spacetelescope / calcos

Calibration for HST/COS.
https://hst-docs.stsci.edu/cosdhb/chapter-3-cos-calibration
3 stars 27 forks source link

Twozone extraction with BACKCORR=OMIT #236

Open jotaylor opened 7 months ago

jotaylor commented 7 months ago

CalCOS does not work when using the TWOZONE extraction method and BACKCORR set to OMIT (see #183 ). These changes enable this combination to be used correctly.

Testing was performed on dataset lcox08k2q. Both segment corrtags were calibrated like so:

  1. v3.4.8, with XTRCTALG=TWOZONE and BACKCORR=PERFORM
  2. v3.4.8, with XTRCTALG=TWOZONE and BACKCORR=OMIT
  3. fork version, with XTRCTALG=TWOZONE and BACKCORR=PERFORM
  4. fork version with XTRCTALG=TWOZONE and BACKCORR=OMIT

As expected, test case 2 failed. Cases 1 and 3 yielded identical x1ds. Case 4 did not crash, and produced a reasonable x1d. The only differences between cases 1/3 and 4 stem from the lack of a background correction in case 4. Using the difference between the NET arrays in cases 4 and 1/3, let's call this NET_DIFF, this is nearly identical to the BACKGROUND array in case 1/3. The maximum difference between NET_DIFF and case 1/3 BACKGROUND is on the order of e-5, and average difference is e-7 (see attached plot).

This seems to suggest that the only difference between case 1/3 & 4 is due to the absence of background correction in case 4, as expected.

comparison

Rplesha commented 7 months ago

Related to https://jira.stsci.edu/browse/COSPIP-24 FYI!