[PIPE2D-1129] Convert detectorMap distortion model to fit for scale Created: 13/Dec/22  Updated: 21/Sep/23  Resolved: 21/Sep/23

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: price Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File pipe2d-1129.png    
Sprint: 2DDRP-2023 A
Reviewers: hassan

 Description   

The DoubleDetectorMap currently models the x and y distortion separately. By modeling the distortion with dx, dy, scale and separate higher-order terms, we can link the two distortions, meaning that changes to the trace positions provide direct information to the change in the wavelength solution.



 Comments   
Comment by price [ 11/Jan/23 ]

Added MultipleDistortionsDetectorMap, which allows layering multiple distortions, and added the ability to DoubleDistortion to fit for common scale (in x and y, for both CCDs).

Comment by price [ 11/Jan/23 ]

Here's a plot of the atmospheric B band for a SuNSS imaging fiber close to the moon (visit=72045 fiberId=197), from an exposure with all fibers dominated by continuum and very few good strong sky lines. Before (red line), the spectrum is shifted relative to an example atmospheric transmission model (this one is zd=60, pwv=1, smoothed with sigma=2, and shifted; the zd and pwv are not appropriate for this data, but it provides a wavelength reference). The wavelength calibration after this ticket is much better.

Comment by price [ 08/Feb/23 ]

I've revised the distortion fitting a bit, and am now using a model with translation, rotation and scale in x and y for the left and right CCDs. I found that using separate scale changes for the x and y axes gives a much better fit than using a common scale change. I'm guessing that these are due to small tilts of the CCDs, which slightly change the distance to focus (and therefore the plate scale) linearly across the CCD.
Here's an example:

With single scale:
reduceExposure.adjustDetectorMap INFO: Final result: chi2=877669.365862 dof=1014415 xRMS=0.030667 yRMS=0.184465 xSoften=0.026625 ySoften=0.000000 from 1010950 lines
reduceExposure.adjustDetectorMap INFO: Stats for OH: chi2=32617.887679 dof=6954 xRMS=0.068013 yRMS=0.184465 xSoften=0.000000 ySoften=0.129661 from 3477 lines

With separate x and y scales:

reduceExposure.adjustDetectorMap INFO: Final result: chi2=840824.684295 dof=1014325 xRMS=0.030314 yRMS=0.116222 xSoften=0.026204 ySoften=0.000000 from 1010932 lines
reduceExposure.adjustDetectorMap INFO: Stats for OH: chi2=15031.568652 dof=6814 xRMS=0.067002 yRMS=0.116222 xSoften=0.000000 ySoften=0.059637 from 3407 lines

What this means is that we need to have wavelength references in the exposure in order to get good wavelength solutions.

Comment by price [ 21/Sep/23 ]

Preparing to merge, and here's a high-level summary of the changes:

  • Added reduceExposure output "subtracted", which is an extraction-subtracted image.
  • Added MultipleDistortionsDetectorMap, which layers distortions on top of the model detectorMap.
    + I expect this to eventually replace all other types of distorted detectorMaps, since it's capable of doing what they do and more.
    + Allows us to support empirical pixel-based distortions (e.g., tree rings) in the future.
  • Added support for using trace x positions to constrain distortions in y.
    + Distortion in y is observed as a addition distortion in x of a trace because the traces are sloped.
  • Added RotScaleDistortion and DoubleRotScaleDistortion to fit a translation, rotation and common scale in x and y.
  • Parallelised the fitting in reduceArc.
  • Various optimisations.
Comment by price [ 21/Sep/23 ]

Merged to master.

Generated at Sat Feb 10 16:03:10 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.