JWSTSourceCatalog
- class jwst.source_catalog.source_catalog.JWSTSourceCatalog(model, catalog, kernel_fwhm, aperture_params, abvega_offset, ci_star_thresholds)[source]
Bases:
objectClass for the JWST source catalog.
- Parameters:
- model
ImageModel The input
ImageModel. The data is assumed to be background-subtracted. Units are expected to be Jy.- catalog
QTable Source catalog table, e.g., as output from
make_tweakreg_catalog().- kernel_fwhmfloat
The full-width at half-maximum (FWHM) of the 2D Gaussian kernel. This is needed to calculate the DAOFind sharpness and roundness properties (DAOFind uses a special kernel that sums to zero).
- aperture_paramsdict
A dictionary containing the aperture parameters (radii, aperture corrections, and background annulus inner and outer radii).
- abvega_offsetfloat
Offset to convert from AB to Vega magnitudes. The value represents
m_AB - m_Vega.- ci_star_thresholdsarray-like of 2 floats
The concentration index thresholds for determining whether a source is a star. The first threshold corresponds to the concentration index calculated from the smallest and middle aperture radii (see
aperture_params). The second threshold corresponds to the concentration index calculated from the middle and largest aperture radii. An object is considered extended if both concentration indices are greater than the corresponding thresholds, otherwise it is considered a star.
- model
Notes
model.erris assumed to be the total error array corresponding to the input sciencemodel.dataarray. It is assumed to include all sources of error, including the Poisson error of the sources, and have the same shape and units as the science data array.Attributes Summary
Return aperture local background fluxes (per pixel).
Return aperture local background flux errors (per pixel).
Return the aperture-corrected total AB magnitude.
Return the aperture-corrected total AB magnitude error.
Return the aperture-corrected total flux for sources.
Return the aperture-corrected total flux error for sources.
Return the aperture-corrected total Vega magnitude.
Return the aperture-corrected total Vega magnitude error.
Return the aperture AB magnitude column names.
Return the aperture AB magnitude column descriptions.
Update the column_desc dictionary to include background flux information.
Return the aperture flux column names.
Return the aperture flux column descriptions.
Return the aperture Vega magnitude column names.
Return the aperture Vega magnitude column descriptions.
Build the final source catalog.
Return the concentration indices column descriptions.
Return the column names of the three concentration indices.
Return the column names in order for the final source catalog.
Determine the concentration indices.
Update the column_desc dictionary to include DAO starfinder computed quantities.
Return a boolean indicating whether the source is extended.
Return the isophotal AB magnitudes.
Return the isophotal AB magnitude errors.
Return the isophotal Vega magnitudes.
Return the isophotal Vega magnitude errors.
Return the distance in pixels to the nearest neighbor for each source.
Return the label number of the nearest neighbor for each source.
Compute the DAOFind source roundness statistic based on symmetry.
Update the
column_descdictionary to include column names and descriptions.Compute the DAOFind source sharpness statistic.
Compute the sky coordinate of the source centroid.
Compute the orientation of the source major axis.
Return the (x, y) source centroids defined from the segmentation image.
Methods Summary
convert_flux_to_abmag(flux, flux_err)Convert flux (and error) to AB magnitude (and error).
convert_jy_to_mjysr(model)Convert data and errors from Jy to MJy/sr, and from
Quantityto ndarray.convert_mjysr_to_jy(model)Convert data and errors from MJy/sr to Jy, and into
Quantityobjects.format_columns(catalog)Format the values in the output catalog.
Calculate the aperture photometry and set the values as dynamic attributes.
Set the concentration indices as dynamic attributes.
Calculate the segment-based source photometry and morphologies.
Attributes Documentation
- aper_bkg_flux
Return aperture local background fluxes (per pixel).
- Returns:
QuantityThe aperture local background fluxes.
- aper_bkg_flux_err
Return aperture local background flux errors (per pixel).
- Returns:
QuantityThe aperture local background flux errors.
- aper_total_abmag
Return the aperture-corrected total AB magnitude.
Should be used only for unresolved sources.
- Returns:
- ndarray
The aperture-corrected total AB magnitude.
- aper_total_abmag_err
Return the aperture-corrected total AB magnitude error.
Should be used only for unresolved sources.
- Returns:
- ndarray
The aperture-corrected total AB magnitude error.
- aper_total_flux
Return the aperture-corrected total flux for sources.
Computed based on the flux in largest aperture. Should be used only for unresolved sources.
- Returns:
QuantityThe aperture-corrected total flux
- aper_total_flux_err
Return the aperture-corrected total flux error for sources.
Computed based on the flux in largest aperture. Should be used only for unresolved sources.
- Returns:
QuantityThe aperture-corrected total flux error
- aper_total_vegamag
Return the aperture-corrected total Vega magnitude.
Should be used only for unresolved sources.
- Returns:
- ndarray
The aperture-corrected total Vega magnitude.
- aper_total_vegamag_err
Return the aperture-corrected total Vega magnitude error.
Should be used only for unresolved sources.
- Returns:
- ndarray
The aperture-corrected total Vega magnitude error.
- aperture_abmag_colnames
Return the aperture AB magnitude column names.
- Returns:
- list of str
The aperture AB magnitude column names.
- aperture_abmag_descriptions
Return the aperture AB magnitude column descriptions.
- Returns:
- list of str
The aperture AB magnitude column descriptions.
- aperture_colnames
Update the column_desc dictionary to include background flux information.
- Returns:
- colnameslist of str
A list of the column names that were updated by this function.
- aperture_flux_colnames
Return the aperture flux column names.
- Returns:
- list of str
The aperture flux column names.
- aperture_flux_descriptions
Return the aperture flux column descriptions.
- Returns:
- list of str
The aperture flux column descriptions.
- aperture_vegamag_colnames
Return the aperture Vega magnitude column names.
- Returns:
- list of str
The aperture Vega magnitude column names.
- aperture_vegamag_descriptions
Return the aperture Vega magnitude column descriptions.
- Returns:
- list of str
The aperture Vega magnitude column descriptions.
- ci_colname_descriptions
Return the concentration indices column descriptions.
- Returns:
- list of str
The concentration indices column descriptions.
- ci_colnames
Return the column names of the three concentration indices.
- Returns:
- list of str
The concentration indices column names.
- colnames
Return the column names in order for the final source catalog.
- Returns:
- list of str
The column names.
- concentration_indices
Determine the concentration indices.
These are calculated as the flux ratios of:
the middle / smallest aperture radii/EE, e.g.,
CI_50_30 = aper50_flux / aper30_fluxthe largest / middle aperture radii/EE, e.g.,
CI_70_50 = aper70_flux / aper50_fluxthe largest / smallest aperture radii/EE, e.g.,
CI_70_30 = aper70_flux / aper30_flux
- Returns:
- list of float
The concentration indices.
- extras_colnames
Update the column_desc dictionary to include DAO starfinder computed quantities.
- Returns:
- colnameslist of str
A list of the column names that were updated by this function.
- is_extended
Return a boolean indicating whether the source is extended.
- Returns:
- ndarray
A boolean array where
Truevalues denote extended sources.
- isophotal_abmag
Return the isophotal AB magnitudes.
- Returns:
- ndarray
The isophotal AB magnitudes.
- isophotal_abmag_err
Return the isophotal AB magnitude errors.
- Returns:
- ndarray
The isophotal AB magnitudes.
- isophotal_vegamag
Return the isophotal Vega magnitudes.
- Returns:
- ndarray
The isophotal Vega magnitudes.
- isophotal_vegamag_err
Return the isophotal Vega magnitude errors.
- Returns:
- ndarray
The isophotal Vega magnitude errors.
- nn_dist
Return the distance in pixels to the nearest neighbor for each source.
Returns NaN if there is only one detected source or for non-finite xypos.
- Returns:
QuantityThe distances in pixels to the nearest neighbors.
- nn_label
Return the label number of the nearest neighbor for each source.
A label value of -1 is returned if there is only one detected source and for sources with a non-finite xcentroid or ycentroid.
- Returns:
- ndarray
The label number of the nearest neighbor.
- roundness
Compute the DAOFind source roundness statistic based on symmetry.
The roundness characteristic computes the ratio of a measure of the bilateral symmetry of the object to a measure of the four-fold symmetry of the object.
“Round” objects have a
roundnessclose to 0, generally between -1 and 1.- Returns:
- ndarray
The DAOFind source roundness statistic.
- segment_colnames
Update the
column_descdictionary to include column names and descriptions.- Returns:
- colnameslist of str
A list of the column names that were updated by this function.
- sharpness
Compute the DAOFind source sharpness statistic.
The sharpness statistic measures the ratio of the difference between the height of the central pixel and the mean of the surrounding non-bad pixels to the height of the best fitting Gaussian function at that point.
Stars generally have a
sharpnessbetween 0.2 and 1.0.- Returns:
- ndarray
The DAOFind source sharpness statistic.
- sky_centroid
Compute the sky coordinate of the source centroid.
The output coordinate frame is the same as the input
wcs.
- sky_orientation
Compute the orientation of the source major axis.
- Returns:
QuantityThe position angle of the source major axis, measured East of North.
- xypos
Return the (x, y) source centroids defined from the segmentation image.
- Returns:
- xyposndarray
A 2D array of the (x, y) source positions.
Methods Documentation
- static convert_flux_to_abmag(flux, flux_err)[source]
Convert flux (and error) to AB magnitude (and error).
- Parameters:
- flux, flux_err
Quantity The input flux and error arrays in units of Jy.
- flux, flux_err
- Returns:
- abmag, abmag_errndarray
The output AB magnitude and error arrays.
- static convert_jy_to_mjysr(model)[source]
Convert data and errors from Jy to MJy/sr, and from
Quantityto ndarray.
- static convert_mjysr_to_jy(model)[source]
Convert data and errors from MJy/sr to Jy, and into
Quantityobjects.