-
Notifications
You must be signed in to change notification settings - Fork 7
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
desisurvey.ephem is broken in current DESI releases #147
Comments
With desimodules/22.1b and from desisurvey.ephem import get_ephem
ephem = get_ephem()
INFO:iers.py:82:freeze_iers: Freezing IERS table used by astropy time, coordinates.
Traceback (most recent call last):
File "/global/common/software/desi/cori/desiconda/20211217-2.0.0/code/desisurvey/master/py/desisurvey/config.py", line 242, in set_output_path
self._output_path = output_path.format(**os.environ)
KeyError: 'DESISURVEY_OUTPUT'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/global/common/software/desi/cori/desiconda/20211217-2.0.0/code/desisurvey/master/py/desisurvey/ephem.py", line 76, in get_ephem
filename = config.get_path('ephem_{}_{}.fits'.format(start_iso, stop_iso))
File "/global/common/software/desi/cori/desiconda/20211217-2.0.0/code/desisurvey/master/py/desisurvey/config.py", line 276, in get_path
self.set_output_path(self.output_path())
File "/global/common/software/desi/cori/desiconda/20211217-2.0.0/code/desisurvey/master/py/desisurvey/config.py", line 244, in set_output_path
raise ValueError(
ValueError: Environment variable not set for output_path: 'DESISURVEY_OUTPUT' |
So two different failure modes! |
Setting However, there are still two serious problems:
|
I'd prefer the code to be robust to $DESISURVEY_OUTPUT not being set, defaulting to something like using the current directory. If it really must be set for some functionality, I'd prefer it to at least not break imports, and generate a meaningful exception if the code that requires it is run.
Oversight, not intention |
In this case with the recent tag the failure is at get_ephem() stage, not at import stage. I agree that DESISURVEY_OUTPUT could default to the current directory if we wanted that. This particular operation will be quite slow unless you're using a cached ephemerides file in DESISURVEY_OUTPUT, though (5 min?), and most existing code using this immediately writes out the ephemirides to a file which is then loaded in the future. So it's not so crazy for it to complain that DESISURVEY_OUTPUT isn't set. |
Is there a standard ephem file at NERSC, say used by survey operations? |
@sbailey, this may be related to your question today about |
With desimodules/22.1b (
astropy==5.0
;desisurvey==0.18.0
):The text was updated successfully, but these errors were encountered: