From 20baae2de13376ddcc933e7f898fadcaa82d504e Mon Sep 17 00:00:00 2001 From: Brianna Smart Date: Tue, 19 Sep 2023 13:52:06 -0700 Subject: [PATCH] Align Struct doc strings with developer guide --- python/lsst/ap/association/association.py | 20 +++++------ python/lsst/ap/association/metrics.py | 8 ++--- .../ap/association/skyBotEphemerisQuery.py | 36 +++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/python/lsst/ap/association/association.py b/python/lsst/ap/association/association.py index b4a9f3e4..797b3476 100644 --- a/python/lsst/ap/association/association.py +++ b/python/lsst/ap/association/association.py @@ -101,16 +101,16 @@ def run(self, result : `lsst.pipe.base.Struct` Results struct with components. - - ``"matchedDiaSources"`` : DiaSources that were matched. Matched + - ``matchedDiaSources`` : DiaSources that were matched. Matched Sources have their diaObjectId updated and set to the id of the diaObject they were matched to. (`pandas.DataFrame`) - - ``"unAssocDiaSources"`` : DiaSources that were not matched. + - ``unAssocDiaSources`` : DiaSources that were not matched. Unassociated sources have their diaObject set to 0 as they were not associated with any existing DiaObjects. (`pandas.DataFrame`) - - ``"nUpdatedDiaObjects"`` : Number of DiaObjects that were + - ``nUpdatedDiaObjects`` : Number of DiaObjects that were matched to new DiaSources. (`int`) - - ``"nUnassociatedDiaObjects"`` : Number of DiaObjects that were + - ``nUnassociatedDiaObjects`` : Number of DiaObjects that were not matched a new DiaSource. (`int`) """ diaSources = self.check_dia_source_radec(diaSources) @@ -189,11 +189,11 @@ def associate_sources(self, dia_objects, dia_sources): result : `lsst.pipe.base.Struct` Results struct with components. - - ``"diaSources"`` : Full set of diaSources both matched and not. + - ``diaSources`` : Full set of diaSources both matched and not. (`pandas.DataFrame`) - - ``"nUpdatedDiaObjects"`` : Number of DiaObjects that were + - ``nUpdatedDiaObjects`` : Number of DiaObjects that were associated. (`int`) - - ``"nUnassociatedDiaObjects"`` : Number of DiaObjects that were + - ``nUnassociatedDiaObjects`` : Number of DiaObjects that were not matched a new DiaSource. (`int`) """ scores = self.score( @@ -228,11 +228,11 @@ def score(self, dia_objects, dia_sources, max_dist): result : `lsst.pipe.base.Struct` Results struct with components: - - ``"scores"``: array of floats of match quality updated DIAObjects + - ``scores``: array of floats of match quality updated DIAObjects (array-like of `float`). - - ``"obj_idxs"``: indexes of the matched DIAObjects in the catalog. + - ``obj_idxs``: indexes of the matched DIAObjects in the catalog. (array-like of `int`) - - ``"obj_ids"``: array of floats of match quality updated DIAObjects + - ``obj_ids``: array of floats of match quality updated DIAObjects (array-like of `int`). Default values for these arrays are diff --git a/python/lsst/ap/association/metrics.py b/python/lsst/ap/association/metrics.py index 765d5d38..316c2349 100644 --- a/python/lsst/ap/association/metrics.py +++ b/python/lsst/ap/association/metrics.py @@ -156,11 +156,11 @@ def makeMeasurement(self, values): A `dict` representation of the metadata. Each `dict` has the following keys: - ``"updatedObjects"`` + ``updatedObjects`` The number of DIAObjects updated for this image (`int` or `None`). May be `None` if the image was not successfully associated. - ``"unassociatedObjects"`` + ``unassociatedObjects`` The number of DIAObjects not associated with a DiaSource in this image (`int` or `None`). May be `None` if the image was not successfully associated. @@ -216,7 +216,7 @@ def makeMeasurement(self, values): A `dict` representation of the metadata. Each `dict` has the following key: - ``"numTotalSolarSystemObjects"`` + ``numTotalSolarSystemObjects`` The number of SolarSystemObjects within the observable detector area (`int` or `None`). May be `None` if solar system association was not attempted or the image was not @@ -264,7 +264,7 @@ def makeMeasurement(self, values): A `dict` representation of the metadata. Each `dict` has the following key: - ``"numAssociatedSsObjects"`` + ``numAssociatedSsObjects`` The number of successfully associated SolarSystem Objects (`int` or `None`). May be `None` if solar system association was not attempted or the image was not successfully associated. diff --git a/python/lsst/ap/association/skyBotEphemerisQuery.py b/python/lsst/ap/association/skyBotEphemerisQuery.py index 3dde9d91..2cbb91c7 100644 --- a/python/lsst/ap/association/skyBotEphemerisQuery.py +++ b/python/lsst/ap/association/skyBotEphemerisQuery.py @@ -126,43 +126,43 @@ def run(self, visitInfos, visit): details see https://ssp.imcce.fr/webservices/skybot/api/conesearch/#output-results - ``"Num"`` + ``Num`` object number (`int`, optional) - ``"Name"`` + ``Name`` object name (`str`) - ``"RA(h)"`` + ``RA(h)`` RA in HMS (`str`) - ``"DE(deg)"`` + ``DE(deg)`` DEC in DMS (`str`) - ``"Class"`` + ``Class`` Minor planet classification (`str`) - ``"Mv"`` + ``Mv`` visual magnitude (`float`) - ``"Err(arcsec)"`` + ``Err(arcsec)`` position error (`float`) - ``"d(arcsec)"`` + ``d(arcsec)`` distance from exposure boresight (`float`)? - ``"dRA(arcsec/h)"`` + ``dRA(arcsec/h)`` proper motion in RA (`float`) - ``"dDEC(arcsec/h)"`` + ``dDEC(arcsec/h)`` proper motion in DEC (`float`) - ``"Dg(ua)"`` + ``Dg(ua)`` geocentric distance (`float`) - ``"Dh(ua)"`` + ``Dh(ua)`` heliocentric distance (`float`) - ``"Phase(deg)"`` + ``Phase(deg)`` phase angle (`float`) - ``"SunElong(deg)"`` + ``SunElong(deg)`` solar elongation (`float`) - ``"ra"`` + ``ra`` RA in decimal degrees (`float`) - ``"dec"`` + ``dec`` DEC in decimal degrees (`float`) - ``"ssObjectId"`` + ``ssObjectId`` unique minor planet ID for internal use (`int`). Shared across catalogs; the pair ``(ssObjectId, visitId)`` is globally unique. - ``"visitId"`` + ``visitId`` a copy of ``visit`` (`int`) """ # Grab the visitInfo from the raw to get the information needed on the