Exemplo n.º 1
0
def prep_stellar_obj(spectral_ap_radius=None,
                     sky_inner_radius=None,
                     flatfield=False):
    #todo + include call to combine_spectra() in reduction.py
    adir = '/home/tevans/analysis/gtc/hatp19'
    science_images_full_list_filename = 'cal_science_noflatfield.lst'
    badpix_maps_full_list_filename = 'badpix_full.lst'
    science_images_list_filename = 'science_images.lst'  # should apply to all stars...
    badpix_maps_list_filename = 'badpix_maps.lst'  # should apply to all stars...
    science_traces_list_filename = [
        'science_traces_reference.lst', 'science_traces_hatp19.lst'
    ]
    ext = '_ap{0:.2f}bg{1:.2f}'.format(spectral_ap_radius, sky_inner_radius)
    science_spectra_list_filename = [ 'science_spectra_reference{0}.lst'.format( ext ), \
                                      'science_spectra_hatp19{0}.lst'.format( ext ) ]
    ddir_science = os.path.join(ddir, 'object')
    ddir_arc = os.path.join(ddir, 'arc')
    star_names = ['reference', 'hatp19']
    disp_axis = 0
    crossdisp_axis = 1
    crossdisp_bounds = [[150, 350], [510, 710]]
    disp_bounds = [[600, 2050], [600, 2050]]
    marc_filename = 'marc_HgAr.fits'
    star0_wavcal_crossdisp_bounds = crossdisp_bounds[0]
    star1_wavcal_crossdisp_bounds = crossdisp_bounds[1]
    wavcal_fiducial_lines = [ 4046.563, 5460.735, 7067.21, 7272.936, 7383.981, 7635.106, \
                              7723.98, 7948.176, 8264.522, 8521.442, 8667.944 ]
    star0_wavcal_disp_bounds = [ [ 785, 797 ], \
                                 [ 1186, 1204 ], \
                                 [ 1608, 1620 ], \
                                 [ 1659, 1675 ], \
                                 [ 1687, 1705 ], \
                                 [ 1752, 1767 ], \
                                 [ 1775, 1795 ], \
                                 [ 1830, 1847 ], \
                                 [ 1910, 1930, ], \
                                 [ 1967, 1979], \
                                 [ 1979, 1990] ]
    star1_wavcal_disp_bounds = star0_wavcal_disp_bounds
    wavcal_crossdisp_bounds = [
        star0_wavcal_crossdisp_bounds, star1_wavcal_crossdisp_bounds
    ]
    wavcal_disp_bounds = [star0_wavcal_disp_bounds, star1_wavcal_disp_bounds]

    stellar = reduction.prep_stellar_obj( adir=adir, \
                                          science_images_full_list_filename=science_images_full_list_filename, \
                                          badpix_maps_full_list_filename=badpix_maps_full_list_filename, \
                                          science_images_list_filename=science_images_list_filename, \
                                          badpix_maps_list_filename=badpix_maps_list_filename, \
                                          science_traces_list_filename=science_traces_list_filename, \
                                          science_spectra_list_filename=science_spectra_list_filename, \
                                          ddir_science=ddir_science, ddir_arc=ddir_arc, n_exts=N_EXTS, \
                                          star_names=star_names, marc_filename=marc_filename, \
                                          disp_axis=disp_axis, crossdisp_axis=crossdisp_axis, \
                                          wavcal_fiducial_lines=wavcal_fiducial_lines, \
                                          wavcal_crossdisp_bounds=wavcal_crossdisp_bounds, \
                                          wavcal_disp_bounds=wavcal_disp_bounds, \
                                          crossdisp_bounds=crossdisp_bounds, disp_bounds=disp_bounds  )

    return stellar
