-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from NTIA/acquisition_data_storage
Acquisition data storage
- Loading branch information
Showing
17 changed files
with
303 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ stepped_frequency_time_domain_iq: | |
sample_rates: | ||
- 15.36e6 | ||
durations_ms: | ||
- 1000 # 10000 | ||
- 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ stepped_frequency_time_domain_iq: | |
sample_rates: | ||
- 15.36e6 | ||
durations_ms: | ||
- 1000 # 10000 | ||
- 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import json | ||
import os | ||
from os import path | ||
|
||
from django.conf import settings | ||
from sigmf.validate import validate as sigmf_validate | ||
|
||
from tasks.models import Acquisition, TaskResult | ||
from tasks.tests.utils import simulate_multirec_acquisition | ||
|
||
SCHEMA_DIR = path.join(settings.REPO_ROOT, "schemas") | ||
SCHEMA_FNAME = "scos_transfer_spec_schema.json" | ||
SCHEMA_PATH = path.join(SCHEMA_DIR, SCHEMA_FNAME) | ||
|
||
with open(SCHEMA_PATH, "r") as f: | ||
schema = json.load(f) | ||
|
||
|
||
def test_metadata(user_client, test_scheduler): | ||
entry_name = simulate_multirec_acquisition(user_client) | ||
tr = TaskResult.objects.get(schedule_entry__name=entry_name, task_id=1) | ||
acquisitions = Acquisition.objects.filter(task_result=tr) | ||
for acquisition in acquisitions: | ||
assert sigmf_validate(acquisition.metadata) | ||
# FIXME: update schema so that this passes | ||
# schema_validate(sigmf_metadata, schema) | ||
|
||
|
||
def test_data_file_created(user_client, test_scheduler): | ||
entry_name = simulate_multirec_acquisition(user_client) | ||
tr = TaskResult.objects.get(schedule_entry__name=entry_name, task_id=1) | ||
acquisitions = Acquisition.objects.filter(task_result=tr) | ||
for acquisition in acquisitions: | ||
assert acquisition.data | ||
assert path.exists(acquisition.data.path) | ||
os.remove(acquisition.data.path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: scos-sensor | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.6 | ||
- black=18.9b0 | ||
- Django=2.2.3 | ||
- flake8=3.7.7 | ||
- Pygments=2.4.2 | ||
- Markdown=3.1.1 | ||
- django-extensions=2.1.7 | ||
- django-filter=2.1.0 | ||
- djangorestframework=3.9.4 | ||
- docker-compose=1.24.0 | ||
- gunicorn=19.9.0 | ||
- isort=4.3.20 | ||
- jedi=0.13.3 | ||
- jsonfield=2.0.2 | ||
- jsonschema=3.0.1 | ||
- mkdocs=1.0.4 | ||
- numpy=1.16.4 | ||
- pytest-cov=2.7.1 | ||
- pytest-django=3.5.1 | ||
- pytest-flake8=1.0.4 | ||
- raven=6.10.0 | ||
- requests-futures=0.9.9 | ||
- requests-mock=1.6.0 | ||
- ruamel.yaml=0.15.96 | ||
- six=1.12.0 | ||
- pip | ||
- pip: | ||
- coreapi==2.3.3 | ||
- django-debug-toolbar==1.11 | ||
- drf-yasg==1.15.0 | ||
- -e git+https://github.com/NTIA/SigMF.git@multi-recording-archive#egg=SigMF | ||
- environs==4.2.0 | ||
- flake8-bugbear==19.3.0 | ||
- pre-commit==1.16.1 | ||
- psycopg2-binary==2.8.2 | ||
- seed-isort-config==1.9.1 | ||
- tox==3.12.1 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Generated by Django 2.2.2 on 2019-07-02 21:13 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("schedule", "0001_initial")] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="scheduleentry", | ||
name="action", | ||
field=models.CharField( | ||
choices=[ | ||
( | ||
"acquire_iq_700MHz_ATT_DL", | ||
"acquire_iq_700MHz_ATT_DL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_ATT_UL", | ||
"acquire_iq_700MHz_ATT_UL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_FirstNet_DL", | ||
"acquire_iq_700MHz_FirstNet_DL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_FirstNet_UL", | ||
"acquire_iq_700MHz_FirstNet_UL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_P-SafetyNB_DL", | ||
"acquire_iq_700MHz_P-SafetyNB_DL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_P-SafetyNB_UL", | ||
"acquire_iq_700MHz_P-SafetyNB_UL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_T-Mobile_DL", | ||
"acquire_iq_700MHz_T-Mobile_DL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_T-Mobile_UL", | ||
"acquire_iq_700MHz_T-Mobile_UL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_Verizon_DL", | ||
"acquire_iq_700MHz_Verizon_DL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_iq_700MHz_Verizon_UL", | ||
"acquire_iq_700MHz_Verizon_UL - Capture time-domain IQ samples at 1 frequencies between", | ||
), | ||
( | ||
"acquire_m4s_700MHz_ATT_DL", | ||
"acquire_m4s_700MHz_ATT_DL - Apply m4s detector over 300 1024-pt FFTs at 739.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_ATT_UL", | ||
"acquire_m4s_700MHz_ATT_UL - Apply m4s detector over 300 1024-pt FFTs at 709.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_FirstNet_DL", | ||
"acquire_m4s_700MHz_FirstNet_DL - Apply m4s detector over 300 1024-pt FFTs at 763.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_FirstNet_UL", | ||
"acquire_m4s_700MHz_FirstNet_UL - Apply m4s detector over 300 1024-pt FFTs at 793.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_P-SafetyNB_DL", | ||
"acquire_m4s_700MHz_P-SafetyNB_DL - Apply m4s detector over 300 512-pt FFTs at 772.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_P-SafetyNB_UL", | ||
"acquire_m4s_700MHz_P-SafetyNB_UL - Apply m4s detector over 300 512-pt FFTs at 802.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_T-Mobile_DL", | ||
"acquire_m4s_700MHz_T-Mobile_DL - Apply m4s detector over 300 512-pt FFTs at 731.50 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_T-Mobile_UL", | ||
"acquire_m4s_700MHz_T-Mobile_UL - Apply m4s detector over 300 512-pt FFTs at 700.50 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_Verizon_DL", | ||
"acquire_m4s_700MHz_Verizon_DL - Apply m4s detector over 300 1024-pt FFTs at 751.00 MHz.", | ||
), | ||
( | ||
"acquire_m4s_700MHz_Verizon_UL", | ||
"acquire_m4s_700MHz_Verizon_UL - Apply m4s detector over 300 1024-pt FFTs at 782.00 MHz.", | ||
), | ||
("logger", 'logger - Log the message "running test {name}/{tid}".'), | ||
( | ||
"survey_700MHz_band_iq", | ||
"survey_700MHz_band_iq - Capture time-domain IQ samples at 10 frequencies between", | ||
), | ||
], | ||
help_text="[Required] The name of the action to be scheduled", | ||
max_length=50, | ||
), | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Django 2.2.2 on 2019-07-02 21:13 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("tasks", "0001_initial")] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="acquisition", | ||
name="data", | ||
field=models.FileField(null=True, upload_to="blob/%Y/%m/%d/%H/%M/%S"), | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.