chihchunhsu/smart

Model Path Issue

Opened this issue · 5 comments

Seems like there's a missing "O" in the model file path, where it should be "_%s-O%s.fits" according to the shared google drive models. (When modelset="phoenix-aces-agss-cond-2011", and instrument="nirspec".)

filename = '%s'%smart.ModelSets[modelset.lower()] + '_t{0:03d}'.format(int(temp.data[0])) + '_g{0:.2f}'.format(float(logg)) + '_z{0:.2f}'.format(float(metal)) + '_en{0:.2f}'.format(float(alpha)) + '_%s-%s.fits'%(instrument.upper(), order.upper())

I think at some point we decided to use order='O33' as a string instead of order=33. This would help the convention more consistent between other instruments that do not have order, e.g. APOGEE.

I see. I'll make the changes accordingly. Thanks!

When I try
smart.makeModel(3500, modelset='phoenix-aces-agss-cond-2011')
smart is still trying to search for "...NIRSPEC-33.fits" file, which is missing an "O" before "33".

However, when I run
smart.makeModel(3500, modelset='phoenix-aces-agss-cond-2011', order='O33')
smart will be searching under the folder "NIRSPEC-OO33", where there's an extra "O" before "33".

I think there's an incompatibility here.

Okay. I just had a dirty fix for this. I fixed with order='33' as the keyword:
mdl = smart.makeModel(teff=2400, logg=5.0, z=0.0, en=0.0, modelset='phoenix-aces-agss-cond-2011', order='33', instrument='nirspec')

We should have a fix where is can accept 'O33', '33' and 33 as options, and it will lstrip any 'O' and convert to string or float. That makes it easier for the user.