qat.utils.waveform module
- class BlackmanFunction(**data)
Bases:
ComplexFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
-
a0:
float
-
a1:
float
-
a2:
float
- derivative(**kwargs)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
width:
float
-
a0:
- class ComplexFunction(**data)
Bases:
AllowExtraFieldsModel
,ABC
Function object used to represent Complex 1D functions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- abstract derivative(x, y)
First order derivative.
- Return type:
ndarray
-
dt:
float
- abstract eval(x)
Function evaluated in domain described by x.
- Return type:
ndarray
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Return type:
None
- Args:
self: The BaseModel instance. context: The context.
- class Cos(**data)
Bases:
ComplexFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(x, _=None)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
-
frequency:
float
-
internal_phase:
float
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- class DragGaussianFunction(**data)
Bases:
ComplexFunction
Drag Gaussian, tighter on one side and long tail on the other.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
-
beta:
float
- derivative(x, _=None)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
width:
float
-
zero_at_edges:
bool
-
beta:
- class ExtraSoftSquareFunction(**data)
Bases:
NumericFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise:
float
-
width:
float
- class GaussianFunction(**data)
Bases:
ComplexFunction
Gaussian function.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(**kwargs)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- property k
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise:
float
-
width:
float
- class GaussianSquareFunction(**data)
Bases:
NumericFunction
A square pulse with a Gaussian rise and fall at the edges.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
square_width:
float
-
std_dev:
float
-
zero_at_edges:
float
- class GaussianZeroEdgeFunction(**data)
Bases:
ComplexFunction
A Gaussian pulse that can be normalized to be zero at the edges.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(x, _=None)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
std_dev:
float
-
width:
float
-
zero_at_edges:
bool
- class NumericFunction(**data)
Bases:
ComplexFunction
Base class for functions applying an numerical first derivative.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(**kwargs)
First order derivative.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- class RoundedSquareFunction(**data)
Bases:
ComplexFunction
- Rounded square.
___
/ ___| |___
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(x, _=None)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise_time:
float
-
std_dev:
float
- step(val)
-
width:
float
- class SechFunction(**data)
Bases:
ComplexFunction
Implements a sech pulse defined by sech(x / width). Note that it is not normalized to be zero at the edges.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(x, _=None)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
width:
float
- class SetupHoldFunction(**data)
Bases:
NumericFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
-
amp:
float
-
amp_setup:
float
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise:
float
-
width:
float
-
amp:
- class Sin(**data)
Bases:
ComplexFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(x, _=None)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
-
frequency:
float
-
internal_phase:
float
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- class SoftSquareFunction(**data)
Bases:
NumericFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise:
float
-
width:
float
- class SofterGaussianFunction(**data)
Bases:
NumericFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise:
float
-
width:
float
- class SofterSquareFunction(**data)
Bases:
NumericFunction
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
-
rise:
float
-
width:
float
- class SquareFunction(**data)
Bases:
ComplexFunction
Square function of fixed amplitude.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- derivative(**kwargs)
First order derivative.
- eval(**kwargs)
Function evaluated in domain described by x.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None