Skip to content

Commit

Permalink
Refactor acquire single freq fft action based info from new tdomain a…
Browse files Browse the repository at this point in the history
…cquire
  • Loading branch information
djanderson committed Nov 9, 2018
1 parent 1df891a commit 39113ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/actions/acquire_single_freq_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 39113ee

Please sign in to comment.