mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-09-25 19:52:10 +02:00
Merge pull request #43 from yoshikisd/bugfix/pytest_reconstruct
Set fixed RNG seed for reconstruction pytests
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user