sgnts.transforms.amplify
¶
Amplify
dataclass
¶
Bases: TSTransform
flowchart TD
sgnts.transforms.amplify.Amplify[Amplify]
sgnts.base.base.TSTransform[TSTransform]
sgnts.base.base.TimeSeriesMixin[TimeSeriesMixin]
sgnts.base.base.TSTransform --> sgnts.transforms.amplify.Amplify
sgnts.base.base.TimeSeriesMixin --> sgnts.base.base.TSTransform
click sgnts.transforms.amplify.Amplify href "" "sgnts.transforms.amplify.Amplify"
click sgnts.base.base.TSTransform href "" "sgnts.base.base.TSTransform"
click sgnts.base.base.TimeSeriesMixin href "" "sgnts.base.base.TimeSeriesMixin"
Amplify data by a factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
factor
|
float
|
float, the factor to multiply the data with. The output dtype follows
|
1
|
Notes
Thread safety:
Marked thread_safe = True. Pad layout: 1 sink + 1
source (@transform.one_to_one). No same-element
pull/new concurrency. internal runs alone.
``pull`` (inherited): per-pad-keyed dict writes. ``new``
(inherited): read-only lookup. ``process``: NumPy scalar
multiplication (releases the GIL for large arrays) on
local buffers; reads ``self.factor`` (post-init read-only).
**Future editors MUST preserve thread safety**: do not
relax the one-to-one constraint. Keep ``process`` purely
functional on its inputs.
Source code in src/sgnts/transforms/amplify.py
process(input_frame, output_frame)
¶
Amplify non-gap data by the factor.