The data format adopted by the biologging tools project has two components [Note]There are some immediate advantages to using this format:
– The Matlab/Octave/R animaltags tools and the DTAG tools directly support this format and make it easy to collect metadata as you perform calibration and processing steps on the data.
– NetCDF files can be exchanged without problems between Matlab, Octave, and R on Windows and Mac.:
- The NetCDF file format for data. This is an international standard file format for scientific data which makes it easy to add general metadata and session-specific information.
- The definition of standard metadata structures for general and data-specific information. These structures are extensible – you can add whatever additional information you want to them – but the basic structures provide a guide as to what should be the minimum content.
Start by defining the researchers in your group and the species that your group works with, found in
species.csv. There are templates for these in the
user directory in the animaltags tools [Note]Make sure to move
species.csv to another directory on your Matlab/Octave path so that they don’t get overwritten if you download a new copy of the animaltags tools. These files are used as a quick way for the Matlab/Octave tools to preset some of the fields in the metadata structure that will be made for each deployment.. The first column of each file contains the shortcuts that the tools will use to access specific lines from the files. For example: your initials in the first column of
researchers.csv will be used to find your affiliation, contact information and data use preferences.
The general metadata for a deployment is called the
This makes an info structure for a deployment of a D4 tag by a person with initials
'xx': either your initials or the initials of the data owner, who must be listed in
researchers.csv. The first two letters of
depid are used to lookup the species in
species.csv [Note]If more than one species matches these two letters, you will be asked to choose which one you mean..
The fields in
info will be preset to some relevant metadata. You can edit these fields to give extra information, e.g.:
It may be easiest to make a script for each field trip and include all the fields that will remain the same throughout the trip, e.g.:
Now you can generate a personalized
info structure for a particular field trip by running your script in the Matlab/Octave command line.
As well as the general metadata for a deployment, some sensor-specific metadata is needed with each type of sensor data as well, for defining its units, axes and sampling rate. The
sens_struct function is a tool for making a sensor structure that is appropriate for each data type. The following instructions provide examples of how to produce data structures for sensors common to DTAG 4 devices, using the sensor cell array returned by
d3readswv_commonfs [Note]Note that the order of the sensor channels may change if your tag was recording a different set of sensors (e.g., ECG, light). Use
d3channames as described here to check. To find out what sensor types are supported by
sens_struct and hit the return key in the command window.:
For acceleration data and magnetometer data, which are usually in Channels 1-3 and 4-6:
For temperature data, usually found in Channel 7:
Similarly, for depth data, assuming that the pressure sensor is in Channel 8:
sens_struct that your data corresponds to a particular sensor type, give the first few letters of that sensor type in the last argument to
'acc' for acceleration.
You can find out what is in any of these structures by typing its name and the return key in the command window. For example, do this for
P and you will see that it claims that the units are in mH2O (i.e., meters of depth), which is not true! The sensor structure fields are expecting that you will now calibrate the data, i.e., convert it from the raw tag units to the units that are listed in the structures [Note]The sensor structures are generated before applying the calibrations so that the calibration constants will get added to the sensor structures first, so that all the subsequent processing steps you apply to each sensor will be recorded..
Previous: Data Structure
Next: Calibration (Coming soon …)