Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParameterGrid enhancement #211

Open
2 tasks
tomaskontrimas opened this issue Feb 10, 2024 · 1 comment
Open
2 tasks

ParameterGrid enhancement #211

tomaskontrimas opened this issue Feb 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tomaskontrimas
Copy link
Collaborator

tomaskontrimas commented Feb 10, 2024

The ParameterGrid class could be merged with the IrregularParameterGrid, as there is no fundamental reason why it has to have a regular grid.

TODO:

  • Update Parabola1DGridManifoldInterpolationMethod interpolation to support an irregular grid:
    a = 0.5*(M0 - 2.*M1 + M2) / dx**2
    b = 0.5*(M2 - M0) / dx
  • Make sure that it does not return negative PDF values. It could be done by flooring them to 0 and renormalizing the PDF? Zero gradient could create issues
@tomaskontrimas tomaskontrimas added the enhancement New feature or request label Feb 10, 2024
@martwo
Copy link
Collaborator

martwo commented Feb 11, 2024

Special care has to be taken when rounding floating point numbers. With a regular grid it is easier to make sure that all values are rounded to the specified decimal precision. I guess this can be achieved also with an irregular grid. But I would recommend to add excessive unit test coverage to ensure correct behavior.

If the rounding of a value is not consistent to fall on exact grid point values, the interpolation / PDF value lookup will fail, most probably for only a few values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants