@@ -20,8 +20,9 @@ def CreatePlaneSegmentation():
2020
2121 oc = OpticalChannel ('test_optical_channel' , 'description' , 500. )
2222 device = Device (name = 'device_name' )
23- ip = ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. ,
24- 300. , 'indicator' , 'location' , reference_frame = 'reference_frame' )
23+ ip = ImagingPlane (name = 'test_imaging_plane' , optical_channel = oc , description = 'description' , device = device ,
24+ excitation_lambda = 600. , imaging_rate = 300. , indicator = 'indicator' , location = 'location' ,
25+ reference_frame = 'reference_frame' )
2526
2627 pS = PlaneSegmentation ('description' , ip , 'test_name' , iSS )
2728 pS .add_roi (pixel_mask = pix_mask [0 :3 ], image_mask = img_mask [0 ])
@@ -36,8 +37,9 @@ def test_init(self):
3637 self .assertEqual (oc .emission_lambda , 500. )
3738
3839 device = Device (name = 'device_name' )
39- ip = ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. ,
40- 300. , 'indicator' , 'location' , reference_frame = 'reference_frame' ,
40+ ip = ImagingPlane ('test_imaging_plane' , oc , description = 'description' , device = device , excitation_lambda = 600. ,
41+ imaging_rate = 300. , indicator = 'indicator' , location = 'location' ,
42+ reference_frame = 'reference_frame' ,
4143 origin_coords = [10 , 20 ], origin_coords_unit = 'oc_unit' ,
4244 grid_spacing = [1 , 2 , 3 ], grid_spacing_unit = 'gs_unit' )
4345 self .assertEqual (ip .optical_channel [0 ], oc )
@@ -69,8 +71,9 @@ def test_init(self):
6971 def test_args (self ):
7072 oc = OpticalChannel ('test_name' , 'description' , 500. )
7173 device = Device (name = 'device_name' )
72- ip = ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. ,
73- 300. , 'indicator' , 'location' , reference_frame = 'reference_frame' )
74+ ip = ImagingPlane ('test_imaging_plane' , oc , description = 'description' , device = device , excitation_lambda = 600. ,
75+ imaging_rate = 300. , indicator = 'indicator' , location = 'location' ,
76+ reference_frame = 'reference_frame' )
7477 with self .assertRaises (ValueError ): # no data or external file
7578 TwoPhotonSeries ('test_tPS' , unit = 'unit' , field_of_view = [2. , 3. ],
7679 imaging_plane = ip , pmt_gain = 1.0 , scan_line_rate = 2.0 ,
@@ -85,8 +88,9 @@ def test_manifold_deprecated(self):
8588
8689 msg = "The 'manifold' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'."
8790 with self .assertWarnsWith (DeprecationWarning , msg ):
88- ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. , 300. , 'indicator' , 'location' ,
89- (1 , 1 , (2 , 2 , 2 )))
91+ ImagingPlane ('test_imaging_plane' , oc , description = 'description' , device = device , excitation_lambda = 600. ,
92+ imaging_rate = 300. , indicator = 'indicator' , location = 'location' ,
93+ manifold = (1 , 1 , (2 , 2 , 2 )))
9094
9195 def test_conversion_deprecated (self ):
9296 oc = OpticalChannel ('test_name' , 'description' , 500. )
@@ -97,8 +101,8 @@ def test_conversion_deprecated(self):
97101
98102 msg = "The 'conversion' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'."
99103 with self .assertWarnsWith (DeprecationWarning , msg ):
100- ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. , 300. , 'indicator' , 'location' ,
101- None , 2.0 )
104+ ImagingPlane ('test_imaging_plane' , oc , description = 'description' , device = device , excitation_lambda = 600. ,
105+ imaging_rate = 300. , indicator = 'indicator' , location = 'location' , conversion = 2.0 )
102106
103107 def test_unit_deprecated (self ):
104108 oc = OpticalChannel ('test_name' , 'description' , 500. )
@@ -109,8 +113,8 @@ def test_unit_deprecated(self):
109113
110114 msg = "The 'unit' argument is deprecated in favor of 'origin_coords_unit' and 'grid_spacing_unit'."
111115 with self .assertWarnsWith (DeprecationWarning , msg ):
112- ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. , 300. , 'indicator' , 'location' ,
113- None , 1.0 , 'my_unit' )
116+ ImagingPlane ('test_imaging_plane' , oc , description = 'description' , device = device , excitation_lambda = 600. ,
117+ imaging_rate = 300. , indicator = 'indicator' , location = 'location' , conversion = 1.0 , unit = 'my_unit' )
114118
115119
116120class MotionCorrectionConstructor (TestCase ):
@@ -190,8 +194,9 @@ def getBoilerPlateObjects(self):
190194
191195 device = Device (name = 'device_name' )
192196 oc = OpticalChannel ('test_optical_channel' , 'description' , 500. )
193- ip = ImagingPlane ('test_imaging_plane' , oc , 'description' , device , 600. ,
194- 300. , 'indicator' , 'location' , reference_frame = 'reference_frame' )
197+ ip = ImagingPlane ('test_imaging_plane' , oc , description = 'description' , device = device , excitation_lambda = 600. ,
198+ imaging_rate = 300. , indicator = 'indicator' , location = 'location' ,
199+ reference_frame = 'reference_frame' )
195200 return iSS , ip
196201
197202 def create_basic_plane_segmentation (self ):
0 commit comments