Lines¶
-
class
echoregions.Lines(input_file=None, parse=True, convert_time=False, replace_nan_range_value=None, offset=0)¶ Bases:
object- Attributes
input_fileString path to the EVL file
output_dataDictionary containing the data parsed from the EVL file
output_filePath(s) to the list of files saved.
pointsList of points in the form (time, depth)
Methods
convert_points(points[, convert_time, …])Convert x and y values of points from the EV format.
parse_file([convert_time, …])Parse the EVL file into Lines.output_data
plot([calibrated_dataset, min_ping_time, …])Plot the points in the EVL file.
to_csv([save_path])Convert an EVL file to a CSV
to_dataframe(**kwargs)Organize EVL data into a Pandas DataFrame.
to_json([save_path, pretty])Convert EVL to JSON
Attributes Summary
String path to the EVL file
Dictionary containing the data parsed from the EVL file
Path(s) to the list of files saved.
List of points in the form (time, depth)
Methods Summary
convert_points(points[, convert_time, …])Convert x and y values of points from the EV format.
parse_file([convert_time, …])Parse the EVL file into Lines.output_data
plot([calibrated_dataset, min_ping_time, …])Plot the points in the EVL file.
to_csv([save_path])Convert an EVL file to a CSV
to_dataframe(**kwargs)Organize EVL data into a Pandas DataFrame.
to_json([save_path, pretty])Convert EVL to JSON
Attributes Documentation
-
input_file¶ String path to the EVL file
-
output_data¶ Dictionary containing the data parsed from the EVL file
-
output_file¶ Path(s) to the list of files saved. String if a single file. LIst of strings if multiple.
-
points¶ List of points in the form (time, depth)
Methods Documentation
-
convert_points(points, convert_time=True, replace_nan_range_value=None, offset=0)¶ Convert x and y values of points from the EV format. Modifies points in-place.
- Parameters
- pointslist or dict
List containing EVL points or a single point in dict form
- convert_timebool, default True
Convert EV time to datetime64
- replace_nan_range_valuefloat, default
None Value in meters to replace -10000.990000 ranges with. Don’t replace if
None.- offsetfloat, default 0
Depth offset in meters.
- Returns
- list or dict
Converted points with type depending on input
-
parse_file(convert_time=False, replace_nan_range_value=None, offset=0)¶ Parse the EVL file into Lines.output_data
- Parameters
- convert_timebool, default False
Convert EV time to datetime64.
- replace_nan_range_valuefloat, default
None Depth in meters to replace -10000.990000 ranges with. Don’t replace if
None.- offsetfloat, default 0
depth offset in meters.
-
plot(calibrated_dataset=None, min_ping_time=None, max_ping_time=None, fill_between=True, max_depth=0, alpha=0.5, **kwargs)¶ Plot the points in the EVL file.
- Parameters
- calibrated_datasetDataset, default
None Dataset containing range and ping_time that sets the bounds for the points plotted.
- min_ping_timedatetime64, default
None Lower ping_time bound.
- max_ping_timedatetime64, default
None Upper ping_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.
- calibrated_datasetDataset, default
-
to_csv(save_path=None, **kwargs)¶ Convert an EVL file to a CSV
- Parameters
- save_pathstr
Path to save csv file to
- kwargskeyword arguments
Additional arguments passed to Lines.parse_file
-
to_dataframe(**kwargs)¶ Organize EVL data into a Pandas DataFrame. See Lines.to_csv for arguments
-
to_json(save_path=None, pretty=False, **kwargs)¶ Convert EVL to JSON
- Parameters
- save_pathstr
Path to save csv file to
- prettybool, default False
Output more human readable JSON
- kwargskeyword arguments
Additional arguments passed to Lines.parse_file