def test_metadata_single_acquisition(user_client, test_scheduler):
    entry_name = simulate_frequency_fft_acquisitions(user_client)
    tr = TaskResult.objects.get(schedule_entry__name=entry_name, task_id=1)
    acquisition = Acquisition.objects.get(task_result=tr)
    assert sigmf_validate(acquisition.metadata)
    check_metadata_fields(acquisition, entry_name,
                          SINGLE_FREQUENCY_FFT_ACQUISITION)
def test_metadata_multiple_acquisition(user_client, test_scheduler):
    entry_name = simulate_frequency_fft_acquisitions(user_client, n=2)
    task_results = TaskResult.objects.filter(schedule_entry__name=entry_name)
    for task_result in task_results:
        acquisition = Acquisition.objects.get(task_result=task_result)
        assert sigmf_validate(acquisition.metadata)
        check_metadata_fields(acquisition, entry_name,
                              MULTIPLE_FREQUENCY_FFT_ACQUISITIONS)
Пример #3
0
def test_metadata_timedomain_iq_single_acquisition(admin_client, test_scheduler):
    entry_name = simulate_timedomain_iq_acquisition(admin_client)
    tr = TaskResult.objects.get(schedule_entry__name=entry_name, task_id=1)
    acquisition = Acquisition.objects.get(task_result=tr)
    check_metadata_fields(
        acquisition,
        entry_name,
        SINGLE_TIMEDOMAIN_IQ_ACQUISITION,
        is_multirecording=False,
    )
def test_metadata_multirecording_acquisition(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:
        check_metadata_fields(
            acquisition,
            entry_name,
            SINGLE_TIMEDOMAIN_IQ_MULTI_RECORDING_ACQUISITION,
            is_multirecording=True,
        )