threeML / astromodels

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

set default minimum for cutoff parameter; fix comments #126

Closed henrikef closed 4 years ago

henrikef commented 4 years ago

Add a default minimum for the cutoff energy in the cutoff_powerlaw function to avoid this warning:

$ python -c "import astromodels"
/Users/ich/hawc_software/miniconda3/envs/clean_hal/lib/python2.7/site-packages/astromodels/core/parameter.py:555: UserWarning: We have set the min_value of xc to 1e-99 because there was a postive transform
  warnings.warn('We have set the min_value of %s to 1e-99 because there was a postive transform' % self.path)

when loading astromodels.

Btw, I notice that Cutoff_powerlaw.xc has a log10 transform, but Super_cutoff_powerlaw.xc and Exponential_cutoff.xc do not. Is that intentional?

grburgess commented 4 years ago

Feel free to merge @henrikef