Skip to content

Commit

Permalink
Fixes for LSSTComCamSim
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsaunders committed Feb 13, 2024
1 parent a107c60 commit a256bb0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions python/lsst/drp/tasks/gbdesAstrometricFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,6 @@ def run(
``modelParams`` : `dict`
Parameters and covariance of the best-fit WCS model.
"""
if (len(inputVisitSummaries) == 1) and self.config.deviceModel and self.config.exposureModel:
raise RuntimeError(
"More than one exposure is necessary to break the degeneracy between the "
"device model and the exposure model."
)
self.log.info("Gather instrument, exposure, and field info")
# Set up an instrument object
instrument = wcsfit.Instrument(instrumentName)
Expand Down Expand Up @@ -965,7 +960,7 @@ def _load_refcat(
finiteInd = np.isfinite(refCat["coord_ra"]) & np.isfinite(refCat["coord_dec"])
refCat = refCat[finiteInd]

if self.config.excludeNonPMObjects:
if self.config.excludeNonPMObjects and self.config.applyRefCatProperMotion:
# Gaia DR2 has zeros for missing data, while Gaia DR3 has NaNs:
hasPM = (
(refCat["pm_raErr"] != 0) & np.isfinite(refCat["pm_raErr"]) & np.isfinite(refCat["pm_decErr"])
Expand All @@ -980,7 +975,7 @@ def _load_refcat(
# Get refcat version from refcat metadata
refCatMetadata = refObjectLoader.refCats[0].get().getMetadata()
refCatVersion = refCatMetadata["REFCAT_FORMAT_VERSION"]
if refCatVersion == 2:
if (refCatVersion == 2) and ("coord_ra_coord_dec_Cov" in refCat.colnames):
raDecCov = (refCat["coord_ra_coord_dec_Cov"]).to(u.degree**2).to_value().tolist()
else:
raDecCov = np.zeros(len(ra))
Expand Down

0 comments on commit a256bb0

Please sign in to comment.