# import classes from the chultun module from chultun import Target # name, ra, dec from chultun import Stack # exposure, filter, binning, count from chultun import Sequence # stacks, repeat from chultun import Observatory # code, latitude, longitude, altitude from chultun import Observation # target, sequence from chultun import Scheduler # observatory, observations from chultun import Telescope # the telescope commands import log import datetime import traceback import sys import subprocess from astropy.time import Time import time import numpy as np from astropy.io import fits # seo telescope telescope = Telescope(False) telescope.setFilter('sii')
# load target and comparison observations with open(cfg_path) as f: cfg = json.load(f) # user, hardcode for now user = cfg['user'] # min obs altitude min_obs_alt = float(cfg['min_obs_alt']) # seo observatory = Observatory(cfg['observatory']['code'], cfg['observatory']['latitude'], cfg['observatory'] ['longitude'], cfg['observatory']['altitude'], cfg['observatory']['timezone']) # init seo telescope telescope = Telescope(cfg['simulate']) # pause time while waiting for object to become available delay_time = cfg['delay_time'] # build main asteroid observation observation_json = cfg['observations'] target_json = observation_json['target'] sequence_json = observation_json['sequences']['main'] stacks_json = sequence_json['stacks'] # build target target = Target.from_name( target_json['name'], observatory, target_json['type'], target_json.get('ra_offset'), target_json.get('dec_offset')) logger.debug(target.toString().replace('\n', '; ')) # build image stacks stacks = []
# user, hardcode for now user = cfg['user'] # min obs altitude min_obs_alt = float(cfg['min_obs_alt']) # seo observatory = Observatory(cfg['observatory']['code'], cfg['observatory']['latitude'], cfg['observatory']['longitude'], cfg['observatory']['altitude'], cfg['observatory']['timezone']) # init seo telescope telescope = Telescope(cfg['simulate']) # pause time while waiting for object to become available wait_time_s = cfg['wait_time_s'] # build main star observation observation_json = cfg['observations']['star'] target_json = observation_json['target'] sequence_json = observation_json['sequences']['main'] stacks_json = sequence_json['stacks'] # build target target = Target.from_name(target_json['name'], observatory, target_json['type']) logger.debug(target.toString().replace('\n', '; ')) # build image stacks stacks = []
input_fname = '/home/mcnowinski/seo/nebulizer/asteroids.txt' # simulate? set to True simulate = False # time between checks for object observability in seconds delay_time = 30 # min time available for background observations in seconds min_background_time = 10 * 60 # 10 minutes # seo observatory = Observatory('G52', 38.2886, -122.50400, 8, 'US/Pacific') # seo telescope telescope = Telescope(simulate) # default min observation alt in degrees min_obs_alt = 30.0 # list of observations observations = [] # init the scheduler scheduler = Scheduler(observatory) # read in observations from file with open(input_fname) as f: inputs = f.readlines() inputs = [x.strip() for x in inputs if not x.startswith('#')]
# user, hardcode for now user = cfg['user'] # min obs altitude min_obs_alt = float(cfg['min_obs_alt']) # seo observatory = Observatory(cfg['observatory']['code'], cfg['observatory']['latitude'], cfg['observatory']['longitude'], cfg['observatory']['altitude'], cfg['observatory']['timezone']) # init seo telescope telescope = Telescope(cfg['simulate']) # pause time while waiting for object to become available wait_time_s = cfg['wait_time_s'] # build main asteroid observation observation_json = cfg['observations']['asteroid'] target_json = observation_json['target'] sequence_json = observation_json['sequences']['main'] stacks_json = sequence_json['stacks'] # build target target = Target.from_name(target_json['name'], observatory, target_json['type']) logger.debug(target.toString().replace('\n', '; ')) # build image stacks stacks = []
psfex_psf_path = '/home/mcnowinski/seo/nebulizer/hf.psf' # focus plot plt_path = '/tmp/hocusfocus.png' # image path image_path = '/tmp' # image filename image_filename = 'hocusfocus.fits' # seo observatory = Observatory('G52', 38.2886, -122.50400, 8, 'US/Pacific') # seo telescope telescope = Telescope(simulate) # list of observations observations = [] # list of image stacks stacks = [] # initialize array covering a range of focus positions pass1_array = [ 4650, 4675, 4700, 4725, 4750, 4775, 4800, 4825, 4850, 4875, 4900, 4925, 4950, 4975, 5000 ] pass1_array_focus = np.zeros((len(pass1_array), 2)) # read in reference stars from file
input_fname = '/home/mcnowinski/seo/nebulizer/observations.txt' # simulate? set to True simulate = False # time between checks for object observability in seconds delay_time = 30 # min time available for background observations in seconds min_background_time = 10 * 60 # 10 minutes # seo observatory = Observatory('G52', 38.2886, -122.50400, 8, 'US/Pacific') # seo telescope telescope = Telescope(simulate) # default min observation alt in degrees min_obs_alt = 30.0 # list of observations observations = [] # init the scheduler scheduler = Scheduler(observatory) # read in observations from file with open(input_fname) as f: inputs = f.readlines() inputs = [x.strip() for x in inputs if not x.startswith('#')]
# load target and comparison observations with open(cfg_path) as f: cfg = json.load(f) # user, hardcode for now user = cfg['user'] # min obs altitude min_obs_alt = float(cfg['min_obs_alt']) # seo observatory = Observatory(cfg['observatory']['code'], cfg['observatory']['latitude'], cfg['observatory'] ['longitude'], cfg['observatory']['altitude'], cfg['observatory']['timezone']) # init seo telescope telescope = Telescope(cfg['simulate']) # pause time while waiting for object to become available delay_time = cfg['delay_time'] # build observation observation_json = cfg['observations'] target_json = observation_json['target'] sequence_json = observation_json['sequences'] stacks_json = sequence_json['stacks'] # build target target = Target.from_name( target_json['name'], observatory, target_json['type'], target_json.get('ra_offset'), target_json.get('dec_offset')) logger.debug(target.toString().replace('\n', '; ')) # build image stacks stacks = []
input_fname = '/home/mcnowinski/seo/nebulizer/observations.txt' # simulate? set to True simulate = False # time between checks for object observability in seconds delay_time = 30 # min time available for background observations in seconds min_background_time = 10 * 60 # 10 minutes # seo observatory = Observatory('G52', 38.2886, -122.50400, 8, 'US/Pacific') # seo telescope telescope = Telescope(simulate) # default min observation alt in degrees min_obs_alt = 30.0 # list of observations observations = [] # init the scheduler scheduler = Scheduler(observatory) input = [ 'mcnowinski', 'Solar System', '3982', 120, 1, 'clear', 2, Sequence.CONTINUOUS ]