This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_for_demo.py
54 lines (49 loc) · 1.91 KB
/
setup_for_demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from pathlib import Path
import numpy as np
import yaml
if __name__ == "__main__":
env_path = Path(".env")
with env_path.open("w", encoding="utf-8") as f:
f.write('CONFIG_PATH="config/config.yml"')
# create config folder
config_folder_path = Path("rsp_vision/config")
config_folder_path.mkdir(parents=True, exist_ok=True)
config_path = config_folder_path / "config.yml"
with config_path.open("w", encoding="utf-8") as f:
content = {
"parser": "Parser2pRSP",
"paths": {
"imaging": "/path/to/",
"allen-dff": "/path/to/allen_dff",
"serial2p": "/path/to/serial2p",
"stimulus-ai-schedule": "/path/to/stimulus_AI_schedule_files",
"output": "/path/to/output",
},
"use-allen-dff": "true",
"analysis-type": "sf_tf",
"padding": [25, 50],
"drift_order": 2,
"fps_two_photon": 30,
"fps_tree_photon": 6.74,
"spatial_frequencies": [0.01, 0.02, 0.04, 0.08, 0.16, 0.32],
"temporal_frequencies": [0.5, 1, 2, 4, 8, 16],
"directions": [0, 45, 90, 135, 180, 225, 270, 315],
"n_spatial_frequencies": 6,
"n_temporal_frequencies": 6,
"n_directions": 8,
"trigger_interval_s": 2.5,
"anova_threshold": 0.0005,
"response_magnitude_threshold": 2.7,
"consider_only_positive": False,
"only_positive_threshold": 0.05,
"baseline": "static",
"fitting": {
"power_law_exp": 1,
"lower_bounds": [-200, 0, 0, 0.01, 0.01, -np.inf],
"upper_bounds": [np.inf, 20, 20, 4, 4, np.inf],
"iterations_to_fit": 20,
"jitter": 0.1,
"oversampling_factor": 100,
},
}
yaml.dump(content, f)