Metadata
The metadata module provides the DeploymentInfo class for
managing acoustic deployment metadata. A deployment record typically describes
the recorder hardware, hydrophone, mooring platform, geographic location, and
deployment dates. This information can be loaded from a CSV file and then
applied to Annotation or
Measurement objects to populate their
metadata fields. A blank CSV template with all required column headers can be
generated with write_template().
DeploymentInfo
- class ecosound.core.metadata.DeploymentInfo[source]
Bases:
objectA class to handle acoustic deployment metadata.
Carries deployment metadata that can be used to populate metadata fields in
AnnotationorMeasurementobjects.- data
DataFrame containing deployment information.
- Type:
pandas DataFrame
Initialize object with empty .data attribute.
- Return type:
None.
- write_template(filepath)[source]
Create a blank deployment file.
Create an empty template CSV file with the required headers. The created file contains only the column headers; an operator must fill in all deployment information manually. Once complete, this file can be loaded with
DeploymentInfo.read().- Parameters:
filepath (str) – path and name of the deployment csv file to create.
- Return type:
None. Write a blank csv deployment file that an operator can fill in.
- read(filepath)[source]
Read metadata information from csv file.
Load data from a CSV file containing deployment metadata and populate the
dataattribute of the DeploymentInfo object. The CSV file must follow the same column headers and format as the template generated byDeploymentInfo.write_template().- Parameters:
filepath (str) – Path of the csv file to read.
- Returns:
None. Populates the
dataattribute of the DeploymentInfo objectwith the contents of the CSV file.