threeML / astromodels

Spatial and spectral models for astrophysics
BSD 3-Clause "New" or "Revised" License
43 stars 44 forks source link

EBLattenuation & DoubleSmoothlyBrokenPowerlaw not available #200

Open eneights opened 1 year ago

eneights commented 1 year ago

When I try to import the EBLattenuation and DoubleSmoothlyBrokenPowerlaw models, I get the errors ImportError: cannot import name 'EBLattenuation' from 'threeML' and ImportError: cannot import name 'DoubleSmoothlyBrokenPowerlaw' from 'threeML'

Running

from threeML import *
spectrum = EBLattenuation()

gives me the error NameError: name 'EBLattenuation' is not defined, and the same thing happens for DoubleSmoothlyBrokenPowerlaw.

I don't have this issue with any other models.

henrikef commented 1 year ago

@eneights do you have https://github.com/me-manu/ebltable installed?

henrikef commented 1 year ago

I believe the DoubleSmoothlyBrokenPowerlaw issue has been fixed on astromodels dev, should be included in the next release. @omodei might know when that's planned.

eneights commented 1 year ago

No, I don't have ebltable installed. So we just need to install that in order to use EBLattenuation?

eneights commented 1 year ago

And ok, sounds good, thank you!

henrikef commented 1 year ago

No, I don't have ebltable installed. So we just need to install that in order to use EBLattenuation?

Yes, please try installing it and let me know if the error persists.

eneights commented 1 year ago

Yes, I'm able to use EBLattenuation after installing ebltable.