Beispiel #1
0
def apWave(chip, ext=2, dr=None):
    """
    NAME:
       apWave
    PURPOSE:
       open an apWave file
    INPUT:
       chip - chip 'a', 'b', or 'c'
       ext= (2) extension to read
       dr= return the path corresponding to this data release      
    OUTPUT:
       contents of HDU ext
    HISTORY:
       2015-02-27 - Written - Bovy (IAS)
    """
    filePath = path.apWavePath(chip, dr=dr)
    if not os.path.exists(filePath):
        download.apWave(chip, dr=dr)
    data = fitsio.read(filePath, ext)
    return data
Beispiel #2
0
def apWave(chip,ext=2,dr=None):
    """
    NAME:
       apWave
    PURPOSE:
       open an apWave file
    INPUT:
       chip - chip 'a', 'b', or 'c'
       ext= (2) extension to read
       dr= return the path corresponding to this data release      
    OUTPUT:
       contents of HDU ext
    HISTORY:
       2015-02-27 - Written - Bovy (IAS)
    """
    filePath= path.apWavePath(chip,dr=dr)
    if not os.path.exists(filePath):
        download.apWave(chip,dr=dr)
    data= fitsio.read(filePath,ext)
    return data