Skip to content

Commit

Permalink
Rename Matlab to MATLAB
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Nov 12, 2023
1 parent 84b5675 commit 5f35b1e
Show file tree
Hide file tree
Showing 31 changed files with 97 additions and 97 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ in Python. The library relies on and is designed to be interoperable with NumPy,
Performance is also very important. So, where possible, Numba is used to accelerate computationally-intensive
functions.

Additionally, the library aims to replicate relevant functionality from Matlab's Communications and
Additionally, the library aims to replicate relevant functionality from MATLAB's Communications and
DSP Toolboxes.

We are progressively adding functionality to the library. If there is something you'd like to see included
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in Python. The library relies on and is designed to be interoperable with `NumPy
Performance is also very important. So, where possible, `Numba`_ is used to accelerate computationally-intensive
functions.

Additionally, the library aims to replicate relevant functionality from Matlab's `Communications`_ and
Additionally, the library aims to replicate relevant functionality from MATLAB's `Communications`_ and
`DSP`_ Toolboxes.

We are progressively adding functionality to the library. If there is something you'd like to see included
Expand Down
2 changes: 1 addition & 1 deletion src/sdr/_filter/_polyphase.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def multirate_taps(
# Compute Kaiser window
# beta = scipy.signal.windows.kaiser_beta(A_stop)
if A_stop >= 50:
beta = 0.1102 * (A_stop - 8.71) # TODO: Matlab uses 8.71 and SciPy uses 8.7
beta = 0.1102 * (A_stop - 8.71) # TODO: MATLAB uses 8.71 and SciPy uses 8.7
elif A_stop > 21:
beta = 0.5842 * (A_stop - 21) ** 0.4 + 0.07886 * (A_stop - 21)
else:
Expand Down
6 changes: 3 additions & 3 deletions tests/conversions/test_ebn0_to_esn0.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_1():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'ebno', 'esno', 'BitsPerSymbol', 2, 'CodingRate', 1/3)'
"""
ebn0 = np.arange(0, 11)
Expand All @@ -30,7 +30,7 @@ def test_1():

def test_2():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'ebno', 'esno', 'BitsPerSymbol', 3, 'CodingRate', 1/2)'
"""
ebn0 = np.arange(0, 11)
Expand All @@ -55,7 +55,7 @@ def test_2():

def test_3():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'ebno', 'esno', 'BitsPerSymbol', 4, 'CodingRate', 2/3)'
"""
ebn0 = np.arange(0, 11)
Expand Down
6 changes: 3 additions & 3 deletions tests/conversions/test_ebn0_to_snr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_1():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'ebno', 'snr', 'BitsPerSymbol', 2, 'CodingRate', 1/3, 'SamplesPerSymbol', 1)'
"""
ebn0 = np.arange(0, 11)
Expand All @@ -30,7 +30,7 @@ def test_1():

def test_2():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'ebno', 'snr', 'BitsPerSymbol', 3, 'CodingRate', 1/2, 'SamplesPerSymbol', 2)'
"""
ebn0 = np.arange(0, 11)
Expand All @@ -55,7 +55,7 @@ def test_2():

def test_3():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'ebno', 'snr', 'BitsPerSymbol', 4, 'CodingRate', 2/3, 'SamplesPerSymbol', 4)'
"""
ebn0 = np.arange(0, 11)
Expand Down
6 changes: 3 additions & 3 deletions tests/conversions/test_esn0_to_ebn0.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_1():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'esno', 'ebno', 'BitsPerSymbol', 2, 'CodingRate', 1/3)'
"""
esn0 = np.arange(0, 11)
Expand All @@ -30,7 +30,7 @@ def test_1():

def test_2():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'esno', 'ebno', 'BitsPerSymbol', 3, 'CodingRate', 1/2)'
"""
esn0 = np.arange(0, 11)
Expand All @@ -55,7 +55,7 @@ def test_2():

def test_3():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'esno', 'ebno', 'BitsPerSymbol', 4, 'CodingRate', 2/3)'
"""
esn0 = np.arange(0, 11)
Expand Down
6 changes: 3 additions & 3 deletions tests/conversions/test_esn0_to_snr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_1():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'esno', 'snr', 'SamplesPerSymbol', 1)'
"""
esn0 = np.arange(0, 11)
Expand All @@ -30,7 +30,7 @@ def test_1():

def test_2():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'esno', 'snr', 'SamplesPerSymbol', 2)'
"""
esn0 = np.arange(0, 11)
Expand All @@ -55,7 +55,7 @@ def test_2():

def test_3():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'esno', 'snr', 'SamplesPerSymbol', 4)'
"""
esn0 = np.arange(0, 11)
Expand Down
6 changes: 3 additions & 3 deletions tests/conversions/test_snr_to_ebn0.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_1():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'snr', 'ebno', 'BitsPerSymbol', 2, 'CodingRate', 1/3, 'SamplesPerSymbol', 1)'
"""
snr = np.arange(0, 11)
Expand All @@ -30,7 +30,7 @@ def test_1():

def test_2():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'snr', 'ebno', 'BitsPerSymbol', 3, 'CodingRate', 1/2, 'SamplesPerSymbol', 2)'
"""
snr = np.arange(0, 11)
Expand All @@ -55,7 +55,7 @@ def test_2():

def test_3():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'snr', 'ebno', 'BitsPerSymbol', 4, 'CodingRate', 2/3, 'SamplesPerSymbol', 4)'
"""
snr = np.arange(0, 11)
Expand Down
6 changes: 3 additions & 3 deletions tests/conversions/test_snr_to_esn0.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_1():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'snr', 'esno', 'SamplesPerSymbol', 1)'
"""
snr = np.arange(0, 11)
Expand All @@ -30,7 +30,7 @@ def test_1():

def test_2():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'snr', 'esno', 'SamplesPerSymbol', 2)'
"""
snr = np.arange(0, 11)
Expand All @@ -55,7 +55,7 @@ def test_2():

def test_3():
"""
Matlab:
MATLAB:
>> convertSNR(0:10, 'snr', 'esno', 'SamplesPerSymbol', 4)'
"""
snr = np.arange(0, 11)
Expand Down
8 changes: 4 additions & 4 deletions tests/dsp/test_decimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_streaming_match_full():

def test_3_kaiser():
"""
Matlab:
MATLAB:
>> x = cos(pi/7.123456*(0:359)');
>> fir = dsp.FIRDecimator(3);
>> y = fir(x);
Expand Down Expand Up @@ -212,7 +212,7 @@ def test_3_kaiser():

def test_4_kaiser():
"""
Matlab:
MATLAB:
>> x = cos(pi/7.123456*(0:359)');
>> fir = dsp.FIRDecimator(4);
>> y = fir(x);
Expand Down Expand Up @@ -322,7 +322,7 @@ def test_4_kaiser():

def test_5_kaiser():
"""
Matlab:
MATLAB:
>> x = cos(pi/7.123456*(0:359)');
>> fir = dsp.FIRDecimator(5);
>> y = fir(x);
Expand Down Expand Up @@ -414,7 +414,7 @@ def test_5_kaiser():

def test_6_kaiser():
"""
Matlab:
MATLAB:
>> x = cos(pi/7.123456*(0:359)');
>> fir = dsp.FIRDecimator(6);
>> y = fir(x);
Expand Down
2 changes: 1 addition & 1 deletion tests/dsp/test_downsample.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_exceptions():

def test_1():
"""
Matlab:
MATLAB:
>> x = 0:39;
>> downsample(x, 4)'
"""
Expand Down
12 changes: 6 additions & 6 deletions tests/dsp/test_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_streaming_match_full():

def test_3_kaiser():
"""
Matlab:
MATLAB:
>> x = cos(pi/4*(0:19)');
>> fir = dsp.Interpolator(3);
>> y = fir(x);
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_3_kaiser():

def test_3_linear():
"""
Matlab:
MATLAB:
>> x = cos(pi/4*(0:19)');
>> fir = dsp.Interpolator(3, 'Linear');
>> y = fir(x);
Expand Down Expand Up @@ -249,7 +249,7 @@ def test_3_linear():

def test_3_zoh():
"""
Matlab:
MATLAB:
>> x = cos(pi/4*(0:19)');
>> fir = dsp.Interpolator(3, 'ZOH');
>> y = fir(x);
Expand Down Expand Up @@ -329,7 +329,7 @@ def test_3_zoh():

def test_srrc_0p5_6():
"""
Matlab:
MATLAB:
>> sps = 4;
>> h = rcosdesign(0.5, 6, sps);
>> s = randi([0 3], 10, 1);
Expand Down Expand Up @@ -434,7 +434,7 @@ def test_srrc_0p5_6():

def test_srrc_0p9_4():
"""
Matlab:
MATLAB:
>> sps = 5;
>> h = rcosdesign(0.9, 4, sps);
>> s = randi([0 3], 10, 1);
Expand Down Expand Up @@ -545,7 +545,7 @@ def test_srrc_0p9_4():

def test_srrc_0p1_7():
"""
Matlab:
MATLAB:
>> sps = 6;
>> h = rcosdesign(0.1, 7, sps);
>> s = randi([0 3], 10, 1);
Expand Down
16 changes: 8 additions & 8 deletions tests/dsp/test_multirate_taps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_3_1():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(3, 1))
"""
h = sdr.multirate_taps(3, 1)
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_3_1():

def test_1_3():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(1, 3))
"""
h = sdr.multirate_taps(1, 3)
Expand Down Expand Up @@ -175,7 +175,7 @@ def test_1_3():

def test_3_2():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(3, 2))
"""
h = sdr.multirate_taps(3, 2)
Expand Down Expand Up @@ -260,7 +260,7 @@ def test_3_2():

def test_2_3():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(2, 3))
"""
h = sdr.multirate_taps(2, 3)
Expand Down Expand Up @@ -321,7 +321,7 @@ def test_2_3():

def test_3_2_20():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(3, 2, 20))
"""
h = sdr.multirate_taps(3, 2, half_length=20)
Expand Down Expand Up @@ -454,7 +454,7 @@ def test_3_2_20():

def test_2_3_20():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(2, 3, 20))
"""
h = sdr.multirate_taps(2, 3, half_length=20)
Expand Down Expand Up @@ -548,7 +548,7 @@ def test_2_3_20():

def test_3_2_15_120():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(3, 2, 15, 120))
"""
h = sdr.multirate_taps(3, 2, half_length=15, A_stop=120)
Expand Down Expand Up @@ -651,7 +651,7 @@ def test_3_2_15_120():

def test_2_3_15_120():
"""
Matlab:
MATLAB:
>> transpose(designMultirateFIR(2, 3, 15, 120))
"""
h = sdr.multirate_taps(2, 3, half_length=15, A_stop=120)
Expand Down
Loading

0 comments on commit 5f35b1e

Please sign in to comment.