OverscanModel

class lsst.ip.isr.OverscanModel

Bases: object

Base class for handling model/data fit comparisons. This handles all of the methods needed for the lmfit Minimizer to run.

Methods Summary

difference(params, signal, data, error, ...)

Calculate the flattened difference array between model and data.

loglikelihood(params, signal, data, error, ...)

Calculate log likelihood of the model.

model_results(params, signal, num_transfers)

Generate a realization of the overscan model, using the specified fit parameters and input signal.

negative_loglikelihood(params, signal, data, ...)

Calculate negative log likelihood of the model.

rms_error(params, signal, data, error, ...)

Calculate RMS error between model and data.

Methods Documentation

difference(params, signal, data, error, *args, **kwargs)

Calculate the flattened difference array between model and data.

Parameters:
paramslmfit.Parameters

Object containing the model parameters.

signalnp.ndarray, (nMeasurements)

Array of image means.

datanp.ndarray, (nMeasurements, nCols)

Array of overscan column means from each measurement.

errorfloat

Fixed error value.

*args

Additional position arguments.

**kwargs

Additional keyword arguments.

Returns:
differencenp.ndarray, (nMeasurements*nCols)

The rms error between the model and input data.

loglikelihood(params, signal, data, error, *args, **kwargs)

Calculate log likelihood of the model.

Parameters:
paramslmfit.Parameters

Object containing the model parameters.

signalnp.ndarray, (nMeasurements)

Array of image means.

datanp.ndarray, (nMeasurements, nCols)

Array of overscan column means from each measurement.

errorfloat

Fixed error value.

*args

Additional position arguments.

**kwargs

Additional keyword arguments.

Returns:
logLfloat

The log-likelihood of the observed data given the model parameters.

static model_results(params, signal, num_transfers, start=1, stop=10)

Generate a realization of the overscan model, using the specified fit parameters and input signal.

Parameters:
paramslmfit.Parameters

Object containing the model parameters.

signalnp.ndarray, (nMeasurements)

Array of image means.

num_transfersint

Number of serial transfers that the charge undergoes.

startint, optional

First overscan column to fit. This number includes the last imaging column, and needs to be adjusted by one when using the overscan bounding box.

stopint, optional

Last overscan column to fit. This number includes the last imaging column, and needs to be adjusted by one when using the overscan bounding box.

Returns:
resultsnp.ndarray, (nMeasurements, nCols)

Model results.

negative_loglikelihood(params, signal, data, error, *args, **kwargs)

Calculate negative log likelihood of the model.

Parameters:
paramslmfit.Parameters

Object containing the model parameters.

signalnp.ndarray, (nMeasurements)

Array of image means.

datanp.ndarray, (nMeasurements, nCols)

Array of overscan column means from each measurement.

errorfloat

Fixed error value.

*args

Additional position arguments.

**kwargs

Additional keyword arguments.

Returns:
negativelogLfloat

The negative log-likelihood of the observed data given the model parameters.

rms_error(params, signal, data, error, *args, **kwargs)

Calculate RMS error between model and data.

Parameters:
paramslmfit.Parameters

Object containing the model parameters.

signalnp.ndarray, (nMeasurements)

Array of image means.

datanp.ndarray, (nMeasurements, nCols)

Array of overscan column means from each measurement.

errorfloat

Fixed error value.

*args

Additional position arguments.

**kwargs

Additional keyword arguments.

Returns:
rmsfloat

The rms error between the model and input data.