Esempio n. 1
0
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 = []
for stack_json in stacks_json:
    stack = Stack(float(stack_json['exposure']), stack_json['filters'], int(
        stack_json['binning']), int(stack_json['count']), stack_json['do_pinpoint'] if 'do_pinpoint' in stack_json else True)
    logger.debug(stack.toString().replace('\n', '; '))
    stacks.append(stack)
# build sequence
sequence = Sequence(stacks, int(
    sequence_json['repeat']), sequence_json['do_pinpoint'] if 'do_pinpoint' in sequence_json else True)
logger.debug(sequence.toString().replace('\n', '; '))
# build main observations
asteroid_main_observation = Observation(
    observatory, target, sequence, min_obs_alt, user)
Esempio n. 2
0
for input in inputs:
    input = input.split(',')
    user = input[0]
    name = input[1]
    exposure = input[2]
    binning = input[3]
    filters = input[4].split(' ')
    count = int(input[5])
    objects = scheduler.findSolarSystemObjects(name.strip().upper())
    if len(objects) == 0:
        print 'Error. Could not find matching object for %s.' % name
    elif len(objects) > 1:
        print 'Error. Found multiple matching objects for %s.' % name
    else:
        num_targets += 1
        target = Target(objects[0]['name'], objects[0]['RA'],
                        objects[0]['DEC'])
        stacks = []
        for i in range(0, count):
            for filter in filters:
                filter = filter.strip()
                # skip the darks for now
                if filter.lower() != 'dark':
                    stacks.append(
                        Stack(float(exposure), filter, int(binning), 1))
        observations.append(
            Observation(observatory, target, Sequence(stacks, 1), min_obs_alt,
                        user))

print 'Successfully identified %d of %d targets.' % (num_targets, len(inputs))

telescope.slackdebug('Starting observerizer...')
Esempio n. 3
0
                          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 = []
for stack_json in stacks_json:
    stack = Stack(float(stack_json['exposure']), stack_json['filters'],
                  int(stack_json['binning']), int(stack_json['count']))
    logger.debug(stack.toString().replace('\n', '; '))
    stacks.append(stack)
# build sequence
sequence = Sequence(stacks, int(sequence_json['repeat']))
logger.debug(sequence.toString().replace('\n', '; '))
# build main observation
star_main_observation = Observation(observatory, target, sequence, min_obs_alt,
                                    user)
# get min, max, and max alt obs times
Esempio n. 4
0
# observations.append(Observation(observatory, target, sequence, min_obs_alt, user))

##5358 (1992 QH)
##define the target
#target = Target('5358', '07 38 46.48', '+36 07 12.2')
##build image stack
#stack = Stack(120, 'clear', 2, 1)
##build image (stack) sequence
#sequence = Sequence([stack], Sequence.CONTINUOUS)
##minimum altitude to observe this target
#min_obs_alt = 30.0
##add this observations to the list
#observations.append(Observation(observatory, target, sequence, min_obs_alt, user))
min_obs_alt = 30.0

target = Target('maxgoldberg.M104', '12 39 59.299', '-11 37 21.000')
stack = Stack(240, 'clear', 2, 1)
sequence = Sequence([stack], 1)
observations.append(Observation(observatory, target, sequence, min_obs_alt, user))

target = Target('maxgoldberg.M104', '12 39 59.299', '-11 37 21.000')
stack = Stack(300, 'clear', 2, 1)
sequence = Sequence([stack], 1)
observations.append(Observation(observatory, target, sequence, min_obs_alt, user))

target = Target('shelstrom.M104', '12 39 59.299', '-11 37 21.000')
sequence = Sequence([Stack(60, 'clear', 2, 2), Stack(40, 'r-band', 2, 2), Stack(60, 'g-band', 2, 2)], 1)
observations.append(Observation(observatory, target, sequence, min_obs_alt, user))

target = Target('rich.oddjob.Jupiter', '17 29 06', '-22 37 07')
stack = Stack(0.1, 'z-band', 2, 1)
Esempio n. 5
0
# #1639 Rollandia
# #define the target
# target = Target('1639 Rollandia', '04 22 19.65', '+18 20 26.8')
# #build image stack
# stack = Stack(120, 'clear', 2, 1)
# #build image (stack) sequence
# sequence = Sequence([stack], Sequence.CONTINUOUS)
# #minimum altitude to observe this target
# min_obs_alt = 30.0
# #add this observations to the list
# observations.append(Observation(observatory, target, sequence, min_obs_alt, user))

#5358 (1992 QH)
#define the target
target = Target('5358', '07 38 46.48', '+36 07 12.2')
#build image stack
stack = Stack(120, 'clear', 2, 1)
#build image (stack) sequence
sequence = Sequence([stack], Sequence.CONTINUOUS)
#minimum altitude to observe this target
min_obs_alt = 30.0
#add this observations to the list
observations.append(Observation(observatory, target, sequence, min_obs_alt, user))

#PN K 3-63
#define the target
target = Target('PN K 3-63', '21 39 11.976', '+55 46 03.94')
#build image stack
stack = Stack(120, 'r-band', 2, 5)
#build image (stack) sequence
Esempio n. 6
0
# read in reference stars from file
with open(ref_stars_fname) as f:
    ref_stars = f.readlines()
ref_stars = [x.strip() for x in ref_stars if not x.startswith('#')]

# create a list of observations from the reference stars
stack = Stack(exposure, filter, binning, 1)
stacks = [stack]
sequence = Sequence(stacks, 1)
for ref_star in ref_stars:
    ref_star_data = ref_star.split()
    name = ref_star_data[0]
    ra = ref_star_data[1]
    dec = ref_star_data[2]
    target = Target(name, ra, dec)
    observations.append(
        Observation(observatory, target, sequence, min_obs_alt, user))

telescope.slackdebug('Starting hocusfocus...')

# wait for sun to set
telescope.checkSun(True)

# find the best target (currently highest in the sky)
# this is overly complicated, but I know it works ;)
# start up the scheduler
scheduler = Scheduler(observatory, observations)
telescope.slackdebug('Identifying calibration star...')
target_observation = scheduler.whatsHighest()