TwoPy 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- twopy-0.1.4/PKG-INFO +87 -0
- twopy-0.1.4/README.md +67 -0
- {twopy-0.1.2 → twopy-0.1.4}/pyproject.toml +1 -1
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/__init__.py +16 -5
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/__init__.py +12 -4
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/background_subtraction.py +223 -49
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/dff.py +175 -118
- twopy-0.1.4/src/twopy/analysis/dff_options.py +35 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/epoch_mapping.py +2 -25
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/motion.py +2 -2
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/persistence.py +147 -87
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/response_processing/apply.py +16 -24
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/response_processing/qc.py +6 -16
- twopy-0.1.4/src/twopy/analysis/response_window_options.py +99 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/responses.py +105 -16
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/trials.py +95 -17
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/workflow.py +190 -63
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/api.py +2 -1
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/types.py +9 -2
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/converted.py +38 -31
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/cache.py +2 -5
- {twopy-0.1.2/src/twopy/conversion → twopy-0.1.4/src/twopy}/frame_ranges.py +10 -5
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/controls.py +43 -2
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/interactive.py +40 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/loading.py +53 -1
- twopy-0.1.4/src/twopy/napari/plotting/data.py +561 -0
- twopy-0.1.4/src/twopy/napari/plotting/dff_options.py +396 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/__init__.py +23 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/api.py +151 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/dynamic_options.py +208 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/options_panel.py +170 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/paths.py +100 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/plot_area.py +248 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/response_plot_widget.py +723 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/save_actions.py +127 -0
- twopy-0.1.4/src/twopy/napari/plotting/docks/visibility_state.py +153 -0
- twopy-0.1.4/src/twopy/napari/plotting/form_controls.py +88 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/label_visibility.py +34 -8
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/options.py +17 -7
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/panels.py +4 -1
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/processing_options.py +58 -37
- twopy-0.1.4/src/twopy/napari/plotting/response_window_options.py +171 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/widgets.py +28 -14
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/responses.py +30 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/viewer.py +5 -2
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/parity/__init__.py +9 -1
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/parity/dff.py +11 -33
- twopy-0.1.4/src/twopy/parity/psycho5.py +243 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/roi.py +3 -25
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/session.py +5 -1
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/stimulus.py +8 -4
- twopy-0.1.4/src/twopy.egg-info/PKG-INFO +87 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy.egg-info/SOURCES.txt +19 -2
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_background_subtraction.py +90 -3
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_conversion.py +20 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_converted.py +85 -1
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_dff.py +84 -26
- twopy-0.1.4/tests/test_frame_ranges.py +71 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_motion.py +2 -2
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_napari.py +869 -38
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_parity.py +1 -1
- twopy-0.1.4/tests/test_parity_psycho5.py +211 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_persistence.py +36 -5
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_real_fixture.py +4 -4
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_response_processing.py +56 -2
- twopy-0.1.4/tests/test_response_window_options.py +73 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_responses.py +158 -2
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_roi.py +18 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_session.py +24 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_stimulus.py +21 -2
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_trials.py +62 -3
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_workflow.py +63 -7
- twopy-0.1.2/PKG-INFO +0 -304
- twopy-0.1.2/README.md +0 -284
- twopy-0.1.2/src/twopy/napari/plotting/data.py +0 -290
- twopy-0.1.2/src/twopy/napari/plotting/docks.py +0 -1165
- twopy-0.1.2/src/twopy.egg-info/PKG-INFO +0 -304
- {twopy-0.1.2 → twopy-0.1.4}/setup.cfg +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/_segments.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/_version.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/response_processing/__init__.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/response_processing/options.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/response_processing/persistence.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/analysis/response_processing/signals.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/api.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/config.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/__init__.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/alignment_crop.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/hdf5_writing.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/matlab_values.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/source_loading.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/conversion/stimulus_code.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/__init__.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/catalog.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/connection.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/generic.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/modeled.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/sql.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/database/types.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/inspection.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/matlab.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/__init__.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/__main__.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/constants.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/display.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/display_paths.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/launcher.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/layout.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/movie.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/paths.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/__init__.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/export.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/plotting/export_controls.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/protocols.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/roi.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/session.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/state.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/text.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/napari/types.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/parity/roi.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/parity/saved_analysis.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/photodiode.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/photodiode_classification.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/spatial.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/synchronization.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy/typing_guards.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy.egg-info/dependency_links.txt +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy.egg-info/entry_points.txt +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy.egg-info/requires.txt +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/src/twopy.egg-info/top_level.txt +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_api.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_config.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_database.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_epoch_mapping.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_import.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_inspection.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_matlab.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_packaging.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_photodiode_classification.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_saved_analysis.py +0 -0
- {twopy-0.1.2 → twopy-0.1.4}/tests/test_synchronization.py +0 -0
twopy-0.1.4/PKG-INFO
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: twopy
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Two-photon imaging analysis tool with a napari interface.
|
|
5
|
+
Author-email: Gustavo Madeira Santana <fromweb1@gumadeiras.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: <3.14,>=3.13
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: h5py<4,>=3.16
|
|
10
|
+
Requires-Dist: matplotlib<4,>=3.10
|
|
11
|
+
Requires-Dist: napari[all]<0.8,>=0.7
|
|
12
|
+
Requires-Dist: numpy<3,>=2.3
|
|
13
|
+
Requires-Dist: pre-commit<5,>=4.6
|
|
14
|
+
Requires-Dist: qtpy<3,>=2.4
|
|
15
|
+
Requires-Dist: pyyaml<7,>=6.0.3
|
|
16
|
+
Requires-Dist: ruff>=0.15
|
|
17
|
+
Requires-Dist: scipy<2,>=1.17
|
|
18
|
+
Requires-Dist: tifffile<2027,>=2026.3
|
|
19
|
+
Requires-Dist: ty<0.1,>=0.0.34
|
|
20
|
+
|
|
21
|
+
# twopy
|
|
22
|
+
|
|
23
|
+
Two-photon imaging analysis tool for the Clark Lab output format.
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
## Getting Started
|
|
28
|
+
|
|
29
|
+
twopy lets you open two-photon recordings, draw ROIs, plot responses in real time, process and analyze them, and save them.
|
|
30
|
+
|
|
31
|
+
When you first load a recording, twopy converts it to a standardized HDF5 format. The converted format includes the aligned movie, mean image, stimulus tables, photodiode signals, and recording metadata. Analysis and the GUI both work from the converted files, so the original source files remain separate from twopy's outputs.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
Examples use micromamba, but any conda-compatible environment manager should work.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
micromamba create -n twopy -c conda-forge python=3.13 pip -y
|
|
40
|
+
micromamba run -n twopy python -m pip install twopy
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Verify the install:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
micromamba run -n twopy python -c 'import twopy; print(twopy.__name__)'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
For a source checkout, copy `config.example.yml` to `config.yml` and edit the paths for your computer. `config.yml` stays local and is not tracked by git.
|
|
50
|
+
|
|
51
|
+
## Start
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
micromamba activate twopy
|
|
55
|
+
twopy
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Open a source recording or converted recording directly:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
twopy /path/to/source/recording
|
|
62
|
+
twopy /path/to/recording_data.h5
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Basic GUI flow:
|
|
66
|
+
|
|
67
|
+
1. Choose a recording.
|
|
68
|
+
2. Draw or edit ROIs in the `rois` Labels layer.
|
|
69
|
+
3. Click Save ROIs.
|
|
70
|
+
4. Update response plots from the current ROIs.
|
|
71
|
+
5. Save analysis outputs.
|
|
72
|
+
|
|
73
|
+
When a source recording has not been converted yet, twopy converts it first. Converted data includes the aligned movie, mean image, stimulus tables, photodiode signals, and recording metadata.
|
|
74
|
+
|
|
75
|
+
## Docs
|
|
76
|
+
|
|
77
|
+
- [GUI guide](docs/gui.md): napari loading, ROI editing, plotting, and saved outputs.
|
|
78
|
+
- [Python API guide](docs/python_api.md): find recordings, convert data, run analysis, and open napari from scripts.
|
|
79
|
+
- [Development guide](docs/development.md): source setup and local checks.
|
|
80
|
+
- [Input data spec](docs/input_data_spec.md): short recording folder contract.
|
|
81
|
+
- [Recording file reference](docs/recording_file_schema.md): detailed source and converted file schema.
|
|
82
|
+
|
|
83
|
+
## Check
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
micromamba run -n twopy pre-commit run --all-files
|
|
87
|
+
```
|
twopy-0.1.4/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# twopy
|
|
2
|
+
|
|
3
|
+
Two-photon imaging analysis tool for the Clark Lab output format.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
twopy lets you open two-photon recordings, draw ROIs, plot responses in real time, process and analyze them, and save them.
|
|
10
|
+
|
|
11
|
+
When you first load a recording, twopy converts it to a standardized HDF5 format. The converted format includes the aligned movie, mean image, stimulus tables, photodiode signals, and recording metadata. Analysis and the GUI both work from the converted files, so the original source files remain separate from twopy's outputs.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Examples use micromamba, but any conda-compatible environment manager should work.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
micromamba create -n twopy -c conda-forge python=3.13 pip -y
|
|
20
|
+
micromamba run -n twopy python -m pip install twopy
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Verify the install:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
micromamba run -n twopy python -c 'import twopy; print(twopy.__name__)'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For a source checkout, copy `config.example.yml` to `config.yml` and edit the paths for your computer. `config.yml` stays local and is not tracked by git.
|
|
30
|
+
|
|
31
|
+
## Start
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
micromamba activate twopy
|
|
35
|
+
twopy
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Open a source recording or converted recording directly:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
twopy /path/to/source/recording
|
|
42
|
+
twopy /path/to/recording_data.h5
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Basic GUI flow:
|
|
46
|
+
|
|
47
|
+
1. Choose a recording.
|
|
48
|
+
2. Draw or edit ROIs in the `rois` Labels layer.
|
|
49
|
+
3. Click Save ROIs.
|
|
50
|
+
4. Update response plots from the current ROIs.
|
|
51
|
+
5. Save analysis outputs.
|
|
52
|
+
|
|
53
|
+
When a source recording has not been converted yet, twopy converts it first. Converted data includes the aligned movie, mean image, stimulus tables, photodiode signals, and recording metadata.
|
|
54
|
+
|
|
55
|
+
## Docs
|
|
56
|
+
|
|
57
|
+
- [GUI guide](docs/gui.md): napari loading, ROI editing, plotting, and saved outputs.
|
|
58
|
+
- [Python API guide](docs/python_api.md): find recordings, convert data, run analysis, and open napari from scripts.
|
|
59
|
+
- [Development guide](docs/development.md): source setup and local checks.
|
|
60
|
+
- [Input data spec](docs/input_data_spec.md): short recording folder contract.
|
|
61
|
+
- [Recording file reference](docs/recording_file_schema.md): detailed source and converted file schema.
|
|
62
|
+
|
|
63
|
+
## Check
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
micromamba run -n twopy pre-commit run --all-files
|
|
67
|
+
```
|
|
@@ -15,6 +15,7 @@ from twopy.analysis import (
|
|
|
15
15
|
BackgroundCorrectionMethod,
|
|
16
16
|
CorrelationFilterOptions,
|
|
17
17
|
DeltaFOverFFitMode,
|
|
18
|
+
DeltaFOverFOptions,
|
|
18
19
|
EpochFrameWindow,
|
|
19
20
|
FrameWindow,
|
|
20
21
|
GroupedRoiResponses,
|
|
@@ -33,25 +34,28 @@ from twopy.analysis import (
|
|
|
33
34
|
apply_motion_artifact_mask_to_delta_f_over_f,
|
|
34
35
|
compute_recording_responses,
|
|
35
36
|
compute_roi_delta_f_over_f,
|
|
37
|
+
default_baseline_epoch_number,
|
|
36
38
|
extract_background_corrected_roi_traces,
|
|
37
39
|
frame_windows_from_photodiode_alignment,
|
|
38
40
|
group_delta_f_over_f_by_epoch,
|
|
39
41
|
interpolate_stimulus_epochs_to_frame_windows,
|
|
40
|
-
|
|
42
|
+
is_baseline_epoch_name,
|
|
41
43
|
load_analysis_outputs,
|
|
42
44
|
make_frame_windows,
|
|
43
45
|
map_stimulus_epochs_to_frame_windows,
|
|
46
|
+
resolve_baseline_frame_windows,
|
|
44
47
|
save_analysis_outputs,
|
|
45
|
-
|
|
48
|
+
select_baseline_frame_windows,
|
|
46
49
|
split_traces_by_frame_windows,
|
|
47
50
|
summarize_epoch_roi_responses,
|
|
48
51
|
summarize_grouped_responses,
|
|
52
|
+
validate_grouped_roi_responses,
|
|
49
53
|
write_response_summary_grouped_csv,
|
|
50
54
|
write_response_summary_trials_csv,
|
|
51
55
|
)
|
|
52
56
|
from twopy.api import find_recordings
|
|
53
57
|
from twopy.conversion import convert_recording_to_twopy, load_source_conversion_inputs
|
|
54
|
-
from twopy.converted import load_converted_recording
|
|
58
|
+
from twopy.converted import load_converted_recording, recording_frame_rate_hz
|
|
55
59
|
from twopy.napari import (
|
|
56
60
|
NapariControlDocks,
|
|
57
61
|
NapariRecordingView,
|
|
@@ -83,6 +87,7 @@ from twopy.spatial import SpatialCrop, SpatialDomain, full_frame_crop
|
|
|
83
87
|
from twopy.stimulus import (
|
|
84
88
|
StimulusSpecificColumnMapping,
|
|
85
89
|
map_stimulus_specific_column,
|
|
90
|
+
stimulus_epoch_names_by_number,
|
|
86
91
|
)
|
|
87
92
|
from twopy.synchronization import (
|
|
88
93
|
AlignedPhotodiodeEvent,
|
|
@@ -114,9 +119,11 @@ __all__ = [
|
|
|
114
119
|
"convert_recording_to_twopy",
|
|
115
120
|
"DEFAULT_RESPONSE_POST_WINDOW_SECONDS",
|
|
116
121
|
"DEFAULT_RESPONSE_PRE_WINDOW_SECONDS",
|
|
122
|
+
"default_baseline_epoch_number",
|
|
117
123
|
"detect_photodiode_events",
|
|
118
124
|
"detect_recording_photodiode_events",
|
|
119
125
|
"DeltaFOverFFitMode",
|
|
126
|
+
"DeltaFOverFOptions",
|
|
120
127
|
"EpochFrameWindow",
|
|
121
128
|
"extract_background_corrected_roi_traces",
|
|
122
129
|
"extract_roi_traces",
|
|
@@ -129,7 +136,7 @@ __all__ = [
|
|
|
129
136
|
"GroupedRoiResponses",
|
|
130
137
|
"InterpolatedEpochMapping",
|
|
131
138
|
"interpolate_stimulus_epochs_to_frame_windows",
|
|
132
|
-
"
|
|
139
|
+
"is_baseline_epoch_name",
|
|
133
140
|
"launch_napari",
|
|
134
141
|
"load_analysis_outputs",
|
|
135
142
|
"load_converted_recording",
|
|
@@ -152,6 +159,8 @@ __all__ = [
|
|
|
152
159
|
"PhotodiodeEventType",
|
|
153
160
|
"PhotodiodeEventSet",
|
|
154
161
|
"ResponseProcessingOptions",
|
|
162
|
+
"recording_frame_rate_hz",
|
|
163
|
+
"resolve_baseline_frame_windows",
|
|
155
164
|
"RoiDeltaFOverF",
|
|
156
165
|
"RoiCorrelationScores",
|
|
157
166
|
"RoiResponseSummary",
|
|
@@ -163,14 +172,16 @@ __all__ = [
|
|
|
163
172
|
"save_analysis_outputs",
|
|
164
173
|
"save_napari_label_rois",
|
|
165
174
|
"save_roi_set",
|
|
166
|
-
"
|
|
175
|
+
"select_baseline_frame_windows",
|
|
167
176
|
"split_traces_by_frame_windows",
|
|
168
177
|
"SmoothingOptions",
|
|
169
178
|
"SpatialCrop",
|
|
170
179
|
"SpatialDomain",
|
|
171
180
|
"StimulusSpecificColumnMapping",
|
|
181
|
+
"stimulus_epoch_names_by_number",
|
|
172
182
|
"summarize_epoch_roi_responses",
|
|
173
183
|
"summarize_grouped_responses",
|
|
184
|
+
"validate_grouped_roi_responses",
|
|
174
185
|
"WindowedRoiResponse",
|
|
175
186
|
"write_response_summary_grouped_csv",
|
|
176
187
|
"write_response_summary_trials_csv",
|
|
@@ -18,6 +18,7 @@ from twopy.analysis.dff import (
|
|
|
18
18
|
RoiDeltaFOverF,
|
|
19
19
|
compute_roi_delta_f_over_f,
|
|
20
20
|
)
|
|
21
|
+
from twopy.analysis.dff_options import DeltaFOverFOptions
|
|
21
22
|
from twopy.analysis.epoch_mapping import (
|
|
22
23
|
InterpolatedEpochMapping,
|
|
23
24
|
interpolate_stimulus_epochs_to_frame_windows,
|
|
@@ -44,18 +45,21 @@ from twopy.analysis.responses import (
|
|
|
44
45
|
RoiResponseSummary,
|
|
45
46
|
RoiResponseTrial,
|
|
46
47
|
group_delta_f_over_f_by_epoch,
|
|
47
|
-
is_gray_epoch_name,
|
|
48
48
|
summarize_epoch_roi_responses,
|
|
49
49
|
summarize_grouped_responses,
|
|
50
|
+
validate_grouped_roi_responses,
|
|
50
51
|
)
|
|
51
52
|
from twopy.analysis.trials import (
|
|
52
53
|
EpochFrameWindow,
|
|
53
54
|
FrameWindow,
|
|
54
55
|
WindowedRoiResponse,
|
|
56
|
+
default_baseline_epoch_number,
|
|
55
57
|
frame_windows_from_photodiode_alignment,
|
|
58
|
+
is_baseline_epoch_name,
|
|
56
59
|
make_frame_windows,
|
|
57
60
|
map_stimulus_epochs_to_frame_windows,
|
|
58
|
-
|
|
61
|
+
resolve_baseline_frame_windows,
|
|
62
|
+
select_baseline_frame_windows,
|
|
59
63
|
split_traces_by_frame_windows,
|
|
60
64
|
)
|
|
61
65
|
from twopy.analysis.workflow import (
|
|
@@ -80,6 +84,8 @@ __all__ = [
|
|
|
80
84
|
"compute_roi_delta_f_over_f",
|
|
81
85
|
"compute_recording_responses",
|
|
82
86
|
"CorrelationFilterOptions",
|
|
87
|
+
"default_baseline_epoch_number",
|
|
88
|
+
"DeltaFOverFOptions",
|
|
83
89
|
"DeltaFOverFFitMode",
|
|
84
90
|
"EpochFrameWindow",
|
|
85
91
|
"extract_background_corrected_roi_traces",
|
|
@@ -90,7 +96,7 @@ __all__ = [
|
|
|
90
96
|
"GroupedRoiResponses",
|
|
91
97
|
"InterpolatedEpochMapping",
|
|
92
98
|
"interpolate_stimulus_epochs_to_frame_windows",
|
|
93
|
-
"
|
|
99
|
+
"is_baseline_epoch_name",
|
|
94
100
|
"load_analysis_outputs",
|
|
95
101
|
"LoadedAnalysisOutputs",
|
|
96
102
|
"LowPassFilterOptions",
|
|
@@ -101,12 +107,14 @@ __all__ = [
|
|
|
101
107
|
"RoiCorrelationScores",
|
|
102
108
|
"RoiResponseSummary",
|
|
103
109
|
"RoiResponseTrial",
|
|
110
|
+
"resolve_baseline_frame_windows",
|
|
104
111
|
"save_analysis_outputs",
|
|
105
|
-
"
|
|
112
|
+
"select_baseline_frame_windows",
|
|
106
113
|
"split_traces_by_frame_windows",
|
|
107
114
|
"SmoothingOptions",
|
|
108
115
|
"summarize_epoch_roi_responses",
|
|
109
116
|
"summarize_grouped_responses",
|
|
117
|
+
"validate_grouped_roi_responses",
|
|
110
118
|
"WindowedRoiResponse",
|
|
111
119
|
"write_response_summary_grouped_csv",
|
|
112
120
|
"write_response_summary_trials_csv",
|