Skip to content

Commit

Permalink
remove site check from normalize_ucals as this is very Gemini specifi…
Browse files Browse the repository at this point in the history
…c and would crash on non-Gemini data. It is also not necessary.
  • Loading branch information
KathleenLabrie committed May 3, 2019
1 parent cd09b78 commit 80cabc1
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions recipe_system/utils/reduce_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,6 @@ def normalize_ucals(files, cals):
a returned dict,
{('GS-2017A-Q-32-7-029', 'processed_flat'): '/path/to/XXX_flat.fits'}
"""
def _site(tags):
site = None
if "SOUTH" in tags:
site = 'GS'
elif "NORTH" in tags:
site = 'GN'
else:
emsg = "Site cannot be determined."
raise TypeError(emsg)
return site

normalz = {}
if cals is None:
Expand All @@ -390,10 +380,6 @@ def _site(tags):

for f in files:
ad = astrodata.open(f)
if _site(cad.tags) != _site(ad.tags):
emsg = "Calibration {} does not match site of observation {}"
raise TypeError(emsg.format(cad.filename, ad.filename))

normalz.update({(ad.calibration_key(), ctype): cpath})

return normalz

0 comments on commit 80cabc1

Please sign in to comment.