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

Fixed spline interp problem #47

Merged
merged 2 commits into from
Jan 10, 2024
Merged

Fixed spline interp problem #47

merged 2 commits into from
Jan 10, 2024

Conversation

cwjames1983
Copy link
Collaborator

Some minor changes to the behaviour of spline interpolation (interp in log space now), and changed 1e-2 to 1e-5 for a "small" number in survey.py. Also a spline performance test routine added. See SLACK for details.

@cwjames1983 cwjames1983 requested a review from profxj January 9, 2024 07:01
Copy link
Contributor

@profxj profxj left a comment

Choose a reason for hiding this comment

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

One semi-significant change requested by me

Thanks for this!




def test_spline_accuracy(gamma = -1.5837, Ntest = 100):
Copy link
Contributor

Choose a reason for hiding this comment

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

please move this to a file in the tests/ folder

Copy link
Contributor

Choose a reason for hiding this comment

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

extra credit if you get it to run under CI

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


def time_splines(gamma = -1.5837, Ntimetest = 100000, Nreps=100):
Copy link
Contributor

Choose a reason for hiding this comment

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

probably best in tests/ too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! In same script

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(in theory, I could split this into a performance check file, but too lazy, since we haven't really paid attention to performance checks in any systematic way - should re-do these at some point)

Copy link
Contributor

@profxj profxj left a comment

Choose a reason for hiding this comment

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

nice!

@profxj profxj merged commit 5d343cb into main Jan 10, 2024
6 checks passed
@profxj profxj deleted the spline_debug branch January 10, 2024 02:58
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.

2 participants