Exemplo n.º 2
0
def prep_stellar_obj( night='' ):
    #todo + include call to combine_spectra() in reduction.py
    adir_full = os.path.join( ADIR, night )
    #adir = '/home/tevans/analysis/gtc/hatp19'
    science_images_full_list_filename = 'cal_science_noflatfield.lst'
    badpix_maps_full_list_filename = 'badpix_full.lst'
    science_images_list_filename = 'science_images.lst' # should apply to all stars...
    badpix_maps_list_filename = 'badpix_maps.lst' # should apply to all stars...
    science_traces_list_filename = [ 'science_traces_reference.lst', 'science_traces_hatp19.lst' ]
    science_spectra_list_filename = [ 'science_spectra_reference.lst', 'science_spectra_hatp19.lst' ]
    ddir_science = os.path.join( ddir, 'object' )
    ddir_arc = os.path.join( ddir, 'arc' )
    star_names = [ 'reference',  'hatp19' ]
    disp_axis = 0
    crossdisp_axis = 0
    crossdisp_bounds = [ [ 150, 350 ], [ 510, 710 ] ]
    disp_bounds = [ [ 400, 2050 ], [ 400, 2050 ] ]
    stellar = reduction.prep_stellar_obj( adir=adir, \
                                          science_images_full_list_filename=science_images_full_list_filename, \
                                          badpix_maps_full_list_filename=badpix_maps_full_list_filename, \
                                          science_images_list_filename=science_images_list_filename, \
                                          badpix_maps_list_filename=badpix_maps_list_filename, \
                                          science_traces_list_filename=science_traces_list_filename, \
                                          science_spectra_list_filename=science_spectra_list_filename, \
                                          ddir_science=ddir_science, ddir_arc=ddir_arc, n_exts=N_EXTS, \
                                          star_names=star_names, \
                                          disp_axis=disp_axis, crossdisp_axis=crossdisp_axis, \
                                          crossdisp_bounds=crossdisp_bounds, disp_bounds=disp_bounds )
    return stellar
Exemplo n.º 3
0
def prep_stellar_obj():
    #todo + include call to combine_spectra() in reduction.py
    adir = '/home/tevans/analysis/gtc/hatp18'
    science_images_full_list_filename = 'cal_science_noflatfield.lst'
    badpix_maps_full_list_filename = 'badpix_full.lst'
    science_images_list_filename = 'science_images.lst' # should apply to all stars...
    badpix_maps_list_filename = 'badpix_maps.lst' # should apply to all stars...
    science_traces_list_filename = [ [ 'science_traces_hatp18.lst' ], [ 'science_traces_reference.lst' ] ]
    science_spectra_list_filename = [ [ 'science_spectra_hatp18.lst' ], [ 'science_spectra_reference.lst' ] ]
    ddir_science = os.path.join( ddir, 'object' )
    ddir_arc = os.path.join( ddir, 'arc' )
    n_exts = 2
    star_names_chip1 = [ 'hatp18' ]
    star_names_chip2 = [ 'reference' ]
    star_names = [ star_names_chip1, star_names_chip2 ]
    disp_axis = 0
    crossdisp_axis = 1
    crossdisp_bounds_chip1 = [ [ 300, 900 ] ]
    disp_bounds_chip1 = [ [ 600, 2050 ] ]
    crossdisp_bounds_chip2 = [ [ 200, 400 ] ]
    disp_bounds_chip2 = [ [ 600, 2050 ] ]
    crossdisp_bounds = [ crossdisp_bounds_chip1, crossdisp_bounds_chip2 ]
    disp_bounds = [ disp_bounds_chip1, disp_bounds_chip2 ]
    stellar = reduction.prep_stellar_obj( adir=adir, \
                                          science_images_full_list_filename=science_images_full_list_filename, \
                                          badpix_maps_full_list_filename=badpix_maps_full_list_filename, \
                                          science_images_list_filename=science_images_list_filename, \
                                          badpix_maps_list_filename=badpix_maps_list_filename, \
                                          science_traces_list_filename=science_traces_list_filename, \
                                          science_spectra_list_filename=science_spectra_list_filename, \
                                          ddir_science=ddir_science, ddir_arc=ddir_arc, n_exts=n_exts, \
                                          star_names=star_names, \
                                          disp_axis=disp_axis, crossdisp_axis=crossdisp_axis, \
                                          crossdisp_bounds=crossdisp_bounds, disp_bounds=disp_bounds )
    return stellar
