def astroNN(dr=None): """ NAME: astroNN PURPOSE: download the astroNN file INPUT: dr= return the path corresponding to this data release (general default) OUTPUT: (none; just downloads) HISTORY: 2018-10-20 - Written - Bovy (UofT) """ if dr is None: dr= path._default_dr() # First make sure the file doesn't exist filePath= path.astroNNPath(dr=dr) if os.path.exists(filePath): return None # Create the file path if int(dr) == 14: downloadPath= 'https://github.com/henrysky/astroNN_spectra_paper_figures/raw/master/astroNN_apogee_dr14_catalog.fits' else: downloadPath= filePath.replace(os.path.join(path._APOGEE_DATA, _dr_string(dr)), _base_url(dr=dr)) _download_file(downloadPath,filePath,dr,verbose=True) return None
def astroNN(dr=None): """ NAME: astroNN PURPOSE: read the astroNN file INPUT: dr= data reduction to load the catalog for (automatically set based on APOGEE_REDUX if not given explicitly) OUTPUT: astroNN data HISTORY: 2018-10-20 - Written - Bovy (UofT) """ filePath = path.astroNNPath(dr=dr) if not os.path.exists(filePath): download.astroNN(dr=dr) #read astroNN file return fitsread(path.astroNNPath(dr=dr))
def astroNN(dr=None): """ NAME: astroNN PURPOSE: read the astroNN file INPUT: dr= data reduction to load the catalog for (automatically set based on APOGEE_REDUX if not given explicitly) OUTPUT: astroNN data HISTORY: 2018-10-20 - Written - Bovy (UofT) """ filePath= path.astroNNPath(dr=dr) if not os.path.exists(filePath): download.astroNN(dr=dr) #read astroNN file return fitsread(path.astroNNPath(dr=dr))