hydrac.model.scattering.scattering¶
Scattering calculation (hydrac.model.scattering.scattering)¶
-
class
hydrac.model.scattering.scattering.Scattering(particle, water, ori=-3.141592653589793, freq=None, tag_M=None, gen_model=None, mode_depl=None, am=3e-05, aM=0.0006, dsigma=None, spacing='log', UND=4)[source]¶ Bases:
objectScattering class.
This class computes the scattering model given the input properties of particles specified by the class
hydrac.model.particle.Particle, and several other inputs such as the carrier frequency of the instruments, the water parameters (ex. sound velocity in water)…Two major cases are considered regarding the inversion procedure:
The case of singlefrequency inversion: In this case, the mean radius of the particles is entered as input. The model is computed at high resolution for display purpose and potential averaging over size distribnution if one is indicated, but only one single value will be used.
The case of multifrequency inversion: One of the multifrequency inversion methods (NNLS, see
hydrac.inversion.multifrequence.nnls) considers an undetermined inversion system, where the number a size classes is defined, the concentrations of which correspond to the system unknown. In this case, in addition to the high-resolution model, it is convenient to compute the model for each ka values corresponding to the instrument frequencies and the target sizes of the particles. As such, the model is computed at two distinct resolutions.The “model” returned by the Scattering class is two-fold:
- The form function \(f\)
- The total scattering cross-section \(\chi\), from which the attenuation due to scattering can be evaluated.
This class can be used as a standalone if one is interested in computing a specific model, and export it elsewhere for other purposes. The Typical usage for a standalone package to compute models (here shown for a model parameters stored in the database, copepDWBA):
# Define the particle properties with a Particle object >>>P = hydrac.model.particle.Particle('copepDWBA',1) # Define the water properties with a Water object >>>W = hydrac.model.water.Water(preset='sea') # Compute the target strength and attenuation >>>S=hydrac.model.scattering.scattering.Scattering(P, W, freq=[1e6, 4e6], tag_M='multi', mode_depl='Mooring', am=0.06e-3, aM=2.8e-3) # Access the form function >>>S.param.f_inf
Within hydrac processing chain, the Scattering class takes the data from the hydroacoustic object as inputs. It is solely called when performing the inversion in the package
hdrac.inversion.inversion.Inversion.All the results are stored into a
scatteringmodified dictionnary (seehydrac.util.parameters).Parameters: - particle : object
Particle object from
hydrac.model.particle.Particle- water : object
Water object from
hydrac.model.water.Water- ori : float
Angle of observation => angle between incident and oscerved scattered wave (\(\pi for backscattering\))
- freq : float (numpy.array or list)
Target frequencies of the hydroacoustic instrument
- tag_M : str, {‘mono’,’multi’}
Tag specifying whether the instrument is multi or single frequency
- gen_model : bool
Save the model in netCDF as a standalone
- mode_depl : str, {‘Mooring’, ‘Cast’, …}
Deployment strategy (see
hydrac.instrument.mod_deployment)- am, aM : float, float
Minimum and maximum radius for model computation
- dsigma : float
Distribution width if the user wants the model to be function of mean radius. Not used for multifrequency inversions.
- spacing : str, {‘lin’, ‘log’}
Spacing type of the radii vector (log to better sample fine particles)
- UND : int
Underdetermination factor for the multifrequency inversion system.
-
ensemble_average_model(self, xx, dsigma, freq=[1000000.0], na=10000.0, am=1e-06, aM=0.01, space='lin')[source]¶ Computes the ensemble averaged model over the size distribution if the dsigma input of the class is not None.
Parameters: - xx : float
Taget \(ka_0\) vector, with \(a_0\) the mean radius, similar to the
kavariable- dsigma : float
Distribution width
- freq : float
Reference frequency (single frequency case)
- na : float (numpy.array or list)
Number of integration points for the size distribution
- am, aM : object
Min and max radius to be considered for the size distribution
- space : str
Spacing of the new ka vector
Returns: - axlng : float
Taget \(ka_0\) vector, with \(a_0\) the mean radius
- aflng : float
Ensemble averaged form function, function of \(ka_0\)
- achilng : float
Ensemble averaged total scattering cross-section , function of \(ka_0\)
-
RES_model(self, am, aM, space='log', UND=None, na=None, freq=None)[source]¶ Calculates the scattering model by calling the right method
Parameters: - am, aM : float
Taget \(ka_0\) vector, with \(a_0\) the mean radius, similar to the math:ka variable
- space : float
Distribution width
- UND : float
Reference frequency (single frequency case)
- na : float (numpy.array or list)
Number of integration points for the size distribution
- freq : object
Returns: - atmp : float
Radius vector
- katmp : float
\(ka\) vector
- f_inftmp : float
Intrinsic form function, function of \(ka\)
- c_inftmp : float
Intrinsic total scattering cross-section, function of \(ka\)
- aij : float
Backscattering cross-section, function of \(ka\)
Classes
Scattering(particle, water[, ori, freq, …]) |
Scattering class. |
Exceptions
InstrAmbiguity |