Skip to content

investigate data types used in noise design matrix #1973

Open

Description

@jeremy-baier

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.

investigating further.

Activity

  1. jeremy-baier commented on Mar 2, 2026

    @jeremy-baier
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions