Project-OSmOSE / OSEkit

OSEkit is an open source suite of tools written in python and dedicated to the management and analysis of data in underwater passive acoustics.
https://osmose.ifremer.fr
Other
3 stars 2 forks source link

New Auxiliary class for basic and simple joining cases (ERA + gps + depth + other eg annotation) #158

Closed gmanatole closed 4 months ago

gmanatole commented 4 months ago

Rewrote auxiliary class that was too complicated and not well incorporated wrt existing OSmOSE codes.

This class inherits from Spectrogram class (and thus Dataset class) Spec inheritance : allows to fetch correct paths for timestamps and metadata by entering analysis params Dataset inheritance :

  1. depth/gps data fetching/formatting already implemented
  2. Dataset was changed so that depth and gps_coordinates for moving hydrophone do not average value but return dataframe for example
  3. gps and depth data is automatically added an epoch column if it doesn't exist (ref. 1970/01/01)

The code to add the epoch column was added in utils/timestamp_utils.py

To facilitate the user's experience, gps joining and depth joining are set to True and have default behaviors. These behaviors can be modified. Joining ERA automatically looks for a nc file in auxiliary/environment and takes the first one available. Possibility to add other csv files by entering key (column name in csv) and absolute path in a dict.

gmanatole commented 4 months ago

I have removed unecessary commented methods from the Auxiliary module. A small explanation of the module has also been added to getting_started.rst doc