power module
Define power probes to measure forward and reflected power.
- class Power(*args, position=nan, p_low=None, p_high=None, k_fix=None, alpha_fix=None, ensure_no_negative=True, **kwargs)[source]
Bases:
InstrumentAn instrument to measure power.
- Parameters:
- where_is_growing(*args, **kwargs)[source]
Identify regions where the signal is increasing (“growing”).
Deprecated since version 1.7.0: Alias to
Power.growth_mask(), consider calling it directly.
- growth_mask(minimum_number_of_points=50, n_trailing_points_to_check=40, width=10, **kwargs)[source]
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a boolean array of the same length as the input signal, where
Trueindicates a region of growth andFalseotherwise. A priori, will be useful for:PowerSetpointto determine power cycles. A fallback isForwardPower.RPA.
The method performs three main operations:
It uses a sliding-window heuristic (via
array_is_growing()) to detect growth.It removes short, isolated
Falsesegments, enforcing a minimum number of consecutiveTruevalues to be considered valid.It clears any trailing
Truevalues near the end of the array to prevent spurious detections due to edge effects.
- Parameters:
minimum_number_of_points (
int, default:50) – The minimum number of consecutiveTruevalues required to consider a region as growing. Shorter segments are suppressed.n_trailing_points_to_check (
int, default:40) – The number of points at the end of the signal to check and force toFalseif they form an isolated or uncertain growth pattern. Particulatly useful forForwardPowerto avoid detection of a new power cycle at the end of the test.width (
int, default:10) – Width of the sample to determine increase.**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Boolean array indicating where the signal is growing.
Notes
The detection is influenced by the choice of parameters and the behavior of
array_is_growing().Trailing regions and short noise-like fluctuations are filtered out.
Todo
Consider adding post-processing to remove isolated
Truevalues.
- _get_wattmeter_calibration(p_low, p_high, v_low=0.0, v_high=1.0)[source]
Compute the wattmetre transfer function parameters.
We just find the linear relation parameters:
- property _transfer_functions: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Give functions transforming acquisition voltage to physical quantity.
They are used when input files contain raw data, ie acquisition voltages.
- _abc_impl = <_abc._abc_data object at 0x7466ce10a300>
- _get_plot_methods(is_2d)
Give the proper plotting functions according to
is_2d.
- _plot_vs_position_for_1d(sample_index, raw=False, color=None, artist=None, axe=None, **kwargs)
Plot what instrument measured at its position, at a given time step.
Adapted to Pick-Up instruments.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
StemContainer|None, default:None) – If provided, the stem Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted stem.
- _plot_vs_position_for_2d(sample_index, raw=False, color=None, axe=None, artist=None, **kwargs)
Plot what instrument measured at all positions, at a given time step.
Adapted to instruments with several positions, such as VirtualInstrument reproducing electric field envelope at all positions.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
Line2D|None, default:None) – If provided, the Line2D Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted line.
- _post_treat(data)
Apply all post-treatment functions.
- property _raw_data: Series
Raw data as measured by the instrument.
For classic
Instrument, it should not change. ForVirtualInstrument, it may change when the data it is calculated changes.
- _raw_data_can_change = False
- _scatter_data_1d(axes, multipactor, xdata=None)
Plot
data, discriminating where there is multipactor or not.- Parameters:
- Return type:
- add_post_treater(post_treater)
Append a single post-treating function.
- copy()
Deep copy of the instrument.
- Return type:
Self
- property data: ndarray[tuple[Any, ...], dtype[float64]]
Get the treated data.
Note that in order to save time,
_datais not re-calculated fromraw_dataevery time. Hence, it is primordial to re-set_y_datatoNoneevery time a change is made to_post_treaters.
- classmethod from_pd_dataframe(name, raw_data, **kwargs)
Instantiate the object from several
CSVfile columns.- Parameters:
name (
str) – Name of the instrument.raw_data (
DataFrame) – Object holding several columns of theCSV.kwargs – Other keyword arguments passed to the
Instrument.
- Return type:
Self- Returns:
An instrument. Note that its
dataattribute will be a 2D array.
- growth_array(**kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a float array of the same length as the input signal, where
1.0indicates a region of growth and-1.0otherwise.0.0means constant signal. A priori, will be useful for:Notes
Designed for non-noisy instruments such as
PowerSetpoint.- Parameters:
width – Width of the sample to determine increase.
no_change_value – Value to put in growth mask when we did not manage to find whether measured signal increased or not.
**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Array where +1 means growing, -1 decreasing, 0 means constant.
- property post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Get the list of the post-treating functions.
- property raw_data_as_pd: Series | DataFrame
Get the raw (untreated) data as a pandas object, without post-treating.
- register_callback(cb)
Register the callback function.
Callback functions are called when a post-treater is added to
Self. This is used whenVirtualInstrumentdata depends on some otherInstrumentdata. Currently used for:ForwardPower(updatesReflectionCoefficient)ReflectedPower(updatesReflectionCoefficient)ReflectionCoefficient(updatesSWR)
- remove_post_treater(post_treater=None, index=None)
Remove
post_treateror the post-treater at indexindex.
- replace(**overrides)
Copy with modified attributes.
- Return type:
Self
- _post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
- _callbacks: list[Callable[[], Series]]
Functions to call when a post-treater is added to current object.
See also
- reduction_info: ReductionInfo | None
Set by
PowerStep.to_single_values(). None until reduction occurs.
- name
Name of the instrument.
- position
The position of the instrument. If irrelevant (global diagnostic), must be set to
np.nan.
- class ForwardPower(*args, **kwargs)[source]
Bases:
PowerStore the forward power.
- _abc_impl = <_abc._abc_data object at 0x7466ce10a880>
- _get_plot_methods(is_2d)
Give the proper plotting functions according to
is_2d.
- _get_wattmeter_calibration(p_low, p_high, v_low=0.0, v_high=1.0)
Compute the wattmetre transfer function parameters.
We just find the linear relation parameters:
- _plot_vs_position_for_1d(sample_index, raw=False, color=None, artist=None, axe=None, **kwargs)
Plot what instrument measured at its position, at a given time step.
Adapted to Pick-Up instruments.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
StemContainer|None, default:None) – If provided, the stem Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted stem.
- _plot_vs_position_for_2d(sample_index, raw=False, color=None, axe=None, artist=None, **kwargs)
Plot what instrument measured at all positions, at a given time step.
Adapted to instruments with several positions, such as VirtualInstrument reproducing electric field envelope at all positions.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
Line2D|None, default:None) – If provided, the Line2D Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted line.
- _post_treat(data)
Apply all post-treatment functions.
- property _raw_data: Series
Raw data as measured by the instrument.
For classic
Instrument, it should not change. ForVirtualInstrument, it may change when the data it is calculated changes.
- _raw_data_can_change = False
- _scatter_data_1d(axes, multipactor, xdata=None)
Plot
data, discriminating where there is multipactor or not.- Parameters:
- Return type:
- property _transfer_functions: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Give functions transforming acquisition voltage to physical quantity.
They are used when input files contain raw data, ie acquisition voltages.
- add_post_treater(post_treater)
Append a single post-treating function.
- copy()
Deep copy of the instrument.
- Return type:
Self
- property data: ndarray[tuple[Any, ...], dtype[float64]]
Get the treated data.
Note that in order to save time,
_datais not re-calculated fromraw_dataevery time. Hence, it is primordial to re-set_y_datatoNoneevery time a change is made to_post_treaters.
- classmethod from_pd_dataframe(name, raw_data, **kwargs)
Instantiate the object from several
CSVfile columns.- Parameters:
name (
str) – Name of the instrument.raw_data (
DataFrame) – Object holding several columns of theCSV.kwargs – Other keyword arguments passed to the
Instrument.
- Return type:
Self- Returns:
An instrument. Note that its
dataattribute will be a 2D array.
- growth_array(**kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a float array of the same length as the input signal, where
1.0indicates a region of growth and-1.0otherwise.0.0means constant signal. A priori, will be useful for:Notes
Designed for non-noisy instruments such as
PowerSetpoint.- Parameters:
width – Width of the sample to determine increase.
no_change_value – Value to put in growth mask when we did not manage to find whether measured signal increased or not.
**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Array where +1 means growing, -1 decreasing, 0 means constant.
- growth_mask(minimum_number_of_points=50, n_trailing_points_to_check=40, width=10, **kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a boolean array of the same length as the input signal, where
Trueindicates a region of growth andFalseotherwise. A priori, will be useful for:PowerSetpointto determine power cycles. A fallback isForwardPower.RPA.
The method performs three main operations:
It uses a sliding-window heuristic (via
array_is_growing()) to detect growth.It removes short, isolated
Falsesegments, enforcing a minimum number of consecutiveTruevalues to be considered valid.It clears any trailing
Truevalues near the end of the array to prevent spurious detections due to edge effects.
- Parameters:
minimum_number_of_points (
int, default:50) – The minimum number of consecutiveTruevalues required to consider a region as growing. Shorter segments are suppressed.n_trailing_points_to_check (
int, default:40) – The number of points at the end of the signal to check and force toFalseif they form an isolated or uncertain growth pattern. Particulatly useful forForwardPowerto avoid detection of a new power cycle at the end of the test.width (
int, default:10) – Width of the sample to determine increase.**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Boolean array indicating where the signal is growing.
Notes
The detection is influenced by the choice of parameters and the behavior of
array_is_growing().Trailing regions and short noise-like fluctuations are filtered out.
Todo
Consider adding post-processing to remove isolated
Truevalues.
- property post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Get the list of the post-treating functions.
- property raw_data_as_pd: Series | DataFrame
Get the raw (untreated) data as a pandas object, without post-treating.
- register_callback(cb)
Register the callback function.
Callback functions are called when a post-treater is added to
Self. This is used whenVirtualInstrumentdata depends on some otherInstrumentdata. Currently used for:ForwardPower(updatesReflectionCoefficient)ReflectedPower(updatesReflectionCoefficient)ReflectionCoefficient(updatesSWR)
- remove_post_treater(post_treater=None, index=None)
Remove
post_treateror the post-treater at indexindex.
- replace(**overrides)
Copy with modified attributes.
- Return type:
Self
- where_is_growing(*args, **kwargs)
Identify regions where the signal is increasing (“growing”).
Deprecated since version 1.7.0: Alias to
Power.growth_mask(), consider calling it directly.
- _post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
- _callbacks: list[Callable[[], Series]]
Functions to call when a post-treater is added to current object.
See also
- reduction_info: ReductionInfo | None
Set by
PowerStep.to_single_values(). None until reduction occurs.
- name
Name of the instrument.
- position
The position of the instrument. If irrelevant (global diagnostic), must be set to
np.nan.
- class ReflectedPower(*args, **kwargs)[source]
Bases:
PowerStore the reflected power.
- _abc_impl = <_abc._abc_data object at 0x7466ce10a340>
- _get_plot_methods(is_2d)
Give the proper plotting functions according to
is_2d.
- _get_wattmeter_calibration(p_low, p_high, v_low=0.0, v_high=1.0)
Compute the wattmetre transfer function parameters.
We just find the linear relation parameters:
- _plot_vs_position_for_1d(sample_index, raw=False, color=None, artist=None, axe=None, **kwargs)
Plot what instrument measured at its position, at a given time step.
Adapted to Pick-Up instruments.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
StemContainer|None, default:None) – If provided, the stem Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted stem.
- _plot_vs_position_for_2d(sample_index, raw=False, color=None, axe=None, artist=None, **kwargs)
Plot what instrument measured at all positions, at a given time step.
Adapted to instruments with several positions, such as VirtualInstrument reproducing electric field envelope at all positions.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
Line2D|None, default:None) – If provided, the Line2D Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted line.
- _post_treat(data)
Apply all post-treatment functions.
- property _raw_data: Series
Raw data as measured by the instrument.
For classic
Instrument, it should not change. ForVirtualInstrument, it may change when the data it is calculated changes.
- _raw_data_can_change = False
- _scatter_data_1d(axes, multipactor, xdata=None)
Plot
data, discriminating where there is multipactor or not.- Parameters:
- Return type:
- property _transfer_functions: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Give functions transforming acquisition voltage to physical quantity.
They are used when input files contain raw data, ie acquisition voltages.
- add_post_treater(post_treater)
Append a single post-treating function.
- copy()
Deep copy of the instrument.
- Return type:
Self
- property data: ndarray[tuple[Any, ...], dtype[float64]]
Get the treated data.
Note that in order to save time,
_datais not re-calculated fromraw_dataevery time. Hence, it is primordial to re-set_y_datatoNoneevery time a change is made to_post_treaters.
- classmethod from_pd_dataframe(name, raw_data, **kwargs)
Instantiate the object from several
CSVfile columns.- Parameters:
name (
str) – Name of the instrument.raw_data (
DataFrame) – Object holding several columns of theCSV.kwargs – Other keyword arguments passed to the
Instrument.
- Return type:
Self- Returns:
An instrument. Note that its
dataattribute will be a 2D array.
- growth_array(**kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a float array of the same length as the input signal, where
1.0indicates a region of growth and-1.0otherwise.0.0means constant signal. A priori, will be useful for:Notes
Designed for non-noisy instruments such as
PowerSetpoint.- Parameters:
width – Width of the sample to determine increase.
no_change_value – Value to put in growth mask when we did not manage to find whether measured signal increased or not.
**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Array where +1 means growing, -1 decreasing, 0 means constant.
- growth_mask(minimum_number_of_points=50, n_trailing_points_to_check=40, width=10, **kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a boolean array of the same length as the input signal, where
Trueindicates a region of growth andFalseotherwise. A priori, will be useful for:PowerSetpointto determine power cycles. A fallback isForwardPower.RPA.
The method performs three main operations:
It uses a sliding-window heuristic (via
array_is_growing()) to detect growth.It removes short, isolated
Falsesegments, enforcing a minimum number of consecutiveTruevalues to be considered valid.It clears any trailing
Truevalues near the end of the array to prevent spurious detections due to edge effects.
- Parameters:
minimum_number_of_points (
int, default:50) – The minimum number of consecutiveTruevalues required to consider a region as growing. Shorter segments are suppressed.n_trailing_points_to_check (
int, default:40) – The number of points at the end of the signal to check and force toFalseif they form an isolated or uncertain growth pattern. Particulatly useful forForwardPowerto avoid detection of a new power cycle at the end of the test.width (
int, default:10) – Width of the sample to determine increase.**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Boolean array indicating where the signal is growing.
Notes
The detection is influenced by the choice of parameters and the behavior of
array_is_growing().Trailing regions and short noise-like fluctuations are filtered out.
Todo
Consider adding post-processing to remove isolated
Truevalues.
- property post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Get the list of the post-treating functions.
- property raw_data_as_pd: Series | DataFrame
Get the raw (untreated) data as a pandas object, without post-treating.
- register_callback(cb)
Register the callback function.
Callback functions are called when a post-treater is added to
Self. This is used whenVirtualInstrumentdata depends on some otherInstrumentdata. Currently used for:ForwardPower(updatesReflectionCoefficient)ReflectedPower(updatesReflectionCoefficient)ReflectionCoefficient(updatesSWR)
- remove_post_treater(post_treater=None, index=None)
Remove
post_treateror the post-treater at indexindex.
- replace(**overrides)
Copy with modified attributes.
- Return type:
Self
- where_is_growing(*args, **kwargs)
Identify regions where the signal is increasing (“growing”).
Deprecated since version 1.7.0: Alias to
Power.growth_mask(), consider calling it directly.
- _post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
- _callbacks: list[Callable[[], Series]]
Functions to call when a post-treater is added to current object.
See also
- reduction_info: ReductionInfo | None
Set by
PowerStep.to_single_values(). None until reduction occurs.
- name
Name of the instrument.
- position
The position of the instrument. If irrelevant (global diagnostic), must be set to
np.nan.
- class Sync(*args, position=nan, **kwargs)[source]
Bases:
VirtualInstrumentStore when power is ON or OFF.
Note
Do not use it in
MultipactorTest, it only makes sense in aPowerStep.- _abc_impl = <_abc._abc_data object at 0x7466ce10b940>
- _get_plot_methods(is_2d)
Give the proper plotting functions according to
is_2d.
- _plot_vs_position_for_1d(sample_index, raw=False, color=None, artist=None, axe=None, **kwargs)
Plot what instrument measured at its position, at a given time step.
Adapted to Pick-Up instruments.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
StemContainer|None, default:None) – If provided, the stem Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted stem.
- _plot_vs_position_for_2d(sample_index, raw=False, color=None, axe=None, artist=None, **kwargs)
Plot what instrument measured at all positions, at a given time step.
Adapted to instruments with several positions, such as VirtualInstrument reproducing electric field envelope at all positions.
- Parameters:
sample_index (
int) – Index of the measurements.raw (
bool, default:False) – If the raw data should be plotted.color (
tuple[float,float,float] |None, default:None) – Color of the plot.artist (
Line2D|None, default:None) – If provided, the Line2D Artist object is updated rather than overwritten. It is mandatory for matplotlib animation to work.axe (
Axes|None, default:None) – Axe where the artist should be created. It must be provided ifartistis not given.
- Return type:
- Returns:
The plotted line.
- _post_treat(data)
Apply all post-treatment functions.
- property _raw_data: Series
Raw data as measured by the instrument.
For classic
Instrument, it should not change. ForVirtualInstrument, it may change when the data it is calculated changes.
- _raw_data_can_change = True
- _scatter_data_1d(axes, multipactor, xdata=None)
Plot
data, discriminating where there is multipactor or not.- Parameters:
- Return type:
- add_post_treater(post_treater)
Append a single post-treating function.
- copy()
Deep copy of the instrument.
- Return type:
Self
- property data: ndarray[tuple[Any, ...], dtype[float64]]
Get the treated data.
Note that in order to save time,
_datais not re-calculated fromraw_dataevery time. Hence, it is primordial to re-set_y_datatoNoneevery time a change is made to_post_treaters.
- classmethod from_pd_dataframe(name, raw_data, **kwargs)
Instantiate the object from several
CSVfile columns.- Parameters:
name (
str) – Name of the instrument.raw_data (
DataFrame) – Object holding several columns of theCSV.kwargs – Other keyword arguments passed to the
Instrument.
- Return type:
Self- Returns:
An instrument. Note that its
dataattribute will be a 2D array.
- growth_array(**kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a float array of the same length as the input signal, where
1.0indicates a region of growth and-1.0otherwise.0.0means constant signal. A priori, will be useful for:Notes
Designed for non-noisy instruments such as
PowerSetpoint.- Parameters:
width – Width of the sample to determine increase.
no_change_value – Value to put in growth mask when we did not manage to find whether measured signal increased or not.
**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Array where +1 means growing, -1 decreasing, 0 means constant.
- growth_mask(minimum_number_of_points=0, n_trailing_points_to_check=0, width=10, **kwargs)
Identify regions where the signal is increasing (“growing”).
This method analyzes a signal to determine where it exhibits a growing trend. It returns a boolean array of the same length as the input signal, where
Trueindicates a region of growth andFalseotherwise. A priori, will be useful for:PowerSetpointto determine power cycles. A fallback isForwardPower.RPA.
The method performs three main operations:
It uses a sliding-window heuristic (via
array_is_growing()) to detect growth.It removes short, isolated
Falsesegments, enforcing a minimum number of consecutiveTruevalues to be considered valid.It clears any trailing
Truevalues near the end of the array to prevent spurious detections due to edge effects.
- Parameters:
minimum_number_of_points (
int, default:0) – The minimum number of consecutiveTruevalues required to consider a region as growing. Shorter segments are suppressed.n_trailing_points_to_check (
int, default:0) – The number of points at the end of the signal to check and force toFalseif they form an isolated or uncertain growth pattern. Particulatly useful forForwardPowerto avoid detection of a new power cycle at the end of the test.width (
int, default:10) – Width of the sample to determine increase.**kwargs – Additional keyword arguments passed to
array_is_growing().
- Return type:
- Returns:
Boolean array indicating where the signal is growing.
Notes
The detection is influenced by the choice of parameters and the behavior of
array_is_growing().Trailing regions and short noise-like fluctuations are filtered out.
Todo
Consider adding post-processing to remove isolated
Truevalues.
- property post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
Get the list of the post-treating functions.
- property raw_data_as_pd: Series | DataFrame
Get the raw (untreated) data as a pandas object, without post-treating.
- register_callback(cb)
Register the callback function.
Callback functions are called when a post-treater is added to
Self. This is used whenVirtualInstrumentdata depends on some otherInstrumentdata. Currently used for:ForwardPower(updatesReflectionCoefficient)ReflectedPower(updatesReflectionCoefficient)ReflectionCoefficient(updatesSWR)
- remove_post_treater(post_treater=None, index=None)
Remove
post_treateror the post-treater at indexindex.
- replace(**overrides)
Copy with modified attributes.
- Return type:
Self
- _post_treaters: list[Callable[[ndarray[tuple[Any, ...], dtype[float64]]], ndarray[tuple[Any, ...], dtype[float64]]]]
- _callbacks: list[Callable[[], Series]]
Functions to call when a post-treater is added to current object.
See also
- reduction_info: ReductionInfo | None
Set by
PowerStep.to_single_values(). None until reduction occurs.
- name
Name of the instrument.
- position
The position of the instrument. If irrelevant (global diagnostic), must be set to
np.nan.