Skip to content

Commit

Permalink
GMOSN implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
mommermi committed Jul 16, 2018
1 parent ba7d690 commit fed4906
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 31 deletions.
2 changes: 2 additions & 0 deletions doc/supported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ observatories/instruments:
| Discovery Channel | Large Monolithic | DCTLMI |
| Telescope | Imager | |
+--------------------------+--------------------+----------------+
| Gemini North 8.2m | GMOS | GMOSN |
+--------------------------+--------------------+----------------+
| Gran Canaria 1.5m | MUSCAT2 | TCS15MUSCAT2 |
+--------------------------+--------------------+----------------+
| IRSF 1.4m | SIRIUS | IRSFSIRIUS |
Expand Down
4 changes: 2 additions & 2 deletions setup/gmoss.scamp → setup/gmosn.scamp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ FULLOUTCAT_NAME full.cat # Full output catalog filename
MATCH Y # Do pattern-matching (Y/N) ?
MATCH_NMAX 0 # Max.number of detections for MATCHing
# (0=auto)
PIXSCALE_MAXERR 1.2 # Max scale-factor uncertainty
PIXSCALE_MAXERR 1.1 # Max scale-factor uncertainty
POSANGLE_MAXERR 180. # Max position-angle uncertainty (deg)
POSITION_MAXERR 5.0 # Max positional uncertainty (arcmin)
MATCH_RESOL 0 # Matching resolution (arcsec); 0=auto
Expand All @@ -69,7 +69,7 @@ CENTROIDERR_KEYS ERRAWIN_IMAGE,ERRBWIN_IMAGE,ERRTHETAWIN_IMAGE
# Cat. params for centroid err ellipse
DISTORT_KEYS XWIN_IMAGE,YWIN_IMAGE # Cat. parameters or FITS keywords
DISTORT_GROUPS 1,1 # Polynom group for each context key
DISTORT_DEGREES 2 # Polynom degree for each group
DISTORT_DEGREES 3 # Polynom degree for each group
FOCDISTORT_DEGREE 1 # Polynom degree for focal plane coords
ASTREF_WEIGHT 1.0 # Relative weight of ref.astrom.cat.
ASTRACCURACY_TYPE SIGMA-ARCSEC # SIGMA-PIXEL, SIGMA-ARCSEC,
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions setup/gmosn_mask_2x2.fits

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions setup/telescopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'object': 'OBJECT', # object name keyword
'filter': 'FILTER', # filter keyword
'filter_translations': {'TOP 2 BOT 1': 'V', 'TOP 3 BOT 1': 'R',
'TOP 4 BOT 1': 'I', 'TOP 5 BOT 1': 'B'},
'TOP 4 BOT 1': 'I', 'TOP 5 BOT 1': 'B'},
# filtername translation dictionary
'exptime': 'EXPTIME', # exposure time keyword (s)
'airmass': 'AIRMASS', # airmass keyword
Expand Down Expand Up @@ -2716,12 +2716,12 @@
}


