Skip to content

Commit

Permalink
Allow lower-case or capital columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Jun 17, 2024
1 parent f4fe13d commit 96216ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redmapper/dereddener.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def deredden_array(self, galaxy_array):
# Lazy-load the map only when needed.
self._reddening_map = healsparse.HealSparseMap.read(self.mapfile)

vals = self._reddening_map.get_values_pos(galaxy_array['ra'], galaxy_array['dec'], lonlat=True)
if 'RA' in galaxy_array.dtype.names:
vals = self._reddening_map.get_values_pos(galaxy_array['RA'], galaxy_array['DEC'], lonlat=True)
else:
vals = self._reddening_map.get_values_pos(galaxy_array['ra'], galaxy_array['dec'], lonlat=True)

bad = (vals < -100.0)
if np.any(bad):
Expand Down

0 comments on commit 96216ac

Please sign in to comment.