get_box_weights
- jwst.extract_1d.soss_extract.soss_boxextract.get_box_weights(centroid, n_pix, shape, cols)[source]
Return the weights of a box aperture given the centroid and the width of the box in pixels.
All pixels will have the same weights except at the ends of the box aperture.
- Parameters:
- centroidndarray
Position of the centroid (in rows). Same shape as
cols.- n_pixfloat
Width of the extraction box in pixels.
- shapetuple
Shape of the output image, i.e.,
(n_row, n_column).- colsarray
Column indices (int) of good columns. Used if the centroid is defined for specific columns or a sub-range of columns.
- Returns:
- weightsndarray
An array of pixel weights to use with the box extraction.