spacetelescope / ullyses

Code to create products for the ULLYSES program
https://ullyses.stsci.edu/
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

Refactor coadd and wrapper #38

Closed stscirij closed 1 year ago

stscirij commented 1 year ago

coadd.py refactored so that it doesn't import any other Ullyses code. Ullyses-specific code moved into wrapper.py, in particular the write function, which is very Ullyses-specific. Ullyses-specific classes created to mixin the ullyses-specific functions. Also made changes to timeseries.py to incorporate the new classes, mainly to get access to target info.

jotaylor commented 1 year ago

@stscirij I tried testing the code and ran into a problem when making the abutted products. It looks like the abut code is looking for a propid attribute, but it isn't in the contributing data instances.

Traceback (most recent call last):
  File "/user/jotaylor/git/ullyses_dp/high_level_science_products/high_level_science_products/make_all_dr_hlsps.py", line 207, in <module>
    make_all_coadd_hlsp()
  File "/user/jotaylor/git/ullyses_dp/high_level_science_products/high_level_science_products/make_all_dr_hlsps.py", line 185, in make_all_coadd_hlsp
    wrapper.main(indir=VETTED_DIR, outdir="/astro/ullyses/jotaylor/test_dr_pipeline/ULLYSES_HLSP/rijdr6", version=VERSION, clobber=True)
  File "/user/jotaylor/linux_anaconda3/envs/ullyses/lib/python3.9/site-packages/ullyses-0.0.1-py3.9.egg/ullyses/wrapper.py", line 450, in main
    abutted = abut(abutted, products[mode])
  File "/user/jotaylor/linux_anaconda3/envs/ullyses/lib/python3.9/site-packages/ullyses-0.0.1-py3.9.egg/ullyses/coadd.py", line 521, in abut
    product_abutted.propid = product_short.propid
AttributeError: 'Ullyses_COSSegmentList' object has no attribute 'propid'

This was processing data in directory /astro/ullyses/all_vetted_data_dr5b/sz98