This Jupyter notebook demonstrates using the cdasws Python package to audify multiple short high-time-resolution bursts from the Van Allen Probes High Frequency Receiver (HFR) Field Waveform Samples. This notebook contains the following sections:
Notes:
Install the prerequisite software from the Python Package Index if it is not already installed.
#%pip install -U cdasws
Execute some preliminary code that is necessary before the code that follows.
from cdasws import CdasWs
from IPython.core.display import HTML
cdas = CdasWs()
The following code demonstrates how to produce an audification of multiple short high-time-resolution bursts from the Van Allen Probes High Frequency Receiver (HFR) Field Waveform Samples RBSP-A_HFR-WAVEFORM_EMFISIS-L2.
status, result = cdas.get_audio('RBSP-A_HFR-WAVEFORM_EMFISIS-L2',
['HFRsamples_times'],
'2013-09-11T05:00:00Z', '2013-09-11T07:30:00Z')
The following code demonstrates how to play the audification file.
if status == 200:
audio_url = result['FileDescription'][0]['Name']
display(HTML('<audio controls><source src="' + audio_url +
'" type="audio/wav">' +
'Your browser does not support playing audio inline.</audio>'))
else:
print('Error getting audification: ', status)
View the cdasws API for additional functions. Additional notebook examples are also available.