Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-42080: Add effTime to computeExposureSummaryStats #726

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
98 changes: 89 additions & 9 deletions python/lsst/afw/image/_exposureSummaryStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ class ExposureSummaryStats(Storable):
(pixels).
"""

effTime: float = float('nan')
"""Effective exposure time calculated from psfSigma, skyBg, and
zeroPoint (seconds).
"""

effTimePsfSigmaScale: float = float('nan')
"""PSF scaling of the effective exposure time."""

effTimeSkyBgScale: float = float('nan')
"""Sky background scaling of the effective exposure time."""

effTimeZeroPointScale: float = float('nan')
"""Zeropoint scaling of the effective exposure time."""

def __post_init__(self):
Storable.__init__(self)

Expand Down Expand Up @@ -184,59 +198,99 @@ def update_schema(cls, schema: Schema) -> None:
"psfSigma",
type="F",
doc="PSF model second-moments determinant radius (center of chip) (pixel)",
units="pixel",
)
schema.addField(
"psfArea",
type="F",
doc="PSF model effective area (center of chip) (pixel**2)",
units='pixel**2',
)
schema.addField(
"psfIxx", type="F", doc="PSF model Ixx (center of chip) (pixel**2)"
"psfIxx",
type="F",
doc="PSF model Ixx (center of chip) (pixel**2)",
units='pixel**2',
)
schema.addField(
"psfIyy", type="F", doc="PSF model Iyy (center of chip) (pixel**2)"
"psfIyy",
type="F",
doc="PSF model Iyy (center of chip) (pixel**2)",
units='pixel**2',
)
schema.addField(
"psfIxy", type="F", doc="PSF model Ixy (center of chip) (pixel**2)"
"psfIxy",
type="F",
doc="PSF model Ixy (center of chip) (pixel**2)",
units='pixel**2',
)
schema.addField(
"raCorners",
type="ArrayD",
size=4,
doc="Right Ascension of bounding box corners (degrees)",
units="degree",
)
schema.addField(
"decCorners",
type="ArrayD",
size=4,
doc="Declination of bounding box corners (degrees)",
units="degree",
)
schema.addField(
"ra", type="D", doc="Right Ascension of bounding box center (degrees)"
"ra",
type="D",
doc="Right Ascension of bounding box center (degrees)",
units="degree",
)
schema.addField(
"dec", type="D", doc="Declination of bounding box center (degrees)"
"dec",
type="D",
doc="Declination of bounding box center (degrees)",
units="degree",
)
schema.addField(
"zenithDistance",
type="F",
doc="Zenith distance of bounding box center (degrees)",
units="degree",
)
schema.addField(
"zeroPoint",
type="F",
doc="Mean zeropoint in detector (mag)",
units="mag",
)
schema.addField(
"skyBg",
type="F",
doc="Average sky background (ADU)",
units="adu",
)
schema.addField(
"skyNoise",
type="F",
doc="Average sky noise (ADU)",
units="adu",
)
schema.addField("zeroPoint", type="F", doc="Mean zeropoint in detector (mag)")
schema.addField("skyBg", type="F", doc="Average sky background (ADU)")
schema.addField("skyNoise", type="F", doc="Average sky noise (ADU)")
schema.addField(
"meanVar", type="F", doc="Mean variance of the weight plane (ADU**2)"
"meanVar",
type="F",
doc="Mean variance of the weight plane (ADU**2)",
units="adu**2"
)
schema.addField(
"astromOffsetMean",
type="F",
doc="Mean offset of astrometric calibration matches (arcsec)",
units="arcsec",
)
schema.addField(
"astromOffsetStd",
type="F",
doc="Standard deviation of offsets of astrometric calibration matches (arcsec)",
units="arcsec",
)
schema.addField("nPsfStar", type="I", doc="Number of stars used for PSF model")
schema.addField(
Expand All @@ -263,11 +317,13 @@ def update_schema(cls, schema: Schema) -> None:
"psfStarDeltaSizeMedian",
type="F",
doc="Median size residual (starSize - psfSize) for psf stars (pixel)",
units="pixel",
)
schema.addField(
"psfStarDeltaSizeScatter",
type="F",
doc="Scatter (via MAD) of size residual (starSize - psfSize) for psf stars (pixel)",
units="pixel",
)
schema.addField(
"psfStarScaledDeltaSizeScatter",
Expand All @@ -279,11 +335,35 @@ def update_schema(cls, schema: Schema) -> None:
type="F",
doc="Delta (max - min) of the model psf trace radius values evaluated on a grid of "
"unmasked pixels (pixel).",
units="pixel",
)
schema.addField(
"maxDistToNearestPsf",
type="F",
doc="Maximum distance of an unmasked pixel to its nearest model psf star (pixel).",
units="pixel",
)
schema.addField(
"effTime",
type="F",
doc="Effective exposure time calculated from psfSigma, skyBg, and "
"zeroPoint (seconds).",
units="second",
)
schema.addField(
"effTimePsfSigmaScale",
type="F",
doc="PSF scaling of the effective exposure time."
)
schema.addField(
"effTimeSkyBgScale",
type="F",
doc="Sky background scaling of the effective exposure time."
)
schema.addField(
"effTimeZeroPointScale",
type="F",
doc="Zeropoint scaling of the effective exposure time."
)

def update_record(self, record: BaseRecord) -> None:
Expand Down