@@ -104,40 +104,40 @@ def load_input_signals(file_path=None):
104104
105105 values_list = []
106106 grid_list = []
107- #current_grid = []
107+ # current_grid = []
108108 current_grid = None # Initialize as None
109109 for item in directory_path .iterdir ():
110110 if item .is_file ():
111111 data = loadData (item .resolve ()) # Assuming loadData reads the XY data correctly
112112 x_values = data [:, 0 ] # First column as X values
113113 y_values = data [:, 1 ] # Second column as Y values
114114
115- #data = loadData(item.resolve())
116- #if current_grid is not None and not np.array_equal(current_grid, data[:, 0]):
117- # print(f"{item.name} was ignored as it is not on a compatible grid.")
118- # continue
119- #if current_grid is not None and not np.array_equal(current_grid, x_values):
120- # print(f"{item.name} was ignored as it is not on a compatible grid.")
115+ # data = loadData(item.resolve())
116+ # if current_grid is not None and not np.array_equal(current_grid, data[:, 0]):
117+ # print(f"{item.name} was ignored as it is not on a compatible grid.")
118+ # continue
119+ # if current_grid is not None and not np.array_equal(current_grid, x_values):
120+ # print(f"{item.name} was ignored as it is not on a compatible grid.")
121121 if current_grid is not None :
122122 if not np .array_equal (current_grid , x_values ):
123123 print (f"{ item .name } has incompatible grid: { x_values } " )
124124 continue
125125 else :
126- #grid_list.append(data[:, 0])
127- #current_grid = grid_list[-1]
128- #values_list.append(data[:, 1])
126+ # grid_list.append(data[:, 0])
127+ # current_grid = grid_list[-1]
128+ # values_list.append(data[:, 1])
129129 current_grid = x_values # Update the current grid
130130 values_list .append (y_values ) # Store the Y values
131131
132132 if not grid_list :
133133 print ("No compatible grid found." )
134134 return None , None
135-
135+
136136 # Stack Y values and create a unique grid array
137137 values_array = np .column_stack (values_list )
138138
139- #grid_array = np.column_stack(grid_list)
140- #grid_vector = np.unique(grid_array, axis=1)
141- #values_array = np.column_stack(values_list)
139+ # grid_array = np.column_stack(grid_list)
140+ # grid_vector = np.unique(grid_array, axis=1)
141+ # values_array = np.column_stack(values_list)
142142 print (f"Grid vector shape: { grid_vector .shape } , Values array shape: { values_array .shape } " )
143143 return grid_vector , values_array
0 commit comments