Velocity analysis¶
Bases: BaseAnalysis
Measure velocity from one channel/ROI using a Radon transform.
The analysis runs on a full-resolution rectangular ROI crop. For line-scan kymographs, rows correspond to time and columns correspond to distance. The Radon core analyzes sliding windows along the time axis and reports velocity as a function of time.
Detection parameters are serialized with the analysis and affect scientific
results. Execution options set with :meth:set_execution_options control
multiprocessing for speed and are not serialized.
Examples:
Create and run one analysis through an AcqImage analysis set::
key = acq.analysis_set.create(
"radon_velocity",
channel=0,
roi_id=1,
detection_params={"window_width": 64},
).key
acq.analysis_set.run_analysis(key)
plot = acq.analysis_set.get(key).get_plot_data()
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel
|
int
|
Zero-based channel index for analysis. |
required |
roi_id
|
int
|
Rectangular ROI identifier for analysis. |
required |
detection_params
|
dict[str, object] | None
|
Optional detection parameters. Missing values are
filled from |
None
|
Source code in src/acqstore/acq_image/analysis/velocity_analysis/radon_velocity_analysis.py
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
set_execution_options ¶
set_execution_options(
*,
use_multiprocessing: bool = True,
processes: int | None = None,
) -> None
Set runtime execution options for the next run.
These options are not detection parameters and are not serialized. They control how the current Python process executes the expensive Radon computation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
use_multiprocessing
|
bool
|
Whether to use multiprocessing for Radon windows. |
True
|
processes
|
int | None
|
Optional number of worker processes. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
None. |
Source code in src/acqstore/acq_image/analysis/velocity_analysis/radon_velocity_analysis.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
run ¶
run(
data_provider: AnalysisDataProvider,
*,
context: AnalysisRunContext | None = None,
dependencies: dict[str, BaseAnalysis] | None = None,
) -> AnalysisResult
Run Radon velocity analysis on one ROI crop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_provider
|
AnalysisDataProvider
|
Provider for full-resolution ROI image data and
physical spacing. |
required |
context
|
AnalysisRunContext | None
|
Optional progress/cancellation context. |
None
|
dependencies
|
dict[str, BaseAnalysis] | None
|
Dependency analyses. Radon velocity currently does not require dependencies. |
None
|
Returns:
| Type | Description |
|---|---|
AnalysisResult
|
Analysis result populated with a summary dictionary and table. The |
AnalysisResult
|
table includes at least |
Raises:
| Type | Description |
|---|---|
AnalysisCancelled
|
If the run is cancelled through |
Source code in src/acqstore/acq_image/analysis/velocity_analysis/radon_velocity_analysis.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
get_plot_data ¶
get_plot_data() -> AnalysisPlotData | None
Return canonical velocity-versus-time plot data.
Returns:
| Type | Description |
|---|---|
AnalysisPlotData | None
|
Plot data using |
AnalysisPlotData | None
|
axis, or |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the table is present but missing required columns. |
Source code in src/acqstore/acq_image/analysis/velocity_analysis/radon_velocity_analysis.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |