Example #1
0
def find_crossmatch_failures(survey):

    r = pd.read_hdf('/data/jls/GaiaDR2/spectro/%s_input.hdf5' % survey)

    #    columns = ['parallax', 'parallax_error',
    #               'pmra', 'pmdec',
    #               'pmra_error', 'pmdec_error',
    #               'parallax_pmra_corr', 'parallax_pmdec_corr', 'pmra_pmdec_corr',
    #               'source_id', 'G', 'GBP', 'GRP', 'eG', 'eGRP', 'eGBP',
    #               'a_g_val', 'a_g_percentile_lower', 'a_g_percentile_upper']

    #   r = r.drop(columns, axis=1)

    if survey == 'GES':
        rx = load_ges()
    if survey == 'APOGEE':
        rx = load_apogee()
    if survey == 'RAVE':
        rx = load_rave(use_dr5=True)
    if survey == 'RAVEON':
        rx = load_rave(use_dr5=False)
    if survey == 'GALAH':
        rx = load_galah()
    if survey == 'LAMOST':
        rx = load_lamost()
        rx = format_columns(rx)

    rx = crossmatch_gaia_spectro(rx, no_proper_motion=False, dist_max=5.)
    print len(rx), np.count_nonzero(r.source_id > 0), np.count_nonzero(
        rx.source_id > 0), np.count_nonzero(r.source_id != rx.source_id)
    rx = rx[(rx.source_id > 0)
            & (r.source_id != rx.source_id)].reset_index(drop=True)

    rx.to_hdf('/data/jls/GaiaDR2/spectro/%s_input_pm.hdf5' % survey, 'data')
Example #2
0
def run_rave_on():
    rave = load_rave(output_folder + 'RAVEON_input.hdf5', use_dr1=DR1)
    return
    rave = check_photometry(rave)
    run_distance_pipeline(rave,
                          output_folder + 'RAVE_Cannon_distances%s.hdf5' % name_str,
                          'raveid', 'RAVE Cannon',
                          npool=npool,
                          with_parallax=with_parallax)
Example #3
0
def run_rave_dr5_fillin():
    rave = load_rave(use_dr1=DR1, use_dr5=True)
    rave2 = Table.read(output_folder + 'RAVE_DR5_distances.hdf5')
    rave = check_photometry(rave[rave2['flag'] == 3].reset_index(drop=True))
    run_distance_pipeline(rave,
                          output_folder + 'RAVE_DR5_distances_fillin.hdf5',
                          'raveid',
                          'RAVE DR5',
                          npool=npool,
                          with_parallax=with_parallax)
Example #4
0
def run_rave_dr5():
    rave = load_rave(output_file=output_folder + 'RAVE_input.hdf5', use_dr1=DR1, use_dr5=True)
    return
    rave = check_photometry(rave)
    run_distance_pipeline(rave,
                          output_folder + 'RAVE_DR5_distances%s.hdf5' % name_str,
                          'raveid', 'RAVE DR5',
                          npool=npool,
                          with_parallax=with_parallax,
                          thin_mag=0.1)
Example #5
0
def run_rave_dr5():
    rave = load_rave(use_dr1=DR1, use_dr5=True)
    if TEST:
        rave = rave.sample(n=TESTNUMBER,
                           random_state=random_seed).reset_index(drop=True)
    rave = check_photometry(rave)
    run_distance_pipeline(rave,
                          output_folder +
                          'RAVE_DR5_distances%s.hdf5' % name_str,
                          'raveid',
                          'RAVE DR5',
                          npool=npool,
                          with_parallax=with_parallax)
Example #6
0
def run_rave_on_extra():
    rave = load_rave(output_folder + 'RAVEON_input_pm.hdf5', use_dr1=DR1)
    if TEST:
        rave = rave.sample(n=TESTNUMBER,
                           random_state=random_seed).reset_index(drop=True)
    rave = check_photometry(rave)
    run_distance_pipeline(rave,
                          output_folder +
                          'RAVE_Cannon_distances_pm%s.hdf5' % name_str,
                          'raveid',
                          'RAVE Cannon',
                          npool=npool,
                          with_parallax=with_parallax)