-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPolyMaxData.py
More file actions
26 lines (26 loc) · 1.18 KB
/
Copy pathPolyMaxData.py
File metadata and controls
26 lines (26 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
def PolyMaxDataPrep(data, sensors):
"""This function is pecific to the data sent available, it coverts the two dimensional
space data (SIMO) which is a dictionary with keys equal to the sensor (output)
and vales equal to a list of each input across all frequencies to a three dimensional
matix space
e.g [[[FRF(w) for input 1 for ouput 1 ], [FRF(w) for input 2 for ouput 1 ], ...],
[[FRF(w) for input 1 for ouput 2 ], [FRF(w) for input 2 for ouput 2 ], ...]], ...]"""
import pandas as pd
import numpy as np
#Converting file to data frame and array
data = pd.DataFrame(data)
#sensor_name = list(data.columns)
data = data.to_numpy()
#sensor_ind = [i for i, x in enumerate(sensor_name) if x in sensors]
#data = data[:, sensor_ind]
#Converting data from 2D [Nf*l] to 3D [m*NF*l]
data = np.expand_dims(data, axis= 0)
return data
# =============================================================================
# DATA = []
# for i in data.values():
# dump_dim = []
# dump_dim.append(i)
# DATA.append(dump_dim)
# return DATA
# =============================================================================