treble_tsdk.core.source¶
Classes
OnAxisResponse(transfer_function: 'np.ndarray', frequency: 'np.ndarray') |
|
Available source types. |
|
Available task types |
- class treble_tsdk.core.source.OnAxisResponse¶
OnAxisResponse(transfer_function: ‘np.ndarray’, frequency: ‘np.ndarray’)
- __init__(transfer_function: numpy.ndarray, frequency: numpy.ndarray) None¶
- classmethod from_base64(encoded: str) OnAxisResponse¶
Deserialize an OnAxisResponse from a base64 encoded string.
- to_base64() str¶
Serialize the OnAxisResponse to a base64 encoded string. Uses numpy’s save format to preserve dtype and shape information.
- frequency: numpy.ndarray¶
- transfer_function: numpy.ndarray¶
- class treble_tsdk.core.source.Source¶
- __init__(x: float, y: float, z: float, source_type: SourceType, label: str, source_properties: SourceProperties | None = None, id: str | None = None, tasks: list[TaskInfoDto] | None = None, order_number: int | None = None, tags: list[str] = [], sub_sources: list[dict | SourceDto] | None = None, child_receivers: list[dict | ReceiverDto] | None = None, metadata: dict[str, str] | ObjectMetadata | None = None)¶
Represents a Simulation source.
- Parameters:
x (float) – X position of source in meters.
y (float) – Y position of source in meters.
z (float) – Z position of source in meters.
source_type (SourceType) – Type of source.
label (str) – Source label.
source_properties (SourceProperties) – Optional, additional source properties.
- classmethod make_boundary_velocity_layer(label: str, boundary_velocity_layer: BoundaryVelocityLayer | str, disable_source_correction: bool = False, source_position: Point3d | None = None, calculate_source_position: bool = True) Source¶
Shortcut to create a boundary velocity Source object with boundary layer specified.
- Parameters:
label (str) – Source label.
boundary_velocity_definition (BoundaryVelocityLayer) – Boundary velocity definition.
source_position (Point3d) – Sets the Source position, note that setting this on a BoundaryVelocityLayer source is optional and will not be used when simulating.
calculate_source_position (bool) – If True, the source position will be calculated based on the center of the boundary layer. Note: setting the source_position parameter will override this behaviour.
- Returns:
Source object.
- classmethod make_boundary_velocity_submodel(location: Point3d | list[float] | None = None, orientation: Rotation | None = None, label: str = '', boundary_velocity_submodel: BoundaryVelocitySubmodel | None = None, disable_source_correction: bool = False, tags: list[str] = [], **kwargs) Source¶
Shortcut to create a boundary velocity Source object with SourceSubmodel.
- Parameters:
orientation (Rotation) – Orientation of the source.
label (str) – Source label.
boundary_velocity_definition (BoundaryVelocitySubmodel) – Boundary velocity submodel.
- Returns:
Source object.
- classmethod make_cardioid(location: Point3d | list[float] | None = None, orientation: Rotation | None = None, label: str = '', tags: list[str] = [], **kwargs) Source¶
Shortcut to create a cardioid Source object.
- classmethod make_dipole(location: Point3d | list[float] | None = None, orientation: Rotation | None = None, label: str = '', tags: list[str] = [], **kwargs) Source¶
Shortcut to create a dipole Source object.
- classmethod make_directive(location: Point3d | list[float] | None = None, orientation: Rotation | None = None, label: str = '', source_directivity: SourceDirectivityObj | str | None = None, use_wave_based_pattern: bool = False, tags: list[str] = [], on_axis_response: OnAxisResponse | None = None, **kwargs) Source¶
Shortcut to create a directive Source object.
- Parameters:
orientation (Rotation) – Orientation of the source.
label (str) – Source label.
source_directivity (SourceDirectivityObj|str) – Source directivity.
use_wave_based_pattern (bool) – If flag is set to True, the GA solver will use an approximate directivity fitted to be used in the wave based solver.
- classmethod make_moving_directive(trajectory: Trajectory, orientation: TrajectoryOrientation | None = None, label: str = '', source_directivity: SourceDirectivityObj | str | None = None, use_wave_based_pattern: bool = False, tags: list[str] = [], on_axis_response: OnAxisResponse | None = None, **kwargs) Source¶
- classmethod make_moving_omni(trajectory: Trajectory, label: str = '', tags: list[str] = [], **kwargs) Source¶
Shortcut to create a moving omni Source object.
- Parameters:
trajectory (Trajectory) – The trajectory for the moving source.
label (str) – Source label.
- Returns:
Moving Source object.
- classmethod make_omni(location: Point3d | list[float] | None = None, label: str = '', tags: list[str] = [], **kwargs) Source¶
Shortcut to create an omni Source object.
- pos_as_point() Point3d¶
- property location: Point3d¶
- property source_properties: SourceProperties¶
- property source_type: SourceType¶
- class treble_tsdk.core.source.SourceProperties¶
- __init__(azimuth_angle: float = 0.0, elevation_angle: float = 0.0, roll_angle: float = 0.0, source_directivity: str | SourceDirectivityObj = None, boundary_velocity_definition: BoundaryVelocitySubmodel | BoundaryVelocityLayer | str = None, source_boundary_layer_name: str = None, source_boundary_mesh_local_sizing: float = None, source_boundary_mesh_keep_exterior_edges: bool = False, disable_source_correction: bool = None, use_wave_based_pattern: bool = None, array_sub_sources: list['Source'] = None, array_source_directivity_upload_id: str = None, on_axis_response: OnAxisResponse = None, device: _SourceReceiverDevice = None)¶
Additional source properties.
- Parameters:
azimuth_angle (float) – Azimuth rotation angle for directional sources. From 0° to 360°.
elevation_angle (float) – Elevation rotation angle for directional sources. From 0° to 90°.
source_directivity (str|SourceDirectivityObj) – If the source type is Directive this parameter specifies the source directivity.
boundary_velocity_definition (BoundaryVelocitySubmodel|BoundaryVelocityLayer|str) – If the source type is a boundary velocity source this parameter specified properties of that.
source_boundary_layer_name – Deprecated. Use source_boundary_velocity instead.
source_boundary_mesh_local_sizing – Deprecated. Use source_boundary_velocity instead.
source_boundary_mesh_keep_exterior_edges – Deprecated. Use source_boundary_velocity instead.
disable_source_correction (bool) – Optional: Disable source correction in solvers.
use_wave_based_pattern (bool) – Optional: If flag is set and source is of type Directive. The GA solver will use an approximate directivity fitted to be used in the wave based solver.
array_sub_sources (list["Source"]) – Optional: List of sub sources for array sources.
array_source_directivity_upload_id (str) – Optional: Upload ID of the array source directivity.
on_axis_response (OnAxisResponse) – Optional: On axis response for array sources. Must be optionally defined only for sub sources of the array source.
- property on_axis_response: OnAxisResponse | None¶
- class treble_tsdk.core.source.SourceType¶
Available source types.
- classmethod list()¶
- classmethod print()¶
- array = 'Array'¶
- boundary_velocity = 'BoundaryVelocity'¶
- cardioid = 'Cardioid'¶
- dipole = 'Dipole'¶
- directive = 'Directive'¶
- moving = 'Moving'¶
- omni = 'Omni'¶
- class treble_tsdk.core.source.TaskType¶
Available task types
- device_rendering = 'DeviceRendering'¶
- dg = 'DG'¶
- ga = 'GA'¶
- geometrical = 'GA'¶
- geometry_checking = 'GeometryChecking'¶
- hybrid = 'Hybrid'¶
- join_directive_speech = 'JoinDirectiveSpeech'¶
- join_directivity = 'JoinDirectivity'¶
- mesher = 'Mesher'¶
- post_processing = 'PostProcessing'¶
- wave_based = 'DG'¶