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-14842: Fix deprecation warnings from PropertyList/Set.get #32

Merged
merged 2 commits into from
Jun 22, 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
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