mirror of
https://github.com/davrot/gevi.git
synced 2025-08-03 01:00:02 +02:00
Compare commits
25 commits
a9c1611610
...
6609a37a97
Author | SHA1 | Date | |
---|---|---|---|
6609a37a97 | |||
6d8a7fbbbc | |||
a33172f38b | |||
d0b8ff58d2 | |||
1946ecc343 | |||
d798311b0d | |||
2e36e9013c | |||
c1caff162d | |||
a3fe0e9d5f | |||
580a85b964 | |||
2d1772b948 | |||
389251826d | |||
d8688a156a | |||
d3d79c0607 | |||
1b12b32a7d | |||
943a0a09a0 | |||
c8b9fadade | |||
0bb8964e1c | |||
1902722901 | |||
2e1906fd64 | |||
f7f286689e | |||
34eb1044d0 | |||
cfe688b0a3 | |||
a32fd9be39 | |||
859a945ac4 |
29 changed files with 942 additions and 64 deletions
46
README.md
46
README.md
|
@ -11,3 +11,49 @@ 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
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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": false,
|
||||
"gevi": false, // true => gevi, false => geci
|
||||
"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
|
||||
//"target_camera_acceptor": "acceptor",
|
||||
// EMPTY FOR GECI "target_camera_acceptor": "acceptor",
|
||||
"target_camera_acceptor": "",
|
||||
"regressor_cameras_acceptor": [
|
||||
"oxygenation",
|
||||
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"target_camera_donor": "donor",
|
||||
"regressor_cameras_donor": [
|
||||
// "oxygenation",
|
||||
// REMOVED FOR GECI "oxygenation",
|
||||
"volume"
|
||||
],
|
||||
// binning
|
||||
|
@ -52,6 +52,11 @@
|
|||
"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",
|
||||
|
@ -59,4 +64,4 @@
|
|||
"oxygenation",
|
||||
"volume"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -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": false,
|
||||
"gevi": false, // true => gevi, false => geci
|
||||
"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
|
||||
// Ratio Sequence
|
||||
"classical_ratio_mode": true, // true: a/d false: 1+a-d
|
||||
// Regression
|
||||
//"target_camera_acceptor": "acceptor",
|
||||
// EMPTY FOR GECI "target_camera_acceptor": "acceptor",
|
||||
"target_camera_acceptor": "",
|
||||
"regressor_cameras_acceptor": [
|
||||
"oxygenation",
|
||||
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"target_camera_donor": "donor",
|
||||
"regressor_cameras_donor": [
|
||||
// "oxygenation",
|
||||
// REMOVED FOR GECI "oxygenation",
|
||||
"volume"
|
||||
],
|
||||
// binning
|
||||
|
@ -52,6 +52,11 @@
|
|||
"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",
|
|
@ -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": false,
|
||||
"gevi": false, // true => gevi, false => geci
|
||||
"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
|
||||
// Ratio Sequence
|
||||
"classical_ratio_mode": true, // true: a/d false: 1+a-d
|
||||
// Regression
|
||||
//"target_camera_acceptor": "acceptor",
|
||||
// EMPTY FOR GECI "target_camera_acceptor": "acceptor",
|
||||
"target_camera_acceptor": "",
|
||||
"regressor_cameras_acceptor": [
|
||||
"oxygenation",
|
||||
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"target_camera_donor": "donor",
|
||||
"regressor_cameras_donor": [
|
||||
// "oxygenation",
|
||||
// REMOVED FOR GECI "oxygenation",
|
||||
"volume"
|
||||
],
|
||||
// binning
|
||||
|
@ -52,6 +52,11 @@
|
|||
"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",
|
|
@ -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": false,
|
||||
"gevi": false, // true => gevi, false => geci
|
||||
"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
|
||||
// Ratio Sequence
|
||||
"classical_ratio_mode": true, // true: a/d false: 1+a-d
|
||||
// Regression
|
||||
//"target_camera_acceptor": "acceptor",
|
||||
// EMPTY FOR GECI "target_camera_acceptor": "acceptor",
|
||||
"target_camera_acceptor": "",
|
||||
"regressor_cameras_acceptor": [
|
||||
"oxygenation",
|
||||
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"target_camera_donor": "donor",
|
||||
"regressor_cameras_donor": [
|
||||
// "oxygenation",
|
||||
// REMOVED FOR GECI "oxygenation",
|
||||
"volume"
|
||||
],
|
||||
// binning
|
||||
|
@ -52,6 +52,11 @@
|
|||
"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",
|
|
@ -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": false,
|
||||
"gevi": false, // true => gevi, false => geci
|
||||
"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
|
||||
// Ratio Sequence
|
||||
"classical_ratio_mode": true, // true: a/d false: 1+a-d
|
||||
// Regression
|
||||
//"target_camera_acceptor": "acceptor",
|
||||
// EMPTY FOR GECI "target_camera_acceptor": "acceptor",
|
||||
"target_camera_acceptor": "",
|
||||
"regressor_cameras_acceptor": [
|
||||
"oxygenation",
|
||||
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"target_camera_donor": "donor",
|
||||
"regressor_cameras_donor": [
|
||||
// "oxygenation",
|
||||
// REMOVED FOR GECI "oxygenation",
|
||||
"volume"
|
||||
],
|
||||
// binning
|
||||
|
@ -52,6 +52,11 @@
|
|||
"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",
|
||||
|
@ -59,4 +64,4 @@
|
|||
"oxygenation",
|
||||
"volume"
|
||||
]
|
||||
}
|
||||
}
|
67
geci/config_example_GECI.json
Normal file
67
geci/config_example_GECI.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -6,9 +6,7 @@ import numpy as np
|
|||
import h5py
|
||||
|
||||
|
||||
def converter(config_filename: str = "config.json") -> None:
|
||||
|
||||
filename: str = config_filename
|
||||
def converter(filename: str = "config_M_Sert_Cre_49.json") -> None:
|
||||
|
||||
if os.path.isfile(filename) is False:
|
||||
print(f"{filename} is missing")
|
||||
|
@ -37,7 +35,7 @@ def converter(config_filename: str = "config.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")
|
||||
|
@ -45,7 +43,7 @@ def converter(config_filename: str = "config.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 = f"roi_sdarken{config["mouse_identifier"]}.npy"
|
||||
filename_out: str = f"roi_sdarken{config['mouse_identifier']}.npy"
|
||||
np.save(filename_out, roi_darken)
|
||||
else:
|
||||
print("ROI sDarken not found")
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"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",
|
||||
"basic_path": "/data_1/fatma/GEVI/",
|
||||
"recoding_data": "2024-11-06",
|
||||
"mouse_identifier": "M0134M_SessionA",
|
||||
"raw_path": "raw",
|
||||
"heartbeat_remove": true, // if gevi must be true; geci: who knows...
|
||||
"gevi": true, // true => gevi, false => geci
|
||||
"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
|
||||
|
@ -51,6 +52,11 @@
|
|||
"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",
|
67
gevi/config_M0134M_2024-11-06_SessionB.json
Normal file
67
gevi/config_M0134M_2024-11-06_SessionB.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"basic_path": "/data_1/fatma/GEVI/",
|
||||
"recoding_data": "2024-11-06",
|
||||
"mouse_identifier": "M0134M_SessionB",
|
||||
"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
|
||||
// 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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-11-07_SessionA.json
Normal file
67
gevi/config_M0134M_2024-11-07_SessionA.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-11-07_SessionB.json
Normal file
67
gevi/config_M0134M_2024-11-07_SessionB.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-11-13_SessionA.json
Normal file
67
gevi/config_M0134M_2024-11-13_SessionA.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-11-13_SessionB.json
Normal file
67
gevi/config_M0134M_2024-11-13_SessionB.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-11-15_SessionA.json
Normal file
67
gevi/config_M0134M_2024-11-15_SessionA.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-11-15_SessionB.json
Normal file
67
gevi/config_M0134M_2024-11-15_SessionB.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
"recoding_data": "2024-11-18",
|
||||
"mouse_identifier": "M0134M_SessionA",
|
||||
"raw_path": "raw",
|
||||
"export_path": "output_M0134M_SessionA",
|
||||
"ref_image_path": "ref_images_M0134M_SessionA",
|
||||
"export_path": "output/M0134M_2024-11-18_SessionA",
|
||||
"ref_image_path": "ref_images/M0134M_2024-11-18_SessionA",
|
||||
"raw_path": "raw",
|
||||
"heartbeat_remove": true,
|
||||
"gevi": true, // true => gevi, false => geci
|
||||
|
@ -56,6 +56,7 @@
|
|||
"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",
|
67
gevi/config_M0134M_2024-11-18_SessionB.json
Normal file
67
gevi/config_M0134M_2024-11-18_SessionB.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-12-04_SessionA.json
Normal file
67
gevi/config_M0134M_2024-12-04_SessionA.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
67
gevi/config_M0134M_2024-12-04_SessionB.json
Normal file
67
gevi/config_M0134M_2024-12-04_SessionB.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
"recoding_data": "session_B",
|
||||
"mouse_identifier": "M3905F",
|
||||
"raw_path": "raw",
|
||||
"export_path": "output_M3905F_session_B",
|
||||
"ref_image_path": "ref_images_M3905F_session_B",
|
||||
"export_path": "output/M3905F_SessionB",
|
||||
"ref_image_path": "ref_images/M3905F_SessionB",
|
||||
"raw_path": "raw",
|
||||
"heartbeat_remove": true,
|
||||
"gevi": true, // true => gevi, false => geci
|
||||
|
@ -54,8 +54,9 @@
|
|||
"save_regression_coefficients": false,
|
||||
"save_aligned_as_python": false,
|
||||
"save_aligned_as_matlab": false,
|
||||
"save_oxyvol_as_python": true,
|
||||
"save_oxyvol_as_matlab": true,
|
||||
"save_oxyvol_as_python": false,
|
||||
"save_oxyvol_as_matlab": false,
|
||||
"save_gevi_with_donor_acceptor": true,
|
||||
// Not important parameter
|
||||
"required_order": [
|
||||
"acceptor",
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"basic_path": "/data_1/robert",
|
||||
"recoding_data": "2021-10-05",
|
||||
"mouse_identifier": "M3879M",
|
||||
"basic_path": "/data_1/fatma/GEVI_GECI_ES",
|
||||
"recoding_data": "session_B",
|
||||
"mouse_identifier": "M3905F",
|
||||
"raw_path": "raw",
|
||||
"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
|
||||
"export_path": "output/M3905F_SessionB",
|
||||
"ref_image_path": "ref_images/M3905F_SessionB",
|
||||
"heartbeat_remove": true,
|
||||
"gevi": true, // true => gevi, false => geci
|
||||
// Ratio Sequence
|
||||
"classical_ratio_mode": true, // true: a/d false: 1+a-d
|
||||
// Regression
|
||||
|
@ -51,6 +51,11 @@
|
|||
"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",
|
56
gevi/example_load_gevi.py
Normal file
56
gevi/example_load_gevi.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
# %%
|
||||
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()
|
||||
|
BIN
preprocessing.pdf
Normal file
BIN
preprocessing.pdf
Normal file
Binary file not shown.
|
@ -6,15 +6,13 @@ from functions.get_trials import get_trials
|
|||
from functions.get_experiments import get_experiments
|
||||
|
||||
|
||||
def converter(config_filename: str = "config.json") -> None:
|
||||
def converter(config_filename: str = "config_M_Sert_Cre_49.json") -> None:
|
||||
|
||||
filename: str = config_filename
|
||||
|
||||
if os.path.isfile(filename) is False:
|
||||
print(f"{filename} is missing")
|
||||
if os.path.isfile(config_filename) is False:
|
||||
print(f"{config_filename} is missing")
|
||||
exit()
|
||||
|
||||
with open(filename, "r") as file:
|
||||
with open(config_filename, "r") as file:
|
||||
config = json.loads(jsmin(file.read()))
|
||||
|
||||
raw_data_path: str = os.path.join(
|
||||
|
@ -30,6 +28,8 @@ def converter(config_filename: str = "config.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,7 +44,10 @@ def converter(config_filename: str = "config.json") -> None:
|
|||
) as file:
|
||||
metadata = json.loads(jsmin(file.read()))
|
||||
|
||||
filename_out: str = f"meta_{config["mouse_identifier"]}_exp{experiment:03d}.json"
|
||||
filename_out: str = os.path.join(
|
||||
config["export_path"],
|
||||
f"metadata_exp{experiment:03d}.json",
|
||||
)
|
||||
|
||||
with open(filename_out, 'w') as file:
|
||||
json.dump(metadata, file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue