To calculate a fit that is independent of time, I examined the linearization with respect to the rate (DN/s).
We want r_ideal = DN/s = Constant
But due to non-linearity, what we see is r_obs = Dn/s = a0 + a1*DN + a2*Dn^2
To eliminate time we can use r_ideal/r_obs to find a DN correction factor
We will define the constant as the maximum rate. To find the constant in r_ideal, fit a polynomial to the rate vs DN for each pixel in the array, take the derivative of polynomial, and find the root. This result is DN_max. Plug this value back into the polynomial to find r_max:
r_max = a0 + a1*DN_max + a2*(DN_max^2)
I then created an array of the a0, a1, a2, and r_max values at each pixel (this file is called linearity_corr.fits).
This array can then be used to linearize any array using the equations:
> DN_correction_factor = (1/((a0/r_max) + ((a1*DN_org)/r_max) + ((a2*(DN_org^2))/r_max))
> DN_linearized = DN_correction_factor*DN_org
An IDL program called linearization_corr.pro, which utilize the above equations, has been uploaded onto the Everything EXES Dropbox under /analysis/cd17/linearization/, along with linearity_corr.fits. The IDL program requires you to input a text file with a list of images, the directory where the images are located, and the prefix name of the files. This is described at the top of the IDL program.
* One known issue with this program is that the files used to create the linearization array did not have significant signal in the upper and lower parts of the frame, which means that the corrections on those pixels are not very good.
Below are examples of single pixels on images with different egos and frame time patterns that have had their individual frames linearized using linearization_corr.pro.
Example 1: 25 1 egos (N2 S0 N3 S0 N3 S0 N1 D0); Frame Time = 0.5s
Example 2: 6 1 egos (N0 S0 N0 S0 N0 S0 D0); Frame Time = 1s


1 comment:
We're we at a long wavelength where the orders are big? If not, that may help us get more signal to upper and lower part of the array. Of course, then we may have too much flux in the middle.
Could you pass the IDL and this post on to Bill Vacca and Melanie Clarke for incorporating in the pipeline?
Post a Comment