Reference Table I want to interpolate values two voltage signals using this table and convert them into corresponding temperature values. It isn't a direct bilinear interpolation I want to perform.
for example: T1: 1.721 V T2: 4.025 V
Step 1: Interpolate T1 over Internal Temp. Ch1 I end up with 134.375 °C.
Step 2: From T2, determine the possible row of the expected value (between 250-300 °C) under Referenz and T1 lies between 125 °C and 140 °C) on the columns. This gives me the following grid: 3.608 3.616 4.462 4.468 Now, I would like to calculate the corresponding voltages by interpolation(max and min). I end up with 3.613 V and 4.46575 V.
Step 3: Using the two voltage values calculated in Step 2, interpolate along the rows. i.e. between 250-300 °C and 3.613 V -4.46575 V to find the temperature in °C corresponding to T2=4.025 V.
Is there any way of doing this by directly reading in a table like this as a data frame?
I've been able to do this on excel using index and match and a lengthier way of doing this is reading in series from the table. For example, a code like this to achieve Step 1:
internal=ref_table.loc[['Internal Temp. (Ch1)'],:].squeeze()
y=[20,85,100,125,140,150,160,170,180]
tit_p1=[]
for i in raw_data['T1 Intern']:
j=np.interp(i,internal,y)
tit_p1.append(j)
print(tit_p1)
However, I have many tables to deal with and it would be a lot easier if I can somehow convert the voltage values into temperature by using the table as a mesh grid.
Any help would be appreciated! Thanks!