Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the solar spectrum code to use the included reference spectra #202

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

simonrp84
Copy link
Member

At present, the SolarIrradianceSpectrum class requires the user to enter the filename to the solar spectra they wish to use.
However, Pyspectral comes with a data file containing a solar spectra (2000 ASTM Standard Extraterrestrial Spectrum Reference E-490-00).
This PR updates the class to use the included spectra by default (i.e: In the case that the user does not supply their own via the filename argument. I have also updated the __init__ docstring to make clear that this spectra is used by default.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fd32fe9) 89.27% compared to head (65f0378) 89.27%.
Report is 9 commits behind head on main.

❗ Current head 65f0378 differs from pull request most recent head 14cdb4c. Consider uploading reports for the commit 14cdb4c to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #202   +/-   ##
=======================================
  Coverage   89.27%   89.27%           
=======================================
  Files          23       23           
  Lines        2545     2545           
=======================================
  Hits         2272     2272           
  Misses        273      273           
Flag Coverage Δ
unittests 89.27% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@djhoese
Copy link
Member

djhoese commented Nov 27, 2023

I'm looking at the use of pkg_resources here in my #207 PR and noticed that in a previous PR where I modified MANIFEST.in that this data file is no longer included in the source distribution. I'll need to fix this.

Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should update all the files in doc/ that refer to this variable and use it. The code examples should be much simpler and maybe a note could be added to one or more of these docs pages (I see 3 files using it) to mention what specific file is being used.

@djhoese
Copy link
Member

djhoese commented Nov 27, 2023

Ah nevermind my second to last comment. The files are included!

Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
@djhoese djhoese self-assigned this Nov 27, 2023
@djhoese djhoese merged commit 14cdb4c into pytroll:main Nov 27, 2023
3 of 5 checks passed
@simonrp84 simonrp84 deleted the upd_solspec_filename branch May 1, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants