Commit 587feec1 authored by Peter Drewelow's avatar Peter Drewelow
Browse files

downloadversionIRdata: download_heatflux_mapping_reference() now also returns...

downloadversionIRdata: download_heatflux_mapping_reference() now also returns an array with target module definition per pixel as dictionary element 'Target_Module'; 'thickness' key renamed to 'Thickness' for consistency
parent 12ef0cde
......@@ -2748,7 +2748,7 @@ def download_heatflux_mapping_reference(timepoint=None,version=0,testmode=False,
d[np.where(profile_no==i_profile)] = \
abs((y2_p-y1_p)*x_f - (x2_p-x1_p)*y_f + x2_p*y1_p - y2_p*x1_p) / np.sqrt((y2_p-y1_p)**2 + (x2_p-x1_p)**2) /2 + \
abs((y2_n-y1_n)*x_f - (x2_n-x1_n)*y_f + x2_n*y1_n - y2_n*x1_n) / np.sqrt((y2_n-y1_n)**2 + (x2_n-x1_n)**2) /2
mappings['thickness'] = d
mappings['Thickness'] = d
if verbose>0:
print("download_heatflux_mapping_reference: 'thickness' of profiles added to mapping reference dictionary")
......@@ -2763,7 +2763,29 @@ def download_heatflux_mapping_reference(timepoint=None,version=0,testmode=False,
Y[index_ver] = -np.sin(22.5/180*np.pi)*x1 + np.cos(22.5/180*np.pi)*y1 + 0.7
if verbose>0:
print("download_heatflux_mapping_reference: vertical target moved and rotated in 'X' and 'Y' for better plotting")
# define target modules array
TM = (np.copy(mappings['Finger_ID'][0]),{1:'TM1h', 2:'TM2h', 3:'TM3h', 4:'TM4h',
5:'TM5h', 6:'TM6h',
7:'TM7h', 8:'TM8h', 9:'TM9h',
10:'TM1v', 11:'TM2v', 12:'TM3v'})
Finger_ID = np.copy(mappings['Finger_ID'][0])
Finger_ID[np.isnan(Finger_ID)] = -1
TM[0][np.logical_and(Finger_ID >= 0, Finger_ID < 700)] = 1
TM[0][np.logical_and(Finger_ID >= 700, Finger_ID < 1400)] = 2
TM[0][np.logical_and(Finger_ID >= 1400, Finger_ID < 2200)] = 3
TM[0][np.logical_and(Finger_ID >= 2200, Finger_ID < 3000)] = 4
TM[0][np.logical_and(Finger_ID >= 3000, Finger_ID < 5400)] = 5
TM[0][np.logical_and(Finger_ID >= 5400, Finger_ID < 7800)] = 6
TM[0][np.logical_and(Finger_ID >= 7800, Finger_ID < 8400)] = 7
TM[0][np.logical_and(Finger_ID >= 8400, Finger_ID < 9600)] = 8
TM[0][np.logical_and(Finger_ID >= 9600, Finger_ID < 10800)] = 9
TM[0][np.logical_and(Finger_ID >= 10800, Finger_ID < 11800)] = 10
TM[0][np.logical_and(Finger_ID >= 11800, Finger_ID < 12800)] = 11
TM[0][np.logical_and(Finger_ID >= 12800, Finger_ID < 13700)] = 12
TM[0][TM[0]==-1] = np.nan
mappings['Target_Module'] = TM
return exist,mappings
def download_heatflux_scene_model_reference(port,timepoint=None,program=None,version=0,testmode=False,verbose=0):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment