Many updates, detailed below. I have tested this code and used it to create draft DR7 products, so I know it works :)
apply_cos_shifts.py: if overwrite is True, remove calcos products and re-calibrate.
new script combine_header_keys.py: This creates a new abstract class whose sole purpose is to combine header keywords. The reason I pulled this out into its own script was that multiple scripts used this logic and it was becoming untenable to keep updating duplicated code. The abstract class logic is the same as was used before, just in its own container.
coadd.py: Have SegmentList inherit from new KeyBlender class and remove the code that was used to combine header keywords since that is in KeyBlender.
ullyses_hlsp.py: Inherit from KeyBlender and remove combine header keyword logic. Fix a couple header keys in XSU data.
ullyses_coadd_abut_wrapper.py: Again, remove the combine header keywords logic and use it as inherited from coadd.SegmentList. Fix data type checking to work with np.int data (this will be obsolete once we merge Robert's HASP abut code)
create_ullyses_hlsp.py: Add a wrapper function to create new XSU HLSPs.
stis_coadd_x1d.py, timeseries.py: Update API to coadd to use new inpath and infiles varnames.
stisblazefix_wrapper.py, unflag_echelle_orders.py: Fix typos and logic mistakes
Add ability to include new 1st header COMMENT to keep track of special calibration the ULLYSES team applied to each dataset.
timeseries_wrapper.py: Improve, but leave unchanged, some functionality, fix the expected naming scheme of yaml files, rename serendipitous->exp & monitoring->subexp, add more sophisticated data checking to ensure correct inputs are being used.
Many updates, detailed below. I have tested this code and used it to create draft DR7 products, so I know it works :)
apply_cos_shifts.py
: if overwrite is True, remove calcos products and re-calibrate.combine_header_keys.py
: This creates a new abstract class whose sole purpose is to combine header keywords. The reason I pulled this out into its own script was that multiple scripts used this logic and it was becoming untenable to keep updating duplicated code. The abstract class logic is the same as was used before, just in its own container.coadd.py
: Have SegmentList inherit from new KeyBlender class and remove the code that was used to combine header keywords since that is in KeyBlender.ullyses_hlsp.py
: Inherit fromKeyBlender
and remove combine header keyword logic. Fix a couple header keys in XSU data.ullyses_coadd_abut_wrapper.py
: Again, remove the combine header keywords logic and use it as inherited from coadd.SegmentList. Fix data type checking to work with np.int data (this will be obsolete once we merge Robert's HASP abut code)create_ullyses_hlsp.py
: Add a wrapper function to create new XSU HLSPs.stis_coadd_x1d.py, timeseries.py
: Update API to coadd to use newinpath
andinfiles
varnames.stisblazefix_wrapper.py, unflag_echelle_orders.py
: Fix typos and logic mistakestimeseries_wrapper.py
: Improve, but leave unchanged, some functionality, fix the expected naming scheme of yaml files, rename serendipitous->exp & monitoring->subexp, add more sophisticated data checking to ensure correct inputs are being used.