# Gemini South, GMOS
gmoss_param = {
'telescope_instrument': 'Gemini-S/GMOS', # telescope/instrument name
'telescope_keyword': 'GMOSS', # telescope/instrument keyword
'observatory_code': 'I11', # MPC observatory code
'secpix': (0.08, 0.08), # pixel size (arcsec)
# Gemini North, GMOS
gmosn_param = {
'telescope_instrument': 'Gemini-N/GMOS', # telescope/instrument name
'telescope_keyword': 'GMOSN', # telescope/instrument keyword
'observatory_code': '568', # MPC observatory code
'secpix': (0.081, 0.081), # pixel size (arcsec)
# before binning
'ext_coeff': 0.05, # typical extinction coefficient

Expand All @@ -2736,47 +2736,47 @@
# binning in x/y, '_blankN' denotes that both axes
# are listed in one keyword, sep. by blanks
'extent': ('NAXIS1', 'NAXIS2'), # N_pixels in x/y
'ra': 'RA', # telescope pointing, RA
'dec': 'DEC', # telescope pointing, Dec
'ra': 'CRVAL1', # telescope pointing, RA
'dec': 'CRVAL2', # telescope pointing, Dec
'radec_separator': 'XXX', # RA/Dec hms separator, use 'XXX'
# if already in degrees
'date_keyword': 'DATE-OBS', # obs date/time
'date_keyword': 'DATE-OBS|UTSTART', # obs date/time
# keyword; guse
# 'date|time' if
# separate
'obsmidtime_jd': 'MIDTIMJD', # obs midtime jd keyword
# (usually provided by
# pp_prepare
'object': 'OBJECT', # object name keyword
'filter': 'FILTER', # filter keyword
'filter_translations': {'V': 'V'},
'filter': 'FILTER2', # filter keyword
'filter_translations': {'i_G0302': 'i'},
# filtername translation dictionary
'exptime': 'EXPTIME', # exposure time keyword (s)
'airmass': 'AIRMASS', # airmass keyword


# source extractor settings
'source_minarea': 9, # default sextractor source minimum N_pixels
'source_snr': 3, # default sextractor source snr for registration
'aprad_default': 4, # default aperture radius in px
'source_snr': 10, # default sextractor source snr for registration
'aprad_default': 6, # default aperture radius in px
'aprad_range': [2, 15], # [minimum, maximum] aperture radius (px)
'sex-config-file': rootpath+'/setup/gmoss.sex',
'mask_file': {},
'sex-config-file': rootpath+'/setup/gmosn.sex',
'mask_file': {'2,2': rootpath+'/setup/gmosn_mask_2x2.fits'},
# mask files as a function of x,y binning

# registration settings (Scamp)
'scamp-config-file': rootpath+'/setup/gmoss.scamp',
'reg_max_mag': 19,
'reg_search_radius': 0.2, # deg
'source_tolerance': 'none',
'scamp-config-file': rootpath+'/setup/gmosn.scamp',
'reg_max_mag': 23,
'reg_search_radius': 0.3, # deg
'source_tolerance': 'high',

# swarp settings
'copy_keywords': ('OBSERVAT,INSTRUME,EXPTIME,OBJECT,' +
'DATE-OBS,RA,DEC,AIRMASS,TEL_KEYW,CCDSUM,' +
'FILTER,MIDTIMJD'),
'DATE-OBS,UTSTART,RA,DEC,AIRMASS,TEL_KEYW,CCDSUM,' +
'FILTER2,MIDTIMJD'),
# keywords to be copied in image
# combination using swarp
'swarp-config-file': rootpath+'/setup/gmoss.swarp',
'swarp-config-file': rootpath+'/setup/gmosn.swarp',

# default catalog settings
'astrometry_catalogs': ['GAIA'],
Expand All @@ -2799,7 +2799,7 @@
'KPNO4NEWF', 'UKIRTWFCAM', 'VLTFORS2',
'LOWELL42SITE', 'PLUTOPLATE', 'TCS15MUSCAT2',
'LCOSBIGKB78', 'ARC35SPICAM', 'LCOSINFL03',
'LCOSPECFS01', 'P60OPT', 'P60SEDM', 'GMOSS']
'LCOSPECFS01', 'P60OPT', 'P60SEDM', 'GMOSN']

# translate INSTRUME (or others, see _pp_conf.py) header keyword into
# PP telescope keyword
Expand Down Expand Up @@ -2852,7 +2852,7 @@
'fs01': 'LCOSPECFS01',
'P60': 'P60OPT',
'Rainbow Cam': 'P60SEDM',
'GMOS-S': 'GMOSS'
'GMOS-N': 'GMOSN'
}

# translate telescope keyword into parameter set defined here
Expand Down Expand Up @@ -2898,7 +2898,7 @@
'LCOSPECFS01': lcospecfs01_param,
'P60OPT': p60opt_param,
'P60SEDM': p60sedm_param,
'GMOSS': gmoss_param}
'GMOSN': gmosn_param}


# append mytelescopes.py, if available
Expand Down
11 changes: 8 additions & 3 deletions toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,15 @@ def skycenter(catalogs, ra_key='ra.deg', dec_key='dec.deg'):

def if_val_in_dict(target_val, dic):
"""check if a value appears in a nested dict structure"""
result = False
for key, val in dic.items():
if type(val) is dict:
return if_val_in_dict(target_val, val)
if if_val_in_dict(target_val, val):
result = True
elif type(val) is list:
return target_val in val
if target_val in val:
result = True
else:
return target_val == val
if target_val == val:
result = True
return result

0 comments on commit fed4906

Please sign in to comment.