Example #1
0
# 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
star_main_observation.getTimes()
logger.debug(star_main_observation.toString().replace('\n', '; '))

# start observations
telescope.slackdebug('Starting aavso...')

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

# wait for target to be available
while Time.now() < star_main_observation.min_obs_time:
    time_left_s = (star_main_observation.min_obs_time - Time.now()).sec
    telescope.slackdebug(
        'The observation (%s) will start in %d min (at %s)...' %
        (star_main_observation.target.getName(), time_left_s / 60,
         star_main_observation.min_obs_time.iso[:-7]))
    time.sleep(wait_time_s)
Example #2
0
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)
# get min, max, and max alt obs times
asteroid_main_observation.getTimes()
logger.debug(asteroid_main_observation.toString().replace('\n', '; '))

# build calibration asteroid/star observations
sequence_json = observation_json['sequences']['calibration']
stacks_json = sequence_json['stacks']
# 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', '; '))
Example #3
0
# 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
asteroid_main_observation = Observation(observatory, target, sequence,
                                        min_obs_alt, user)
# get min, max, and max alt obs times
asteroid_main_observation.getTimes()
logger.debug(asteroid_main_observation.toString().replace('\n', '; '))

# build bracket asteroid observation
sequence_json = observation_json['sequences']['bracket']
stacks_json = sequence_json['stacks']
# 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 bracket observation