jbirky / apogee_tools

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

Issue with getModel #5

Closed caganze closed 7 years ago

caganze commented 7 years ago

mdl = ap.getModel(params=[3200, 5.0, 0.0], grid='BTSETTLb', xrange=[15200,16940])

returns /Users/caganze/Research/apogee_all/apogee_tools/apogee_tools/spec_tools.py in load_flux(self, parameters) 93 ''' 94 ---> 95 key = self.key_name.format(*parameters) 96 with h5py.File(self.filename, "r") as hdf5: 97 try:

AttributeError: 'NoneType' object has no attribute 'format'

jbirky commented 7 years ago

The issue was that key_name in line 59 of spec_tools.py was missing a user input argument, so I changed it to this, the format from starfish: key_name = kwargs.get('key_name', "t{0:.0f}g{1:.1f}z{2:.1f}") which seems to fix it