iris.nodes.iris_response.probe_schemas package¶
Submodules¶
iris.nodes.iris_response.probe_schemas.probe_schema_interface module¶
- class iris.nodes.iris_response.probe_schemas.probe_schema_interface.ProbeSchema(**kwargs: Any)[source]¶
Bases:
Algorithm
Probe schema abstract class.
- class ProbeSchemaParameters[source]¶
Bases:
Parameters
Default ProbeSchema parameters.
- abstract generate_schema() Tuple[ndarray, ndarray] [source]¶
Generate rhos’ and phis’ positions values.
- Returns:
Tuple with generated schema (rhos, phis).
- Return type:
Tuple[np.ndarray, np.ndarray]
- property phis: ndarray¶
Get phis’ position values.
- Returns:
phis’ position values.
- Return type:
np.ndarray
- property rhos: ndarray¶
Get rhos’ position values.
- Returns:
rhos’ position values.
- Return type:
np.ndarray
iris.nodes.iris_response.probe_schemas.regular_probe_schema module¶
- class iris.nodes.iris_response.probe_schemas.regular_probe_schema.RegularProbeSchema(n_rows: int, n_cols: int, boundary_rho: List[float] = [0, 0.0625], boundary_phi: Literal['periodic-symmetric', 'periodic-left'] | List[ConstrainedFloatValue] = 'periodic-left', image_shape: List[PositiveInt] | None = None)[source]¶
Bases:
ProbeSchema
Probe Schema for a regular Grid.
- class RegularProbeSchemaParameters(*, n_rows: ConstrainedIntValue, n_cols: ConstrainedIntValue, boundary_rho: List[ConstrainedFloatValue], boundary_phi: Literal['periodic-symmetric', 'periodic-left'] | List[ConstrainedFloatValue], image_shape: List[PositiveInt] | None = None)[source]¶
Bases:
ProbeSchemaParameters
RegularProbeSchema parameters.
- boundary_phi: Literal['periodic-symmetric', 'periodic-left'] | List[ConstrainedFloatValue]¶
- boundary_rho: List[ConstrainedFloatValue]¶
- classmethod check_overlap(v: Literal['periodic-symmetric', 'periodic-left'] | List[ConstrainedFloatValue], field: ModelField) Literal['periodic-symmetric', 'periodic-left'] | List[ConstrainedFloatValue] [source]¶
Validate offsets to avoid overlap.
- Parameters:
cls (type) – Class type.
v (Union[Literal["periodic-symmetric", "periodic-left"], List[confloat(ge=0.0, lt=1)]]) – Value to check.
field (fields.ModelField) – Field descriptor.
- Raises:
ProbeSchemaError – Raises warning that offsets are together too large.
- Returns:
The value for boundary_rho or boundary_phi respectively
- Return type:
Union[Literal[“periodic-symmetric”, “periodic-left”], List[confloat(ge=0.0, lt=1)]]
- image_shape: List[PositiveInt] | None¶
- n_cols: int¶
- n_rows: int¶
- static find_suitable_n_rows(row_min: int, row_max: int, length: int, boundary_condition: Literal['periodic-symmetric', 'periodic-left'] | List[float] = 'periodic_symmetric') List[int] [source]¶
Find proper spacing of rows/columns for given boundary conditions (i.e. image size, offset. etc).
- Parameters:
row_min (int) – Starting value for row count
row_max (int) – End value for row count
length (int) – Pixels in the respective dimension
boundary_condition (Union[Literal["periodic-symmetric", "periodic-left"], List[float]], optional) – Boundary conditions for the probing can either be periodic or non-periodic, if they are periodic, the distance from one row to the next must be the same also for the boundaries. Defaults to “periodic_symmetric”.
Else –
- ‘periodic-symmetric’: the first and the last row are placed with an offset to the
borders, that is half of the spacing of the two rows
- ’periodic-left’: the first row is at the border of the bottom of the image, while
the last row is one spacing apart from the top of the image
- list with two values: in this case the an offset of value f1 and f2 is set on both ends, i.e. the
the sampling no longer goes from 0 to 1 (‘no-offset’) but instead from 0+f1 to 0-f2
are (no conditions for the boundaries are required. Options) –
- ‘periodic-symmetric’: the first and the last row are placed with an offset to the
borders, that is half of the spacing of the two rows
- ’periodic-left’: the first row is at the border of the bottom of the image, while
the last row is one spacing apart from the top of the image
- list with two values: in this case the an offset of value f1 and f2 is set on both ends, i.e. the
the sampling no longer goes from 0 to 1 (‘no-offset’) but instead from 0+f1 to 0-f2
- Returns:
List of all number of rows that does not lead to interpolation errors
- Return type:
List[int]