Skip to content

Commit

Permalink
minor updates to get TNGDOLORES to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mommert committed Apr 26, 2017
1 parent eb4d9c4 commit 5b259b6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import sys
import numpy
import logging
import astropy
from astropy.io import fits
from astropy import wcs
import datetime
Expand Down
12 changes: 11 additions & 1 deletion pp_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ def prepare(filenames, obsparam, header_update, flipx=False,
'CRVAL2', 'CFINT2', 'LTM1_1', 'LTM2_2',
'WAT0_001', 'LTV1', 'LTV2', 'PIXXMIT',
'PIXOFFST', 'PC1_1', 'PC1_2', 'PC2_1', 'PC2_2',
'CUNIT1', 'CUNIT2', 'A_ORDER', 'A_0_0',
#'CUNIT1', 'CUNIT2',
'A_ORDER', 'A_0_0',
'A_0_1', 'A_0_2', 'A_1_0', 'A_1_1', 'A_2_0',
'B_ORDER', 'B_0_0', 'B_0_1', 'B_0_2', 'B_1_0',
'B_1_1', 'B_2_0', 'AP_ORDER', 'AP_0_0',
Expand All @@ -247,6 +248,15 @@ def prepare(filenames, obsparam, header_update, flipx=False,
if toolbox.if_val_in_dict(key, obsparam):
header.remove(key)

# normalize CUNIT keywords
try:
if 'degree' in header['CUNIT1'].lower():
header['CUNIT1'] = ('deg')
if 'degree' in header['CUNIT2'].lower():
header['CUNIT2'] = ('deg')
except KeyError:
pass

# if GENERIC telescope, add implants to header
if obsparam['telescope_keyword'] is 'GENERIC':
for key, val in list(implants.items()):
Expand Down
2 changes: 2 additions & 0 deletions pp_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def register(filenames, telescope, sex_snr, source_minarea, aprad,
cat = catalog(frame['ldac_filename'])
cat.read_ldac(frame['ldac_filename'],
frame['fits_filename'],
object_keyword=obsparam['object'],
exptime_keyword=obsparam['exptime'],
maxflag=0)
ldac_catalogs.append(cat)

Expand Down

0 comments on commit 5b259b6

Please sign in to comment.