@@ -100,53 +100,6 @@ def check_array_dim(arr):
100100 return np .empty ([0 , 3 ]) if arr .ndim == 1 else arr
101101
102102
103- def get_obj_desc ():
104- """Get dictionary specifying FOOOF object names and kind of attributes.
105-
106- Returns
107- -------
108- attibutes : dict
109- Mapping of FOOOF object attributes, and what kind of data they are.
110- """
111-
112- attributes = {'results' : ['aperiodic_params_' , 'peak_params_' , 'error_' ,
113- 'r_squared_' , '_gaussian_params' ],
114- 'settings' : ['peak_width_limits' , 'max_n_peaks' , 'min_peak_amplitude' ,
115- 'peak_threshold' , 'aperiodic_mode' ],
116- 'data' : ['power_spectrum' , 'freq_range' , 'freq_res' ],
117- 'data_info' : ['freq_range' , 'freq_res' ],
118- 'arrays' : ['freqs' , 'power_spectrum' , 'aperiodic_params_' ,
119- 'peak_params_' , '_gaussian_params' ]}
120-
121- return attributes
122-
123-
124- def get_data_indices (aperiodic_mode ):
125- """Get a dictionary mapping the column labels to indices in FOOOF data (FOOOFResults).
126-
127- Parameters
128- ----------
129- aperiodic_mode : {'fixed', 'knee'}
130- Which approach taken to fit the aperiodic component.
131-
132- Returns
133- -------
134- indices : dict
135- Mapping for data columns to the column indices in which they appear.
136- """
137-
138- indices = {
139- 'CF' : 0 ,
140- 'Amp' : 1 ,
141- 'BW' : 2 ,
142- 'offset' : 0 ,
143- 'knee' : 1 if aperiodic_mode == 'knee' else None ,
144- 'exponent' : 1 if aperiodic_mode == 'fixed' else 2
145- }
146-
147- return indices
148-
149-
150103def check_iter (obj , length ):
151104 """Check an object to ensure that it is iterable, and make it iterable if not.
152105
0 commit comments