jbirky / apogee_tools

Modeling tools for SDSS/APOGEE spectra
http://apogee-tools.readthedocs.io/
MIT License
2 stars 3 forks source link

apvisit download not working? #4

Closed aburgasser closed 7 years ago

aburgasser commented 7 years ago

in your instructions I tried:

data = ap.Spectrum(id='2M03290406+3117075-0', type='apvisit')

and got

OSError Traceback (most recent call last)

in () ----> 1 data = ap.Spectrum(id='2M03290406+3117075-0', type='apvisit') /Users/adam/python_codes/apogee_tools/apogee_tools/core.py in __init__(self, **kwargs) 187 """ 188 --> 189 openFile = fits.open(self.file) 190 191 self.HDU0 = openFile[0] /Users/adam/anaconda3/lib/python3.5/site-packages/astropy/io/fits/hdu/hdulist.py in fitsopen(name, mode, memmap, save_backup, cache, lazy_load_hdus, **kwargs) 164 165 return HDUList.fromfile(name, mode, memmap, save_backup, cache, --> 166 lazy_load_hdus, **kwargs) 167 168 /Users/adam/anaconda3/lib/python3.5/site-packages/astropy/io/fits/hdu/hdulist.py in fromfile(cls, fileobj, mode, memmap, save_backup, cache, lazy_load_hdus, **kwargs) 402 return cls._readfrom(fileobj=fileobj, mode=mode, memmap=memmap, 403 save_backup=save_backup, cache=cache, --> 404 lazy_load_hdus=lazy_load_hdus, **kwargs) 405 406 @classmethod /Users/adam/anaconda3/lib/python3.5/site-packages/astropy/io/fits/hdu/hdulist.py in _readfrom(cls, fileobj, data, mode, memmap, save_backup, cache, lazy_load_hdus, **kwargs) 1042 # raise and exception 1043 if not read_one and mode in ('readonly', 'denywrite'): -> 1044 raise IOError('Empty or corrupt FITS file') 1045 1046 if not lazy_load_hdus: OSError: Empty or corrupt FITS file the command: data = ap.Spectrum(id='2M03290406+3117075', type='aspcap') worked fine
aburgasser commented 7 years ago

this is the same as issue #1

jbirky commented 7 years ago

ok I have removed the documentation for all apVisit things. they probably should be completely rewritten/restructured at some point