ADACS-Australia / NDRI-IMOS

Other
0 stars 0 forks source link

Calibration code #4

Open MartinCupak opened 4 months ago

MartinCupak commented 4 months ago

Inputs:

MartinCupak commented 1 month ago

Calibration code written (translated from Matlab) and tested. The demo cli script takes calibration file, hydrophone sensitivity and Calibration noise level as parameters, plus obviously the raw underwater audio record in .dat, and saves the result uncompressed as Microsoft WAVE or as loseless compressed FLAC. Both have metadata stored as json string in "comment" ID3 tag.

MartinCupak commented 1 month ago

For bulk processing of a bunch of records from the same sensor and calibration config, pre-processing of the calibration record can be done once, then just run calibration for the individual underwater audio records.

mhidas commented 1 month ago

:+1: :+1: :+1: Great work! Thanks @MartinCupak

mhidas commented 1 month ago

For bulk processing of a bunch of records from the same sensor and calibration config, pre-processing of the calibration record can be done once, then just run calibration for the individual underwater audio records.

This is the way we'd like to use this code to process entire deployments at a time. Is the current code able to output and also read in the pre-processed calibration record? Do you have a sample bit of code to show how this works?

MartinCupak commented 1 month ago

it should be all apparent from the command line tools in "scripts" subfolder of the repo.

MartinCupak commented 1 month ago

Regarding the pre-processed calibration record, I would just keep that in memory when processing eg 1000 files that share the same calibration. It is not that CPU expensive to re-create, if you go with a set broken into smaller batches of audio files, the whole set using the same calibration. It just feels like a waste to do it 1000 times for each file in the batch.