# Add spline fit to ISR linearizers

XMLWordPrintable

#### Details

• Type: Improvement
• Status: Invalid
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Team:
Data Release Production

#### Description

It has become clear that, as discussed in Astier, et.al., we need to correct the non-linearity of the ASPIC amplifiers.  I created a linearizer with the current cubic polynomial fit using measurePhotonTransferCurve.py, then applied it using the ISR and re-ran measurePhotonTransferCurve.py.  It did not correct the "bump" around 50,000 ADU, as shown in the attached NonLinearity_R22S11_C04_25Aug20.png.  Astier, et.al. recommend using a spline fit to better capture the nature of the bump.  I implemented this in a notebook at NCSA at:

 /project/cslage/BOT_lspdev/notebooks/Linearity_Study_Sat_02Sep20.ipynb

and also uploaded it to git hub at:

 https://github.com/craiglagegit/ScratchStuff/blob/master/notebooks/Linearity_Study_Sat_02Sep20.ipynb

It does a much better job at correcting the bump, although not as good as in Pierre's paper. You can see the improved correction in the attached NonLinearity_Correction_R22S11_C04_02Sep20.png.  Both of these plots are analogous to Figure 3 in Astier, et.al.

Note that the expTime data in this notebook was generated by applying the MONDIODE correction.  In order to do this, I modified ptc.py with the following lines.  While I added "fudge factors" for three of the neutral density filters, I think this is not that critical since I ended up not using the low flux points in the spline fit.  Please contact me if any of this is not clear.  I think the next step is to implement the spline correction, which I think Chris Waters may already be working on.  Then we can try correcting the flux in the ISR using the spline fit and re-do the PTC curves.

 # Lage - 24Aug20 changes below to include mondiode  md1 = exp1.getMetadata() md2 = exp2.getMetadata() filter2 = md1['FILTER2'].split('D')[2] mondiodeNormalizer = 3.0E-9 # This puts the exptime back in the normal range  try:  mondiode = (md1['MONDIODE'] + md2['MONDIODE']) / 2.0 / mondiodeNormalizer except:  continue useMondiode = True if useMondiode:  if filter2 == '1.0':  fudgeFactor = 0.98 # Empirically determined fudge factor to compensate for ND filter error   mondiode *= fudgeFactor  if filter2 == '0.5':  fudgeFactor = 0.9876 # Empirically determined fudge factor to compensate for ND filter error   mondiode *= fudgeFactor  if filter2 == '0.3':  fudgeFactor = 0.9961 # Empirically determined fudge factor to compensate for ND filter error   mondiode *= fudgeFactor  expTime = expTime * mondiode 

#### Activity

Hide
Christopher Waters added a comment -

Useful information that I'll link to the other ticket to save time.

Show
Christopher Waters added a comment - Useful information that I'll link to the other ticket to save time.

#### People

Assignee:
Christopher Waters
Reporter:
Craig Lage
Reviewers:
Andrés Alejandro Plazas Malagón, Merlin Fisher-Levine
Watchers:
Christopher Waters, Craig Lage