Skip to content

Commit 7b77de5

Browse files
committed
fixing tests
1 parent fd505bb commit 7b77de5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test_.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
# Load images and ROIs
88
cal_basepath = os.path.dirname(os.path.abspath(__file__)) + '/../data/dataset1/n2'
9-
cal_image_paths = glob.glob(cal_basepath + '/*.tif')
10-
cal_roi_paths = glob.glob(cal_basepath + '/*.txt')
9+
cal_image_paths = sorted(glob.glob(cal_basepath + '/*.tif'))
10+
cal_roi_paths = sorted(glob.glob(cal_basepath + '/*.txt'))
1111
cal_images = [load_image(p) for p in cal_image_paths]
1212
cal_rois = [np.loadtxt(p) for p in cal_roi_paths]
1313

@@ -25,11 +25,11 @@ def test_2():
2525
# Testing that Calibration gives correct answer
2626
sc = SaibrCalibrate(gfp=cal_images_gfp, af=cal_images_af, roi=cal_rois, sigma=2)
2727
sc.run()
28-
assert sc.params[0] == pytest.approx(0.9497859698053084)
29-
assert sc.params[1] == pytest.approx(-458.79346328784277)
28+
assert sc.params[0] == pytest.approx(0.9506699286602773)
29+
assert sc.params[1] == pytest.approx(-457.7097277898565)
3030

3131
def test_3():
3232
# Testing that Correction gives correct answer
33-
img = saibr_correct(cal_images_gfp[0], cal_images_af[0], 0.9497859698053084, -458.79346328784277)
34-
assert img[0, 0] == pytest.approx(225.81832595690582)
33+
img = saibr_correct(cal_images_gfp[0], cal_images_af[0], 0.9506699286602773, -457.7097277898565)
34+
assert img[0, 0] == pytest.approx(422.5635553021118)
3535

0 commit comments

Comments
 (0)