Skip to content

Commit

Permalink
Merge pull request MTG#146 from dhunstack/emptyListBug
Browse files Browse the repository at this point in the history
[Fix] Fixes Issue MTG#145 on MTG/sms-tools
  • Loading branch information
xserra authored Nov 15, 2023
2 parents b6ad198 + a167549 commit 941dc4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/models/harmonicModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def harmonicDetection(pfreq, pmag, pphase, f0, nH, hfreqp, fs, harmDevSlope=0.01
hphase = np.zeros(nH) # initialize harmonic phases
hf = f0 * np.arange(1, nH + 1) # initialize harmonic frequencies
hi = 0 # initialize harmonic index
if hfreqp == []: # if no incomming harmonic tracks initialize to harmonic series
if len(hfreqp) == 0: # if no incomming harmonic tracks initialize to harmonic series
hfreqp = hf
while (f0 > 0) and (hi < nH) and (hf[hi] < fs / 2): # find harmonic peaks
pei = np.argmin(abs(pfreq - hf[hi])) # closest peak
Expand Down

0 comments on commit 941dc4f

Please sign in to comment.