gridutils.tuple_chisq can now handle unfrozen parameters#1964
gridutils.tuple_chisq can now handle unfrozen parameters#1964dlakaplan wants to merge 14 commits intonanograv:masterfrom
gridutils.tuple_chisq can now handle unfrozen parameters#1964Conversation
src/pint/gridutils.py
Outdated
|
|
||
| # All other unfrozen parameters will be fitted for at each grid point | ||
| chi2 = np.zeros(len(parvalues)) | ||
| dof = np.zeros(len(parvalues), dtype=np.int16) |
There was a problem hiding this comment.
Is there a reason why you want this to be int16? Isn't it possible to overflow that if you have a ton of TOAs?
There was a problem hiding this comment.
Sure. this was mostly just so that it would be an int instead of a float. Could make it int32 if you think it's worth it.
There was a problem hiding this comment.
I definitely think it needs to be at least np.int32 (due to possible overflow as mentioned). But truthfully, I don't see any reason to use anything less than native ints in general here (we aren't trying to save memory or anything), so np.int64 (which should be the default int on most machines) should be totally fine!
There was a problem hiding this comment.
This has been changed. Let me know if you have any further comments.
Previously the parameters for
gridutils.tuple_chisqandgridutils.tuple_chisq_extrawere fixed and frozen at the user-supplied values. Now select parameters can also be unfrozen. The dof is now returned as well (since that can change).