PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

Turning off EQW estimation #179

Open ThomasSYLai opened 2 years ago

ThomasSYLai commented 2 years ago

Question. Is there any way to turn off the EQW estimate?

I'm encountering an error message when running a "pure" PAH spectrum with no underlying continuum. Adding a switch on whether to obtain the EQW might solve the problem.

/Users/thomaslai/Documents/astro/PAHFIT/pahfit/pahfit/feature_strengths.py:187: RuntimeWarning: divide by zero encountered in true_divide
eqw = integrate.simpson(lnu / continuum, lam)
alexmaragko commented 2 years ago

Currently it is calculated by default if the PAH band strength is > 0.0, otherwise it returns 0.0. The printed message seems to be a Warning and not an Error, so that means the code does not crash, is that correct?