Exemplo n.º 4
0
def prep_stellar_obj(night=''):
    #todo + include call to combine_spectra() in reduction.py
    adir_full = os.path.join(ADIR, night)
    #adir = '/home/tevans/analysis/gtc/hatp19'
    science_images_full_list_filename = 'cal_science_noflatfield.lst'
    badpix_maps_full_list_filename = 'badpix_full.lst'
    science_images_list_filename = 'science_images.lst'  # should apply to all stars...
    badpix_maps_list_filename = 'badpix_maps.lst'  # should apply to all stars...
    science_traces_list_filename = [
        'science_traces_reference.lst', 'science_traces_hatp19.lst'
    ]
    science_spectra_list_filename = [
        'science_spectra_reference.lst', 'science_spectra_hatp19.lst'
    ]
    ddir_science = os.path.join(ddir, 'object')
    ddir_arc = os.path.join(ddir, 'arc')
    star_names = ['reference', 'hatp19']
    disp_axis = 0
    crossdisp_axis = 0
    crossdisp_bounds = [[150, 350], [510, 710]]
    disp_bounds = [[400, 2050], [400, 2050]]
    stellar = reduction.prep_stellar_obj( adir=adir, \
                                          science_images_full_list_filename=science_images_full_list_filename, \
                                          badpix_maps_full_list_filename=badpix_maps_full_list_filename, \
                                          science_images_list_filename=science_images_list_filename, \
                                          badpix_maps_list_filename=badpix_maps_list_filename, \
                                          science_traces_list_filename=science_traces_list_filename, \
                                          science_spectra_list_filename=science_spectra_list_filename, \
                                          ddir_science=ddir_science, ddir_arc=ddir_arc, n_exts=N_EXTS, \
                                          star_names=star_names, \
                                          disp_axis=disp_axis, crossdisp_axis=crossdisp_axis, \
                                          crossdisp_bounds=crossdisp_bounds, disp_bounds=disp_bounds )
    return stellar
Exemplo n.º 5
0
def prep_stellar_obj( spectral_ap_radius=None, sky_inner_radius=None, flatfield=False ):
    #todo + include call to combine_spectra() in reduction.py
    adir = '/home/tevans/analysis/gtc/hatp19'
    science_images_full_list_filename = 'cal_science_noflatfield.lst'
    badpix_maps_full_list_filename = 'badpix_full.lst'
    science_images_list_filename = 'science_images.lst' # should apply to all stars...
    badpix_maps_list_filename = 'badpix_maps.lst' # should apply to all stars...
    science_traces_list_filename = [ 'science_traces_reference.lst', 'science_traces_hatp19.lst' ]
    ext = '_ap{0:.2f}bg{1:.2f}'.format( spectral_ap_radius, sky_inner_radius )
    science_spectra_list_filename = [ 'science_spectra_reference{0}.lst'.format( ext ), \
                                      'science_spectra_hatp19{0}.lst'.format( ext ) ]
    ddir_science = os.path.join( ddir, 'object' )
    ddir_arc = os.path.join( ddir, 'arc' )
    star_names = [ 'reference',  'hatp19' ]
    disp_axis = 0
    crossdisp_axis = 1
    crossdisp_bounds = [ [ 150, 350 ], [ 510, 710 ] ]
    disp_bounds = [ [ 600, 2050 ], [ 600, 2050 ] ]
    marc_filename = 'marc_HgAr.fits'
    star0_wavcal_crossdisp_bounds = crossdisp_bounds[0]
    star1_wavcal_crossdisp_bounds = crossdisp_bounds[1]
    wavcal_fiducial_lines = [ 4046.563, 5460.735, 7067.21, 7272.936, 7383.981, 7635.106, \
                              7723.98, 7948.176, 8264.522, 8521.442, 8667.944 ]
    star0_wavcal_disp_bounds = [ [ 785, 797 ], \
                                 [ 1186, 1204 ], \
                                 [ 1608, 1620 ], \
                                 [ 1659, 1675 ], \
                                 [ 1687, 1705 ], \
                                 [ 1752, 1767 ], \
                                 [ 1775, 1795 ], \
                                 [ 1830, 1847 ], \
                                 [ 1910, 1930, ], \
                                 [ 1967, 1979], \
                                 [ 1979, 1990] ]
    star1_wavcal_disp_bounds = star0_wavcal_disp_bounds
    wavcal_crossdisp_bounds = [ star0_wavcal_crossdisp_bounds, star1_wavcal_crossdisp_bounds ]
    wavcal_disp_bounds = [ star0_wavcal_disp_bounds, star1_wavcal_disp_bounds ]

    stellar = reduction.prep_stellar_obj( adir=adir, \
                                          science_images_full_list_filename=science_images_full_list_filename, \
                                          badpix_maps_full_list_filename=badpix_maps_full_list_filename, \
                                          science_images_list_filename=science_images_list_filename, \
                                          badpix_maps_list_filename=badpix_maps_list_filename, \
                                          science_traces_list_filename=science_traces_list_filename, \
                                          science_spectra_list_filename=science_spectra_list_filename, \
                                          ddir_science=ddir_science, ddir_arc=ddir_arc, n_exts=N_EXTS, \
                                          star_names=star_names, marc_filename=marc_filename, \
                                          disp_axis=disp_axis, crossdisp_axis=crossdisp_axis, \
                                          wavcal_fiducial_lines=wavcal_fiducial_lines, \
                                          wavcal_crossdisp_bounds=wavcal_crossdisp_bounds, \
                                          wavcal_disp_bounds=wavcal_disp_bounds, \
                                          crossdisp_bounds=crossdisp_bounds, disp_bounds=disp_bounds  )

    return stellar
