Skip to content

Commit

Permalink
tests/generate: derive filename from python module instead of hardcod…
Browse files Browse the repository at this point in the history
…ed path
  • Loading branch information
vsergeev committed Dec 13, 2019
1 parent 1f999d5 commit 1f8283b
Show file tree
Hide file tree
Showing 65 changed files with 82 additions and 74 deletions.
2 changes: 1 addition & 1 deletion tests/generate/blocks/protocol/ax25framer_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def bytes_to_stuffed_bits(data):
x = numpy.hstack([random_bit(20), bytes_to_stuffed_bits(frame2_data), bytes_to_stuffed_bits(frame1_data), bytes_to_stuffed_bits(frame2_data), random_bit(20)])
vectors.append(TestVector([], [x], test_vector_wrapper([frame2_object, frame1_object, frame2_object]), "Three back to back valid frames"))

return BlockSpec("AX25FramerBlock", "tests/blocks/protocol/ax25framer_spec.lua", vectors, 1e-6)
return BlockSpec("AX25FramerBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/protocol/pocsagdecoder_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def test_vector_wrapper(messages):
vectors.append(TestVector(['"both"'], [frame1], test_vector_wrapper([message1_both]), "Alphanumeric Message"))
vectors.append(TestVector(['"numeric"'], [frame2], test_vector_wrapper([message2]), "Numeric Message"))

return BlockSpec("POCSAGDecoderBlock", "tests/blocks/protocol/pocsagdecoder_spec.lua", vectors, 1e-6)
return BlockSpec("POCSAGDecoderBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/protocol/pocsagframer_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def words_to_bits(words):
frame1_objects_cutoff = ["{0x1f92e2, 0, {0xa87e6, 0x7af04}}", "{0x121b14, 1, {0xd79d6, 0xb348e, 0xfbc8c, 0x2bd98}}", "{0xfcea9, 2, {0xa7ff9}}", "{0x15e21a, 3, {0xf19f9}}", "{0xdd68b, 0, {}}", "{0xb78be, 3, {0x461b5, 0xeae54, 0xe3d3f}}"]
vectors.append(TestVector([], [x], test_vector_wrapper(frame1_objects_cutoff), "Frame with an uncorrectable bit error"))

return BlockSpec("POCSAGFramerBlock", "tests/blocks/protocol/pocsagframer_spec.lua", vectors, 1e-6)
return BlockSpec("POCSAGFramerBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/protocol/rdsdecoder_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ def test_vector_wrapper(packets):
vectors.append(TestVector([], [frame3], test_vector_wrapper([packet3]), "Datetime Frame"))
vectors.append(TestVector([], [frame4], test_vector_wrapper([packet4]), "Other Frame"))

return BlockSpec("RDSDecoderBlock", "tests/blocks/protocol/rdsdecoder_spec.lua", vectors, 1e-6)
return BlockSpec("RDSDecoderBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/protocol/rdsframer_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def test_vector_wrapper(frames):
x = numpy.hstack([frame1_bits, frame2_bits, frame3_bits])
vectors.append(TestVector([], [x], test_vector_wrapper([frame1_object, frame2_object, frame3_object]), "Three contiguous frames"))

return BlockSpec("RDSFramerBlock", "tests/blocks/protocol/rdsframer_spec.lua", vectors, 1e-6)
return BlockSpec("RDSFramerBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/protocol/varicodedecoder_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def generate():
vectors.append(TestVector([], [message2_bits], [message2], "Valid message with extra leading 0 bit"))
vectors.append(TestVector([], [message3_bits], [message3], "Empty message"))

return BlockSpec("VaricodeDecoderBlock", "tests/blocks/protocol/varicodedecoder_spec.lua", vectors, 1e-6)
return BlockSpec("VaricodeDecoderBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/absolutevalue_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_float32(256)
vectors.append(TestVector([], [x], [numpy.abs(x)], "256 Float32 input, 256 Float32 output"))

return BlockSpec("AbsoluteValueBlock", "tests/blocks/signal/absolutevalue_spec.lua", vectors, 1e-6)
return BlockSpec("AbsoluteValueBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/add_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ def generate():
x, y = random_float32(256), random_float32(256)
vectors.append(TestVector([], [x, y], [x + y], "2 256 Float32 inputs, 256 Float32 output"))

return BlockSpec("AddBlock", "tests/blocks/signal/add_spec.lua", vectors, 1e-6)
return BlockSpec("AddBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/addconstant_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def process(constant, x):
# Float32 vector plus Float32 constant
vectors.append(TestVector([numpy.float32(3.5)], [x], process(numpy.float32(3.5), x), "Float32 constant, 256 Float32 inputs, 256 Float32 output"))

return BlockSpec("AddConstantBlock", "tests/blocks/signal/addconstant_spec.lua", vectors, 1e-6)
return BlockSpec("AddConstantBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/agc_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def agc(target, gain_tau, power_tau, x):
vectors.append(TestVector(['"fast"', -35, -75], [x], agc(-35, 0.1, 1.0, x), "-60 dBFS complex exponential input, -35 dBFS target, fast agc"))
vectors.append(TestVector(['"slow"', -35, -75], [x], agc(-35, 3.0, 1.0, x), "-60 dBFS complex exponential input, -35 dBFS target, slow agc"))

return BlockSpec("AGCBlock", "tests/blocks/signal/agc_spec.lua", vectors, 1e-6)
return BlockSpec("AGCBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/bandpassfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ def process(num_taps, cutoffs, nyquist, window, x):
vectors.append(TestVector([129, [0.1, 0.3], 3.0, '"bartlett"'], [x], process(129, [0.1, 0.3], 3.0, "bartlett", x), "129 taps, {0.1, 0.3} cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([129, [0.4, 0.6], 3.0, '"bartlett"'], [x], process(129, [0.4, 0.6], 3.0, "bartlett", x), "129 taps, {0.4, 0.6} cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 ComplexFloat32 output"))

return BlockSpec("BandpassFilterBlock", "tests/blocks/signal/bandpassfilter_spec.lua", vectors, 1e-6)
return BlockSpec("BandpassFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/bandstopfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def process(num_taps, cutoffs, nyquist, window, x):
vectors.append(TestVector([129, [0.1, 0.3], 3.0, '"bartlett"'], [x], process(129, [0.1, 0.3], 3.0, "bartlett", x), "129 taps, {0.1, 0.3} cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([129, [0.4, 0.6], 3.0, '"bartlett"'], [x], process(129, [0.4, 0.6], 3.0, "bartlett", x), "129 taps, {0.4, 0.6} cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 ComplexFloat32 output"))

return BlockSpec("BandstopFilterBlock", "tests/blocks/signal/bandstopfilter_spec.lua", vectors, 1e-6)
return BlockSpec("BandstopFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/binaryphasecorrector_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def process(num_samples, sample_interval, x):
vectors.append(TestVector([64, 7], [x], process(64, 7, x), "64 sample average, 7 sample interval, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([100, 32], [x], process(100, 32, x), "100 sample average, 32 sample interval, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))

return BlockSpec("BinaryPhaseCorrectorBlock", "tests/blocks/signal/binaryphasecorrector_spec.lua", vectors, 1e-6)
return BlockSpec("BinaryPhaseCorrectorBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complexbandpassfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def process(num_taps, cutoffs, nyquist, window, x):
vectors.append(TestVector([129, [-0.1, -0.3], 3.0, '"bartlett"'], [x], process(129, [-0.1, -0.3], 3.0, "bartlett", x), "129 taps, {-0.1, -0.3} cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([129, [-0.2, 0.2], 3.0, '"bartlett"'], [x], process(129, [-0.2, 0.2], 3.0, "bartlett", x), "129 taps, {-0.2, 0.2} cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))

return BlockSpec("ComplexBandpassFilterBlock", "tests/blocks/signal/complexbandpassfilter_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexBandpassFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complexbandstopfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ def process(num_taps, cutoffs, nyquist, window, x):
vectors.append(TestVector([129, [-0.1, -0.3], 3.0, '"bartlett"'], [x], process(129, [-0.1, -0.3], 3.0, "bartlett", x), "129 taps, {-0.1, -0.3} cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([129, [-0.2, 0.2], 3.0, '"bartlett"'], [x], process(129, [-0.2, 0.2], 3.0, "bartlett", x), "129 taps, {-0.2, 0.2} cutoff, 3.0 nyquist, bartlett window, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))

return BlockSpec("ComplexBandstopFilterBlock", "tests/blocks/signal/complexbandstopfilter_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexBandstopFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complexconjugate_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_complex64(256)
vectors.append(TestVector([], [x], [numpy.conj(x)], "256 ComplexFloat32 input, 256 ComplexFloat32 output"))

return BlockSpec("ComplexConjugateBlock", "tests/blocks/signal/complexconjugate_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexConjugateBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complexmagnitude_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_complex64(256)
vectors.append(TestVector([], [x], [numpy.abs(x).astype(numpy.float32)], "256 ComplexFloat32 input, 256 Float32 output"))

return BlockSpec("ComplexMagnitudeBlock", "tests/blocks/signal/complexmagnitude_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexMagnitudeBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complexphase_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_complex64(256)
vectors.append(TestVector([], [x], [numpy.angle(x).astype(numpy.float32)], "256 ComplexFloat32 input, 256 Float32 output"))

return BlockSpec("ComplexPhaseBlock", "tests/blocks/signal/complexphase_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexPhaseBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complextofloat_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_complex64(256)
vectors.append(TestVector([], [x], [numpy.real(x), numpy.imag(x)], "256 ComplexFloat32 input, 2 256 Float32 outputs"))

return BlockSpec("ComplexToFloatBlock", "tests/blocks/signal/complextofloat_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexToFloatBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complextoimag_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_complex64(256)
vectors.append(TestVector([], [x], [numpy.imag(x)], "256 ComplexFloat32 input, 256 Float32 output"))

return BlockSpec("ComplexToImagBlock", "tests/blocks/signal/complextoimag_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexToImagBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/complextoreal_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_complex64(256)
vectors.append(TestVector([], [x], [numpy.real(x)], "256 ComplexFloat32 input, 256 Float32 output"))

return BlockSpec("ComplexToRealBlock", "tests/blocks/signal/complextoreal_spec.lua", vectors, 1e-6)
return BlockSpec("ComplexToRealBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/deinterleave_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def generate():
vectors.append(TestVector([2], [x], [x[0::2], x[1::2]], "Deinterleave 2 channels, ComplexFloat32 input"))
vectors.append(TestVector([3], [x], [x[0::3], x[1::3], x[2::3]], "Deinterleave 3 channels, ComplexFloat32 input"))

return BlockSpec("DeinterleaveBlock", "tests/blocks/signal/deinterleave_spec.lua", vectors, 1e-6)
return BlockSpec("DeinterleaveBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/delay_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def process(n, x):
vectors.append(TestVector([100], [x], process(100, x), "100 Sample Delay, 256 Float32 input, 356 Float32 output"))
vectors.append(TestVector([307], [x], process(307, x), "307 Sample Delay, 256 Float32 input, 563 Float32 output"))

return BlockSpec("DelayBlock", "tests/blocks/signal/delay_spec.lua", vectors, 1e-6)
return BlockSpec("DelayBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/differentialdecoder_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ def process(invert, x):
vectors.append(TestVector([False], [x], process(False, x), "Non-inverted output, 256 Bit input, 256 Bit output"))
vectors.append(TestVector([True], [x], process(True, x), "Inverted output, 256 Bit input, 256 Bit output"))

return BlockSpec("DifferentialDecoderBlock", "tests/blocks/signal/differentialdecoder_spec.lua", vectors, 1e-6)
return BlockSpec("DifferentialDecoderBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/downsampler_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def process(factor, x):
vectors.append(TestVector([256], [x], process(256, x), "256 Factor, 256 Float32 input, 1 Float32 output"))
vectors.append(TestVector([257], [x], process(257, x), "256 Factor, 256 Float32 input, 0 Float32 output"))

return BlockSpec("DownsamplerBlock", "tests/blocks/signal/downsampler_spec.lua", vectors, 1e-6)
return BlockSpec("DownsamplerBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/firfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ def normalize(v):
vectors.append(TestVector([taps, False], [x], process(taps, x), "Dot product, 64 ComplexFloat32 tap, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([taps, True], [x], [process(taps, x)[0][0:225]], "FFT, 64 ComplexFloat32 tap, 256 ComplexFloat32 input, 225 ComplexFloat32 output"))

return BlockSpec("FIRFilterBlock", "tests/blocks/signal/firfilter_spec.lua", vectors, 1e-6)
return BlockSpec("FIRFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/floattocomplex_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ def process(real, imag):
real, imag = random_float32(256), random_float32(256)
vectors.append(TestVector([], [real, imag], process(real, imag), "2 256 Float32 inputs, 256 ComplexFloat32 output"))

return BlockSpec("FloatToComplexBlock", "tests/blocks/signal/floattocomplex_spec.lua", vectors, 1e-6)
return BlockSpec("FloatToComplexBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/fmdeemphasisfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def process(tau, x):
vectors.append(TestVector([5e-6], [x], process(5e-6, x), "5e-6 tau, 256 Float32 input, 256 Float32 output"))
vectors.append(TestVector([1e-6], [x], process(1e-6, x), "1e-6 tau, 256 Float32 input, 256 Float32 output"))

return BlockSpec("FMDeemphasisFilterBlock", "tests/blocks/signal/fmdeemphasisfilter_spec.lua", vectors, 1e-6)
return BlockSpec("FMDeemphasisFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/fmpreemphasisfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def process(tau, x):
vectors.append(TestVector([5e-6], [x], process(5e-6, x), "5e-6 tau, 256 Float32 input, 256 Float32 output"))
vectors.append(TestVector([1e-6], [x], process(1e-6, x), "1e-6 tau, 256 Float32 input, 256 Float32 output"))

return BlockSpec("FMPreemphasisFilterBlock", "tests/blocks/signal/fmpreemphasisfilter_spec.lua", vectors, 1e-6)
return BlockSpec("FMPreemphasisFilterBlock", vectors, 1e-6)
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def process(k, x):
vectors.append(TestVector([5.0], [x], process(5.0, x), "5.0 Modulation Index, 256 ComplexFloat32 input, 256 Float32 output"))
vectors.append(TestVector([10.0], [x], process(10.0, x), "10.0 Modulation Index, 256 ComplexFloat32 input, 256 Float32 output"))

return BlockSpec("FrequencyDiscriminatorBlock", "tests/blocks/signal/frequencydiscriminator_spec.lua", vectors, 1e-6)
return BlockSpec("FrequencyDiscriminatorBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/frequencytranslator_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def process(offset, x):
vectors.append(TestVector([0.7], [x], process(0.7, x), "0.7 offset, 256 ComplexFloat32 input, 256 ComplexFloat32 output"))

# FIXME why does this need 2e-5 epsilon?
return BlockSpec("FrequencyTranslatorBlock", "tests/blocks/signal/frequencytranslator_spec.lua", vectors, 2e-5)
return BlockSpec("FrequencyTranslatorBlock", vectors, 2e-5)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/highpassfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def process(num_taps, cutoff, nyquist, window, x):
vectors.append(TestVector([129, 0.5, 3.0, '"bartlett"'], [x], process(129, 0.5, 3.0, "bartlett", x), "128 taps, 0.5 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output"))
vectors.append(TestVector([129, 0.7, 3.0, '"bartlett"'], [x], process(129, 0.7, 3.0, "bartlett", x), "128 taps, 0.7 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output"))

return BlockSpec("HighpassFilterBlock", "tests/blocks/signal/highpassfilter_spec.lua", vectors, 1e-6)
return BlockSpec("HighpassFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/hilberttransform_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def process(num_taps, x):
vectors.append(TestVector([129], [x], process(129, x), "129 taps, 256 Float32 input, 256 ComplexFloat32 output"))
vectors.append(TestVector([257], [x], process(257, x), "257 taps, 256 Float32 input, 256 ComplexFloat32 output"))

return BlockSpec("HilbertTransformBlock", "tests/blocks/signal/hilberttransform_spec.lua", vectors, 1e-6)
return BlockSpec("HilbertTransformBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/iirfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def process(b_taps, a_taps, x):
b_taps, a_taps = gentaps(10)
vectors.append(TestVector([b_taps, a_taps], [x], process(b_taps, a_taps, x), "10 Float32 b taps, 10 Float32 a taps, 256 Float32 input, 256 Float32 output"))

return BlockSpec("IIRFilterBlock", "tests/blocks/signal/iirfilter_spec.lua", vectors, 1e-6)
return BlockSpec("IIRFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/interleave_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def generate():
vectors.append(TestVector([2], [x, y], [numpy.ravel(numpy.column_stack((x, y)))], "Interleave 2 channels, ComplexFloat32 input"))
vectors.append(TestVector([3], [x, y, z], [numpy.ravel(numpy.column_stack((x, y, z)))], "Interleave 3 channels, ComplexFloat32 input"))

return BlockSpec("InterleaveBlock", "tests/blocks/signal/interleave_spec.lua", vectors, 1e-6)
return BlockSpec("InterleaveBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/lowpassfilter_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def process(num_taps, cutoff, nyquist, window, x):
vectors.append(TestVector([128, 0.5, 3.0, '"bartlett"'], [x], process(128, 0.5, 3.0, "bartlett", x), "128 taps, 0.5 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output"))
vectors.append(TestVector([128, 0.7, 3.0, '"bartlett"'], [x], process(128, 0.7, 3.0, "bartlett", x), "128 taps, 0.7 cutoff, 3.0 nyquist, bartlett window, 256 Float32 input, 256 Float32 output"))

return BlockSpec("LowpassFilterBlock", "tests/blocks/signal/lowpassfilter_spec.lua", vectors, 1e-6)
return BlockSpec("LowpassFilterBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/manchesterdecoder_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ def manchester_encode(x):
vectors.append(TestVector([False], [slipped_x], [x], "Non-inverted output with invalid first bit, 513 Bit input, 256 Bit output"))
vectors.append(TestVector([True], [slipped_x], [numpy.invert(x)], "Inverted output with invalid first bit, 513 Bit input, 256 Bit output"))

return BlockSpec("ManchesterDecoderBlock", "tests/blocks/signal/manchesterdecoder_spec.lua", vectors, 1e-6)
return BlockSpec("ManchesterDecoderBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/multiply_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ def generate():
x, y = random_float32(256), random_float32(256)
vectors.append(TestVector([], [x, y], [x * y], "2 256 Float32 inputs, 256 Float32 output"))

return BlockSpec("MultiplyBlock", "tests/blocks/signal/multiply_spec.lua", vectors, 1e-6)
return BlockSpec("MultiplyBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/multiplyconjugate_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x, y = random_complex64(256), random_complex64(256)
vectors.append(TestVector([], [x, y], [x * numpy.conj(y)], "2 256 ComplexFloat32 inputs, 256 ComplexFloat32 output"))

return BlockSpec("MultiplyConjugateBlock", "tests/blocks/signal/multiplyconjugate_spec.lua", vectors, 1e-6)
return BlockSpec("MultiplyConjugateBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/multiplyconstant_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def process(constant, x):
# Float32 vector times Float32 constant
vectors.append(TestVector([numpy.float32(3.5)], [x], process(numpy.float32(3.5), x), "Float32 constant, 256 Float32 inputs, 256 Float32 output"))

return BlockSpec("MultiplyConstantBlock", "tests/blocks/signal/multiplyconstant_spec.lua", vectors, 1e-6)
return BlockSpec("MultiplyConstantBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/nop_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ def generate():
y = random_bit(256)
vectors.append(TestVector([], [y], [y], "256 Bit input, 256 Bit output"))

return BlockSpec("NopBlock", "tests/blocks/signal/nop_spec.lua", vectors, 1e-6)
return BlockSpec("NopBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/powersquelch_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def generate():
vectors.append(TestVector([-30], [x], [numpy.array([0.0]*len(x), dtype=numpy.complex64)], "-40 dBFS complex exponential input, -30 dBFS squelch"))
vectors.append(TestVector([-50], [x], [x], "-40 dBFS complex exponential input, -50 dBFS squelch"))

return BlockSpec("PowerSquelchBlock", "tests/blocks/signal/powersquelch_spec.lua", vectors, 1e-6)
return BlockSpec("PowerSquelchBlock", vectors, 1e-6)
2 changes: 1 addition & 1 deletion tests/generate/blocks/signal/realtocomplex_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def generate():
x = random_float32(256)
vectors.append(TestVector([], [x], [x.astype(numpy.complex64)], "256 Float32 input, 256 ComplexFloat32 output"))

return BlockSpec("RealToComplexBlock", "tests/blocks/signal/realtocomplex_spec.lua", vectors, 1e-6)
return BlockSpec("RealToComplexBlock", vectors, 1e-6)
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def process(num_taps, beta, symbol_rate, x):
vectors.append(TestVector([101, 0.7, 1e-3], [x], process(101, 0.7, 1e-3, x), "101 taps, 0.7 beta, 1e-3 symbol rate, 256 Float32 input, 256 Float32 output"))
vectors.append(TestVector([101, 1.0, 5e-3], [x], process(101, 1.0, 5e-3, x), "101 taps, 1.0 beta, 5e-3 symbol rate, 256 Float32 input, 256 Float32 output"))

return BlockSpec("RootRaisedCosineFilterBlock", "tests/blocks/signal/rootraisedcosinefilter_spec.lua", vectors, 1e-6)
return BlockSpec("RootRaisedCosineFilterBlock", vectors, 1e-6)
Loading

0 comments on commit 1f8283b

Please sign in to comment.