def aspcapStar(loc_id, apogee_id, ext=1, dr=None, header=True, aspcapWavegrid=False): """ NAME: aspcapStar PURPOSE: Read an aspcapStar file for a given star INPUT: loc_id - location ID (field for 1m targets) apogee_id - APOGEE ID of the star ext= (1) extension to load header= (True) if True, also return the header dr= return the path corresponding to this data release (general default) aspcapWavegrid= (False) if True, output the spectrum on the ASPCAP wavelength grid OUTPUT: aspcapStar file or (aspcapStar file, header) HISTORY: 2014-11-25 - Written - Bovy (IAS) """ filePath = path.aspcapStarPath(loc_id, apogee_id, dr=dr) if not os.path.exists(filePath): download.aspcapStar(loc_id, apogee_id, dr=dr) data = fitsio.read(filePath, ext, header=header) return data
def aspcapStar(loc_id, apogee_id, telescope='apo25m', ext=1, dr=None, header=True, aspcapWavegrid=False): """ NAME: aspcapStar PURPOSE: Read an aspcapStar file for a given star INPUT: loc_id - location ID (field for 1m targets or after DR14) apogee_id - APOGEE ID of the star telescope= telescope used ('apo25m' [default], 'apo1m', 'lco25m') ext= (1) extension to load header= (True) if True, also return the header dr= return the path corresponding to this data release (general default) aspcapWavegrid= (False) if True, output the spectrum on the ASPCAP wavelength grid OUTPUT: aspcapStar file or (aspcapStar file, header) HISTORY: 2014-11-25 - Written - Bovy (IAS) 2018-01-22 - Edited for new post-DR14 path structure - Bovy (UofT) """ filePath = path.aspcapStarPath(loc_id, apogee_id, dr=dr, telescope=telescope) if not os.path.exists(filePath): download.aspcapStar(loc_id, apogee_id, dr=dr, telescope=telescope) data = fitsread(filePath, ext, header=header) return data
def aspcapStar(loc_id,apogee_id,ext=1,dr=None,header=True, aspcapWavegrid=False): """ NAME: aspcapStar PURPOSE: Read an aspcapStar file for a given star INPUT: loc_id - location ID (field for 1m targets) apogee_id - APOGEE ID of the star ext= (1) extension to load header= (True) if True, also return the header dr= return the path corresponding to this data release (general default) aspcapWavegrid= (False) if True, output the spectrum on the ASPCAP wavelength grid OUTPUT: aspcapStar file or (aspcapStar file, header) HISTORY: 2014-11-25 - Written - Bovy (IAS) """ filePath= path.aspcapStarPath(loc_id,apogee_id,dr=dr) if not os.path.exists(filePath): download.aspcapStar(loc_id,apogee_id,dr=dr) data= fitsio.read(filePath,ext,header=header) return data
def aspcapStar(loc_id,apogee_id,telescope='apo25m',ext=1,dr=None,header=True, aspcapWavegrid=False): """ NAME: aspcapStar PURPOSE: Read an aspcapStar file for a given star INPUT: loc_id - location ID (field for 1m targets or after DR14) apogee_id - APOGEE ID of the star telescope= telescope used ('apo25m' [default], 'apo1m', 'lco25m') ext= (1) extension to load header= (True) if True, also return the header dr= return the path corresponding to this data release (general default) aspcapWavegrid= (False) if True, output the spectrum on the ASPCAP wavelength grid OUTPUT: aspcapStar file or (aspcapStar file, header) HISTORY: 2014-11-25 - Written - Bovy (IAS) 2018-01-22 - Edited for new post-DR14 path structure - Bovy (UofT) """ filePath= path.aspcapStarPath(loc_id,apogee_id,dr=dr,telescope=telescope) if not os.path.exists(filePath): download.aspcapStar(loc_id,apogee_id,dr=dr,telescope=telescope) data= fitsread(filePath,ext,header=header) return data
apogee_id - APOGEE ID of the star telescope= telescope used ('apo25m' [default], 'apo1m', 'lco25m') ext= (1) extension to load header= (True) if True, also return the header dr= return the path corresponding to this data release (general default) aspcapWavegrid= (False) if True, output the spectrum on the ASPCAP wavelength grid OUTPUT: aspcapStar file or (aspcapStar file, header) HISTORY: 2014-11-25 - Written - Bovy (IAS) 2018-01-22 - Edited for new post-DR14 path structure - Bovy (UofT) """ filePath= path.aspcapStarPath(loc_id,apogee_id,dr=dr,telescope=telescope) if not os.path.exists(filePath): download.aspcapStar(loc_id,apogee_id,dr=dr,telescope=telescope) data= fitsread(filePath,ext,header=header) return data @specOnAspcapWavegrid def apStar(loc_id,apogee_id,telescope='apo25m', ext=1,dr=None,header=True,aspcapWavegrid=False): """ NAME: apStar PURPOSE: Read an apStar file for a given star INPUT: loc_id - location ID (field for 1m targets or after DR14) apogee_id - APOGEE ID of the star telescope= telescope used ('apo25m' [default], 'apo1m', 'lco25m')