|
1 | 1 | import logging |
2 | 2 | from dataclasses import dataclass |
3 | 3 | from typing import List |
| 4 | +from typing import Union, Optional |
4 | 5 |
|
5 | 6 | import numpy as np |
6 | 7 |
|
|
10 | 11 | @dataclass |
11 | 12 | class kWaveMedium(object): |
12 | 13 | # sound speed distribution within the acoustic medium [m/s] | required to be defined |
13 | | - sound_speed: np.array |
| 14 | + sound_speed: Union[float, int, np.ndarray] |
14 | 15 | # reference sound speed used within the k-space operator (phase correction term) [m/s] |
15 | | - sound_speed_ref: np.array = None |
| 16 | + sound_speed_ref: Optional[Union[float, int, np.ndarray]] = None |
16 | 17 | # density distribution within the acoustic medium [kg/m^3] |
17 | | - density: np.array = None |
| 18 | + density: Optional[Union[float, int, np.ndarray]] = None |
18 | 19 | # power law absorption coefficient [dB/(MHz^y cm)] |
19 | | - alpha_coeff: np.array = None |
| 20 | + alpha_coeff: Optional[Union[float, int, np.ndarray]] = None |
20 | 21 | # power law absorption exponent |
21 | | - alpha_power: np.array = None |
| 22 | + alpha_power: Optional[Union[float, int, np.ndarray]] = None |
22 | 23 | # optional input to force either the absorption or dispersion terms in the equation of state to be excluded; |
23 | 24 | # valid inputs are 'no_absorption' or 'no_dispersion' |
24 | | - alpha_mode: np.array = None |
| 25 | + alpha_mode: Optional[str] = None |
25 | 26 | # frequency domain filter applied to the absorption and dispersion terms in the equation of state |
26 | | - alpha_filter: np.array = None |
| 27 | + alpha_filter: Optional[np.ndarray] = None |
27 | 28 | # two element array used to control the sign of absorption and dispersion terms in the equation of state |
28 | | - alpha_sign: np.array = None |
| 29 | + alpha_sign: Optional[np.ndarray] = None |
29 | 30 | # parameter of nonlinearity |
30 | | - BonA: np.array = None |
| 31 | + BonA: Optional[Union[float, int, np.ndarray]] = None |
31 | 32 | # is the medium absorbing? |
32 | 33 | absorbing: bool = False |
33 | 34 | # is the medium absorbing stokes? |
|
0 commit comments