lsst.meas.algorithms g86b635cae8+734fe384f0
Loading...
Searching...
No Matches
lsst.meas.algorithms.brightStarStamps.BrightStarStamp Class Reference
Inheritance diagram for lsst.meas.algorithms.brightStarStamps.BrightStarStamp:
lsst.meas.algorithms.stamps.AbstractStamp lsst.meas.algorithms.brightStarStamps.BrightStarStamps

Public Member Functions

PropertyList metadata (self)
 
BrightStarStamp factory (cls, MaskedImageF stamp_im, Psf|None psf, SkyWcs|None wcs, PropertyList metadata)
 

Static Public Attributes

Psf psf | None
 
SkyWcs wcs | None
 
int visit | None
 
int detector | None
 
int ref_id | None
 
float ref_mag | None
 
Point2D position | None
 
float focal_plane_radius | None
 
Angle focal_plane_angle | None
 
float scale | None
 
float scale_err | None
 
float pedestal | None
 
float pedestal_err | None
 
float pedestal_scale_cov | None
 
float gradient_x | None
 
float gradient_y | None
 
float global_reduced_chi_squared | None
 
int global_degrees_of_freedom | None
 
float psf_reduced_chi_squared | None
 
int psf_degrees_of_freedom | None
 
float psf_masked_flux_fraction | None
 

Protected Member Functions

PropertyList _getMetadata (self)
 

Static Protected Attributes

dict _metadata_attribute_map
 

Detailed Description

A single postage stamp centered on a bright star.

Attributes
----------
stamp_im : `~lsst.afw.image.MaskedImageF`
    The pixel data for this stamp.
psf : `~lsst.afw.detection.Psf`, optional
    The point-spread function for this star.
wcs : `~lsst.afw.geom.SkyWcs`, optional
    World coordinate system associated with the stamp.
visit : `int`, optional
    Visit number of the observation.
detector : `int`, optional
    Detector ID within the visit.
ref_id : `int`, optional
    Reference catalog ID of the star.
ref_mag : `float`, optional
    Reference catalog magnitude of the star.
position : `~lsst.geom.Point2D`, optional
    Center position of the star on the detector in pixel coordinates.
focal_plane_radius : `float`, optional
    Radial distance from the focal plane center in tangent-plane pixels.
focal_plane_angle : `~lsst.geom.Angle`, optional
    Azimuthal angle on the focal plane (counterclockwise from +X).
scale : `float`, optional
    Flux scaling factor applied to the PSF model.
scale_err : `float`, optional
    Error in the flux scale.
pedestal : `float`, optional
    Background pedestal level.
pedestal_err : `float`, optional
    Error on the pedestal.
pedestal_scale_cov : `float`, optional
    Covariance between pedestal and scale.
gradient_x : `float`, optional
    Background gradient in the X direction.
gradient_y : `float`, optional
    Background gradient in the Y direction.
global_reduced_chi_squared : `float`, optional
    Reduced chi-squared for the global model fit.
global_degrees_of_freedom : `int`, optional
    Degrees of freedom for the global model fit.
psf_reduced_chi_squared : `float`, optional
    Reduced chi-squared for the PSF fit.
psf_degrees_of_freedom : `int`, optional
    Degrees of freedom for the PSF fit.
psf_masked_flux_fraction : `float`, optional
    Fraction of flux masked in the PSF.

Notes
-----
This class is designed to be used with `BrightStarStamps`, which manages
collections of these stamps and handles reading/writing them to FITS files.
The `factory` class method provides a standard interface to construct
instances from image data and metadata, while the `_getMetadata` method
extracts metadata for storage in FITS headers.

Definition at line 45 of file brightStarStamps.py.

Member Function Documentation

◆ _getMetadata()

PropertyList lsst.meas.algorithms.brightStarStamps.BrightStarStamp._getMetadata ( self)
protected
Extract metadata from the stamp's attributes.

This method constructs a `PropertyList` containing metadata
extracted from the stamp's attributes. It is used when writing the
stamp to a FITS file to store relevant metadata in the FITS headers.

Returns
-------
metadata : `PropertyList`
    A `PropertyList` containing the metadata, or `None` if no
    metadata attributes are defined.

Definition at line 151 of file brightStarStamps.py.

◆ factory()

BrightStarStamp lsst.meas.algorithms.brightStarStamps.BrightStarStamp.factory ( cls,
MaskedImageF stamp_im,
Psf | None psf,
SkyWcs | None wcs,
PropertyList metadata )
Construct a `BrightStarStamp` from image data and metadata.

This method provides a standard interface to create a `BrightStarStamp`
from its image data, PSF, WCS, and associated metadata.
It is used by the `BrightStarStamps.readFits` method to construct
individual bright star stamps from FITS files.

Parameters
----------
stamp_im : `~lsst.afw.image.MaskedImageF`
    Masked image for the stamp.
psf : `~lsst.afw.detection.Psf`, optional
    Point-spread function for the stamp.
wcs : `~lsst.afw.geom.SkyWcs`, optional
    World coordinate system for the stamp.
metadata : `PropertyList`
    Metadata associated with the stamp, containing keys for all
    required attributes.

