예제 #1
0
def apogeePlate(dr=None):
    """
    NAME:
       apogeePlate
    PURPOSE:
       download the apogeePlate 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.apogeePlatePath(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 apogeePlate(dr=None):
    """
    NAME:
       apogeePlate
    PURPOSE:
       download the apogeePlate 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.apogeePlatePath(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 apogeePlate(dr=None):
    """
    NAME:
       apogeePlate
    PURPOSE:
       read the apogeePlate file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeePlate file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    return fitsio.read(path.apogeePlatePath(dr=dr))
예제 #4
0
파일: read.py 프로젝트: Chaotique/apogee
def apogeePlate(dr=None):
    """
    NAME:
       apogeePlate
    PURPOSE:
       read the apogeePlate file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeePlate file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    return fitsio.read(path.apogeePlatePath(dr=dr))
예제 #5
0
파일: read.py 프로젝트: mrawls/apogee
def apogeePlate(dr=None):
    """
    NAME:
       apogeePlate
    PURPOSE:
       read the apogeePlate file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeePlate file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    filePath = path.apogeePlatePath(dr=dr)
    if not os.path.exists(filePath):
        download.apogeePlate(dr=dr)
    return fitsio.read(filePath)
예제 #6
0
파일: read.py 프로젝트: mrawls/apogee
def apogeePlate(dr=None):
    """
    NAME:
       apogeePlate
    PURPOSE:
       read the apogeePlate file
    INPUT:
       dr= return the file corresponding to this data release
    OUTPUT:
       apogeePlate file
    HISTORY:
       2013-11-04 - Written - Bovy (IAS)
    """
    filePath= path.apogeePlatePath(dr=dr)
    if not os.path.exists(filePath):
        download.apogeePlate(dr=dr)
    return fitsio.read(filePath)