Exemplo n.º 6
0
def prep_stellar_obj():
    #todo + include call to combine_spectra() in reduction.py
    adir = '/home/tevans/analysis/gtc/hatp18'
    science_images_full_list_filename = 'cal_science_noflatfield.lst'
    badpix_maps_full_list_filename = 'badpix_full.lst'
    science_images_list_filename = 'science_images.lst'  # should apply to all stars...
    badpix_maps_list_filename = 'badpix_maps.lst'  # should apply to all stars...
    science_traces_list_filename = [['science_traces_hatp18.lst'],
                                    ['science_traces_reference.lst']]
    science_spectra_list_filename = [['science_spectra_hatp18.lst'],
                                     ['science_spectra_reference.lst']]
    ddir_science = os.path.join(ddir, 'object')
    ddir_arc = os.path.join(ddir, 'arc')
    n_exts = 2
    star_names_chip1 = ['hatp18']
    star_names_chip2 = ['reference']
    star_names = [star_names_chip1, star_names_chip2]
    disp_axis = 0
    crossdisp_axis = 1
    crossdisp_bounds_chip1 = [[300, 900]]
    disp_bounds_chip1 = [[600, 2050]]
    crossdisp_bounds_chip2 = [[200, 400]]
    disp_bounds_chip2 = [[600, 2050]]
    crossdisp_bounds = [crossdisp_bounds_chip1, crossdisp_bounds_chip2]
    disp_bounds = [disp_bounds_chip1, disp_bounds_chip2]
    stellar = reduction.prep_stellar_obj( adir=adir, \
                                          science_images_full_list_filename=science_images_full_list_filename, \
                                          badpix_maps_full_list_filename=badpix_maps_full_list_filename, \
                                          science_images_list_filename=science_images_list_filename, \
                                          badpix_maps_list_filename=badpix_maps_list_filename, \
                                          science_traces_list_filename=science_traces_list_filename, \
                                          science_spectra_list_filename=science_spectra_list_filename, \
                                          ddir_science=ddir_science, ddir_arc=ddir_arc, n_exts=n_exts, \
                                          star_names=star_names, \
                                          disp_axis=disp_axis, crossdisp_axis=crossdisp_axis, \
                                          crossdisp_bounds=crossdisp_bounds, disp_bounds=disp_bounds )
    return stellar