{"id":15018838,"url":"https://github.com/mithaystack/digital_rf","last_synced_at":"2025-04-06T21:14:51.529Z","repository":{"id":45664537,"uuid":"94592436","full_name":"MITHaystack/digital_rf","owner":"MITHaystack","description":"Read, write, and interact with data in the Digital RF and Digital Metadata formats","archived":false,"fork":false,"pushed_at":"2024-08-15T20:26:35.000Z","size":5785,"stargazers_count":98,"open_issues_count":18,"forks_count":30,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-29T22:21:59.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MITHaystack.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-17T01:11:05.000Z","updated_at":"2024-10-11T23:28:41.000Z","dependencies_parsed_at":"2023-01-24T20:15:28.383Z","dependency_job_id":"25960bf9-5ceb-41ee-bf06-c2182b963835","html_url":"https://github.com/MITHaystack/digital_rf","commit_stats":{"total_commits":657,"total_committers":5,"mean_commits":131.4,"dds":0.1004566210045662,"last_synced_commit":"22b8b5f4aeac5297ba03618485bb8985828583b0"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MITHaystack%2Fdigital_rf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MITHaystack%2Fdigital_rf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MITHaystack%2Fdigital_rf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MITHaystack%2Fdigital_rf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MITHaystack","download_url":"https://codeload.github.com/MITHaystack/digital_rf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550690,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:52:31.248Z","updated_at":"2025-04-06T21:14:51.513Z","avatar_url":"https://github.com/MITHaystack.png","language":"Python","readme":".. -*- mode: rst -*-\n\n|GitHub|_ |PyPI|_ |Conda|_ |CI|_\n\n.. |GitHub| image:: https://badge.fury.io/gh/MITHaystack%2Fdigital_rf.svg\n.. _GitHub: https://badge.fury.io/gh/MITHaystack%2Fdigital_rf\n\n.. |PyPI| image:: https://badge.fury.io/py/digital-rf.svg\n.. _PyPI: https://pypi.python.org/pypi/digital-rf/\n\n.. |Conda| image:: https://anaconda.org/conda-forge/digital_rf/badges/version.svg\n.. _Conda: https://anaconda.org/conda-forge/digital_rf\n\n.. |CI| image:: https://github.com/MITHaystack/digital_rf/workflows/conda-matrix/badge.svg\n.. _CI: https://github.com/MITHaystack/digital_rf/actions?query=workflow%3Aconda-matrix+branch%3Amaster\n\n|DigitalRF|\n===========\n\n.. |DigitalRF| image:: docs/digital_rf_logo.png\n    :alt: Digital RF\n    :width: 100%\n\nThe Digital RF project encompasses a standardized HDF5 format for reading and writing of radio frequency data and the software for doing so. The format is designed to be self-documenting for data archive and to allow rapid random access for data processing. For details on the format, refer to the 'documents' directory in the source tree.\n\nThis suite of software includes libraries for reading and writing data in the Digital RF HDF5 format in C (``libdigital_rf``), Python (``digital_rf``) with blocks for GNU Radio (``gr_digital_rf``), and MATLAB. It also contains the ``thor.py`` UHD radio recorder script, Python tools for managing and processing Digital RF data, example scripts that demonstrate basic usage, and example applications that encompass a complete data recording and processing chain for various use cases.\n\n\nImportant Links\n===============\n\n:Official source code repo: https://github.com/MITHaystack/digital_rf\n:Issue tracker: https://github.com/MITHaystack/digital_rf/issues\n:User mailing list for help/questions: openradar-users@openradar.org\n:Developer mailing list: openradar-developers@openradar.org\n\n\nCitation\n========\n\nIf you use Digital RF in a scientific publication, we would appreciate a citation such as the following (BibTeX_):\n\n    Volz, R., Rideout, W. C., Swoboda, J., Vierinen, J. P., \u0026 Lind, F. D. (2025). Digital RF (Version 2.6.11). MIT Haystack Observatory. Retrieved from https://github.com/MITHaystack/digital_rf\n\n.. _BibTeX: bibtex.bib\n\n\nDependencies\n============\n\nThe main package components are divided into subdirectories by language (C, Python, and MATLAB) and can be built and installed separately or all together. Their individual dependencies are listed below by component.\n\nBuild\n-----\n\nall\n  * cmake \u003e= 3.20 (``cmake``)\n\nc\n  * hdf5 \u003e= 1.8 (``libhdf5-dev``)\n\npython\n  * build (``python3-build`` or ``pip install build``)\n  * hdf5 \u003e= 1.8 (``libhdf5-dev``)\n  * mako (``python-mako``)\n  * numpy (``python-numpy``)\n  * python 3.8+ (``python-dev``)\n  * scikit-build-core (``python3-scikit-build-core`` or ``pip install scikit-build-core``)\n  * setuptools-scm (``python3-setuptools-scm`` or ``pip install setuptools-scm``)\n\nmatlab\n  * cmake \u003e= 3.0 (``cmake``)\n  * MATLAB \u003e= R2016a\n\nRuntime\n-------\n\nc\n  * hdf5 \u003e= 1.8 (``libhdf5``)\n\npython\n  * h5py (``python-h5py``)\n  * hdf5 \u003e= 1.8 (``libhdf5``)\n  * numpy (``python-numpy``)\n  * packaging (``python-packaging``)\n  * python 3.8+ (``python``)\n  * python-dateutil (``python-dateutil``)\n  * six (``python-six``)\n\nmatlab\n  * MATLAB \u003e= R2014b\n\nRuntime [optional feature]\n--------------------------\n\npython\n  * gnuradio [gr_digital_rf] (``gnuradio``)\n  * gr-osmosdr [thorosmo] (``gr-osmosdr``)\n  * gr-iio [thorpluto] (``gr-iio``)\n  * gr-uhd [thor] (``libgnuradio-uhd``)\n  * matplotlib [tools] (``python-matplotlib``)\n  * pandas [digital_metadata] (``python-pandas``)\n  * pytest \u003e= 3 [tests] (``python-pytest``)\n  * python-sounddevice [tools] (``pip install sounddevice``)\n  * scipy [tools] (``python-scipy``)\n  * uhd [uhdtodrf] (``python3-uhd``)\n  * watchdog [mirror, ringbuffer, watchdog] (``python-watchdog``)\n\n\nInstallation\n============\n\nIf you're just getting started with Digital RF, we recommend using the Conda_ binary package. It is available in the `conda-forge \u003chttps://conda-forge.github.io/\u003e`_ distribution of community-maintained packages.\n\nIn an existing Conda environment, run the following to install ``digital_rf`` and its dependencies::\n\n    conda config --add channels conda-forge\n    conda config --set channel_priority strict\n    conda install digital_rf\n\nYou may also want to install the ``gnuradio-core`` package in order to make use of ``gr_digital_rf``::\n\n    conda install gnuradio-core\n\nUsing PyPI package (wheel)\n--------------------------\n\nAlternatively, you can most likely install Digital RF through PyPI_ with `pip` using a pre-built wheel::\n\n    pip install digital_rf\n\nThis will install the ``digital_rf`` and ``gr_digital_rf`` Python packages and GNU Radio Companion (GRC) blocks. (If you're interested in the C library or development, see other installation methods for ways to install the full project package.)\n\nIf you plan on using Digital RF with GNU Radio, make sure to run the `pip` command in the same Python environment that your GNU Radio installation uses so that GNU Radio can find the packages. Depending on your GNU Radio installation, it may be necessary to add the Digital RF blocks to your GRC blocks path by creating or editing the GRC configuration file\n\n:Unix (local): $HOME/.gnuradio/config.conf\n:Windows (local): %APPDATA%/.gnuradio/config.conf\n:Unix (global): /etc/gnuradio/conf.d/grc.conf\n:Custom (global): {INSTALL_PREFIX}/etc/gnuradio/conf.d/grc.conf\n\nto contain::\n\n    [grc]\n    local_blocks_path = {PIP_PREFIX}/share/gnuradio/grc/blocks\n\n(replacing ``{PIP_PREFIX}`` with the pip installation prefix, \"/usr/local\" for example).\n\nUsing MacPorts\n--------------\n\nDigital RF can be installed though MacPorts, using the port install command::\n\n    sudo ports install digital_rf\n\nThis will install and build all of the needed dependencies using MacPorts.\n\nUsing source code package\n-------------------------\n\nFirst, ensure that you have the above-listed dependencies installed.\n\nClone the repository and enter the source directory::\n\n    git clone https://github.com/MITHaystack/digital_rf.git\n    cd digital_rf\n\nCreate a build directory to keep the source tree clean::\n\n    mkdir build\n    cd build\n\nBuild and install::\n\n    cmake ..\n    make\n    sudo make install\n\nCMake will attempt to find your Python installation in the usual places. If this fails, you can specify a particular Python interpreter by adding ``-DPython_EXECUTABLE={PATH}`` (replacing ``{PATH}`` with the interpreter path) to the cmake command.\n\nFinally, you may need to update the library cache so the newly-installed ``libdigital_rf`` is found::\n\n    sudo ldconfig\n\nNote that it is also possible to build the different language libraries separately by following the CMake build procedure from within the `c` and `matlab` directories. The `python` package can be built and installed on its own using any Python build frontend compatible with `pyproject.toml`, e.g.::\n\n    python -m build\n\nThe MATLAB toolbox is not created by default. If you have MATLAB R2016a or higher and want to create an installable toolbox package, run the following from the build directory::\n\n    make matlab\n\nThe toolbox package will then be found at \"build/matlab/digital_rf.mltbx\".\n\n\nExample Usage\n=============\n\nPython and C examples can be found in the examples directory in the source tree. The C examples can be compiled from the build directory by running::\n\n    make examples\n\n\nThe following Python commands will load and read data located in a directory \"/data/test\".\n\nLoad the module and create a reader object::\n\n    import digital_rf as drf\n    do = drf.DigitalRFReader('/data/test')\n\nList channels::\n\n    do.get_channels()\n\nGet data bounds for channel 'cha'::\n\n    s, e = do.get_bounds('cha')\n\nRead first 10 samples from channel 'cha'::\n\n    data = do.read_vector(s, 10, 'cha')\n\n\nTesting\n=======\n\nTo execute the C test suite, run the following from the build directory::\n\n    make test\n\nThe C and tests create test files in \"/tmp/hdf5*\". To cleanup afterward, run::\n\n    rm -r /tmp/hdf5*\n\nThe python tests require ``pytest`` to run. From the source directory, you can simply run::\n\n    pytest\n\n\nAcknowledgments\n===============\n\nThis work was supported by the National Science Foundation under the Geospace Facilities and MRI programs, and by National Instruments / Ettus corporation through the donation of software radio hardware. We are grateful for the support that made this development possible.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithaystack%2Fdigital_rf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmithaystack%2Fdigital_rf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithaystack%2Fdigital_rf/lists"}