chihchunhsu / smart

Spectral Modeling Analysis and RV Tool
MIT License
7 stars 3 forks source link

Model Path Issue #7

Open wei-lingfeng opened 3 years ago

wei-lingfeng commented 3 years ago

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

https://github.com/chihchunhsu/smart/blob/2316e50bfb6f050d5dcdd0ee1e5eab6831e8a669/smart/forward_model/InterpolateModel.py#L57

chihchunhsu commented 3 years ago

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.

wei-lingfeng commented 3 years ago

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

wei-lingfeng commented 3 years ago

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.

chihchunhsu commented 3 years ago

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

ctheissen commented 3 years ago

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.