Skip to content
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

Add fix for HASP data sometimes creating a product with no good pixels #47

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

stscirij
Copy link
Collaborator

@stscirij stscirij commented May 8, 2023

When the coadd code creates a product with no good pixels (all have effective_exptime = 0.0), the code will throw an exception when trying to calculate the first and last good wavelengths. This sometimes happens for HASP STIS data, but not for Ullyses data as the preprocessing of STIS data takes care of this. To fix, the first and last good wavelengths are set to None if there are no good pixels. The HASP wrapper code detects this and doesn't try to make a product in such a case, but I didn't add a handler to the Ullyses wrapper since the case doesn't occur (and perhaps throwing an exception is preferred to raise visibility to this case).

making the section that calculated the first and last good wavelengths
throw an exception.  Catch this case.  Since this doesn't happen for
Ullyses data, we don't need to catch this case in the Ullyses wrapper
like we do in HASP
Bug for STIS CCD data where input data maps to beyond the end of the product arrays
Issue for some COS data that hasn't been processed with the latest calcos code so doesn't
have variance columns in data table - use gcounts instead
Copy link
Collaborator

@Rplesha Rplesha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this code on three targets, using the current "main" branch of ullyses-utils and this branch installed:

  1. AV456 - Massive star with FUSE, COS/G130M&G160M, STIS/E140H&E230H&E230M
  2. HD-104237E - T-tauri star in the observed ULLYSES sample with COS/G130M, STIS/G140L&G230L&G430L&G750L
  3. SZ100 - Custom calibrated T-tauri star in the observed ULLYSES sample with STIS/G230L&G430L&G750L

For all three targets, there were no differences in the data compared to DR6 products. In the file headers, the only difference was in the DATE column and the FITS_SW version (I used a more recent version of v5.1.1 compared to v5.0.4).

@jotaylor you'll still need to approve the request though since I am not an owner. EDIT: Apparently you might not need to approve it. I was given approval powers.

@jotaylor jotaylor merged commit 97c2c79 into spacetelescope:main Aug 25, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants