Commit 869469f3 authored by Mijian Xu's avatar Mijian Xu 😷

remove nan from power

parent 53dc4284
Pipeline #1156 failed with stage
in 50 seconds
......@@ -228,7 +228,6 @@ Syntax: powspec [w1, w2]
print('w1 should be less than w2'), w2) = None
print('Only two arguments can be accepted')
......@@ -191,6 +191,8 @@ class mgmat(object):
power = np.zeros_like(radfreq)
for i, frq in enumerate(radfreq):
power[i] = np.mean(sf_amp[np.where(omega == frq)])
power = power[np.where(np.logical_not(np.isnan(power)))]
radfreq = radfreq[np.where(np.logical_not(np.isnan(power)))]
self.power = np.vstack((radfreq, np.log(power)))
def power_fit(self, freqmin, freqmax):
Markdown is supported
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