示例#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']), 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)
示例#2
0
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
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', '; '))
示例#3
0
文件: aavso.py 项目: tomsachen/seo
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
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]))
示例#4
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']), 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
target_main_observation = Observation(
    observatory, target, sequence, min_obs_alt, user)
# get min, max, and max alt obs times
target_main_observation.getTimes()
logger.debug(target_main_observation.toString().replace('\n', '; '))

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

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

# wait for target to be available
while Time.now() < target_main_observation.min_obs_time:
    wait_time_s = (target_main_observation.min_obs_time-Time.now()).sec
    telescope.slackdebug('The observation (%s) will start in %d min (at %s)...' % (
        target_main_observation.target.getName(), wait_time_s/60, target_main_observation.min_obs_time.iso[:-7]))
    time.sleep(delay_time)