Skip to content

Commit

Permalink
Merge pull request #32 from lsst/tickets/DM-14842
Browse files Browse the repository at this point in the history
DM-14842: Fix deprecation warnings from PropertyList/Set.get
  • Loading branch information
r-owen committed Jun 22, 2018
2 parents 86a76e2 + 4a0f721 commit da44f9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ups/*.cfgc
.cache
.pytest_cache
pytest_session.txt
.coverage
Makefile
autom4te.cache/
config.h
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/meas/extensions/psfex/psfex.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,11 +715,11 @@ def makeitLsst(prefs, context, saveWcs=False, plot=dict()):
crval=afwGeom.SpherePoint(0.0, 0.0, afwGeom.degrees),
cdMatrix=cdMatrix)

naxis1, naxis2 = md.get("NAXIS1"), md.get("NAXIS2")
naxis1, naxis2 = md.getScalar("NAXIS1"), md.getScalar("NAXIS2")
# Find how many rows there are in the catalogue
md = readMetadata(cat)

field.addExt(wcs, naxis1, naxis2, md.get("NAXIS2"))
field.addExt(wcs, naxis1, naxis2, md.getScalar("NAXIS2"))
if saveWcs:
wcss.append((wcs, naxis1, naxis2))

Expand Down Expand Up @@ -1029,9 +1029,9 @@ def makeit(prefs, context, saveWcs=False, plot=dict()):
if not md.exists("CRPIX1"): # no WCS; try WCSA
for k in md.names():
if re.search(r"A$", k):
md.set(k[:-1], md.get(k))
md.set(k[:-1], md.getScalar(k))
wcs = afwGeom.makeSkyWcs(md)
naxis1, naxis2 = md.get("NAXIS1"), md.get("NAXIS2")
naxis1, naxis2 = md.getScalar("NAXIS1"), md.getScalar("NAXIS2")
elif hdu.name == "LDAC_OBJECTS":
nobj = len(hdu.data)

Expand Down
2 changes: 1 addition & 1 deletion python/lsst/meas/extensions/psfex/psfexPsfDeterminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def determinePsf(self, exposure, psfCandidateList, metadata=None, flagKey=None):
pc += 1
elif key[0] == ':':
try:
contextvalp.append(exposure.getMetadata().get(key[1:]))
contextvalp.append(exposure.getMetadata().getScalar(key[1:]))
except KeyError:
raise RuntimeError("*Error*: %s parameter not found in the header of %s" %
(key[1:], prefs.getContextName()))
Expand Down

0 comments on commit da44f9d

Please sign in to comment.