pstack

wfc3tools.pstack.pstack(filename, column=0, row=0, extname='sci', units='counts', title=None, xlabel=None, ylabel=None, plot=True)[source]

A function to plot the statistics of one pixels up the IR ramp image. Original implementation in the iraf nicmos package. Pixel values here are 0 based, not 1 based.

Parameters:
filenamestr

Input MultiAccum image name. This should be either a _ima or _raw file, containing all the data from multiple readouts. You must specify just the file name, with no extension designation.

columnint, default=0

The column index of the pixel to be plotted.

rowint, default=0

The row index of the pixel to be plotted.

extnamestr, default=”sci”

Extension name (EXTNAME keyword value) of data to plot. Allowed values are “sci”, “err”, “dq”, “samp”, and “time”.

unitsstr, default=”counts”

Plot “sci” or “err” data in units of counts or countrate (“rate”). Input data can be in either unit; conversion will be performed automatically. Ignored when plotting “dq”, “samp”, or “time” data. Allowed values are “counts” and “rate”.

titlestr, default=None

Title for the plot. If left blank, the name of the input image, appended with the extname and column and row being plotted, is used.

xlabelstr, default=None

Label for the X-axis of the plot. If left blank, a suitable default is generated.

ylabelstr, default=None

Label for the Y-axis of the plot. If left blank, a suitable default based on the plot units and the extname of the data is generated.

plotbool, default=True

If False, return data and do not plot.

Returns:
xaxisnumpy.ndarray

Array of x-axis values that will be plotted.

yaxisnumpy.ndarray

Array of y-axis values that will be plotted as specified by ‘units’.

Examples

>>> from wfc3tools import pstack
>>> inputFilename = 'ibh719grq_ima.fits'
>>> x, y = 100, 25
>>> xdata, ydata = pstack(inputFilename,
                          column=x,
                          row=y,
                          extname="sci",
                          units="counts",
                          title="",
                          xlabel="",
                          ylabel="")