arim.scat.ScatFromData#
- class arim.scat.ScatFromData(frequencies, scat_matrix_LL=None, scat_matrix_LT=None, scat_matrix_TL=None, scat_matrix_TT=None)[source]#
Bases:
Scattering2d
Scattering functions from a set of data.
This class provides the regular
Scattering2d
interface for a dataset of scattering matrices. The typical usage is to use this class for wrapping data generated with another software in arim.By default, this class uses a linear interpolation for generating values at new angles.
By default, this class uses a linear interpolation for generating values at new frequencies when at least two frequencies point are given. Outside the frequency range of the data, values are extrapolated. This can be changed by modifying
interp_freq_kwargs
, the arguments passed to scipy.interpolate.interp1d. If the data contains only one frequency, this data will be used at any new frequency.- numfreq#
- Type:
int
- numangles#
- Type:
int
- orig_matrices#
Shape of each value: (numfreq, numangles, numangles)
- Type:
dict
- frequencies#
1d array
- Type:
ndarray
- interp_freq_kwargs#
Passed to
scipy.interpolate.interp1d
. Default:bounds_error=False, fill_value='extrapolate'
- Type:
dict
- static freq_interp_matrices(frequencies, new_freq, multi_freq_matrices, **interp_freq_kwargs)[source]#
Return the single-frequency scattering matrices from multi-frequency scattering matrices by interpolating at the desired frequency.
- Parameters:
frequencies (ndarray) – 1d
new_freq (float)
multi_freq_scat_matrices (dict[str]) – Keys: frequencies (1d array), LL, LT, TL, TT
interp1d_kwargs (kwargs) – Arguments for
scipy.interpolate.interp1d
- Return type:
single_freq_scat_matrices