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-15244: Change fluxSigma to fluxErr and similarly for apCorr and covariances #14

Merged
merged 2 commits into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class Solver {
returned value is not set
- hasCentroid: if true then centroid has been set; returned value is false
- *filterName*_flux: flux in the specified filter (double)
- *filterName*_fluxSigma: flux uncertainty in the specified filter (double)
- *filterName*_fluxErr: flux uncertainty in the specified filter (double)
- resolved (if starGalCol specified): true if object is not resolved
- variable (if varCol specified): true if brightness is variable
- photometric: true if not resolved (or starGalCol blank) and not variable (or varCol blank);
Expand Down
2 changes: 1 addition & 1 deletion include/lsst/meas/extensions/astrometryNet/detail/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Returned schema:
- centroid: centroid on some exposure, if relevant (an lsst::afw::geom::Point2D); returned value is not set
- hasCentroid: if true then centroid has been set; returned value is false
- *filterName*_flux: flux in the specified filter (double)
- *filterName*_fluxSigma: flux uncertainty in the specified filter (double)
- *filterName*_fluxErr: flux uncertainty in the specified filter (double)
- resolved (if starGalCol specified): true if object is not resolved
- variable (if varCol specified): true if brightness is variable
- photometric: true if not resolved (or starGalCol blank) and not variable (or varCol blank);
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/extensions/astrometryNet/anetAstrometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def __init__(self, schema, refObjLoader=None, **kwds):
doc="centroid distorted for astrometry solver")
self.centroidYKey = schema.addField(self.distortedName + "_y", type="D",
doc="centroid distorted for astrometry solver")
self.centroidXErrKey = schema.addField(self.distortedName + "_xSigma", type="F",
self.centroidXErrKey = schema.addField(self.distortedName + "_xErr", type="F",
doc="centroid distorted err for astrometry solver")
self.centroidYErrKey = schema.addField(self.distortedName + "_ySigma", type="F",
self.centroidYErrKey = schema.addField(self.distortedName + "_yErr", type="F",
doc="centroid distorted err for astrometry solver")
self.centroidFlagKey = schema.addField(self.distortedName + "_flag", type="Flag",
doc="centroid distorted flag astrometry solver")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void declareSolver(py::module& mod) {
set
- hasCentroid: if true then centroid has been set; returned value is false
- <filterName>_flux: flux in the specified filter (double)
- <filterName>_fluxSigma: flux uncertainty in the specified filter (double)
- <filterName>_fluxErr: flux uncertainty in the specified filter (double)
- resolved (if starGalCol specified): true if object is not resolved
- variable (if varCol specified): true if brightness is variable
- photometric: true if not resolved (or starGalCol blank) and not variable (or varCol blank);
Expand Down
2 changes: 1 addition & 1 deletion src/detail/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ getCatalogImpl(std::vector<index_t*> inds,
if (mc->hasErr()) {
fluxErrKey.push_back(
schema.addField<double>(
mc->filterName + "_fluxSigma",
mc->filterName + "_fluxErr",
mc->filterName + " flux uncertainty (sigma)"));
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_anetAstrometryTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ def makeSourceCat(self, distortedWcs):
sourceCat = afwTable.SourceCatalog(sourceSchema)
sourceCentroidKey = afwTable.Point2DKey(sourceSchema["slot_Centroid"])
sourceFluxKey = sourceSchema["slot_PsfFlux_flux"].asKey()
sourceFluxSigmaKey = sourceSchema["slot_PsfFlux_fluxSigma"].asKey()
sourceFluxErrKey = sourceSchema["slot_PsfFlux_fluxErr"].asKey()

sourceCat.reserve(len(refCat))
for refObj in refCat:
src = sourceCat.addNew()
src.set(sourceCentroidKey, refObj.get(refCentroidKey))
src.set(sourceFluxKey, refObj.get(refFluxRKey))
src.set(sourceFluxSigmaKey, refObj.get(refFluxRKey)/100)
src.set(sourceFluxErrKey, refObj.get(refFluxRKey)/100)
return sourceCat


Expand Down
8 changes: 4 additions & 4 deletions tests/test_loadAstrometryNetObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def testLoadPixelBox(self):
filterNameList = ['u', 'g', 'r', 'i', 'z']
for filterName in filterNameList:
schema.find(filterName + "_flux").key
schema.find(filterName + "_fluxSigma").key
schema.find(filterName + "_fluxErr").key
for fieldName in ("coord_ra", "coord_dec", "centroid_x", "centroid_y", "hasCentroid",
"photometric", "resolved"):
schema.find(fieldName)
Expand Down Expand Up @@ -118,7 +118,7 @@ def testNoMagErrs(self):
for filterName in ['u', 'g', 'r', 'i', 'z']:
schema.find(filterName + "_flux")
with self.assertRaises(KeyError):
schema.find(filterName + "_fluxSigma")
schema.find(filterName + "_fluxErr")

def testRequestForeignFilter(self):
"""The user requests a filter not in the astrometry.net catalog.
Expand All @@ -142,7 +142,7 @@ def testRequestForeignFilter(self):
schema = refCat.getSchema()
for filterName in filterNameList:
schema.find(filterName + "_flux")
schema.find(filterName + '_fluxSigma')
schema.find(filterName + '_fluxErr')

def testDifferentMagNames(self):
"""The astrometry.net catalog's magnitude columns are not named after filters.
Expand All @@ -167,7 +167,7 @@ def testDifferentMagNames(self):
schema = refCat.getSchema()
for nm in filterNameList:
schema.find(nm + "_flux")
schema.find(nm + '_fluxSigma')
schema.find(nm + '_fluxErr')

def assertObjInBBox(self, refCat, bbox, wcs):
"""Assert that all reference objects are inside the specified pixel bounding box plus a margin
Expand Down