aodn / imos-toolbox

Graphical tool for QC'ing and NetCDF'ing oceanographic datasets
GNU General Public License v3.0
46 stars 31 forks source link

Sampling regime metadata set incorrectly for Signature ADCP #554

Closed mhidas closed 4 years ago

mhidas commented 5 years ago

We have received this file, from a "Norrtek Signature250" instrument, with the following global attributes:

                :instrument_burst_duration = 0. ;
                :instrument_burst_interval = 900. ;
                :instrument_sample_interval = -17173800. ;

The timestamps are at regular 15min intervals, so if it was originally burst sampled, the bursts have already been binned. In that case the instrument_burst_ attributes should not be present (or at least set to correct values).

Either way, the instrument_sample_interval should be set to a sensible value (in this case 900.).

sspagnol commented 5 years ago

And while I'm a fan of talk like a pirate day the instrument should be 'Nortek Signature250', i.e. only one 'r' in Nortek :)

ocehugo commented 5 years ago

I would expect a NaN first too. Nonetheless

Requirements:

- [ ] Before files are written they have to pass a schema. - [ ] The schema has to check the metadata - [ ] The schema checks for instrument_sample_interval <= instrument_burst_duration <= instrument_burst_interval

update: the requirements above would take too long and are not necessary if the logic is implemented in the few parsers that set those attributes.

mhidas commented 5 years ago

The schema checks for insturment_burst_duration is in seconds, it's smaller or equal to the sample interval or the burst interval.

I'm not sure I fully understand what you're saying here. If the instrument is burst-sampling, the relative sizes of the attributes should be instrument_sample_interval <= instrument_burst_duration <= instrument_burst_interval

If the instrument is not burst-sampling then I think the instrument_burst_ attributes should not even be there, to avoid confusion.

For data originating from a burst-sampled instrument, where bursts have already been averaged, these attributes can be left with values unchanged, so they still describe the original sampling regime (as opposed to the timestamps in the present file). This is what our burst-averaged product is currently doing.

ocehugo commented 5 years ago

@mhidas, Agree. corrected

ocehugo commented 5 years ago

I got some files from Mark and the data was processed including the coordinate transformation and exported to mat files.

There are 1 ad2cp file and two mat files.

ocehugo commented 4 years ago

FYI: The reason why this data is with erroneous sampling metadata is that the data bypassed the signatureParser.m function (probably manually/custom handled).

The above parser does not accept the file as is - the "version" was not supported. Moreover, the logic that sets the sampling metadata logic didn't support the sampling scheme - a ping interval == burst interval == measurement average interval

I change the requirements:

ocehugo commented 4 years ago

not automatically closed when #623 changes were merged.