diff --git a/README.md b/README.md index 6fde740..8a52c17 100644 --- a/README.md +++ b/README.md @@ -11,49 +11,3 @@ Ruhr-Universität Bochum, Universitätsbibliothek 08.02.2024 [https://doi.org/10.13154/294-11032](https://doi.org/10.13154/294-11032) - ------------------------------------------------------------------------------------------------------ - -Updated: 19.03.2025 - -Files are now organized in subdirectories to distinguish better between code for GEVI or GECI analysis. -``` -gevi-geci/ - stage_1*, stage_2*, stage_3*, stage_4*, stage_5* - -> main stages for data preprocessing - -> use e.g.: python stage_1_get_ref_image.py -c config_example_GEVI.json - functions/ - -> functions used by the main stages - -gevi-geci/gevi/ - config_example_GEVI.json - -> typical config file for GEVI (compare to gevi-geci/geci/config_example_GECI.json) - config_M0134M*, config_M3905F* - -> config files for a few recordings (adjust directory names, if necessary!) - example_load_gevi.py - -> simple script demonstrating how to load data - -gevi-geci/geci/ - config_example_GECI.json - -> typical config file for GECI (compare to gevi-geci/gevi/config_example_GEVI.json) - config_M_Sert_Cre_4* - -> config files for a few recordings (adjust directory names, if necessary!) - stage_6_convert_roi.py - -> additional stage for the analysis of Hendrik's recordings - -> use e.g.: python stage_6_convert_roi.py -f config_M_Sert_Cre_41.json - geci_loader.py, geci_plot.py - -> additional code for summarizing the results and plotting with the ROIs - -> use e.g. python geci_loader.py --filename config_M_Sert_Cre_41.json - -gevi-geci/other/ - stage_4b_inspect.py, stage_4c_viewer.py - -> temporary code for assisting search for implantation electrode -``` - - - - - - - - diff --git a/gevi/config_M0134M_2024-11-18_SessionA.json b/callum_config_M0134M.json similarity index 92% rename from gevi/config_M0134M_2024-11-18_SessionA.json rename to callum_config_M0134M.json index e9e0d00..f283745 100644 --- a/gevi/config_M0134M_2024-11-18_SessionA.json +++ b/callum_config_M0134M.json @@ -3,8 +3,8 @@ "recoding_data": "2024-11-18", "mouse_identifier": "M0134M_SessionA", "raw_path": "raw", - "export_path": "output/M0134M_2024-11-18_SessionA", - "ref_image_path": "ref_images/M0134M_2024-11-18_SessionA", + "export_path": "output_M0134M_SessionA", + "ref_image_path": "ref_images_M0134M_SessionA", "raw_path": "raw", "heartbeat_remove": true, "gevi": true, // true => gevi, false => geci @@ -56,7 +56,6 @@ "save_aligned_as_matlab": false, "save_oxyvol_as_python": false, "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", diff --git a/gevi/config_M3905F_SessionB.json b/callum_config_M3905F.json similarity index 89% rename from gevi/config_M3905F_SessionB.json rename to callum_config_M3905F.json index f2a41bd..8517026 100644 --- a/gevi/config_M3905F_SessionB.json +++ b/callum_config_M3905F.json @@ -3,8 +3,8 @@ "recoding_data": "session_B", "mouse_identifier": "M3905F", "raw_path": "raw", - "export_path": "output/M3905F_SessionB", - "ref_image_path": "ref_images/M3905F_SessionB", + "export_path": "output_M3905F_session_B", + "ref_image_path": "ref_images_M3905F_session_B", "raw_path": "raw", "heartbeat_remove": true, "gevi": true, // true => gevi, false => geci @@ -54,9 +54,8 @@ "save_regression_coefficients": false, "save_aligned_as_python": false, "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, + "save_oxyvol_as_python": true, + "save_oxyvol_as_matlab": true, // Not important parameter "required_order": [ "acceptor", diff --git a/gevi/config_example_GEVI.json b/config_M3879M_2021-10-05.json similarity index 77% rename from gevi/config_example_GEVI.json rename to config_M3879M_2021-10-05.json index e7d53ad..da3980a 100644 --- a/gevi/config_example_GEVI.json +++ b/config_M3879M_2021-10-05.json @@ -1,12 +1,12 @@ { - "basic_path": "/data_1/fatma/GEVI_GECI_ES", - "recoding_data": "session_B", - "mouse_identifier": "M3905F", + "basic_path": "/data_1/robert", + "recoding_data": "2021-10-05", + "mouse_identifier": "M3879M", "raw_path": "raw", - "export_path": "output/M3905F_SessionB", - "ref_image_path": "ref_images/M3905F_SessionB", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci + "export_path": "output_M3879M_2021-10-05", + "ref_image_path": "ref_images_M3879M_2021-10-05", + "heartbeat_remove": true, // if gevi must be true; geci: who knows... + "gevi": true, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression @@ -51,11 +51,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", diff --git a/geci/config_M_Sert_Cre_41.json b/config_M_Sert_Cre_41.json similarity index 78% rename from geci/config_M_Sert_Cre_41.json rename to config_M_Sert_Cre_41.json index 48ede27..3675a3d 100644 --- a/geci/config_M_Sert_Cre_41.json +++ b/config_M_Sert_Cre_41.json @@ -3,14 +3,14 @@ "recoding_data": "2023-07-17", "mouse_identifier": "M_Sert_Cre_41", "raw_path": "raw", - "export_path": "output/M_Sert_Cre_41", - "ref_image_path": "ref_images/M_Sert_Cre_41", - "heartbeat_remove": true, - "gevi": false, // true => gevi, false => geci + "export_path": "output_M_Sert_Cre_41", + "ref_image_path": "ref_images_M_Sert_Cre_41", + "heartbeat_remove": false, + "gevi": false, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression - // EMPTY FOR GECI "target_camera_acceptor": "acceptor", + //"target_camera_acceptor": "acceptor", "target_camera_acceptor": "", "regressor_cameras_acceptor": [ "oxygenation", @@ -18,7 +18,7 @@ ], "target_camera_donor": "donor", "regressor_cameras_donor": [ - // REMOVED FOR GECI "oxygenation", + // "oxygenation", "volume" ], // binning @@ -52,11 +52,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", @@ -64,4 +59,4 @@ "oxygenation", "volume" ] -} +} \ No newline at end of file diff --git a/geci/config_M_Sert_Cre_42.json b/config_M_Sert_Cre_42.json similarity index 78% rename from geci/config_M_Sert_Cre_42.json rename to config_M_Sert_Cre_42.json index daf6c3e..47d0ab6 100644 --- a/geci/config_M_Sert_Cre_42.json +++ b/config_M_Sert_Cre_42.json @@ -3,14 +3,14 @@ "recoding_data": "2023-07-18", "mouse_identifier": "M_Sert_Cre_42", "raw_path": "raw", - "export_path": "output/M_Sert_Cre_42", - "ref_image_path": "ref_images/M_Sert_Cre_42", - "heartbeat_remove": true, - "gevi": false, // true => gevi, false => geci + "export_path": "output_M_Sert_Cre_42", + "ref_image_path": "ref_images_M_Sert_Cre_42", + "heartbeat_remove": false, + "gevi": false, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression - // EMPTY FOR GECI "target_camera_acceptor": "acceptor", + //"target_camera_acceptor": "acceptor", "target_camera_acceptor": "", "regressor_cameras_acceptor": [ "oxygenation", @@ -18,7 +18,7 @@ ], "target_camera_donor": "donor", "regressor_cameras_donor": [ - // REMOVED FOR GECI "oxygenation", + // "oxygenation", "volume" ], // binning @@ -52,11 +52,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", diff --git a/geci/config_M_Sert_Cre_45.json b/config_M_Sert_Cre_45.json similarity index 78% rename from geci/config_M_Sert_Cre_45.json rename to config_M_Sert_Cre_45.json index 875faf5..e28c337 100644 --- a/geci/config_M_Sert_Cre_45.json +++ b/config_M_Sert_Cre_45.json @@ -3,14 +3,14 @@ "recoding_data": "2023-07-18", "mouse_identifier": "M_Sert_Cre_45", "raw_path": "raw", - "export_path": "output/M_Sert_Cre_45", - "ref_image_path": "ref_images/M_Sert_Cre_45", - "heartbeat_remove": true, - "gevi": false, // true => gevi, false => geci + "export_path": "output_M_Sert_Cre_45", + "ref_image_path": "ref_images_M_Sert_Cre_45", + "heartbeat_remove": false, + "gevi": false, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression - // EMPTY FOR GECI "target_camera_acceptor": "acceptor", + //"target_camera_acceptor": "acceptor", "target_camera_acceptor": "", "regressor_cameras_acceptor": [ "oxygenation", @@ -18,7 +18,7 @@ ], "target_camera_donor": "donor", "regressor_cameras_donor": [ - // REMOVED FOR GECI "oxygenation", + // "oxygenation", "volume" ], // binning @@ -52,11 +52,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", diff --git a/geci/config_M_Sert_Cre_46.json b/config_M_Sert_Cre_46.json similarity index 78% rename from geci/config_M_Sert_Cre_46.json rename to config_M_Sert_Cre_46.json index 085a80d..21db1d5 100644 --- a/geci/config_M_Sert_Cre_46.json +++ b/config_M_Sert_Cre_46.json @@ -3,14 +3,14 @@ "recoding_data": "2023-03-16", "mouse_identifier": "M_Sert_Cre_46", "raw_path": "raw", - "export_path": "output/M_Sert_Cre_46", - "ref_image_path": "ref_images/M_Sert_Cre_46", - "heartbeat_remove": true, - "gevi": false, // true => gevi, false => geci + "export_path": "output_M_Sert_Cre_46", + "ref_image_path": "ref_images_M_Sert_Cre_46", + "heartbeat_remove": false, + "gevi": false, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression - // EMPTY FOR GECI "target_camera_acceptor": "acceptor", + //"target_camera_acceptor": "acceptor", "target_camera_acceptor": "", "regressor_cameras_acceptor": [ "oxygenation", @@ -18,7 +18,7 @@ ], "target_camera_donor": "donor", "regressor_cameras_donor": [ - // REMOVED FOR GECI "oxygenation", + // "oxygenation", "volume" ], // binning @@ -52,11 +52,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", diff --git a/geci/config_M_Sert_Cre_49.json b/config_M_Sert_Cre_49.json similarity index 78% rename from geci/config_M_Sert_Cre_49.json rename to config_M_Sert_Cre_49.json index 11e6e8c..2621f5e 100644 --- a/geci/config_M_Sert_Cre_49.json +++ b/config_M_Sert_Cre_49.json @@ -3,14 +3,14 @@ "recoding_data": "2023-03-15", "mouse_identifier": "M_Sert_Cre_49", "raw_path": "raw", - "export_path": "output/M_Sert_Cre_49", - "ref_image_path": "ref_images/M_Sert_Cre_49", - "heartbeat_remove": true, - "gevi": false, // true => gevi, false => geci + "export_path": "output_M_Sert_Cre_49", + "ref_image_path": "ref_images_M_Sert_Cre_49", + "heartbeat_remove": false, + "gevi": false, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression - // EMPTY FOR GECI "target_camera_acceptor": "acceptor", + //"target_camera_acceptor": "acceptor", "target_camera_acceptor": "", "regressor_cameras_acceptor": [ "oxygenation", @@ -18,7 +18,7 @@ ], "target_camera_donor": "donor", "regressor_cameras_donor": [ - // REMOVED FOR GECI "oxygenation", + // "oxygenation", "volume" ], // binning @@ -52,11 +52,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", @@ -64,4 +59,4 @@ "oxygenation", "volume" ] -} +} \ No newline at end of file diff --git a/gevi/config_M0134M_2024-11-06_SessionB.json b/config_fatma_gevi_M0134M_SessionA2_Test.json similarity index 75% rename from gevi/config_M0134M_2024-11-06_SessionB.json rename to config_fatma_gevi_M0134M_SessionA2_Test.json index b620fbd..b1d0f83 100644 --- a/gevi/config_M0134M_2024-11-06_SessionB.json +++ b/config_fatma_gevi_M0134M_SessionA2_Test.json @@ -1,13 +1,12 @@ { - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-06", - "mouse_identifier": "M0134M_SessionB", + "basic_path": "/data_1/fatma/GEVI", + "recoding_data": "2024-10-16", + "mouse_identifier": "M0134M_SessionA2_Test", + "export_path": "output_2024-10-16_M0134M_SessionA2_Test", + "ref_image_path": "ref_images_2024-10-16_M0134M_SessionA2_Test", "raw_path": "raw", - "export_path": "output/M0134M_2024-11-06_SessionB", - "ref_image_path": "ref_images/M0134M_2024-11-06_SessionB", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci + "heartbeat_remove": true, // if gevi must be true; geci: who knows... + "gevi": true, // true => gevi, false => geci // Ratio Sequence "classical_ratio_mode": true, // true: a/d false: 1+a-d // Regression @@ -52,11 +51,6 @@ "save_heartbeat": false, "save_factors": false, "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, // Not important parameter "required_order": [ "acceptor", diff --git a/geci/config_example_GECI.json b/geci/config_example_GECI.json deleted file mode 100644 index 48ede27..0000000 --- a/geci/config_example_GECI.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/hendrik", - "recoding_data": "2023-07-17", - "mouse_identifier": "M_Sert_Cre_41", - "raw_path": "raw", - "export_path": "output/M_Sert_Cre_41", - "ref_image_path": "ref_images/M_Sert_Cre_41", - "heartbeat_remove": true, - "gevi": false, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - // EMPTY FOR GECI "target_camera_acceptor": "acceptor", - "target_camera_acceptor": "", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - // REMOVED FOR GECI "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/geci/geci_loader.py b/geci_loader.py similarity index 100% rename from geci/geci_loader.py rename to geci_loader.py diff --git a/geci/geci_plot.py b/geci_plot.py similarity index 100% rename from geci/geci_plot.py rename to geci_plot.py diff --git a/gevi/config_M0134M_2024-11-06_SessionA.json b/gevi/config_M0134M_2024-11-06_SessionA.json deleted file mode 100644 index b6f4da8..0000000 --- a/gevi/config_M0134M_2024-11-06_SessionA.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-06", - "mouse_identifier": "M0134M_SessionA", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-06_SessionA", - "ref_image_path": "ref_images/M0134M_2024-11-06_SessionA", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-07_SessionA.json b/gevi/config_M0134M_2024-11-07_SessionA.json deleted file mode 100644 index 01fb9b3..0000000 --- a/gevi/config_M0134M_2024-11-07_SessionA.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-07", - "mouse_identifier": "M0134M_SessionA", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-07_SessionA", - "ref_image_path": "ref_images/M0134M_2024-11-07_SessionA", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-07_SessionB.json b/gevi/config_M0134M_2024-11-07_SessionB.json deleted file mode 100644 index d92b34b..0000000 --- a/gevi/config_M0134M_2024-11-07_SessionB.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-07", - "mouse_identifier": "M0134M_SessionB", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-07_SessionB", - "ref_image_path": "ref_images/M0134M_2024-11-07_SessionB", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-13_SessionA.json b/gevi/config_M0134M_2024-11-13_SessionA.json deleted file mode 100644 index eab7d1e..0000000 --- a/gevi/config_M0134M_2024-11-13_SessionA.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-13", - "mouse_identifier": "M0134M_SessionA", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-13_SessionA", - "ref_image_path": "ref_images/M0134M_2024-11-13_SessionA", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-13_SessionB.json b/gevi/config_M0134M_2024-11-13_SessionB.json deleted file mode 100644 index 0ae7eab..0000000 --- a/gevi/config_M0134M_2024-11-13_SessionB.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-13", - "mouse_identifier": "M0134M_SessionB", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-13_SessionB", - "ref_image_path": "ref_images/M0134M_2024-11-13_SessionB", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-15_SessionA.json b/gevi/config_M0134M_2024-11-15_SessionA.json deleted file mode 100644 index c2aabf1..0000000 --- a/gevi/config_M0134M_2024-11-15_SessionA.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-15", - "mouse_identifier": "M0134M_SessionA", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-15_SessionA", - "ref_image_path": "ref_images/M0134M_2024-11-15_SessionA", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-15_SessionB.json b/gevi/config_M0134M_2024-11-15_SessionB.json deleted file mode 100644 index 3827bc9..0000000 --- a/gevi/config_M0134M_2024-11-15_SessionB.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-15", - "mouse_identifier": "M0134M_SessionB", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-15_SessionB", - "ref_image_path": "ref_images/M0134M_2024-11-15_SessionB", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-11-18_SessionB.json b/gevi/config_M0134M_2024-11-18_SessionB.json deleted file mode 100644 index 143817b..0000000 --- a/gevi/config_M0134M_2024-11-18_SessionB.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-11-18", - "mouse_identifier": "M0134M_SessionB", - "raw_path": "raw", - "export_path": "output/M0134M_2024-11-18_SessionB", - "ref_image_path": "ref_images/M0134M_2024-11-18_SessionB", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-12-04_SessionA.json b/gevi/config_M0134M_2024-12-04_SessionA.json deleted file mode 100644 index d77e531..0000000 --- a/gevi/config_M0134M_2024-12-04_SessionA.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-12-04", - "mouse_identifier": "M0134M_SessionA", - "raw_path": "raw", - "export_path": "output/M0134M_2024-12-04_SessionA", - "ref_image_path": "ref_images/M0134M_2024-12-04_SessionA", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/config_M0134M_2024-12-04_SessionB.json b/gevi/config_M0134M_2024-12-04_SessionB.json deleted file mode 100644 index 36ad83f..0000000 --- a/gevi/config_M0134M_2024-12-04_SessionB.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "basic_path": "/data_1/fatma/GEVI/", - "recoding_data": "2024-12-04", - "mouse_identifier": "M0134M_SessionB", - "raw_path": "raw", - "export_path": "output/M0134M_2024-12-04_SessionB", - "ref_image_path": "ref_images/M0134M_2024-12-04_SessionB", - "raw_path": "raw", - "heartbeat_remove": true, - "gevi": true, // true => gevi, false => geci - // Ratio Sequence - "classical_ratio_mode": true, // true: a/d false: 1+a-d - // Regression - "target_camera_acceptor": "acceptor", - "regressor_cameras_acceptor": [ - "oxygenation", - "volume" - ], - "target_camera_donor": "donor", - "regressor_cameras_donor": [ - "oxygenation", - "volume" - ], - // binning - "binning_enable": true, - "binning_at_the_end": false, - "binning_kernel_size": 4, - "binning_stride": 4, - "binning_divisor_override": 1, - // alignment - "alignment_batch_size": 200, - "rotation_stabilization_threshold_factor": 3.0, // >= 1.0 - "rotation_stabilization_threshold_border": 0.9, // <= 1.0 - // Heart beat detection - "lower_freqency_bandpass": 5.0, // Hz - "upper_freqency_bandpass": 14.0, // Hz - "heartbeat_filtfilt_chuck_size": 10, - // Gauss smear - "gauss_smear_spatial_width": 8, - "gauss_smear_temporal_width": 0.1, - "gauss_smear_use_matlab_mask": false, - // LED Ramp on - "skip_frames_in_the_beginning": 100, // Frames - // PyTorch - "dtype": "float32", - "force_to_cpu": false, - // Save - "save_as_python": true, // produces .npz files (compressed) - "save_as_matlab": false, // produces .hd5 file (compressed) - // Save extra information - "save_alignment": false, - "save_heartbeat": false, - "save_factors": false, - "save_regression_coefficients": false, - "save_aligned_as_python": false, - "save_aligned_as_matlab": false, - "save_oxyvol_as_python": false, - "save_oxyvol_as_matlab": false, - "save_gevi_with_donor_acceptor": true, - // Not important parameter - "required_order": [ - "acceptor", - "donor", - "oxygenation", - "volume" - ] -} diff --git a/gevi/example_load_gevi.py b/gevi/example_load_gevi.py deleted file mode 100644 index ce8c2e5..0000000 --- a/gevi/example_load_gevi.py +++ /dev/null @@ -1,56 +0,0 @@ -# %% -import numpy as np -import matplotlib.pyplot as plt -import os - -output_path = 'output' - -recording_name = 'M0134M_2024-12-04_SessionA' -n_trials_per_experiment = [30, 0, 30, 30, 30, 30, 30, 30, 30,] -name_experiment = ['none', 'visual', '2 uA', '5 uA', '7 uA', '10 uA', '15 uA', '30 uA', '60 uA'] - -# recording_name = 'M0134M_2024-11-06_SessionB' -# n_trials_per_experiment = [15, 15,] -# name_experiment = ['none', 'visual',] - -i_experiment = 8 - -r_avg = None -ad_avg = None -for i_trial in range(n_trials_per_experiment[i_experiment]): - - folder = output_path + os.sep + recording_name - file = f"Exp{i_experiment + 1:03}_Trial{i_trial + 1:03}_ratio_sequence.npz" - fullpath = folder + os.sep + file - - print(f'Loading file "{fullpath}"...') - data = np.load(fullpath) - - print(f"FIle contents: {data.files}") - ratio_sequence = data["ratio_sequence"] - if 'data_acceptor' in data.files: - data_acceptor = data["data_acceptor"] - data_donor = data["data_donor"] - - mask = data["mask"][:, :, np.newaxis] - - if i_trial == 0: - r_avg = ratio_sequence - if 'data_acceptor' in data.files: - ad_avg = (data_acceptor / data_donor) * mask + 1 - mask - else: - r_avg += ratio_sequence - if 'data_acceptor' in data.files: - ad_avg += (data_acceptor / data_donor) * mask + 1 - mask - -if r_avg is not None: - r_avg /= n_trials_per_experiment[i_experiment] -if ad_avg is not None: - ad_avg /= n_trials_per_experiment[i_experiment] - -# %% -for t in range(200, 300, 5): - plt.imshow(r_avg[:, :, t], vmin=0.99, vmax=1.01, cmap='seismic') - plt.colorbar() - plt.show() - diff --git a/preprocessing.pdf b/preprocessing.pdf deleted file mode 100644 index 701c122..0000000 Binary files a/preprocessing.pdf and /dev/null differ diff --git a/other/stage_4b_inspect.py b/stage_4b_inspect.py similarity index 100% rename from other/stage_4b_inspect.py rename to stage_4b_inspect.py diff --git a/other/stage_4c_viewer.py b/stage_4c_viewer.py similarity index 100% rename from other/stage_4c_viewer.py rename to stage_4c_viewer.py diff --git a/stage_5_convert_metadata.py b/stage_5_convert_metadata.py index 9f4073b..31e1ce2 100644 --- a/stage_5_convert_metadata.py +++ b/stage_5_convert_metadata.py @@ -6,13 +6,15 @@ from functions.get_trials import get_trials from functions.get_experiments import get_experiments -def converter(config_filename: str = "config_M_Sert_Cre_49.json") -> None: +def converter(config_filename: str = "config.json") -> None: - if os.path.isfile(config_filename) is False: - print(f"{config_filename} is missing") + filename: str = config_filename + + if os.path.isfile(filename) is False: + print(f"{filename} is missing") exit() - with open(config_filename, "r") as file: + with open(filename, "r") as file: config = json.loads(jsmin(file.read())) raw_data_path: str = os.path.join( @@ -28,8 +30,6 @@ def converter(config_filename: str = "config_M_Sert_Cre_49.json") -> None: experiments = get_experiments(raw_data_path).numpy() - os.makedirs(config["export_path"], exist_ok=True) - for experiment in experiments: trials = get_trials(raw_data_path, experiment).numpy() @@ -44,10 +44,7 @@ def converter(config_filename: str = "config_M_Sert_Cre_49.json") -> None: ) as file: metadata = json.loads(jsmin(file.read())) - filename_out: str = os.path.join( - config["export_path"], - f"metadata_exp{experiment:03d}.json", - ) + filename_out: str = f"meta_{config["mouse_identifier"]}_exp{experiment:03d}.json" with open(filename_out, 'w') as file: json.dump(metadata, file) diff --git a/geci/stage_6_convert_roi.py b/stage_6_convert_roi.py similarity index 84% rename from geci/stage_6_convert_roi.py rename to stage_6_convert_roi.py index 7bedc29..18176db 100644 --- a/geci/stage_6_convert_roi.py +++ b/stage_6_convert_roi.py @@ -6,7 +6,9 @@ import numpy as np import h5py -def converter(filename: str = "config_M_Sert_Cre_49.json") -> None: +def converter(config_filename: str = "config.json") -> None: + + filename: str = config_filename if os.path.isfile(filename) is False: print(f"{filename} is missing") @@ -35,7 +37,7 @@ def converter(filename: str = "config_M_Sert_Cre_49.json") -> None: if os.path.isfile(roi_control_mat): hf = h5py.File(roi_control_mat, "r") roi_control = np.array(hf["roi"]).T - filename_out: str = f"roi_control{config['mouse_identifier']}.npy" + filename_out: str = f"roi_control{config["mouse_identifier"]}.npy" np.save(filename_out, roi_control) else: print("ROI Control not found") @@ -43,7 +45,7 @@ def converter(filename: str = "config_M_Sert_Cre_49.json") -> None: if os.path.isfile(roi_sdarken_mat): hf = h5py.File(roi_sdarken_mat, "r") roi_darken = np.array(hf["roi"]).T - filename_out: str = f"roi_sdarken{config['mouse_identifier']}.npy" + filename_out = f"roi_sdarken{config["mouse_identifier"]}.npy" np.save(filename_out, roi_darken) else: print("ROI sDarken not found")