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
{{ message }}
Repository navigation
investigate data types used in noise design matrix #1973
i think that the PINT noise design matrix and phi matrix are using long doubles in some instances. i dont think that this needs to be the case. it is probably slowing down the code and increasing memory usage.
I have confirmed that the noise design matrices do indeed get built with long doubles in noise_models.py. Previously, I was under the impression that this was coming from the radio frequencies, but the radio frequencies in general are just doubles. The long doubles come from the toas which are used as an input to construct the design matrices. It is not necessary to use long doubles for noise design matrices ( enterprise, discovery, … etc just use doubles).
I added a line in the basis creation in PR #1966 , which converts the long doubles to doubles prior to constructing the design matrices. As expected, creation time decreases and memory usage decreases as well.
Further speed ups are implemented in #1966 by just caching the noise design matrix. Unless the noise parameters are being sampled in with the mcmc fitter, then this matrix will be the same every time.
More work should investigate if more caching will lead to more improvements such as the phi matrix or perhaps caching the U@Phi@U^T matrix additionally.
Activity
jeremy-baier commentedon Mar 2, 2026
I have confirmed that the noise design matrices do indeed get built with long doubles in
noise_models.py. Previously, I was under the impression that this was coming from the radio frequencies, but the radio frequencies in general are just doubles. The long doubles come from the toas which are used as an input to construct the design matrices. It is not necessary to use long doubles for noise design matrices ( enterprise, discovery, … etc just use doubles).I added a line in the basis creation in PR #1966 , which converts the long doubles to doubles prior to constructing the design matrices. As expected, creation time decreases and memory usage decreases as well.
Further speed ups are implemented in #1966 by just caching the noise design matrix. Unless the noise parameters are being sampled in with the mcmc fitter, then this matrix will be the same every time.
More work should investigate if more caching will lead to more improvements such as the phi matrix or perhaps caching the U@Phi@U^T matrix additionally.