Python Forum
Indirect Bilinear Interpolation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Indirect Bilinear Interpolation
#1
[Image: Ref_table-ICIlb6Dy.PNG]


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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem using two-dimensional interpolation. Result looks bad player1682 4 2,451 Oct-12-2021, 09:27 AM
Last Post: player1682
  programming an interpolation polynom relating newton Hallo810 1 2,166 Nov-14-2020, 03:05 PM
Last Post: buran
  3d Interpolation with irregular input grid blueade7 2 5,662 Feb-09-2017, 06:41 PM
Last Post: blueade7

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020