Skip to content

Commit 5b9f022

Browse files
committed
Update Spectrum.cs
1 parent b7b15a1 commit 5b9f022

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/NSD/Data types/Spectrum.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ public void TrimDC()
3737
// not to use the first few frequency bins.The first frequency bin that yields unbiased spectral estimates
3838
// depends on the window function used.The bin is given by the effective half-width of the window
3939
// transfer function.
40-
int trimmedStartEndBins = 0;
41-
public void TrimStartEnd(int bins)
40+
int trimmedStartBins = 0;
41+
public void TrimStart(int bins)
4242
{
43-
if (trimmedStartEndBins != 0)
44-
throw new Exception($"TrimStartEnd already called with bins: {trimmedStartEndBins}");
45-
trimmedStartEndBins = bins;
46-
Frequencies = Frequencies.Slice(bins, Frequencies.Length - (bins * 2));
47-
Values = Values.Slice(bins, Values.Length - (bins * 2));
43+
if (trimmedStartBins != 0)
44+
throw new Exception($"TrimStart already called with bins: {trimmedStartBins}");
45+
trimmedStartBins = bins;
46+
Frequencies = Frequencies.Slice(bins, Frequencies.Length - bins);
47+
Values = Values.Slice(bins, Values.Length - bins);
4848
}
4949
}

0 commit comments

Comments
 (0)