y5gfunc.source.wobbly.utils¶
utils
¶
Utility functions for Wobbly parser.
Classes:
| Name | Description |
|---|---|
Result |
Operation result container |
Functions:
| Name | Description |
|---|---|
get_decimation_info |
Get decimation cycle information from the project |
frame_number_after_decimation |
Calculate frame number after decimation |
Attributes:
| Name | Type | Description |
|---|---|---|
T |
|
Result
dataclass
¶
get_decimation_info
¶
get_decimation_info(project: ProjectData) -> tuple[CycleDecimationDict, DecimationRangeList]
Get decimation cycle information from the project
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ProjectData
|
Wobbly project data |
required |
Returns:
| Type | Description |
|---|---|
tuple[CycleDecimationDict, DecimationRangeList]
|
Tuple of (decimated_by_cycle, ranges) |
Source code in y5gfunc/source/wobbly/utils.py
frame_number_after_decimation
¶
frame_number_after_decimation(frame: int, decimated_by_cycle: CycleDecimationDict) -> int
Calculate frame number after decimation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Original frame number |
required |
|
CycleDecimationDict
|
Dictionary mapping cycles to sets of decimated offsets |
required |
Returns:
| Type | Description |
|---|---|
int
|
Frame number after decimation |