def azza_to_radec(az, za, MJD, fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'): """ azza_to_radec(az, za, MJD): Return RA and DEC (J2000 in deg) from AZ and ZA (in deg) at MJD. Keyword params are fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'. """ scope, x, lon, lat, hgt = s.sla_obs(0, scope) microns = 3e8/(fctr*1e6)*1e6 app_rarad, app_decrad = s.sla_oap('a',az*DEGTORAD,za*DEGTORAD,MJD, 0.0,-lon,lat,hgt,0.0,0.0,temp,atm,humid,microns,0.0065) ra2000, dec2000 = s.sla_amp(app_rarad, app_decrad, MJD, 2000.0) return ra2000*RADTODEG, dec2000*RADTODEG
def radec_to_azza(ra, dec, MJD, fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'): """ redec_to_azza(ra, dec, MJD): Return AZ and ZA (in deg) from RA and DEC (J2000 in deg) at MJD. Keyword params are fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'. """ scope, x, lon, lat, hgt = s.sla_obs(0, scope) microns = 3e8/(fctr*1e6)*1e6 app_rarad, app_decrad = s.sla_map(ra*DEGTORAD,dec*DEGTORAD,0.0,0.0,0.0,0.0,2000.0,MJD) az, za, hob, rob, dob = s.sla_aop(app_rarad,app_decrad,MJD, 0.0,-lon,lat,hgt,0.0,0.0,temp,atm,humid,microns,0.0065) az = s.sla_dranrm(az) return az*RADTODEG, za*RADTODEG
def azza_to_radec(az, za, MJD, fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'): """ azza_to_radec(az, za, MJD): Return RA and DEC (J2000 in deg) from AZ and ZA (in deg) at MJD. Keyword params are fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'. """ scope, x, lon, lat, hgt = s.sla_obs(0, scope) microns = 3e8 / (fctr * 1e6) * 1e6 app_rarad, app_decrad = s.sla_oap('a', az * DEGTORAD, za * DEGTORAD, MJD, 0.0, -lon, lat, hgt, 0.0, 0.0, temp, atm, humid, microns, 0.0065) ra2000, dec2000 = s.sla_amp(app_rarad, app_decrad, MJD, 2000.0) return ra2000 * RADTODEG, dec2000 * RADTODEG
def radec_to_azza(ra, dec, MJD, fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'): """ redec_to_azza(ra, dec, MJD): Return AZ and ZA (in deg) from RA and DEC (J2000 in deg) at MJD. Keyword params are fctr=350.0, atm=1010.0, temp=283.0, humid=0.5, scope='GBT'. """ scope, x, lon, lat, hgt = s.sla_obs(0, scope) microns = 3e8 / (fctr * 1e6) * 1e6 app_rarad, app_decrad = s.sla_map(ra * DEGTORAD, dec * DEGTORAD, 0.0, 0.0, 0.0, 0.0, 2000.0, MJD) az, za, hob, rob, dob = s.sla_aop(app_rarad, app_decrad, MJD, 0.0, -lon, lat, hgt, 0.0, 0.0, temp, atm, humid, microns, 0.0065) az = s.sla_dranrm(az) return az * RADTODEG, za * RADTODEG
def get_sitepos(site_code, dbg=False): '''Returns site name, geodetic longitude (East +ve), latitude (both in radians) and altitude (meters) for passed sitecode. This can be either a SLALIB site name or a MPC sitecode (FTN, FTS and SQA currently defined). Be *REALLY* careful over longitude sign conventions...''' site_code = site_code.upper() if site_code == 'F65' or site_code == 'FTN': # MPC code for FTN. Positions from JPL HORIZONS, longitude converted from 203d 44' 32.6" East # 156d 15' 27.4" W (site_lat, status) = S.sla_daf2r(20, 42, 25.5) (site_long, status) = S.sla_daf2r(156, 15, 27.4) site_long = -site_long site_hgt = 3055.0 site_name = 'Haleakala-Faulkes Telescope North (FTN)' elif site_code == 'E10' or site_code == 'FTS': # MPC code for FTS. Positions from JPL HORIZONS ( 149d04'13.0''E, 31d16'23.4''S, 1111.8 m ) (site_lat, status) = (S.sla_daf2r(31, 16, 23.4)) site_lat = -site_lat (site_long, status) = S.sla_daf2r(149, 04, 13.0) site_hgt = 1111.8 site_name = 'Siding Spring-Faulkes Telescope South (FTS)' elif site_code == 'SQA' or site_code == 'G51': (site_lat, status) = S.sla_daf2r(34, 41, 29.23) (site_long, status) = S.sla_daf2r(120, 02, 32.0) site_long = -site_long site_hgt = 328.0 site_name = 'Sedgwick Observatory (SQA)' elif site_code == 'ELP' or site_code == '711' or site_code == 'V37': (site_lat, status) = S.sla_daf2r(30, 40, 47.53) (site_long, status) = S.sla_daf2r(104, 00, 54.63) site_long = -site_long site_hgt = 2010.0 site_name = 'LCOGT Node at McDonald Observatory (ELP)' elif site_code == 'BPL' or site_code == '500': (site_lat, status) = S.sla_daf2r(34, 25, 57) (site_long, status) = S.sla_daf2r(119, 51, 46) site_long = -site_long site_hgt = 7.0 site_name = 'LCOGT Back Parking Lot Node (BPL)' elif site_code == 'LSC-DOMA-1M0A' or site_code == 'W85': # Latitude, longitude from Eric Mamajek (astro-ph: 1210.1616) Table 6. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(30, 10, 2.58) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(70, 48, 17.24) site_long = -site_long # West of Greenwich ! site_hgt = 2201.0 site_name = 'LCOGT LSC Node 1m0 Dome A at Cerro Tololo' elif site_code == 'LSC-DOMB-1M0A' or site_code == 'W86': # Latitude, longitude from Eric Mamajek (astro-ph: 1210.1616) Table 6. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(30, 10, 2.39) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(70, 48, 16.78) site_long = -site_long # West of Greenwich ! site_hgt = 2201.0 site_name = 'LCOGT LSC Node 1m0 Dome B at Cerro Tololo' elif site_code == 'LSC-DOMC-1M0A' or site_code == 'W87': # Latitude, longitude from Eric Mamajek (astro-ph: 1210.1616) Table 6. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(30, 10, 2.81) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(70, 48, 16.85) site_long = -site_long # West of Greenwich ! site_hgt = 2201.0 site_name = 'LCOGT LSC Node 1m0 Dome C at Cerro Tololo' elif site_code == 'LSC-AQWA-0M4A' or site_code == 'W85': # Latitude, longitude from somewhere (site_lat, status) = S.sla_daf2r(30, 10, 3.79) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(70, 48, 16.88) site_long = -site_long # West of Greenwich ! site_hgt = 2202.5 site_name = 'LCOGT LSC Node 0m4a Aqawan A at Cerro Tololo' elif site_code == 'CPT-DOMA-1M0A' or site_code == 'K91': # Latitude, longitude from site GPS co-ords plus offsets from site plan. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(32, 22, 50.0) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(20, 48, 36.65) site_hgt = 1807.0 site_name = 'LCOGT CPT Node 1m0 Dome A at Sutherland' elif site_code == 'CPT-DOMB-1M0A' or site_code == 'K92': # Latitude, longitude from site GPS co-ords plus offsets from site plan. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(32, 22, 50.0) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(20, 48, 36.13) site_hgt = 1807.0 site_name = 'LCOGT CPT Node 1m0 Dome B at Sutherland' elif site_code == 'CPT-DOMC-1M0A' or site_code == 'K93': # Latitude, longitude from site GPS co-ords plus offsets from site plan. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(32, 22, 50.38) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(20, 48, 36.39) site_hgt = 1807.0 site_name = 'LCOGT CPT Node 1m0 Dome C at Sutherland' elif site_code == 'COJ-DOMA-1M0A' or site_code == 'Q63': # Latitude, longitude from Google Earth guesswork. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(31, 16, 22.56) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(149, 04, 14.33) site_hgt = 1168.0 site_name = 'LCOGT COJ Node 1m0 Dome A at Siding Spring' elif site_code == 'COJ-DOMB-1M0A' or site_code == 'Q64': # Latitude, longitude from Google Earth guesswork. Height # corrected by +3m for telescope height from Vince. (site_lat, status) = S.sla_daf2r(31, 16, 22.89) site_lat = -site_lat # Southern hemisphere ! (site_long, status) = S.sla_daf2r(149, 04, 14.75) site_hgt = 1168.0 site_name = 'LCOGT COJ Node 1m0 Dome B at Siding Spring' else: # Obtain latitude, longitude of the observing site. # Reverse longitude to get the more normal East-positive convention (site_num, site_name, site_long, site_lat, site_hgt) = S.sla_obs(0, site_code) site_name = site_name.rstrip() site_long = -site_long logger.debug("Site name, lat/long/height=%s %f %f %.1f" % (site_name, site_long, site_lat, site_hgt)) return (site_name, site_long, site_lat, site_hgt)