twpasolver.frequency module#
Definition of class for frequency span.
This module defines the Frequencies class for representing a span of frequencies with a variable unit of measure. The span can be provided either as a list or as a tuple that will be passed to numpy.arange.
- pydantic model twpasolver.frequency.Frequencies[source]#
Bases:
BaseModelFrequency span with variable unit.
Show JSON schema
{ "title": "Frequencies", "description": "Frequency span with variable unit.", "type": "object", "properties": { "f_list": { "anyOf": [ { "items": { "minimum": 0, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of frequencies", "title": "F List" }, "f_arange": { "anyOf": [ { "maxItems": 3, "minItems": 3, "prefixItems": [ { "minimum": 0, "type": "number" }, { "minimum": 0, "type": "number" }, { "minimum": 0, "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "description": "Tuple passed to numpy.arange to construct frequency span.", "title": "F Arange" }, "unit": { "default": "GHz", "enum": [ "Hz", "kHz", "MHz", "GHz", "THz" ], "title": "Unit", "type": "string" } } }
- Fields:
- field f_list: list[typing.Annotated[float, Ge(ge=0)]] | None = None#
List of frequencies
- field f_arange: tuple[typing.Annotated[float, Ge(ge=0)], typing.Annotated[float, Ge(ge=0)], typing.Annotated[float, Ge(ge=0)]] | None = None#
Tuple passed to numpy.arange to construct frequency span.
- property f: ndarray#
Computed frequencies array.
- Returns:
Array of computed frequencies.
- Return type:
numpy.ndarray
- property omega: ndarray#
Computed angular frequencies array.
- Returns:
Array of computed angular frequencies.
- Return type:
numpy.ndarray