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