i make big grid with this method ->
min_value = -0.04
max_value = 0.04
step_size = 0.0001
xvalues = np.arange(min_value, max_value + step_size, step_size)
yvalues = np.arange(min_value, max_value + step_size, step_size)
xx, yy = np.meshgrid(xvalues, yvalues)
summed_temp = np.zeros_like(xx)
grid_coordinates = np.column_stack((xx.ravel(), yy.ravel()))
i have coordinates and value of the zero
next step : i have specefic location (x1,y1) target_location and 2d array as temp grid target_temp_grid = ishape_temp_grid[0][:, :, 0]
third step : i found clost neighbor to target location at my big grid that i made before now i have the new target location nearest_center_point = grid_coordinates[nearest_index]
fourth step : i make the coordinates surrounded by nearest_center_point
with translate_grid function
fifth step : i get new coordinates with rotate the translated coordinates
sixth step : i want to interpolate my 2d temp grid ( ishape_temp_grid[0][:, :, 0] value that represent temp) into the bigger grid that i made before that currently filled with zero and change the zero the value that represent temperature
seventh step : plot the big grid with showing the point and temp
i stuck step sixth
i do not know how do since six and seven step.
what i tried
interpolated_temp = griddata(combined_rotated_coordinates, target_temp_grid.ravel(), (xx, yy), method='linear', fill_value=0)
error : File “interpnd.pyx”, line 193, in scipy.interpolate.interpnd._check_init_shape
ValueError: different number of values and points
OR
other ways that led to weird shape