Ejemplo n.º 1
0
def apogeeDesign(dr=None):
    """
    NAME:
       apogeeDesign
    PURPOSE:
       download the apogeeDesign file
    INPUT:
       dr= return the path corresponding to this data release (general default)
    OUTPUT:
       (none; just downloads)
    HISTORY:
       2015-12-27 - Written - Bovy (UofT)
    """
    if dr is None: dr= path._default_dr()
    # First make sure the file doesn't exist
    filePath= path.apogeeDesignPath(dr=dr)
    if os.path.exists(filePath): return None
    # Create the file path    
    downloadPath= os.path.join(path._APOGEE_DATA,'dr%s' % dr,
                               'apogee','target',os.path.basename(filePath))\
                               .replace(os.path.join(path._APOGEE_DATA,
                                                     _dr_string(dr)),
                                        _base_url(dr=dr))
    _download_file(downloadPath,filePath,dr)
    return None
Ejemplo n.º 2
0
def apogeeDesign(dr=None):
    """
    NAME:
       apogeeDesign
    PURPOSE:
       download the apogeeDesign file
    INPUT:
       dr= return the path corresponding to this data release (general default)
    OUTPUT:
       (none; just downloads)
    HISTORY:
       2015-12-27 - Written - Bovy (UofT)
    """
    if dr is None: dr = path._default_dr()
    # First make sure the file doesn't exist
    filePath = path.apogeeDesignPath(dr=dr)
    if os.path.exists(filePath): return None
    # Create the file path
    downloadPath= os.path.join(path._APOGEE_DATA,'dr%s' % dr,
                               'apogee','target',os.path.basename(filePath))\
                               .replace(os.path.join(path._APOGEE_DATA,
                                                     _dr_string(dr)),
                                        _base_url(dr=dr))
    _download_file(downloadPath, filePath, dr)
    return None
Ejemplo n.º 3
0
def apogeeDesign(dr=None):
    """
    NAME:
       apogeeDesign
    PURPOSE:
       read the apogeeDesign file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeeDesign file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    return fitsio.read(path.apogeeDesignPath(dr=dr))
Ejemplo n.º 4
0
def apogeeDesign(dr=None):
    """
    NAME:
       apogeeDesign
    PURPOSE:
       read the apogeeDesign file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeeDesign file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    return fitsio.read(path.apogeeDesignPath(dr=dr))
Ejemplo n.º 5
0
def apogeeDesign(dr=None):
    """
    NAME:
       apogeeDesign
    PURPOSE:
       read the apogeeDesign file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeeDesign file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    filePath = path.apogeeDesignPath(dr=dr)
    if not os.path.exists(filePath):
        download.apogeeDesign(dr=dr)
    return fitsio.read(filePath)
Ejemplo n.º 6
0
def apogeeDesign(dr=None):
    """
    NAME:
       apogeeDesign
    PURPOSE:
       read the apogeeDesign file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeeDesign file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    filePath= path.apogeeDesignPath(dr=dr)
    if not os.path.exists(filePath):
        download.apogeeDesign(dr=dr)
    return fitsio.read(filePath)