示例#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
示例#2
0
文件: download.py 项目: jbirky/apogee
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
示例#3
0
文件: read.py 项目: tchirila/apogee
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))
示例#4
0
文件: read.py 项目: Chaotique/apogee
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))
示例#5
0
文件: read.py 项目: mrawls/apogee
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)
示例#6
0
文件: read.py 项目: mrawls/apogee
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)