Esempio n. 1
0
def import_lastrun_data(opt):
    mjd_yesterday = ephem.date(ephem.julian_date(ephem.date(
        opt.date))) - 2400000.5

    data_to_date = query_for_observations(mjd_yesterday, opt.cal, OSSOS_RUNIDS)
    for row in data_to_date:
        storage.populate(row['dataset_name'])
Esempio n. 2
0
def megacam_corresponding_to_observations(ax):
    # now while we know the KBO was in these images (here's the measurements), want the field centres
    # to make the footprints.
    discov = [m for m in obj.mpc_observations if m.discovery][0]
    obs_frames = [m.comment.frame.split('p')[0].strip(' ') for m in obj.mpc_observations]
    obs_table = query_for_observations(Time(parameters.SURVEY_START).mjd, 1, tuple(parameters.OSSOS_RUNIDS))

    camera_dimen = 0.98

    for i in range(len(obs_table) - 1, -1, -1):
        t = obs_table.data[i]
        if str(t.dataset_name) in obs_frames:
            print str(t.dataset_name)
            alpha = 0.4
            lw = 0.95
            if Time(t.StartDate, format='mjd') < Time('2014-01-01'):
                ec = 'b'
            else:
                ec = '#E47833'
                alpha = 0.5
            if str(t.dataset_name) == discov.comment.frame[0:7]:
                ec = 'k'
                lw = 1.7
            r = Rectangle(xy=(t.RA - camera_dimen / 2.0, t.DEC - camera_dimen / 2.0),
                          height=camera_dimen,
                          width=camera_dimen,
                          edgecolor=ec,
                          alpha=alpha,
                          lw=lw,
                          zorder=-100,
                          fill=False)
            ax.add_artist(r)

    return ax
Esempio n. 3
0
def megacam_corresponding_to_observations(ax):
    # now while we know the KBO was in these images (here's the measurements), want the field centres
    # to make the footprints.
    discov = [m for m in obj.mpc_observations if m.discovery][0]
    obs_frames = [m.comment.frame.split('p')[0].strip(' ') for m in obj.mpc_observations]
    obs_table = query_for_observations(Time(parameters.SURVEY_START).mjd, 1, tuple(parameters.OSSOS_RUNIDS))

    camera_dimen = 0.98

    for i in range(len(obs_table) - 1, -1, -1):
        t = obs_table.data[i]
        if str(t.dataset_name) in obs_frames:
            print(str(t.dataset_name))
            alpha = 0.4
            lw = 0.95
            if Time(t.StartDate, format='mjd') < Time('2014-01-01'):
                ec = 'b'
            else:
                ec = '#E47833'
                alpha = 0.5
            if str(t.dataset_name) == discov.comment.frame[0:7]:
                ec = 'k'
                lw = 1.7
            r = Rectangle(xy=(t.RA - camera_dimen / 2.0, t.DEC - camera_dimen / 2.0),
                          height=camera_dimen,
                          width=camera_dimen,
                          edgecolor=ec,
                          alpha=alpha,
                          lw=lw,
                          zorder=-100,
                          fill=False)
            ax.add_artist(r)

    return ax