extract_stars(data, catalogs, size=(11, 11))¶
Extract cutout images centered on stars defined in the input catalog(s).
Stars where the cutout array bounds partially or completely lie outside of the input
dataimage will not be extracted.
NDDataor list of
NDDataobject or a list of
NDDataobjects containing the 2D image(s) from which to extract the stars. If the input
catalogscontain only the sky coordinates (i.e., not the pixel coordinates) of the stars then each of the
NDDataobjects must have a valid
Table, list of
A catalog or list of catalogs of sources to be extracted from the input
data. To link stars in multiple images as a single source, you must use a single source catalog where the positions defined in sky coordinates.
If a list of catalogs is input (or a single catalog with a single
NDDataobject), they are assumed to correspond to the list of
NDDataobjects input in
data(i.e., a separate source catalog for each 2D image). For this case, the center of each source can be defined either in pixel coordinates (in
ycolumns) or sky coordinates (in a
skycoordcolumn containing a
SkyCoordobject). If both are specified, then the pixel coordinates will be used.
If a single source catalog is input with multiple
NDDataobjects, then these sources will be extracted from every 2D image in the input
data. In this case, the sky coordinates for each source must be specified as a
SkyCoordobject contained in a column called
NDDataobject in the input
datamust also have a valid
wcsattribute. Pixel coordinates (in
ycolumns) will be ignored.
Optionally, each catalog may also contain an
idcolumn representing the ID/name of stars. If this column is not present then the extracted stars will be given an
idnumber corresponding the the table row number (starting at 1). Any other columns present in the input
catalogswill be ignored.
- sizeint or array_like (int), optional
The extraction box size along each axis. If
sizeis a scalar then a square box of size
sizewill be used. If
sizehas two elements, they should be in
(ny, nx)order. The size must be greater than or equal to 3 pixel for both axes. Size must be odd in both axes; if either is even, it is padded by one to force oddness.