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

Don't use stsynphot, use plain synphot. #421

Merged
merged 3 commits into from Apr 1, 2021

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented Apr 1, 2021

Swap to synphot instead of pysynphot for poppy, at basically no loss in functionality we care about. This avoids needing to download many GBs of unrelated reference data.

The HST calibration spectral dataset is 4.25 GB. That's not acceptable to force as a required download on all users, given the diverse set of use cases for poppy which are in some cases completely unrelated to HST/JWST data. (e.g. optics lab technology work and cubesat optical modeling)

@mperrin mperrin requested a review from shanosborne April 1, 2021 21:38
@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #421 (8d04154) into develop (c64ab86) will decrease coverage by 0.01%.
The diff coverage is 53.84%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #421      +/-   ##
===========================================
- Coverage    74.27%   74.26%   -0.02%     
===========================================
  Files           18       18              
  Lines         6087     6084       -3     
===========================================
- Hits          4521     4518       -3     
  Misses        1566     1566              
Impacted Files Coverage Δ
poppy/utils.py 52.90% <0.00%> (-0.09%) ⬇️
poppy/instrument.py 67.20% <70.00%> (-0.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c64ab86...8d04154. Read the comment docs.

@mperrin mperrin added this to the 1.0.0 milestone Apr 1, 2021
Copy link
Contributor

@shanosborne shanosborne left a comment

Choose a reason for hiding this comment

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

I'd also look for "stsynphot" in tox.ini and in all the docs' .rst files

@@ -1465,7 +1468,7 @@ def specFromSpectralType(sptype, return_list=False, catalog=None):
import os
cdbs = os.getenv('PYSYN_CDBS')
if cdbs is None:
raise EnvironmentError("Environment variable $PYSYN_CDBS must be defined for stsynphot")
raise EnvironmentError("Environment variable $PYSYN_CDBS must be defined for synphot")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does PYSYN_CDBS also need to be defined for synphot? Or should this line stay stsynphot? I thought it was stsynphot specific, but I may be wrong

Copy link
Contributor

@shanosborne shanosborne left a comment

Choose a reason for hiding this comment

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

Besides my 1 comment, this looks good. And I'll let you test that it also works with the synphot-only webbpsf.

@mperrin
Copy link
Collaborator Author

mperrin commented Apr 1, 2021

That one function - looking up for spectral type to a stellar spectrum - may be the one piece that for now actually does require stsynphot. But that's an optional piece of functionality which many users never use, so I'm OK with that.

@mperrin mperrin merged commit 26b019a into spacetelescope:develop Apr 1, 2021
@mperrin mperrin deleted the use_base_synphot branch April 1, 2021 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants