aburgasser / splat

SpeX Prism Spectral Analysis Toolkit
MIT License
25 stars 46 forks source link

variable error when using modelFitEMCEE #122

Open lsbrock opened 6 years ago

lsbrock commented 6 years ago

I'm working through the example provided for the function modelFitEMCEE (posted below). I have tried a few variations (i.e., excluding keywords) and tried loading in a model first, too. I am getting the following error each time: File "/Users/lsbrock/python/splat/splat/model.py", line 3880, in modelFitEMCEE modelset = kwargs.get('model', modelset) UnboundLocalError: local variable 'modelset' referenced before assignment

import splat sp = splat.getSpectrum(shortname='1507-1627')[0] sp.fluxCalibrate('2MASS J',12.16,absolute=True) spt,spt_e = splat.classifyByStandard(sp) teff,teff_e = splat.typeToTeff(spt) result = splat.model.modelFitEMCEE(sp,t0=teff,g0=5.0,fit_metallicity=False,model='BTSettl2008', nwalkers=50,nsamples=500,output='/Users/lsbrock/python/test')

aburgasser commented 6 years ago

I apologize, but both modelFitEMCEE and modelfitMCMC are currently "offline" as we made a major change to how the models are referenced, and are still working through the updates. modelFitGrid should be working. I'll note on this thread when those functions are back online (should be within the month).

lsbrock commented 6 years ago

Thank you for letting me know! I will stay tuned for the functions to come back online. And yes, I was able to get modelFitGrid to work without any issues.