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

fix: remove non-finite values #101

Merged
merged 2 commits into from
Oct 24, 2024
Merged

fix: remove non-finite values #101

merged 2 commits into from
Oct 24, 2024

Conversation

jokasimr
Copy link
Contributor

Fixes #100

Draft because needs test

@jokasimr jokasimr marked this pull request as ready for review October 24, 2024 09:47
@jokasimr jokasimr requested a review from jl-wynen October 24, 2024 09:48
@jokasimr jokasimr enabled auto-merge October 24, 2024 09:48
Comment on lines +72 to +76
# Make the Q range cover a larger interval than the experiment is sensitive to.
# This let's us test the non-covered regions are filtered from the ORSO data.
amor_pipeline[QBins] = sc.geomspace(
dim="Q", start=0.005, stop=0.15, num=391, unit="1/angstrom"
)
Copy link
Member

Choose a reason for hiding this comment

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

Would be nicer to put this in a separate test, instead of having one "let us test every aspect" one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I agree. But that would require re-running the pipeline again, making the tests slower.
So for that reason I opted for making it part of the test for the ORSO output instead.

Copy link
Member

Choose a reason for hiding this comment

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

Since we both agree, maybe we can live with the slower tests? Alternatively, write a unit test for just this function, without running the full pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we both agree, maybe we can live with the slower tests?

That's a weird way of putting it. I agreed about the aspect you brought up. But taking into account the drawback mentioned I opted for another solution.

If you prefer a different trade-off, for example having slower but more well separated tests, we can do that instead.

@jokasimr jokasimr merged commit 2921d40 into main Oct 24, 2024
4 checks passed
@jokasimr jokasimr deleted the filter-nan branch October 24, 2024 12:00
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.

Saved reflectivity curves should not contain NaN
2 participants