Lines#

class echoregions.lines.Lines(input_file: str, nan_depth_value: Optional[float] = None)#

Bases: object

Class that contains and performs operations with Depth/Lines data from Echoview EVL files.

Methods

mask(da_Sv[, method, limit_area])

Subsets a bottom dataset to the range of an Sv dataset Create a mask of same shape as data found in Sonar object; bottom: False, otherwise: True

plot([fmt, start_time, end_time, ...])

Plot the points in the EVL file.

replace_nan_depth([inplace])

Replace -10000.99 depth values with user-specified _nan_depth_value

to_csv([save_path])

Save a Dataframe to a .csv file

to_json([save_path, pretty])

Convert supported formats to .json file.

Methods Summary

mask(da_Sv[, method, limit_area])

Subsets a bottom dataset to the range of an Sv dataset Create a mask of same shape as data found in Sonar object; bottom: False, otherwise: True

plot([fmt, start_time, end_time, ...])

Plot the points in the EVL file.

replace_nan_depth([inplace])

Replace -10000.99 depth values with user-specified _nan_depth_value

to_csv([save_path])

Save a Dataframe to a .csv file

to_json([save_path, pretty])

Convert supported formats to .json file.

Methods Documentation

mask(da_Sv: xarray.core.dataarray.DataArray, method: str = 'nearest', limit_area: Optional[str] = None)#

Subsets a bottom dataset to the range of an Sv dataset Create a mask of same shape as data found in Sonar object; bottom: False, otherwise: True

Parameters
da_SvXarray DataArray

Matrix of coordinates (ping_time, depth) that contains Sv values.

methodstr

Contains Pandas/Scipy parameter for interpolation method.

limit_areastr

Contains Pandas parameter for determining filling restriction for NA values.

Returns
bottom_maskXarray DataArray

Matrix of coordinates (ping_time, depth) with values such that bottom: False, otherwise: True

plot(fmt: str = '', start_time: Optional[pandas._libs.tslibs.timestamps.Timestamp] = None, end_time: Optional[pandas._libs.tslibs.timestamps.Timestamp] = None, fill_between: bool = False, max_depth: Union[int, float] = 0, **kwargs) None#

Plot the points in the EVL file.

Parameters
fmtstr, optional

A format string such as ‘bo’ for blue circles. See matplotlib documentation for more information.

start_timedatetime64, default None

Lower time bound.

end_timedatetime64, default None

Upper time bound.

fill_betweenbool, default True

Use matplotlib fill_between to plot the line. The area between the EVL points and max_depth will be filled in.

max_depthfloat, default 0

The fill_between function will color in the area betwen the points and this depth value given in meters.

alphafloat, default 0.5

Opacity of the plot

kwargskeyword arguments

Additional arguments passed to matplotlib plot or fill_between. Useful arguments include color, lw, and marker.

replace_nan_depth(inplace: bool = False) Optional[pandas.core.frame.DataFrame]#

Replace -10000.99 depth values with user-specified _nan_depth_value

Parameters
inplacebool

Modify the current data inplace

Returns
DataFrame with depth edges replaced by Lines._nan_depth_value
to_csv(save_path: Optional[bool] = None) None#

Save a Dataframe to a .csv file

Parameters
save_pathstr

path to save the CSV file to

to_json(save_path: Optional[str] = None, pretty: bool = True, **kwargs) None#

Convert supported formats to .json file.

Parameters
save_pathstr

path to save the JSON file to

prettybool, default True

Output more human readable JSON

kwargs

keyword arguments passed into parse_file