File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
- import pandas as pd
3
2
import numpy as np
4
3
from goofi .data import Data , DataType
5
4
from goofi .node import Node
@@ -28,6 +27,8 @@ def setup(self):
28
27
self .load_csv ()
29
28
30
29
def load_csv (self ):
30
+ import pandas as pd
31
+
31
32
filename = self .params ["Read" ]["filename" ].value
32
33
if filename != self .last_filename : # Only reload if filename changed
33
34
if os .path .exists (filename ):
Original file line number Diff line number Diff line change 1
1
import numpy as np
2
- from fooof import FOOOF
3
2
4
3
from goofi .data import Data , DataType
5
4
from goofi .node import Node
@@ -25,12 +24,17 @@ def config_params():
25
24
}
26
25
}
27
26
27
+ def setup (self ):
28
+ from fooof import FOOOF
29
+
30
+ self .FOOOF = FOOOF
31
+
28
32
def process (self , psd_data : Data ):
29
33
if psd_data is None or psd_data .data is None :
30
34
return None
31
35
32
36
# Create FOOOF object & set its parameters
33
- fm = FOOOF (max_n_peaks = self .params ["fooof" ]["max_n_peaks" ].value )
37
+ fm = self . FOOOF (max_n_peaks = self .params ["fooof" ]["max_n_peaks" ].value )
34
38
35
39
# Extract the PSD and freqs from the Data object
36
40
psd = psd_data .data
You can’t perform that action at this time.
0 commit comments