Merge pull request #43 from yoshikisd/bugfix/pytest_reconstruct

Set fixed RNG seed for reconstruction pytests
This commit is contained in:
Damian Guenzing
2025-07-07 11:55:38 -07:00
committed by GitHub
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -5,6 +5,8 @@ import torch as t
import cdtools
from matplotlib import pyplot as plt
# Force all reconstructions to use the same RNG seed
t.manual_seed(0)
def test_center_probe(lab_ptycho_cxi):
dataset = cdtools.datasets.Ptycho2DDataset.from_cxi(lab_ptycho_cxi)
+4
View File
@@ -1,6 +1,10 @@
import pytest
import cdtools
from matplotlib import pyplot as plt
import torch as t
# Force all reconstructions to use the same RNG seed
t.manual_seed(0)
@pytest.mark.slow
def test_simple_ptycho(lab_ptycho_cxi, reconstruction_device, show_plot):