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

Add gratings to level3 list, use new HASP abut as well #83

Closed jotaylor closed 11 months ago

jotaylor commented 11 months ago

We only used the new HASP abut strategy for level 4 (preview-spec) products. We neglected to use it also for level 3 (aspec). Because of this, aspecs were being created in the same method as previous DRs. The gratings that contribute to each aspec were hardcoded, because they are grouped by resolution. However, as we added more non-ULLYSES data (i.e. AR data), we did not update this hardcoded list. This led to some AR modes not being included in aspecs.

There were two solutions. 1) Simply add the missing gratings to the hardcoded list. This does not address the issues that level 3 products are using the old abut strategy. 2) Add missing gratings to hardcoded list AND use new abut strategy. This is what I did. *Note that I also followed the currently implemented logic which is to NOT make an aspec when only 1 mode exists for a resolution grouping. I checked with ULLYSES leads that this behavior is desired for aspecs.

I have tested 3 example cases: 1 where we were missing 2 modes (AV-304), one where no modes were missing (AV-456), and one where only 1 grating contributes to the target at all (CVSO-35). They all changed as expected which is: