You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a result, this function is going to fail without any question, and numpy /python
will happily ignore the NaN value which is always returned.
this then turns
chi2_pdf_derivative
chi2_pdf_previous
chi2_pdf_snd_derivative
chi2_pdf_derivative_previous
into NaN values as well.
The text was updated successfully, but these errors were encountered:
fabada/fabada/__init__.py
Line 129 in 44a0ae0
The chi2pdf estimation is dependent on df.
df, in the example demos, is set to data.size.
In the case of fabada_demo_spectrum, data.size is 1430 samples.
per wolfram alpha, the gamma function value of 715 is 1x10^1729,
which is well out of the calculation range of any desktop computer.
chi2_data = np.sum <-- a float
chi2_pdf = stats.chi2.pdf(chi2_data, df=data.size)
https://lost-contact.mit.edu/afs/inf.ed.ac.uk/group/teaching/matlab-help/R2014a/stats/chi2pdf.html
chi2_pdf = (chi2data** (N - 2) / 2) * numpy.exp(-chi2sum / 2)
/ ((2 ** (N / 2)) * math.gamma(N / 2))
As a result, this function is going to fail without any question, and numpy /python
will happily ignore the NaN value which is always returned.
this then turns
chi2_pdf_derivative
chi2_pdf_previous
chi2_pdf_snd_derivative
chi2_pdf_derivative_previous
into NaN values as well.
The text was updated successfully, but these errors were encountered: