Skip to content

Better r_z #49

@marcobonici

Description

@marcobonici

In this moment, we are evaluating the r_z using gauss quadrature. While perfectly fine from an accuracy point of view, the issue comes when we have to evaluate this for a lot of points (let us say for a SNIA analysis).
In this case, three approaches might be beneficial.

  1. The transformed_weights returns a matrix. In this manner, we take advantage of E_z being extremely efficient and we leverage the fact that the whole calculations is done with matrix operations (thanks BLAS).
  2. We use interpolation techniques. This can be done in two different ways.
    3. a. Using splines. We take our function over a grid between z min and z max, and interpolate with splines. The issue is always with jacobians when doing AD (but we now how to deal with that).
    3. b. Using Chebyshev polynomials trick. This would additionally benefit from a memoization step, to avoid recomputing the Chebyshev polynomials (and this would be very useful for the SNIA case, as the z array is always the same).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions