propagation_path_list
Classes:
-
EdgeDiffraction
–Edge diffraction anchor
-
Inhomogeneity
–Inhomogeneity anchor
-
InhomogeneityReceiver
–Inhomogeneity anchor extension for a receiver
-
InhomogeneitySource
–Inhomogeneity anchor extension for a source
-
InhomogeneitySpecularReflection
–Inhomogeneity anchor extension for a specular reflection
-
MaterialBase
–Base class for all acoustic materials that can be stored in the
material_database
-
PropagationAnchorBase
–Base class for all propagation anchors
-
PropagationPath
–Container of PropagationAnchors representing a propagation path.
-
PropagationPathList
–Top-level data structure for the propagation path list
-
Receiver
–Receiver anchor
-
ScalarMaterial
–Acoustic material with scalar absorption and scattering coefficients
-
Source
–Source anchor
-
SpecularReflection
–Specular reflection anchor
-
ThirdOctaveMaterial
–Acoustic material with frequency-dependent absorption and scattering coefficients.
Functions:
EdgeDiffraction
Bases: PropagationAnchorBase
Edge diffraction anchor
The edge diffraction anchor is a point in space where sound is diffracted around an edge. The diffraction is assumed to be caused by a wedge-shaped edge.
The main wedge face is defined to be the face that is illuminated by the previous propagation anchor.
Todo
Do we separate outer and inner edge diffraction?
Attributes:
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
main_wedge_face_id
(int
) –Identifier of the main wedge polygon
-
main_wedge_face_material_id
(Optional[str]
) –Identifier of the material of the main wedge face
-
main_wedge_face_normal
(Vector
) –Normal of the main wedge polygon face
-
opposite_wedge_face_id
(int
) –Identifier of the opposite wedge polygon
-
opposite_wedge_face_material_id
(Optional[str]
) –Identifier of the material of the opposite wedge face
-
opposite_wedge_face_normal
(Vector
) –Normal of the opposite wedge polygon face
-
type
(Literal['EdgeDiffraction']
) –Discriminator field
-
vertex_end
(Optional[Vector]
) –End vertex of the wedges edge
-
vertex_start
(Optional[Vector]
) –Start vertex of the wedges edge
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
main_wedge_face_id
instance-attribute
main_wedge_face_id: int
Identifier of the main wedge polygon
main_wedge_face_material_id
class-attribute
instance-attribute
main_wedge_face_material_id: Optional[str] = None
Identifier of the material of the main wedge face
main_wedge_face_normal
instance-attribute
main_wedge_face_normal: Vector
Normal of the main wedge polygon face
opposite_wedge_face_id
instance-attribute
opposite_wedge_face_id: int
Identifier of the opposite wedge polygon
opposite_wedge_face_material_id
class-attribute
instance-attribute
opposite_wedge_face_material_id: Optional[str] = None
Identifier of the material of the opposite wedge face
opposite_wedge_face_normal
instance-attribute
opposite_wedge_face_normal: Vector
Normal of the opposite wedge polygon face
type
class-attribute
instance-attribute
type: Literal['EdgeDiffraction'] = 'EdgeDiffraction'
Discriminator field
vertex_end
class-attribute
instance-attribute
vertex_end: Optional[Vector] = None
End vertex of the wedges edge
vertex_start
class-attribute
instance-attribute
vertex_start: Optional[Vector] = None
Start vertex of the wedges edge
Inhomogeneity
Bases: PropagationAnchorBase
Inhomogeneity anchor
This serves both as the base class for all inhomogeneity types and as a generic inhomogeneity anchor.
Attributes:
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
time_stamp
(float
) –Time stamp of the inhomogeneity
-
type
(Literal['Inhomogeneity']
) –Discriminator field
-
wavefront_normal
(Vector
) –Normal of the wavefront
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
time_stamp
instance-attribute
time_stamp: float
Time stamp of the inhomogeneity
type
class-attribute
instance-attribute
type: Literal['Inhomogeneity'] = 'Inhomogeneity'
Discriminator field
wavefront_normal
instance-attribute
wavefront_normal: Vector
Normal of the wavefront
InhomogeneityReceiver
Bases: Receiver
Inhomogeneity anchor extension for a receiver
Since the distance law does not apply to inhomogeneous media, the spreading loss of the path is stored in the inhomogeneity receiver.
Attributes:
-
directivity_id
(Optional[str]
) –Identifier of the directivity pattern
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
name
(str
) –Name of the receiver
-
orientation
(Optional[Quaternion]
) –Orientation of the source, defined as a quaternion
-
spreading_loss_db
(float
) –Spreading loss in dB
-
time_stamp
(float
) –Time stamp of the inhomogeneity
-
type
(Literal['InhomogeneityReceiver']
) –Discriminator field
-
wavefront_normal
(Vector
) –Normal of the wavefront
directivity_id
class-attribute
instance-attribute
directivity_id: Optional[str] = None
Identifier of the directivity pattern
This is the identifier of the directivity pattern that is used by the receiver. Currently, the directivity pattern is not part of the data model, but it is assumed that the directivity pattern is stored on disk and is loaded separately.
Todo
The directivities might be added to the data model as well.
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
name
instance-attribute
name: str
Name of the receiver
orientation
class-attribute
instance-attribute
orientation: Optional[Quaternion] = None
Orientation of the source, defined as a quaternion
spreading_loss_db
instance-attribute
spreading_loss_db: float
Spreading loss in dB
time_stamp
instance-attribute
time_stamp: float
Time stamp of the inhomogeneity
type
class-attribute
instance-attribute
type: Literal["InhomogeneityReceiver"] = (
"InhomogeneityReceiver"
)
Discriminator field
wavefront_normal
instance-attribute
wavefront_normal: Vector
Normal of the wavefront
InhomogeneitySource
Bases: Source
Inhomogeneity anchor extension for a source
Attributes:
-
directivity_id
(Optional[str]
) –Identifier of the directivity pattern
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
name
(str
) –Name of the receiver
-
orientation
(Optional[Quaternion]
) –Orientation of the source, defined as a quaternion
-
sound_power_W
(Optional[float]
) –Sound power of the source in Watts
-
time_stamp
(float
) –Time stamp of the inhomogeneity
-
type
(Literal['InhomogeneitySource']
) –Discriminator field
-
wavefront_normal
(Vector
) –Normal of the wavefront
directivity_id
class-attribute
instance-attribute
directivity_id: Optional[str] = None
Identifier of the directivity pattern
This is the identifier of the directivity pattern that is used by the receiver. Currently, the directivity pattern is not part of the data model, but it is assumed that the directivity pattern is stored on disk and is loaded separately.
Todo
The directivities might be added to the data model as well.
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
name
instance-attribute
name: str
Name of the receiver
orientation
class-attribute
instance-attribute
orientation: Optional[Quaternion] = None
Orientation of the source, defined as a quaternion
sound_power_W
class-attribute
instance-attribute
sound_power_W: Optional[float] = None
Sound power of the source in Watts
time_stamp
instance-attribute
time_stamp: float
Time stamp of the inhomogeneity
type
class-attribute
instance-attribute
type: Literal["InhomogeneitySource"] = "InhomogeneitySource"
Discriminator field
wavefront_normal
instance-attribute
wavefront_normal: Vector
Normal of the wavefront
InhomogeneitySpecularReflection
Bases: SpecularReflection
Inhomogeneity anchor extension for a specular reflection
Attributes:
-
face_normal
(Optional[Vector]
) –Normal of the polygon face
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
material_id
(Optional[str]
) –Identifier of the material
-
polygon_id
(int
) –Identifier of the polygon that is reflected from
-
time_stamp
(float
) –Time stamp of the inhomogeneity
-
type
(Literal['InhomogeneitySpecularReflection']
) –Discriminator field
-
wavefront_normal
(Vector
) –Normal of the wavefront
face_normal
class-attribute
instance-attribute
face_normal: Optional[Vector] = None
Normal of the polygon face
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
material_id
class-attribute
instance-attribute
material_id: Optional[str] = None
Identifier of the material
This identifier is used to reference the material in the material database.
polygon_id
instance-attribute
polygon_id: int
Identifier of the polygon that is reflected from
time_stamp
instance-attribute
time_stamp: float
Time stamp of the inhomogeneity
type
class-attribute
instance-attribute
type: Literal["InhomogeneitySpecularReflection"] = (
"InhomogeneitySpecularReflection"
)
Discriminator field
wavefront_normal
instance-attribute
wavefront_normal: Vector
Normal of the wavefront
MaterialBase
Bases: BaseModel
Base class for all acoustic materials that can be stored in the material_database
Attributes:
-
type
(Literal['MaterialBase']
) –Discriminator field
type
class-attribute
instance-attribute
type: Literal['MaterialBase'] = 'MaterialBase'
Discriminator field
PropagationAnchorBase
Bases: BaseModel
Base class for all propagation anchors
Attributes:
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
type
(Literal['PropagationAnchorBase']
) –Discriminator field
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
type
class-attribute
instance-attribute
type: Literal["PropagationAnchorBase"] = (
"PropagationAnchorBase"
)
Discriminator field
PropagationPath
Bases: BaseModel
Container of PropagationAnchors representing a propagation path.
Attributes:
-
identifier
(str
) –Identifier of the propagation path.
-
propagation_anchors
(List[Union[Source, Receiver, SpecularReflection, EdgeDiffraction, Inhomogeneity, PropagationAnchorBase]]
) –List of propagation anchors
identifier
instance-attribute
identifier: str
Identifier of the propagation path.
This could be the name of the path, or a unique identifier. For example a path with a source and a receiver might be called "S-R" for source to receiver.
propagation_anchors
instance-attribute
propagation_anchors: List[
Union[
Source,
Receiver,
SpecularReflection,
EdgeDiffraction,
Inhomogeneity,
PropagationAnchorBase,
]
]
List of propagation anchors
This list contains the propagation anchors that make up the propagation path.
PropagationPathList
Bases: BaseModel
Top-level data structure for the propagation path list
The propagation path list contains a list of propagation paths, which in turn contain a list of propagation anchors. The propagation anchors can be of type - Source - Receiver - SpecularReflection - EdgeDiffraction - Inhomogeneity - InhomogeneitySource - InhomogeneityReceiver - InhomogeneitySpecularReflection
The propagation path list also contains a material database, which is a dictionary of materials that can be referenced by the propagation anchors. The material database is optional, and can be used to store materials that are used by the propagation anchors. The material database is a dictionary of materials, where the key is the material identifier and the value is the material itself.
Attributes:
-
dynamic_propagation_paths
(Optional[List[PathList]]
) –List of dynamic propagation paths
-
material_database
(Optional[Dict[str, Union[ScalarMaterial, ThirdOctaveMaterial, MaterialBase]]]
) –Optional material database storing MaterialBase objects
-
propagation_paths
(Optional[PathList]
) –List of propagation paths
dynamic_propagation_paths
class-attribute
instance-attribute
dynamic_propagation_paths: Optional[List[PathList]] = None
List of dynamic propagation paths
material_database
class-attribute
instance-attribute
material_database: Optional[
Dict[
str,
Union[
ScalarMaterial,
ThirdOctaveMaterial,
MaterialBase,
],
]
] = None
Optional material database storing MaterialBase objects
propagation_paths
class-attribute
instance-attribute
propagation_paths: Optional[PathList] = None
List of propagation paths
Receiver
Bases: PropagationAnchorBase
Receiver anchor
The receiver anchor is a point in space where sound is received. It is assumed to be a point receiver, i.e. it has no spatial extent.
Attributes:
-
directivity_id
(Optional[str]
) –Identifier of the directivity pattern
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
name
(str
) –Name of the receiver
-
orientation
(Optional[Quaternion]
) –Orientation of the source, defined as a quaternion
-
type
(Literal['Receiver']
) –Discriminator field
directivity_id
class-attribute
instance-attribute
directivity_id: Optional[str] = None
Identifier of the directivity pattern
This is the identifier of the directivity pattern that is used by the receiver. Currently, the directivity pattern is not part of the data model, but it is assumed that the directivity pattern is stored on disk and is loaded separately.
Todo
The directivities might be added to the data model as well.
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
name
instance-attribute
name: str
Name of the receiver
orientation
class-attribute
instance-attribute
orientation: Optional[Quaternion] = None
Orientation of the source, defined as a quaternion
type
class-attribute
instance-attribute
type: Literal['Receiver'] = 'Receiver'
Discriminator field
ScalarMaterial
Bases: MaterialBase
Acoustic material with scalar absorption and scattering coefficients
Attributes:
-
absorption
(float
) –Absorption coefficient, defined for the 1/3 octave band center frequencies
-
scattering
(Optional[float]
) –Scattering coefficient, defined for the 1/3 octave band center frequencies
-
type
(Literal['ScalarMaterial']
) –Discriminator field
absorption
instance-attribute
absorption: float
Absorption coefficient, defined for the 1/3 octave band center frequencies
scattering
class-attribute
instance-attribute
scattering: Optional[float] = None
Scattering coefficient, defined for the 1/3 octave band center frequencies
type
class-attribute
instance-attribute
type: Literal['ScalarMaterial'] = 'ScalarMaterial'
Discriminator field
Source
Bases: PropagationAnchorBase
Source anchor
The source anchor is a point in space where sound is emitted. It is assumed to be a point source, i.e. it has no spatial extent.
Attributes:
-
directivity_id
(Optional[str]
) –Identifier of the directivity pattern
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
name
(str
) –Name of the receiver
-
orientation
(Optional[Quaternion]
) –Orientation of the source, defined as a quaternion
-
sound_power_W
(Optional[float]
) –Sound power of the source in Watts
-
type
(Literal['Source']
) –Discriminator field
directivity_id
class-attribute
instance-attribute
directivity_id: Optional[str] = None
Identifier of the directivity pattern
This is the identifier of the directivity pattern that is used by the receiver. Currently, the directivity pattern is not part of the data model, but it is assumed that the directivity pattern is stored on disk and is loaded separately.
Todo
The directivities might be added to the data model as well.
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
name
instance-attribute
name: str
Name of the receiver
orientation
class-attribute
instance-attribute
orientation: Optional[Quaternion] = None
Orientation of the source, defined as a quaternion
sound_power_W
class-attribute
instance-attribute
sound_power_W: Optional[float] = None
Sound power of the source in Watts
type
class-attribute
instance-attribute
type: Literal['Source'] = 'Source'
Discriminator field
SpecularReflection
Bases: PropagationAnchorBase
Specular reflection anchor
The specular reflection anchor is a point in space where sound is reflected from a surface. The reflection is assumed to be specular, i.e. the angle of incidence is equal to the angle of reflection.
Attributes:
-
face_normal
(Optional[Vector]
) –Normal of the polygon face
-
interaction_point
(Vector
) –Interaction point of the propagation anchor.
-
material_id
(Optional[str]
) –Identifier of the material
-
polygon_id
(int
) –Identifier of the polygon that is reflected from
-
type
(Literal['SpecularReflection']
) –Discriminator field
face_normal
class-attribute
instance-attribute
face_normal: Optional[Vector] = None
Normal of the polygon face
interaction_point
instance-attribute
interaction_point: Vector
Interaction point of the propagation anchor.
This is the point in space where the propagation anchor interacts with the environment. For example, for a source this could be the point where the sound is emitted, and for a receiver this could be the point where the sound is received.
material_id
class-attribute
instance-attribute
material_id: Optional[str] = None
Identifier of the material
This identifier is used to reference the material in the material database.
polygon_id
instance-attribute
polygon_id: int
Identifier of the polygon that is reflected from
type
class-attribute
instance-attribute
type: Literal['SpecularReflection'] = 'SpecularReflection'
Discriminator field
ThirdOctaveMaterial
Bases: MaterialBase
Acoustic material with frequency-dependent absorption and scattering coefficients.
The absorption and scattering coefficients are stored as magnitude spectra, which are defined for the 1/3 octave band center frequencies.
Attributes:
-
absorption
(MagnitudeSpectra
) –Absorption coefficient, defined for the 1/3 octave band center frequencies
-
impedance_imag
(Optional[MagnitudeSpectra]
) –Imaginary part of the material impedance, defined for the 1/3 octave band center frequencies, optional
-
impedance_real
(Optional[MagnitudeSpectra]
) –Real part of the material impedance, defined for the 1/3 octave band center frequencies, optional
-
scattering
(Optional[MagnitudeSpectra]
) –Scattering coefficient, defined for the 1/3 octave band center frequencies
-
type
(Literal['ThirdOctaveMaterial']
) –Discriminator field
absorption
instance-attribute
absorption: MagnitudeSpectra
Absorption coefficient, defined for the 1/3 octave band center frequencies
impedance_imag
class-attribute
instance-attribute
impedance_imag: Optional[MagnitudeSpectra] = None
Imaginary part of the material impedance, defined for the 1/3 octave band center frequencies, optional
impedance_real
class-attribute
instance-attribute
impedance_real: Optional[MagnitudeSpectra] = None
Real part of the material impedance, defined for the 1/3 octave band center frequencies, optional
scattering
class-attribute
instance-attribute
scattering: Optional[MagnitudeSpectra] = None
Scattering coefficient, defined for the 1/3 octave band center frequencies
type
class-attribute
instance-attribute
type: Literal["ThirdOctaveMaterial"] = "ThirdOctaveMaterial"
Discriminator field
load
load(model_type: Type[T], file: Union[Path, str]) -> T
Load a model from a file.
This function loads a file from the file system and tries to parse it as a given type.
Parameters:
-
model_type
(Type[T]
) –The type of the model to load.
-
file
(Union[Path, str]
) –The file to load the model from.
Returns:
-
T
–An instance of the model type.
Raises:
-
FileNotFoundError
–If the file does not exist.
-
ValueError
–If the file extension is not supported.
save
save(file: Union[Path, str], model: BaseModel)
Save a model to a file.
This function saves a data structure to the file system.
Parameters:
-
file
(Union[Path, str]
) –The file to save the model to.
-
model
(BaseModel
) –The model to save.
Raises:
-
TypeError
–If the file argument is not a Path, str, or stream.
-
ValueError
–If the file extension is not supported.