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
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
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))
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)
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)