Support material for SpectrumX workshops, tutorials, and other events.
This example demonstrates how to upload data to the SpectrumX Data System (SDS) and interact with it using the spectrumx
Python package.
Continue in ./demos/data_system/README.md.
The spectrogram example demonstrates how to download DigitalRF data from the SpectrumX Data System (SDS) and create spectrograms from the data.
- Python 3.x
- Required Python packages:
- spectrumx
- digital-rf
- h5py
- numpy
- matplotlib
- scipy
Note: All required dependencies are pre-installed in the SpectrumX Visualization Interface's JupyterHub instance, which is hosted at https://svi.crc.nd.edu/notebook. This is the recommended environment for running the spectrogram example.
-
Navigate to the spectrogram example directory:
cd demos/spectrogram_from_sds
-
Install the required packages:
python -m venv .venv source .venv/bin/activate pip install spectrumx digital-rf h5py numpy matplotlib scipy
-
Get your SDS secret token from the SDS website.
-
Open the Jupyter notebook:
jupyter notebook spectrogram.ipynb
-
In the notebook:
- Replace
YOUR_SECRET_TOKEN
with your SDS secret token - Replace
/YOUR_PATH
with the path to your data in the SDS - Replace
data/files/YOUR_USERNAME/YOUR_PATH/
with the local path where you want to store the downloaded data
- Replace
-
Run the cells in sequence to:
- Download the DigitalRF data from the SDS
- Process the data and generate spectrograms
- View the resulting spectrograms
The example will create spectrograms for each channel in the downloaded data, with automatic scaling of the power levels.