# Extend PTC code to use "proxy flux" method

XMLWordPrintable

#### Details

• Story
• Status: To Do
• Resolution: Unresolved
• None
• None
• None
• Data Release Production
• No

#### Description

Extend DM-26784 to use czw "proxy flux" method to deal with (I think?) gaps in photodiode data, or maybe this is to be able to provide corrections when there's no photodiode data at all? Not quite sure, Chris and I can work it out when it's time to do this one.

Also this ticket should work out how to configure the interplay between config options for this and using the photodiode data.

#### Activity

Christopher Waters added a comment - -

Here's an actual description of the proxy flux.  We have two measurements for the linearity, an independent variable (a photodiode charge or an exposure time, called X below), and a dependent variable (the measured flux, called F below).
We know/strongly suspect that F isn't linear in X, such that F = g0 + g1*X + g2*X^2 + ....  When X is small, we're in a linear regime, so we can ignore g2 and higher order terms.  The DM-26845 linearity code does this by filtering F, using two config options, such that only values minLinearAdu < F < maxLinearAdu are retained.  minLinearAdu should likely be set to zero, but due to the use of neutral density filters, a non-zero value may be necessary (possibly only when X is the exposure time).

The filtered values, f and x, are then fit with a linear fit f = h0 + h1*x.  With this, the full set of X can be converted into the proxy flux L, by calculating L = h0 + h1 * X.  In this transformed coordinate, F = k0 + k1*L + k2*L^2 + ..., which is identical to what we had before, but with the result that k0 = 0 and k1 = 1.  This removes any need for rescaling the final measured linearity, and moves the problem to the regime of "measured flux" as a function of "ideal linear flux".  This also makes the fits independent of the scaling of X, so exposure time and photodiode results can be directly compared.

Christopher Waters added a comment - - Here's an actual description of the proxy flux.  We have two measurements for the linearity, an independent variable (a photodiode charge or an exposure time, called X  below), and a dependent variable (the measured flux, called F  below). We know/strongly suspect that F  isn't linear in X , such that F = g0 + g1*X + g2*X^2 + ... .  When X  is small, we're in a linear regime, so we can ignore g2  and higher order terms.  The DM-26845 linearity code does this by filtering F , using two config options, such that only values minLinearAdu < F < maxLinearAdu  are retained.  minLinearAdu  should likely be set to zero, but due to the use of neutral density filters, a non-zero value may be necessary (possibly only when X  is the exposure time). The filtered values, f  and x , are then fit with a linear fit f = h0 + h1*x .  With this, the full set of X  can be converted into the proxy flux L , by calculating L = h0 + h1 * X .  In this transformed coordinate, F = k0 + k1*L + k2*L^2 + ... , which is identical to what we had before, but with the result that k0 = 0  and k1 = 1 .  This removes any need for rescaling the final measured linearity, and moves the problem to the regime of "measured flux" as a function of "ideal linear flux".  This also makes the fits independent of the scaling of X , so exposure time and photodiode results can be directly compared.

#### People

Unassigned
Merlin Fisher-Levine
Andrés Alejandro Plazas Malagón, Christopher Waters, Merlin Fisher-Levine