Returns
-------
brightStarStamp : `BrightStarStamp`
    The constructed `BrightStarStamp` instance.

Reimplemented from lsst.meas.algorithms.stamps.AbstractStamp.

Definition at line 182 of file brightStarStamps.py.

◆ metadata()

PropertyList lsst.meas.algorithms.brightStarStamps.BrightStarStamp.metadata ( self)
Return the stamp's metadata as a PropertyList.

Reimplemented in lsst.meas.algorithms.brightStarStamps.BrightStarStamps.

Definition at line 177 of file brightStarStamps.py.

Member Data Documentation

◆ _metadata_attribute_map

dict lsst.meas.algorithms.brightStarStamps.BrightStarStamp._metadata_attribute_map
staticprotected
Initial value:
= {
"VISIT": "visit",
"DETECTOR": "detector",
"REF_ID": "ref_id",
"REF_MAG": "ref_mag",
"POSITION_X": "position.x",
"POSITION_Y": "position.y",
"FOCAL_PLANE_RADIUS": "focal_plane_radius",
"FOCAL_PLANE_ANGLE_DEGREES": "focal_plane_angle",
"SCALE": "scale",
"SCALE_ERR": "scale_err",
"PEDESTAL": "pedestal",
"PEDESTAL_ERR": "pedestal_err",
"PEDESTAL_SCALE_COV": "pedestal_scale_cov",
"GRADIENT_X": "gradient_x",
"GRADIENT_Y": "gradient_y",
"GLOBAL_REDUCED_CHI_SQUARED": "global_reduced_chi_squared",
"GLOBAL_DEGREES_OF_FREEDOM": "global_degrees_of_freedom",
"PSF_REDUCED_CHI_SQUARED": "psf_reduced_chi_squared",
"PSF_DEGREES_OF_FREEDOM": "psf_degrees_of_freedom",
"PSF_MASKED_FLUX_FRACTION": "psf_masked_flux_fraction",
}

Definition at line 128 of file brightStarStamps.py.

◆ detector

int lsst.meas.algorithms.brightStarStamps.BrightStarStamp.detector | None
static

Definition at line 108 of file brightStarStamps.py.

◆ focal_plane_angle

Angle lsst.meas.algorithms.brightStarStamps.BrightStarStamp.focal_plane_angle | None
static

Definition at line 113 of file brightStarStamps.py.

◆ focal_plane_radius

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.focal_plane_radius | None
static

Definition at line 112 of file brightStarStamps.py.

◆ global_degrees_of_freedom

int lsst.meas.algorithms.brightStarStamps.BrightStarStamp.global_degrees_of_freedom | None
static

Definition at line 122 of file brightStarStamps.py.

◆ global_reduced_chi_squared

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.global_reduced_chi_squared | None
static

Definition at line 121 of file brightStarStamps.py.

◆ gradient_x

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.gradient_x | None
static

Definition at line 119 of file brightStarStamps.py.

◆ gradient_y

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.gradient_y | None
static

Definition at line 120 of file brightStarStamps.py.

◆ pedestal

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.pedestal | None
static

Definition at line 116 of file brightStarStamps.py.

◆ pedestal_err

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.pedestal_err | None
static

Definition at line 117 of file brightStarStamps.py.

◆ pedestal_scale_cov

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.pedestal_scale_cov | None
static

Definition at line 118 of file brightStarStamps.py.

◆ position

Point2D lsst.meas.algorithms.brightStarStamps.BrightStarStamp.position | None
static

Definition at line 111 of file brightStarStamps.py.

◆ psf

Psf lsst.meas.algorithms.brightStarStamps.BrightStarStamp.psf | None
static

Definition at line 105 of file brightStarStamps.py.

◆ psf_degrees_of_freedom

int lsst.meas.algorithms.brightStarStamps.BrightStarStamp.psf_degrees_of_freedom | None
static

Definition at line 124 of file brightStarStamps.py.

◆ psf_masked_flux_fraction

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.psf_masked_flux_fraction | None
static

Definition at line 125 of file brightStarStamps.py.

◆ psf_reduced_chi_squared

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.psf_reduced_chi_squared | None
static

Definition at line 123 of file brightStarStamps.py.

◆ ref_id

int lsst.meas.algorithms.brightStarStamps.BrightStarStamp.ref_id | None
static

Definition at line 109 of file brightStarStamps.py.

◆ ref_mag

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.ref_mag | None
static

Definition at line 110 of file brightStarStamps.py.

◆ scale

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.scale | None
static

Definition at line 114 of file brightStarStamps.py.

◆ scale_err

float lsst.meas.algorithms.brightStarStamps.BrightStarStamp.scale_err | None
static

Definition at line 115 of file brightStarStamps.py.

◆ visit

int lsst.meas.algorithms.brightStarStamps.BrightStarStamp.visit | None
static

Definition at line 107 of file brightStarStamps.py.

◆ wcs

SkyWcs lsst.meas.algorithms.brightStarStamps.BrightStarStamp.wcs | None
static

Definition at line 106 of file brightStarStamps.py.


The documentation for this class was generated from the following file: