jpierel14 / snsed

3 stars 3 forks source link

colorCalc fails on reference to sncosmo.SFD98Map #4

Closed Zeklandia closed 5 years ago

Zeklandia commented 5 years ago

Running through the code available in the documentation (aside from the print calls) yields this stack trace:

Downloading http://sncosmo.github.io/data/spectra/alpha_lyr_stis_007.fits
|================================================================================================================================================================================================================| 241k/241k (100.00%)         0s
Getting best fit for: U-B,r-J,r-H,r-K
No model provided, running series of models.
Traceback (most recent call last):
  File "…/snsedextend_tutorial.py", line 15, in <module>
    dust='CCM89Dust', effect_frames=['rest', 'obs'], effect_names=['host', 'mw'])
  File "…/anaconda3/envs/astro3/lib/python3.7/site-packages/snsedextend/colorCalc.py", line 358, in curveToColor
    fits.append(_snFit([mod]+args))
  File "…/anaconda3/envs/astro3/lib/python3.7/site-packages/snsedextend/colorCalc.py", line 56, in _snFit
    dust_dict={'SFD98Map':sncosmo.SFD98Map,'CCM89Dust':sncosmo.CCM89Dust,'OD94Dust':sncosmo.OD94Dust,'F99Dust':sncosmo.F99Dust}
AttributeError: module 'sncosmo' has no attribute 'SFD98Map'
Zeklandia commented 5 years ago

Actually this happens on every attempt to make a color table:

Getting best fit for: r-z
Traceback (most recent call last):
…
  File "…/anaconda3/envs/astro3/lib/python3.7/site-packages/snsedextend/colorCalc.py", line 378, in curveToColor
    bestRes,bestFit=_snFit(append(model,args))
  File "…/anaconda3/envs/astro3/lib/python3.7/site-packages/snsedextend/colorCalc.py", line 56, in _snFit
    dust_dict={'SFD98Map':sncosmo.SFD98Map,'CCM89Dust':sncosmo.CCM89Dust,'OD94Dust':sncosmo.OD94Dust,'F99Dust':sncosmo.F99Dust}
AttributeError: module 'sncosmo' has no attribute 'SFD98Map'
jpierel14 commented 5 years ago

Ah yeah sncosmo removed that in their newer versions, should be fixed in version 0.3.3 from commit 9b6f67fe2aa4108448cfe1995d094d64824a9f97