Closed cpiaulet closed 2 years ago
If a fresh install doesn't work, can you try replacing the following from the run_eurekaS2 method of the EurekaSpec2Pipeline class in s2_reduce.py
if meta.waverange_start is not None:
# Control the dispersion extraction
# FIX: Does not actually change dispersion direction extraction
if meta.waverange_start is None:
# Only log this once
log.writelog('Editing (in place) the waverange in the input '
'file')
with datamodels.open(filename) as m:
m.meta.wcsinfo.waverange_start = meta.waverange_start
m.save(filename)
if meta.waverange_end is not None:
# Control the dispersion extraction
# FIX: Does not actually change dispersion direction extraction
if meta.waverange_start is None:
# Only log this once
log.writelog('Editing (in place) the waverange in the input '
'file')
with datamodels.open(filename) as m:
m.meta.wcsinfo.waverange_end = meta.waverange_end
m.save(filename)
with
if meta.waverange_start is not None:
# Control the dispersion extraction
# FIX: Does not actually change dispersion direction extraction
if meta.waverange_start is None:
# Only log this once
log.writelog('Editing (in place) the waverange in the input '
'file')
with fits.open(filename, mode='update') as hdulist:
hdulist[1].header['WAVSTART'] = meta.waverange_start
if meta.waverange_end is not None:
# Control the dispersion extraction
# FIX: Does not actually change dispersion direction extraction
if meta.waverange_start is None:
# Only log this once
log.writelog('Editing (in place) the waverange in the input '
'file')
with fits.open(filename, mode='update') as hdulist:
hdulist[1].header['WAVEND'] = meta.waverange_end
Hi! Kevin asked me to respond here because I had a similar, possibly related, problem.
When I updated Eureka! I also updated my conda environment with the new yml file and one of the asdf packages (specifically asdf-astropy) ended up having some missing components for an unknown reason, probably just an installation hiccup. I had the same "missing attributes" error and the solution was to pip uninstall that specific package and reinstall, so I recommend tracing back to which package ASDFValidator comes from and uninstalling/reinstalling.
ok, I uninstalled and re-installed asdf-astropy
and asdf==2.8.1
and now it ran through! Thanks for your help, the issue can be closed.
FAQ check
Instrument
NIRSpec (Stages 1-3)
What happened?
I had to re-install Eureka! from scratch and followed the step-by-step installation instructions in the documentation, then went through the Quickstart to make sure I was not forgetting anything. However, when running Stage 2 on the NIRSpec Tiny dataset, I get a weird error which seems to come from some attribute of an asdf object not being there when the Stage1 FITS file is read in (?). I can't run through Stage 2 yet because of this error.
Error traceback output
What operating system are you using?
Mac OS Monterey 12.0.1
What version of Python are you running?
Python 3.9.7
What Python packages do you have installed?
Code of Conduct