single_image_photometry#
- stellarphot.photometry.photometry.single_image_photometry(ccd_image, photometry_settings, fname=None, logline='single_image_photometry:')[source]#
Perform aperture photometry on a single image, with an options for estimating the local background from sigma clipped stats of the counts in an annulus around the aperture. If the sky positions of the sources are in the sourcelist and not the image positions (x,y), then the function will compute the image positions from the sky positions using the WCS of the image. It assumes the input sky positions are in decimal degree units and in the ICRS frame.
- Parameters:
- ccd_image
astropy.nddata.CCDData Image on which to perform aperture photometry. It’s headers must contain DATE-OBS, FILTER, and exposure time in units of seconds (identified by one of the following keywords: EXPOSURE, EXPTIME, TELAPSE, ELAPTIME, ONTIME, or LIVETIME). If AIRMASS is available it will be added to
phot_table. This image must also have a WCS header associated with it if you want to use sky positions as inputs.- photometry_settings
stellarphot.settings.PhotometrySettings Photometry settings to use for the photometry. This includes the camera, observatory, the aperture and annulus radii to use for the photometry, a map of passbands from your filters to AAVSO filter names, and options for the photometry. See
stellarphot.settings.PhotometrySettingsfor more information.- fnamestr, optional (Default: None)
Name of the image file on which photometry is being performed, used for logging and tracking purposes, the file is not accessed or modified.
- loglinestr, optional (Default: “single_image_photometry:”)
String to prepend to all log messages.
- ccd_image
- Returns:
- phot_table
stellarphot.PhotometryData Photometry data for all the locations in which aperture photometry was performed. This may be a subset of the sources in the sourcelist if locations were too close to the edge of the image or to each other for successful aperture photometry. If pixel (x/y) positions were used for the photometry, but a valid WCS header was not available for
ccd_image, the output ‘ra’, ‘dec’, and ‘bjd’ columns will have np.nan values- dropped_sourceslist
This of the star_ids of the sources that fell outside the image or were too close together and did not have photometry performed.
- phot_table
Notes
The default behavior (set by
use_coordinates`="pixel") for determining the placement of apertures is to use the x/y positions in the `sourcelist. This is because in most cases, ra/dec positions are derived from the x/y positions and the WCS of theccd_image. This default reduces unnecessary computation and works if the WCS is not very accurate.When attempting to process multiple images of the same field, it makes sense to use the ra/dec positions in the sourcelist and the WCS of the
ccd_imageto compute the x/y positions on each image individually. In this scenario, theuse_coordinatesparameter should be set to “sky”.