-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tjlane
committed
Aug 21, 2024
1 parent
aca7d8b
commit a761c6d
Showing
4 changed files
with
144 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from pytest import fixture | ||
import reciprocalspaceship as rs | ||
import numpy as np | ||
import gemmi as gm | ||
|
||
|
||
@fixture | ||
def random_intensities() -> rs.DataSet: | ||
""" | ||
A simple 10x10x10 P1 dataset, with random intensities | ||
""" | ||
|
||
params = (10.0, 10.0, 10.0, 90.0, 90.0, 90.0) | ||
cell = gm.UnitCell(*params) | ||
sg_1 = gm.SpaceGroup(1) | ||
Hall = rs.utils.generate_reciprocal_asu(cell, sg_1, 1.0, anomalous=False) | ||
|
||
h, k, l = Hall.T | ||
ds = rs.DataSet( | ||
{ | ||
"H": h, | ||
"K": k, | ||
"L": l, | ||
"IMEAN": np.abs(np.random.randn(len(h))), | ||
}, | ||
spacegroup=sg_1, | ||
cell=cell, | ||
).infer_mtz_dtypes() | ||
ds.set_index(["H", "K", "L"], inplace=True) | ||
|
||
return ds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters