Commit 292f74ab authored by Anchal Gupta's avatar Anchal Gupta
Browse files

Correcteddata concatenation. One frequency value was being repeated at every...

Correcteddata concatenation. One frequency value was being repeated at every crossover. All instances of the use of this function before March 27th, 2020 will have this error. One can simply remove the first instance of the repeated frequency bin in the generated data. It could be that due to round off errors, your data does not show repeated frequency bin but extremely close bins (much more than nearby frequency spacing). The second instance in the repeated frequency bins has more averages, so one should use that.
parent 8d5a091c
......@@ -107,15 +107,15 @@ def modPSD(time, data, detrend = 'linear', average = 'mean'):
PSD = subPSD[:10]
stdPSD1 = substdPSD1[:10]
stdPSD2 = substdPSD2[:10]
Freq = np.concatenate((Freq,subFreq[10:101]))
PSD = np.concatenate((PSD,subPSD[10:101]))
stdPSD1 = np.concatenate((stdPSD1,substdPSD1[10:101]))
stdPSD2 = np.concatenate((stdPSD2,substdPSD2[10:101]))
Freq = np.concatenate((Freq,subFreq[10:100]))
PSD = np.concatenate((PSD,subPSD[10:100]))
stdPSD1 = np.concatenate((stdPSD1,substdPSD1[10:100]))
stdPSD2 = np.concatenate((stdPSD2,substdPSD2[10:100]))
Freq = np.concatenate((Freq,subFreq[101:]))
PSD = np.concatenate((PSD,subPSD[101:]))
stdPSD1 = np.concatenate((stdPSD1,substdPSD1[101:]))
stdPSD2 = np.concatenate((stdPSD2,substdPSD2[101:]))
Freq = np.concatenate((Freq,subFreq[100:]))
PSD = np.concatenate((PSD,subPSD[100:]))
stdPSD1 = np.concatenate((stdPSD1,substdPSD1[100:]))
stdPSD2 = np.concatenate((stdPSD2,substdPSD2[100:]))
if average == 'mean':
return Freq, PSD, stdPSD1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment