@@ -106,6 +106,57 @@ def test_define_dataset_auto_tile(tmp_path, caplog):
106106 bdv .define_dataset_auto (project_filename , file_info ["path" ], bf_series_type )
107107 # Check if the final call is in the log
108108 assert final_call == caplog .messages [0 ]
109+
110+
111+ def test_define_dataset_auto_tile_split_timepoints (tmp_path , caplog ):
112+ """Test automatic dataset definition method for tile series.
113+
114+ Parameters
115+ ----------
116+ tmp_path : pytest.fixture
117+ Temporary path for the test.
118+ caplog : pytest.fixture
119+ Log capturing fixture.
120+ """
121+
122+ # Set the logging level to capture warnings
123+ caplog .set_level (logging .WARNING )
124+ # Clear the log
125+ caplog .clear ()
126+
127+ # Define the project and file names
128+ project_filename = "proj_name"
129+ file_path = tmp_path
130+ file_info = pathtools .parse_path (file_path )
131+
132+ # Define the result and dataset save paths
133+ result_folder = pathtools .join2 (file_info ["path" ], project_filename )
134+
135+ # Default settings
136+
137+ # Define the type of Bio-Formats series
138+ bf_series_type = "Tiles"
139+
140+ # Define the ImageJ command
141+ cmd = "Define Multi-View Dataset"
142+
143+ # Set the default values for dataset definitions
144+ options = set_default_values (project_filename , file_info ["path" ])
145+
146+ # Construct the options for dataset definitions
147+ options = (
148+ options
149+ + "how_to_store_input_images=["
150+ + "Re-save as multiresolution HDF5"
151+ + "] "
152+ + "load_raw_data_virtually "
153+ + "metadata_save_path=["
154+ + result_folder
155+ + "] "
156+ + "image_data_save_path=["
157+ + result_folder
158+ + "] "
159+ + "check_stack_sizes "
109160 + "split_hdf5 "
110161 + "timepoints_per_partition=1 "
111162 + "setups_per_partition=0 "
@@ -116,7 +167,7 @@ def test_define_dataset_auto_tile(tmp_path, caplog):
116167 final_call = "IJ.run(cmd=[%s], params=[%s])" % (cmd , options )
117168
118169 # Define the dataset using the "Auto-Loader" option
119- bdv .define_dataset_auto (project_filename , file_info ["path" ], bf_series_type )
170+ bdv .define_dataset_auto (project_filename , file_info ["path" ], bf_series_type , timepoints_per_partition = 1 )
120171 # Check if the final call is in the log
121172 assert final_call == caplog .messages [0 ]
122173
0 commit comments