Data conversions¶
lsst.cst model for data and format conversions
- lsst.cst.conversions.data_id_to_str(data_id)¶
Converts a data identifier dictionary to a string. Will work on any dict and is not specific to the dataId format.
- lsst.cst.conversions.ids_to_str(data_ids)¶
Transform a numpy array of object identifiers (long integers) to a string of comma-separated values enclosed in parentheses. This is the format required for a WHERE … IN … statement in a TAP query.
- Parameters:
data_ids (
numpy.ndarray) – Array of object IDs (long int).- Returns:
result – String of comma-separated IDs, in parentheses.
- Return type:
- lsst.cst.conversions.nearest_patch_from_ra_dec(ra, dec)¶
Return nearest deepCoadd skymap patch, and its tract, for a given RA and Dec.
- Parameters:
ra (
np.float64) – Right ascension, in decimal degrees.dec (
np.float64) – Declination, in decimal degrees.
- Returns:
nearest_patch – Numerical identifiers for the nearest patch (and its tract), and the distance (in degrees) between the patch center and the input coordinates.
- Return type:
- lsst.cst.conversions.psf_size_at_pixel_xy(psf, bbox, xy)¶
Obtains the size of the PSF in an image at a given xy coordinate.
- Parameters:
psf (
lsst.meas.extensions.psfex.PsfexPsforlsst.meas.algorithms.CoaddPsf) – PSF object from a calexp or deepCoadd respectively; use .getPsf().bbox (
lsst.geom.Box2I) – Bounding box for the calexp or deepCoadd; use .getBBox().xy (
tuple[int,int]) – Pixel coordinates x and y where PSF size is to be evaluated.
- Returns:
psf_size – Size of the PSF in pixels; sigma and FWHM.
- Return type: