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

Add unit tests for analysis_reduction #141

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GuiMacielPereira
Copy link
Collaborator

@GuiMacielPereira GuiMacielPereira commented Nov 21, 2024

Description of work:
Added unit tests for the most important functions in analysis_reduction.py.
I restructured some functions and renamed variables as I added each test.

To test:
Check that all tests (unit + system) pass

Fixes #9.

Restructured the functions of the analysis reduction and added two unit tests,
one for calculating the kinematics and the other for calculating y spaces.
Added test for 3 different spectra: one with normal data, one with
a range in TOF masked with zeros and another fully masked spectra.

Checked that the fitting function (total ncp) and fitting
parameters match.
Added unit test that compares masking tof range with zeros with
using a range that has been cut off (i.e. does not include the
values with zeros).

If the error function is successfully ignoring zeros then the
result of both fits should be the same
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit tests to analysis_functions
1 participant