{"id":18750348,"url":"https://github.com/ntia/scos-tekrsa","last_synced_at":"2025-04-12T23:31:58.266Z","repository":{"id":52607178,"uuid":"274757113","full_name":"NTIA/scos-tekrsa","owner":"NTIA","description":"Plugin for SCOS Sensor which adds support for Tektronix RSA spectrum analyzers","archived":false,"fork":false,"pushed_at":"2025-01-17T18:46:19.000Z","size":15015,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T17:57:18.004Z","etag":null,"topics":["ieee","python","rf","scos","sdr","spectrum-analyzer","tektronix"],"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/NTIA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-24T19:53:20.000Z","updated_at":"2024-12-19T21:45:49.000Z","dependencies_parsed_at":"2023-02-19T15:16:07.689Z","dependency_job_id":"4a8901b9-3346-4817-924c-a482398e46dd","html_url":"https://github.com/NTIA/scos-tekrsa","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTIA%2Fscos-tekrsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTIA%2Fscos-tekrsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTIA%2Fscos-tekrsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTIA%2Fscos-tekrsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NTIA","download_url":"https://codeload.github.com/NTIA/scos-tekrsa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"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":["ieee","python","rf","scos","sdr","spectrum-analyzer","tektronix"],"created_at":"2024-11-07T17:11:29.990Z","updated_at":"2025-04-12T23:31:58.260Z","avatar_url":"https://github.com/NTIA.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NTIA/ITS SCOS Tektronix® RSA Plugin\n\n[![GitHub release (latest SemVer)][latest-release-semver-badge]][github-releases]\n[![GitHub Actions Test Status][github-actions-test-badge]][github-actions-tox-link]\n[![GitHub all releases][github-download-count-badge]][github-releases]\n[![GitHub issues][github-issue-count-badge]][github-issues]\n[![Code style: black][code-style-badge]][code-style-repo]\n\n[NTIA/ITS]: https://its.ntia.gov/\n[github-actions-tox-link]: https://github.com/NTIA/scos-tekrsa/actions/workflows/tox.yaml\n[github-actions-test-badge]: https://github.com/NTIA/scos-tekrsa/actions/workflows/tox.yaml/badge.svg\n[code-style-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[code-style-repo]: https://github.com/psf/black\n[latest-release-semver-badge]: https://img.shields.io/github/v/release/NTIA/scos-tekrsa?display_name=tag\u0026sort=semver\n[github-releases]: https://github.com/NTIA/scos-tekrsa/releases\n[github-download-count-badge]: https://img.shields.io/github/downloads/NTIA/scos-tekrsa/total\n[github-issue-count-badge]: https://img.shields.io/github/issues/NTIA/scos-tekrsa\n[github-issues]: https://github.com/NTIA/scos-tekrsa/issues\n\nThis repository is a plugin to add support for the Tektronix RSA306, RSA306B, RSA503A,\nRSA507A, RSA513A, RSA518A, RSA603A, and RSA607A real-time spectrum analyzers to\nSCOS Sensor, developed by [NTIA/ITS]. See the\n[SCOS Sensor documentation](https://github.com/NTIA/scos-sensor/blob/master/README.md)\nfor more information about SCOS Sensor, especially the section about\n[Actions and Hardware Support](https://github.com/NTIA/scos-sensor/blob/master/README.md#actions-and-hardware-support).\n\nThis plugin requires the\n[RSA API for Linux](https://github.com/tektronix/RSA_API/) by Tektronix.\nA custom [Python wrapper for this API](https://github.com/NTIA/tekrsa-api-wrap/) is also\nused to mask Ctypes syntax, handle error-checking, and implement helper methods.\n\nThis repository also includes many 700 MHz band actions in\n`scos_tekrsa/configs/actions-300` and CBRS band (3550-3700 MHz) actions in `scos_tekrsa/configs/actions-500-600`.\nActions are defined separately for RSA300- and RSA500/600-series devices, allowing for\npreamp and attenuation control of the RSA500/600-series devices. Action classes,\n`SignalAnalyzerInterface`, and signals are used from the [SCOS Actions Plugin](https://github.com/NTIA/scos-actions/).\n\nFor information on adding actions, see the [SCOS Actions Plugin documentation](https://github.com/NTIA/scos-actions/blob/master/README.md#adding-actions).\n\n## Table of Contents\n\n- [Overview of Repo Structure](#overview-of-repo-structure)\n- [Running in SCOS Sensor](#running-in-scos-sensor)\n- [Development](#development)\n- [License](#license)\n- [Contact](#contact)\n- [Disclaimer](#disclaimer)\n\n## Overview of Repo Structure\n\n- `scos_tekrsa/configs`: Contains YAML files with the parameters used to initialize the\nTektronix RSA supported actions\n- `scos_tekrsa/discover`: Includes the code to read YAML files and make actions\navailable to `scos-sensor`\n- `scos_tekrsa/hardware`: Includes an implementation of the signal analyzer interface for\nTektronix RSA devices, along with supporting test code\n\n## Running in SCOS Sensor\n\nRequires `git`, `python\u003e=3.9`, `pip\u003e=18.1`, and `pip-tools\u003e=6.6.2`\n\nBelow are the steps to run SCOS Sensor with the SCOS Tektronix RSA plugin:\n\n1. Clone `scos-sensor`:\n\n    ```bash\n    git clone https://github.com/NTIA/scos-sensor.git\n    ```\n\n1. Navigate to the cloned `scos-sensor` directory:\n\n    ```bash\n    cd scos-sensor\n    ```\n\n1. If testing locally, generate the necessary SSL certificates by running:\n\n    ```bash\n    cd scripts \u0026\u0026 ./create_localhost_cert.sh\n    ````\n\n1. While in the `scos-sensor` directory, create the `env` file by copying the template\nfile:\n\n    ```bash\n    cp env.template ./env\n    ```\n\n1. In the newly-created `env` file, set the following environment variables:\n\n    ```text\n    DEVICE_MODEL=RSA507A  # Or 'RSA306B', 'RSA517A', etc.\n    # These are the same for all supported Tektronix RSA devices:\n    BASE_IMAGE=ghcr.io/ntia/scos-tekrsa/tekrsa_usb:latest\n    USB_DEVICE=Tektronix\n    SIGAN_CLASS=TekRSASigan\n    SIGAN_MODULE=scos_tekrsa.hardware.tekrsa_sigan\n    ```\n\n1. Get environment variables:\n\n    ```bash\n    source ./env\n    ```\n\n1. In `scos-sensor/src/requirements.in`, remove or comment any unnecessary dependencies\n(such as `scos_usrp`), then add the `scos_tekrsa` dependency:\n\n    ```text\n    # Be sure to provide the correct tag for the desired version\n    scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@8.0.0\n    ```\n\n1. Compile requirements by running:\n\n    ```bash\n    cd src\n    pip-compile requirements.in\n    pip-compile requirements-dev.in\n    ```\n\n1. Download the [RSA API for Linux](https://www.tek.com/spectrum-analyzer/rsa306-software/rsa-application-programming-interface--api-for-64bit-linux--v100014)\nfrom Tektronix. Place the three files `libRSA_API.so`, `libcyusb_shared.so`, and\n`cyusb.conf` in the directory `scos-sensor/drivers`.\n\n1. Create a `files.json` file in `scos-sensor/drivers` containing:\n\n    ```json\n    {\n        \"scos_files\": [\n            {\n                \"source_path\": \"cyusb.conf\",\n                \"dest_path\": \"/etc/cyusb.conf\"\n            }\n        ]\n    }\n    ```\n\n1. Build and start containers (and optionally, view logs):\n\n    ```bash\n    docker-compose build --no-cache\n    docker-compose up -d --force-recreate\n    docker-compose logs -f\n    ```\n\n## Development\n\n### Development Environment\n\nSet up a development environment using a tool like\n[Conda](https://docs.conda.io/en/latest/)\nor [venv](https://docs.python.org/3/library/venv.html#module-venv), with `python\u003e=3.9`.\nThen, from the cloned directory, install the development dependencies by running:\n\n```bash\npip install .[dev]\n```\n\nThis will install the project itself, along with development dependencies for pre-commit\nhooks, building distributions, and running tests. Set up pre-commit, which runs\nauto-formatting and code-checking automatically when you make a commit, by running:\n\n```bash\npre-commit install\n```\n\nThe pre-commit tool will auto-format Python code using [Black](https://github.com/psf/black)\nand [isort](https://github.com/pycqa/isort). Other pre-commit hooks are also enabled, and\ncan be found in [`.pre-commit-config.yaml`](.pre-commit-config.yaml).\n\n### Updating the `scos_tekrsa` package\n\nThis project uses [Hatchling](https://github.com/pypa/hatch/tree/master/backend) as a\nbackend. Hatchling makes versioning and building new releases easy. The package version can\nbe updated easily by using any of the following commands.\n\n```bash\nhatchling version major   # 1.0.0 -\u003e 2.0.0\nhatchling version minor   # 1.0.0 -\u003e 1.1.0\nhatchling version micro   # 1.0.0 -\u003e 1.0.1\nhatchling version \"X.X.X\" # 1.0.0 -\u003e X.X.X\n```\n\nTo build a new release (both wheel and sdist/tarball), run:\n\n```bash\nhatchling build\n```\n\n### Updating the `tekrsa_usb` package\n\nTo build, tag the version as X.X.X, and push the updated image to the GitHub Container\nRegistry, run:\n\n```bash\ndocker build -f docker/Dockerfile -t tekrsa_usb .\ndocker tag tekrsa_usb ghcr.io/ntia/scos-tekrsa/tekrsa_usb:X.X.X\ndocker tag tekrsa_usb ghcr.io/ntia/scos-tekrsa/tekrsa_usb:latest\ndocker push ghcr.io/ntia/scos-tekrsa/tekrsa_usb:X.X.X\ndocker push ghcr.io/ntia/scos-tekrsa/tekrsa_usb:latest\n```\n\n### Running Tests\n\nThe `scos_tekrsa` plugin is tested using [`tox`](https://tox.wiki/en/latest/) and the [`pytest`](https://docs.pytest.org/en/7.1.x/)\nframework. The following commands can be used to run tests and show coverage reports.\n\n```bash\npytest          # faster, but less thorough\ntox             # test code in virtual environments for multiple versions of Python\ntox --recreate  # To recreate the virtual environments used for testing\n```\n\n## License\n\nSee [LICENSE](LICENSE.md)\n\nTEKTRONIX and TEK are registered trademarks of Tektronix, Inc.\n\n## Contact\n\nFor technical questions about `scos_tekrsa`, contact the\n[ITS Spectrum Monitoring Team](mailto:spectrummonitoring@ntia.gov).\n\n## Disclaimer\n\nCertain commercial equipment, instruments, or materials are identified in this project\nwere used for the convenience of the developers. In no case does such identification\nimply recommendation or endorsement by the National Telecommunications and Information\nAdministration, nor does it imply that the material or equipment identified is\nnecessarily the best available for the purpose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntia%2Fscos-tekrsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntia%2Fscos-tekrsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntia%2Fscos-tekrsa/lists"}