-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efc4d42
commit accfa1c
Showing
6 changed files
with
99 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
# Update output format to enable automatic inline annotations. | ||
- name: Run Ruff | ||
run: ruff check --output-format=github . |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import os | ||
import numpy as np | ||
"""data_io | ||
Tools for reading data files included in this repository. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
"""main | ||
This module executes the simulation and runs the plotting | ||
functions. It emulates src/Hydrated_Regolith_Spectra_Generator_and_Retrieval.m | ||
""" | ||
from matplotlib import pyplot as plt | ||
import numpy as np | ||
from pprint import pprint as print | ||
from pprint import pprint | ||
|
||
from simulator import Hapke, get_sample_grid | ||
from .simulator import Hapke, get_sample_grid | ||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
WLS = get_sample_grid() | ||
Refl = np.array([np.random.randn()*x for x in WLS]) | ||
Refl = np.array([np.random.randn() * x for x in WLS]) | ||
R = Hapke(Refl, WLS) | ||
print(WLS) | ||
print(Refl) | ||
print(R) | ||
pprint(WLS) | ||
pprint(Refl) | ||
pprint(R) | ||
plt.figure() | ||
plt.plot(WLS,Refl,WLS,R) | ||
plt.plot(WLS, Refl, WLS, R) | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters