compute_NASC#
- echopype.commongrid.compute_NASC(ds_Sv: Dataset, range_bin: str = '10m', dist_bin: str = '0.5nmi', method: str = 'map-reduce', skipna=True, closed: Literal['left', 'right'] = 'left', **flox_kwargs) Dataset#
Compute Nautical Areal Scattering Coefficient (NASC) from an Sv dataset. TODO: Add range_var_max and reindex parameters to match compute_MVBS.
- Parameters:
- ds_Svxr.Dataset
A dataset containing Sv data. The Sv dataset must contain
latitude,longitude, anddepthas data variables.- range_binstr, default ‘10m’
bin size along
depthin meters (m).- dist_binstr, default ‘0.5nmi’
bin size along
distancein nautical miles (nmi).- method: str, default ‘map-reduce’
The flox strategy for reduction of dask arrays only. See flox documentation for more details.
- skipna: bool, default True
If true, the mean operation skips NaN values. Else, the mean operation includes NaN values.
- closed: {‘left’, ‘right’}, default ‘left’
Which side of bin interval is closed.
- **flox_kwargs
Additional keyword arguments to be passed to flox reduction function.
- Returns:
- xr.Dataset
A dataset containing NASC
Notes
The NASC computation implemented here generally corresponds to the Echoview algorithm PRC_NASC https://support.echoview.com/WebHelp/Reference/Algorithms/Analysis_Variables/PRC_ABC_and_PRC_NASC.htm#PRC_NASC # noqa The difference is that since in echopype masking of the Sv dataset is done explicitly using functions in the
masksubpackage, the computation only involves computing the mean Sv and the mean height within each cell, where some Sv “pixels” may have been masked as NaN.In addition, in echopype the binning of pings into individual cells is based on the actual horizontal distance computed from the latitude and longitude coordinates of each ping in the Sv dataset. Therefore, both regular and irregular horizontal distance in the Sv dataset are allowed. This is different from Echoview’s assumption of constant ping rate, vessel speed, and sample thickness when computing mean Sv (see https://support.echoview.com/WebHelp/Reference/Algorithms/Analysis_Variables/Sv_mean.htm#Conversions). # noqa