From 39113ee4903ccad49423afe787330dfcf88c431f Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Thu, 8 Nov 2018 19:52:21 -0700 Subject: [PATCH] Refactor acquire single freq fft action based info from new tdomain acquire --- src/actions/acquire_single_freq_fft.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/actions/acquire_single_freq_fft.py b/src/actions/acquire_single_freq_fft.py index 9821d670..be353061 100644 --- a/src/actions/acquire_single_freq_fft.py +++ b/src/actions/acquire_single_freq_fft.py @@ -110,7 +110,7 @@ class M4sDetector(Enum): sample = 5 -# FIXME: this needs to be defined globally somewhere +# The sigmf-ns-scos version targeted by this action SCOS_TRANSFER_SPEC_VER = '0.1' @@ -159,6 +159,7 @@ def __init__(self, name, frequency, gain, sample_rate, fft_size, nffts): self.enbw = None def __call__(self, schedule_entry_name, task_id): + """This is the entrypoint function called by the scheduler.""" from schedule.models import ScheduleEntry # raises ScheduleEntry.DoesNotExist if no matching schedule entry @@ -223,7 +224,7 @@ def build_sigmf_md(self): logger.debug("Building SigMF metadata file") sigmf_md = SigMFFile() - sigmf_md.set_global_field("core:datatype", "rf32_le") + sigmf_md.set_global_info(GLOBAL_INFO) sigmf_md.set_global_field("core:sample_rate", self.sample_rate) sigmf_md.set_global_field("core:description", self.description) @@ -314,7 +315,7 @@ def archive(self, m4s_data, sigmf_md, parent_entry, task_id): @property def description(self): defs = { - 'name': 'acquire700c', + 'name': self.name, 'frequency': self.frequency / 1e6, 'sample_rate': self.sample_rate / 1e6, 'fft_size': self.fft_size,