evaluate_nl_polynomial

romanisim.nonlinearity.evaluate_nl_polynomial(counts, coeffs, reversed=False)

Correct the observed DN for non-linearity.

As electrons accumulate, they make it harder for the device to count future electrons due to classical non-linearity. This function converts observed DN to what would have been seen absent non-linearity, using the provided non-linearity coefficients.

Parameters:
countsnp.ndarray[ny, nx] (float)

Number of DN already in pixel

coeffsnp.ndarray[ncoeff, ny, nx] (float)

Coefficients of the non-linearity correction polynomials

reversedbool

If True, the coefficients are in reversed order, which is the order that np.polyval wants them. One can maybe save a little time reversing them once ahead of time.

Returns:
correctednp.ndarray[nx, ny] (float)

The corrected number of DN