Handling acoustic data¶
Snippets of acoustic data are made available as statistical summaries, wave files, mp3 files and raw data. The snippets of the same type are offered as stream.
from openkm3.store import KM3Store
store = KM3Store()
store.list("acoustic20_01")
INFO:root:Loaded catalog from cache.
Acoustic data¶
Identifier |
Title |
Description |
---|---|---|
acoustic20_01_wav |
Acoustic data stream wave |
Samples of acoustic data from ARCA DOM as wav file |
acoustic20_01_mp3 |
Acoustic data stream mp3 |
Samples of acoustic data from ORCA DOM as mp3 file |
acoustic20_01_raw |
Acoustic data stream raw |
Samples of acoustic data from ORCA DOM as raw files |
acoustic20_01_psd |
Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
store.list("acoustic20_01_psd")
Acoustic data stream psd information¶
Identifier |
Title |
Description |
---|---|---|
acoustic20_01_psd_DOM_808974724_CH1_1601366233 |
Element of Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
acoustic20_01_psd_DOM_808974724_CH1_1599150167 |
Element of Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
acoustic20_01_psd_DOM_808974724_CH1_1601455406 |
Element of Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
acoustic20_01_psd_DOM_808974724_CH1_1599152165 |
Element of Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
acoustic20_01_psd_DOM_808974724_CH1_1601364561 |
Element of Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
acoustic20_01_psd_DOM_808974724_CH1_1600355223 |
Element of Acoustic data stream psd information |
Statistical quantities of acoustic data from ORCA DOM |
Accessing statistical information¶
As example, one sample of a channel from a hydrophone on one Digital Optical Module (DOM) is accessed
psd = store.get("acoustic20_01_psd_DOM_808974724_CH1_1601366233")
psd.show_metadata()
INFO:root:Loaded entry acoustic20_01_psd_DOM_808974724_CH1_1601366233 as <class 'openkm3.dataclasses.Table'>.
Entry |
Value |
---|---|
accessInfo |
{} |
accessURL |
http://192.84.151.120:8080/api/v1/psd/DOM_808974724_CH1_1601366233 |
author |
The KM3NeT collaboration |
dateCreation |
2020-11-11 |
datePublication |
2020-11-11 |
description |
Statistical quantities of acoustic data from ORCA DOM |
instrument |
DOM_808974724_CH1 |
keywords |
[] |
kid |
3e74baaf-8aa4-4352-a88d-64cafb847c82 |
ktype |
km3.data.d3.acoustic.psd |
license |
CC-BY4.0 |
odcid |
acoustic20_01_psd_DOM_808974724_CH1_1601366233 |
parentResource |
fa347840-1f13-4720-adab-3607efe08a90 |
publisher |
The KM3NeT collaboration |
resource_uri |
/data/resources/acoustic20_01_psd_DOM_808974724_CH1_1601366233/ |
returnFormat |
application/json |
startTime |
2020-09-29T07:57:13 |
title |
Element of Acoustic data stream psd information |
version |
1.0 |
df = psd.get_dataframe()
df["mean"].plot()
<AxesSubplot:>

Accessing the wave file¶
wave = store.get("acoustic20_01_wav_DOM_808974724_CH1_1601366233")
INFO:root:Loaded entry acoustic20_01_wav_DOM_808974724_CH1_1601366233 as <class 'openkm3.dataclasses.AudioWave'>.
wave.show_paraminfo()
Parameter |
Value |
---|---|
nchannels |
1 |
sampwidth |
3 |
framerate |
193500 |
nframes |
13476645 |
comptype |
NONE |
compname |
not compressed |
df = wave.get_dataframe(endframe = 13476645, startframe = 10000000)
df
0 | 1 | 2 | |
---|---|---|---|
0 | 88 | -73 | -104 |
1 | -51 | 96 | -1 |
2 | 71 | 77 | 64 |
3 | -79 | 17 | 76 |
4 | -88 | -91 | -104 |
... | ... | ... | ... |
3476640 | -65 | -32 | -94 |
3476641 | -112 | 62 | 96 |
3476642 | 73 | -56 | 61 |
3476643 | 32 | 70 | -34 |
3476644 | 0 | 0 | -128 |
3476645 rows × 3 columns
Download python script: example_acoustic.py
Download Jupyter notebook: example_acoustic.ipynb