Skip to content

WIP: feat time domain solar wind covariance#1966

Open
jeremy-baier wants to merge 33 commits into
nanograv:masterfrom
jeremy-baier:feat/jgb-td-solar-wind-gp
Open

WIP: feat time domain solar wind covariance#1966
jeremy-baier wants to merge 33 commits into
nanograv:masterfrom
jeremy-baier:feat/jgb-td-solar-wind-gp

Conversation

@jeremy-baier
Copy link
Copy Markdown
Contributor

@jeremy-baier jeremy-baier commented Feb 23, 2026

Needed for NG20.
Major changes

  • Making phi either 1d or 2d. Necessary for 2-dimensional kernels.
  • Addition of said 2d kernels for the solar wind only for now.
  • Time domain interpolation bases to go with the above. Both custom ( for Bayesian Blocking ) and uniform bins.
  • Since above, need to switch trivia phi inversion to use a cholesky decomposition with a np inversion fallback.

More work should really explore additional caching of various parts of the GLS fit when the noise model is being held constant. This might be sub blocks of the design matrix. Or a refactorization of the GLS implementation.

TODO

  • unit tests
  • should check that our basis and phi matrix match those of discovery. (might consider adding tests for this).
  • additional model validations ?
  • Try refactoring so there is one TimeDomainSolarWindNoise class with a kernel parameter

Disclosure that I used co-pilot for generating the unit tests as well as some docstrings and type hinting.

Copy link
Copy Markdown
Member

@scottransom scottransom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot in here and it is beyond me to go through carefully line-by-line! We definitely need to make sure that there are some test cases and/or examples available that provide results that you believe are correct.

Comment thread src/pint/models/noise_model.py Outdated
Comment thread src/pint/models/noise_model.py Outdated
Comment thread src/pint/models/noise_model.py Outdated
@jeremy-baier
Copy link
Copy Markdown
Contributor Author

thanks for the comments, Scott ! I will take a look and see about implementing them.

Comment thread src/pint/utils.py
)


def get_phiinv(phi: np.ndarray) -> np.ndarray:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use a slightly more explicit docstring (explaining parameters and return values)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also I see some typos in utils.py, so you could fix paremeters -> parameters

@dlakaplan
Copy link
Copy Markdown
Contributor

Maybe @abhisrkckl can look at this, since it involves changes to the noise model and some of the whitened residual pieces he put in recently?

@abhisrkckl
Copy link
Copy Markdown
Contributor

Is this ready to be looked at?

@jeremy-baier
Copy link
Copy Markdown
Contributor Author

Is this ready to be looked at?

Yes ! I just need to get the black to pass. I think I have been using the wrong line length settings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants