Skip to content

Commit

Permalink
pattern: Added test_from_angle_data
Browse files Browse the repository at this point in the history
  • Loading branch information
Somerandomguy10111 committed May 1, 2024
1 parent 9a121ef commit 86f8221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/examples/aimat.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions tests/t_xrdpattern_cls.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ def test_data_ok(self):
for data in [raw_data, std_data]:
self.check_data_ok(data=data)

def test_from_angle_data(self):
angles = [1.0, 2.0, 3.0]
intensities = [10.0, 20.0, 100.0]
pattern = XrdPattern.from_angle_map(angles=angles, intensities=intensities)
self.check_data_ok(data=pattern.xrd_intensities)

if __name__ == "__main__":
TestXrdPattern.execute_all(manual_mode=False)
Expand Down

0 comments on commit 86f8221

Please sign in to comment.