File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ def data_checker(
167167 Parameters
168168 ----------
169169 data : xp.ndarray
170- Input CuPy or Numpy array.
170+ Input CuPy or Numpy array either float32 or uint16 data type .
171171 verbosity : bool
172172 If enabled, then the printing of the warning happens when data contains infs or nans.
173173 method_name : str, optional.
Original file line number Diff line number Diff line change @@ -88,9 +88,9 @@ def distortion_correction_proj_discorpy(
8888 if len (data .shape ) == 2 :
8989 data = cp .expand_dims (data , axis = 0 )
9090
91- data = data_checker (
92- data , verbosity = True , method_name = "distortion_correction_proj_discorpy"
93- )
91+ # data = data_checker(
92+ # data, verbosity=True, method_name="distortion_correction_proj_discorpy"
93+ # )
9494
9595 # Get info from metadata txt file
9696 xcenter , ycenter , list_fact = _load_metadata_txt (metadata_path )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def test_correct_distortion(
3838
3939 path = os .path .join (distortion_correction_path , image )
4040 im_host = imread (path )
41- im = cp .asarray (im_host )
41+ im = cp .asarray (im_host . astype ( cp . uint16 ) )
4242
4343 shift_xy = [0 , 0 ]
4444 step_xy = [1 , 1 ]
@@ -48,5 +48,5 @@ def test_correct_distortion(
4848
4949 assert_allclose (np .mean (corrected_data ), mean_value )
5050 assert np .max (corrected_data ) == max_value
51- assert corrected_data .dtype == np . uint8
51+ assert corrected_data .dtype == cp . uint16
5252 assert corrected_data .flags .c_contiguous
You can’t perform that action at this time.
0 commit comments