keflavich / HiGal_SEDfitter

SED fitting tools for Herschel Hi-Gal data
2 stars 6 forks source link

error when try to use PixelFitter #4

Open boxcwang opened 4 years ago

boxcwang commented 4 years ago

Hi, I tried to run the example, but pixelfitter = PixelFitter(bfixed=True) gives the following error:

ValueError Traceback (most recent call last)

in ----> 1 pixelfitter = PixelFitter(bfixed=True) /anaconda3/lib/python3.7/site-packages/higal_sedfitter-0.0.dev71-py3.7.egg/higal_sedfitter/fit.py in __init__(self, tguess, bguess, nguess, trange, brange, nrange, tfixed, bfixed, nfixed) 49 50 parameters = lmfit.Parameters() ---> 51 parameters.update(OrderedDict(parlist)) 52 assert list(parameters.keys())[0] == 'T' 53 assert list(parameters.keys())[1] == 'beta' /anaconda3/lib/python3.7/site-packages/lmfit-1.0.0+1.g046ebc4-py3.7.egg/lmfit/parameter.py in update(self, other) 82 """Update values and symbols with another Parameters object.""" 83 if not isinstance(other, Parameters): ---> 84 raise ValueError("'%s' is not a Parameters object" % other) 85 self.add_many(*other.values()) 86 for sym in other._asteval.user_defined_symbols(): ValueError: 'OrderedDict([('T', ), ('beta', ), ('N', )])' is not a Parameters object Any idea why parameters.update(OrderedDict(parlist)) gives the error here? Cheers Yuan
keflavich commented 4 years ago

Unfortunately this looks like a change in lmfit's API. I haven't updated this code in a while, so it will be a bit of a challenge to track down. Maybe try getting an older version of lmfit? I can't say which, though.