#%matplotlib inline
%matplotlib notebook
#%matplotlib widget
import sys
import os
try:
hostname = os.environ['HOSTNAME']
except KeyError:
hostname = 'juno'
print('HOSTNAME:', hostname)
#os.path.exists('/home/chust/tch')
if hostname == 'juno' and not '/home/chust/tch' in sys.path:
sys.path.append('/home/chust/tch')
print('sys.path:', sys.path, '\n')
import matplotlib.pyplot as plt
import numpy as np
import glob
from lib_lfr.global_params import *
from lib_lfr.load_routines import get_lfr_decom_l1_asm
from lib_lfr.calib_routines import calibrate_sm
from lib_lfr.time_routines import index_from_date
from lib_io.store_routines import json2data
dir_root = '/WIN/Users/chust/DD CHUST' if hostname == 'PC-CHUST2.lpp.polytechnnique.fr' else \
'/home/chust/DD pc-p-chust' if hostname == 'pc-p-chust' else \
'/home/thomas/Labo' if hostname == 'pc-tango2' else 'ERROR!'
dir_DATA1 = '/DATA1' if hostname == 'PC-CHUST2.lpp.polytechnnique.fr' else \
'/home/chust/DATA' if hostname in ['pc-p-chust', 'juno'] else \
'/home/thomas/Labo/DATA' if hostname == 'pc-tango2' else 'ERROR!'
dir_DATA3 = '/run/media/chust/Samsung_T5'
dir_plots = '/home/thomas/Labo/Plots' if hostname == 'pc-tango2' else '/home/chust/Plots'
dir_storage = '/home/thomas/Labo/Storage' if hostname == 'pc-tango2' else '/home/chust/Storage'
#dir_data1 = dir_DATA1 + '/SO/Tests/2022_03_04_Bruno_FSW_3.3.0.7'
dir_data1 = dir_DATA1 + '/SO/Tests/2022_03_10_Bruno_FSW_3.3.0.7'
#dir_data2 = dir_DATA1 + '/SO/Tests/2022_03_14_Bruno_FSW_3.2.0.24'
dir_data2 = dir_DATA1 + '/SO/Tests/2022_03_17_Bruno_FSW_3.3.0.7_unitaires_ALE'
print('dir_root:', dir_root)
print('dir_data1:', dir_data1)
print('dir_data2:', dir_data2)
HOSTNAME: PC-CHUST2.lpp.polytechnnique.fr sys.path: ['/WIN/Users/chust/DD CHUST/Missions/Solar Orbiter/LFR/Python/Alexis', '/WIN/Users/chust/DD CHUST/Missions/Solar Orbiter/LFR/Python/tch', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '', '/home/lab-lpp.local/chust/venv_py3/lib64/python3.10/site-packages', '/home/lab-lpp.local/chust/venv_py3/lib/python3.10/site-packages', '/usr/lib64/python3.10/site-packages', '/usr/lib/python3.10/site-packages'] dir_root: /WIN/Users/chust/DD CHUST dir_data1: /DATA1/SO/Tests/2022_03_10_Bruno_FSW_3.3.0.7 dir_data2: /DATA1/SO/Tests/2022_03_17_Bruno_FSW_3.3.0.7_unitaires_ALE
Matrices de passage par défaut pour les ASM : à valider
Comparaison/validation FSW 3.2.0.24 vs 3.3.0.7 avec matrices unitaires.
Mapping Discospace :
Analog Discovery 1 : E1/E2
Analog Discovery 2 : B1/B2
Analog Discovery 3 : B3
files = glob.glob(dir_root + '/Missions/Solar Orbiter/LFR/Ground Segment/ROB kcoefficients' +
'/kcoefficients update #3/ASM_calibration_default-full-tables*')
for file in files:
print(os.path.basename(file))
[freq_cal, B_cal, E_cal] = json2data(file)
index_freq = 3*[None]
print(" freq_cal | B_cal | E_cal")
for F in [0, 1, 2]:
index_freq[F] = freq_cal[F].nonzero()[0]
print("F%s: %s %3d"%(F, freq_cal[F].shape, len(index_freq[F])), B_cal[F].shape, E_cal[F].shape)
index_freq
F=0
freq_cal[F][index_freq[F]]
F=1
freq_cal[F][index_freq[F]]
F=2
freq_cal[F][index_freq[F]]
B_cal[2][index_freq[F], ...]
case = 'F0-3168Hz-2Vpp_on_E1E2B1B2B3-UnitKCOEFFMatrices'
dir_Packets = dir_data1 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af0')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_unit = get_lfr_decom_l1_asm(file)
1 2022_03_10_15_12_03_packet_record_NORMAL.af0
case = 'F0-3168Hz-2Vpp_on_E1E2B1B2B3-DefaultKCOEFFMatrices'
dir_Packets = dir_data1 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af0')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_default = get_lfr_decom_l1_asm(file)
print('asm mode :', asm_unit['mode'], '@F%d'%(LFR_Fs2F(asm_unit['fe'])))
print('asm time :', asm_unit['relative_time'])
print('asm shape:', asm_unit['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_unit['asm_idl'].shape
asm mode : NORMAL @F0 asm time : [ 0. 3.99992371 7.99984741 11.99977112 15.99969482 19.99961853 23.99954224 27.99946594 31.99938965 35.99931335 39.99923706 43.99916077 47.99908447 51.99899292 55.99891663 59.99884033] asm shape: (16, 88, 5, 5)
print('asm mode :', asm_default['mode'], '@F%d'%(LFR_Fs2F(asm_default['fe'])))
print('asm time :', asm_default['relative_time'])
print('asm shape:', asm_default['asm_idl'].shape)
F = 0
calib_mat_freqs_asm_BE = np.zeros((nfreq, ndim, ndim), dtype=complex)
calib_mat_freqs_asm_BE[:, 0:3, 0:3] = B_cal[F][index_freq[F], ...]
calib_mat_freqs_asm_BE[:, 3:5, 3:5] = E_cal[F][index_freq[F], ...]
asm_unit_calibrated = calibrate_sm(asm_unit['asm_idl'], calib_mat_freqs_asm_BE, echo=True)
i1 = index_from_date(3168, asm_unit['freq'], epsi=None)
i2 = index_from_date(3168, asm_default['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_default['freq'][i1]
np.array(asm_unit['freq'])
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_default['asm_idl'][:, i1, i, j]))
print(np.angle(asm_default['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit_calibrated[:, i1, i, j]))
print(np.angle(asm_unit_calibrated[:, i1, i, j], deg=True))
i = 0
j = 1
print(np.abs(asm_unit_calibrated[:, i1, i, j] / asm_default['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit_calibrated[:, i1, i, j] / asm_default['asm_idl'][:, i2, i, j], deg=True))
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:, i2, i, j], deg=True))))
)
case = 'F0-3168Hz-2Vpp_on_E1E2B1B2B3_FSW_3.2.0.24'
dir_Packets = dir_data2 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af0')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_32024 = get_lfr_decom_l1_asm(file)
print('asm mode :', asm_32024['mode'], '@F%d'%(LFR_Fs2F(asm_32024['fe'])))
print('asm time :', asm_32024['relative_time'])
print('asm shape:', asm_32024['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_32024['asm_idl'].shape
i1 = index_from_date(3168, asm_unit['freq'], epsi=None)
i2 = index_from_date(3168, asm_32024['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_32024['freq'][i1]
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_32024['asm_idl'][:, i2, i, j]))
print(np.angle(asm_32024['asm_idl'][:, i2, i, j], deg=True))
i = 3
j = 4
print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_32024['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_32024['asm_idl'][:, i2, i, j], deg=True))
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j], deg=True))))
)
case = 'F0-3168Hz-2Vpp_on_E1E2B1B2B3-KCOEFFUnitMatrices'
dir_Packets = dir_data2 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af0')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_unitALE = get_lfr_decom_l1_asm(file)
1 2022_03_17_13_14_41_packet_record_NORMAL.af0
print('asm mode :', asm_unitALE['mode'], '@F%d'%(LFR_Fs2F(asm_unitALE['fe'])))
print('asm time :', asm_unitALE['relative_time'])
print('asm shape:', asm_unitALE['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_unitALE['asm_idl'].shape
asm mode : NORMAL @F0 asm time : [ 0. 3.99993896 7.99989319 11.99983215 15.99978638 19.99972534 23.99966431 27.99961853 31.9995575 35.99949646 39.99945068 43.99938965 47.99932861 51.99926758 55.9992218 59.99916077] asm shape: (16, 88, 5, 5)
i1 = index_from_date(3168, asm_unit['freq'], epsi=None)
i2 = index_from_date(3168, asm_unitALE['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_unitALE['freq'][i1]
(16, 3168.0, 16, 3168.0)
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
i=0, j=0 : [1.7031250e+00 2.0179524e+07 2.0183552e+07 2.0189182e+07 2.0192142e+07 2.0189408e+07 2.0183824e+07 2.0179234e+07 2.0180634e+07 2.0185390e+07 2.0190542e+07 2.0191966e+07 2.0188116e+07 2.0181438e+07 2.0179392e+07 2.0181008e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=1 : [5.9302425e-01 2.0704750e+07 2.0709092e+07 2.0715752e+07 2.0718586e+07 2.0716286e+07 2.0709424e+07 2.0704552e+07 2.0706194e+07 2.0711516e+07 2.0717270e+07 2.0718516e+07 2.0714076e+07 2.0707248e+07 2.0704624e+07 2.0707044e+07] [-10.37236 0.36110428 0.36207673 0.3620051 0.3639064 0.36444402 0.36382058 0.36269024 0.36065224 0.363144 0.36456618 0.36435312 0.3650324 0.36174795 0.3609276 0.36296123] i=0, j=2 : [5.7709765e-01 1.9743272e+07 1.9766876e+07 1.9783888e+07 1.9760480e+07 1.9781506e+07 1.9769554e+07 1.9752470e+07 1.9757908e+07 1.9791438e+07 1.9777100e+07 1.9760246e+07 1.9815364e+07 1.9765490e+07 1.9803520e+07 1.9770006e+07] [ -33.403233 31.458881 89.91196 148.39124 -153.46336 -95.138 -36.7243 21.807304 80.48189 139.30005 -163.25691 -104.54899 -46.868984 10.970469 68.92569 126.64537 ] i=0, j=3 : [9.9144906e-01 1.9214894e+07 1.9222062e+07 1.9247918e+07 1.9239050e+07 1.9237340e+07 1.9251444e+07 1.9250224e+07 1.9246500e+07 1.9278356e+07 1.9276824e+07 1.9277470e+07 1.9285338e+07 1.9269530e+07 1.9294014e+07 1.9245966e+07] [ 12.283956 38.128067 113.342514 -171.49811 -96.42323 -21.454256 53.442364 127.913284 -157.26578 -82.64235 -8.607178 65.26556 139.28949 -146.63483 -72.948364 1.0895917] i=0, j=4 : [8.0332106e-01 1.9280230e+07 1.9287762e+07 1.9314208e+07 1.9304714e+07 1.9302952e+07 1.9317626e+07 1.9315810e+07 1.9311984e+07 1.9344248e+07 1.9342822e+07 1.9342960e+07 1.9351404e+07 1.9335162e+07 1.9360106e+07 1.9311410e+07] [ -7.2632456 38.076633 113.29046 -171.54974 -96.47696 -21.507225 53.390293 127.86016 -157.31903 -82.69299 -8.659789 65.213036 139.23843 -146.687 -72.99957 1.0375913] i=1, j=1 : [8.7760419e-01 2.1243642e+07 2.1248314e+07 2.1256056e+07 2.1258758e+07 2.1256920e+07 2.1248712e+07 2.1243544e+07 2.1245446e+07 2.1251360e+07 2.1257730e+07 2.1258804e+07 2.1253746e+07 2.1246756e+07 2.1243530e+07 2.1246796e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=2 : [2.2729467e-01 2.0257190e+07 2.0281540e+07 2.0299876e+07 2.0275634e+07 2.0297802e+07 2.0284292e+07 2.0266642e+07 2.0272500e+07 2.0307372e+07 2.0293146e+07 2.0275522e+07 2.0331568e+07 2.0280500e+07 2.0318970e+07 2.0285440e+07] [ -18.01977 31.097504 89.54979 148.02888 -153.82732 -95.50284 -37.08816 21.444685 80.12145 138.93723 -163.62178 -104.91341 -47.23393 10.608889 68.5645 126.282646] i=1, j=3 : [4.8516539e-01 1.9715064e+07 1.9722542e+07 1.9749920e+07 1.9740598e+07 1.9739456e+07 1.9752678e+07 1.9751312e+07 1.9747778e+07 1.9780926e+07 1.9779846e+07 1.9780144e+07 1.9787720e+07 1.9771636e+07 1.9796206e+07 1.9747772e+07] [ 17.170563 37.76664 112.980316 -171.86058 -96.78721 -21.819237 53.078495 127.5507 -157.62617 -83.00507 -8.972123 64.901115 138.92456 -146.99635 -73.30964 0.72694427] i=1, j=4 : [3.8024402e-01 1.9782106e+07 1.9789954e+07 1.9817940e+07 1.9807976e+07 1.9806784e+07 1.9820582e+07 1.9818608e+07 1.9814966e+07 1.9848540e+07 1.9847566e+07 1.9847348e+07 1.9855504e+07 1.9838972e+07 1.9864014e+07 1.9814920e+07] [ 0.7848246 37.71519 112.92827 -171.91219 -96.84093 -21.872204 53.026417 127.49756 -157.67941 -83.05571 -9.024735 64.84861 138.87352 -147.04854 -73.36085 0.67494255] i=2, j=2 : [7.5260419e-01 2.1127778e+07 2.1138100e+07 2.1132304e+07 2.1126594e+07 2.1136940e+07 2.1135598e+07 2.1126382e+07 2.1135346e+07 2.1136678e+07 2.1126442e+07 2.1132216e+07 2.1138836e+07 2.1128024e+07 2.1130430e+07 2.1138548e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=3 : [4.4750011e-01 2.1090016e+07 2.1095094e+07 2.1088670e+07 2.1091348e+07 2.1093724e+07 2.1094980e+07 2.1097010e+07 2.1100818e+07 2.1095634e+07 2.1097174e+07 2.1104684e+07 2.1091988e+07 2.1100152e+07 2.1093414e+07 2.1096636e+07] [ 45.707317 6.668669 23.432804 40.114117 57.0336 73.681725 90.16245 106.10529 122.252106 138.05653 154.63943 169.82352 -173.84578 -157.61221 -141.869 -125.55751 ] i=2, j=4 : [3.5563803e-01 2.1161804e+07 2.1167162e+07 2.1161270e+07 2.1163420e+07 2.1165624e+07 2.1167504e+07 2.1168880e+07 2.1172702e+07 2.1167720e+07 2.1169364e+07 2.1176380e+07 2.1164114e+07 2.1172056e+07 2.1165446e+07 2.1168458e+07] [ 29.38061 6.6171823 23.380793 40.06244 56.98017 73.62894 90.11077 106.052345 122.19905 138.00569 154.5871 169.77104 -173.89696 -157.66475 -141.92021 -125.60975 ] i=3, j=3 : [1.7682291e+00 2.1197050e+07 2.1206518e+07 2.1196406e+07 2.1199898e+07 2.1206410e+07 2.1194606e+07 2.1203302e+07 2.1204554e+07 2.1194908e+07 2.1205346e+07 2.1202694e+07 2.1195884e+07 2.1206712e+07 2.1199554e+07 2.1197814e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=4 : [5.9676337e-01 2.1269218e+07 2.1278954e+07 2.1269370e+07 2.1272366e+07 2.1278680e+07 2.1267482e+07 2.1275536e+07 2.1276818e+07 2.1267322e+07 2.1277902e+07 2.1274724e+07 2.1268330e+07 2.1278986e+07 2.1271902e+07 2.1270000e+07] [-22.312138 -0.05151056 -0.05198732 -0.05172055 -0.0533449 -0.05274652 -0.0515978 -0.0528972 -0.05299045 -0.05089807 -0.05226056 -0.05242247 -0.05121182 -0.05263494 -0.05121881 -0.0522968 ] i=4, j=4 : [1.2630209e+00 2.1341638e+07 2.1351638e+07 2.1342586e+07 2.1345084e+07 2.1351202e+07 2.1340602e+07 2.1348012e+07 2.1349320e+07 2.1339984e+07 2.1350706e+07 2.1346996e+07 2.1341030e+07 2.1351510e+07 2.1344498e+07 2.1342438e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unitALE['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
i=0, j=0 : [1.7604166e+00 2.0164214e+07 2.0165370e+07 2.0166700e+07 2.0170026e+07 2.0173132e+07 2.0177176e+07 2.0178498e+07 2.0177514e+07 2.0175744e+07 2.0173606e+07 2.0170066e+07 2.0165818e+07 2.0163350e+07 2.0165006e+07 2.0167882e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=1 : [6.3793045e-01 2.0674932e+07 2.0675466e+07 2.0677238e+07 2.0680724e+07 2.0683800e+07 2.0687430e+07 2.0689760e+07 2.0689508e+07 2.0686934e+07 2.0684382e+07 2.0680236e+07 2.0676396e+07 2.0674930e+07 2.0675748e+07 2.0678240e+07] [-8.923989 0.3630735 0.36149278 0.36215147 0.36338252 0.36410218 0.36415854 0.36216784 0.36291105 0.36490715 0.36489537 0.3619404 0.36017096 0.36186868 0.36403057 0.36234334] i=0, j=2 : [5.7066321e-01 1.9352358e+07 1.9333758e+07 1.9353984e+07 1.9350324e+07 1.9371870e+07 1.9424642e+07 1.9378058e+07 1.9394776e+07 1.9383238e+07 1.9424830e+07 1.9370898e+07 1.9361984e+07 1.9370928e+07 1.9366098e+07 1.9293996e+07] [ -26.565052 36.695187 107.02932 177.51979 -112.273186 -42.30412 26.59581 95.51447 165.07867 -125.47765 -56.678677 12.385258 81.97608 151.98097 -138.43962 -67.81 ] i=0, j=3 : [1.0024993e+00 1.8751378e+07 1.8725570e+07 1.8712664e+07 1.8711992e+07 1.8752378e+07 1.8759552e+07 1.8765638e+07 1.8757940e+07 1.8735596e+07 1.8713484e+07 1.8741914e+07 1.8753348e+07 1.8729408e+07 1.8707212e+07 1.8655318e+07] [ 13.061551 43.066944 128.91908 -144.7453 -58.096497 28.069536 113.41839 -161.04771 -75.66594 10.439078 97.07128 -176.68324 -90.982506 -5.0162945 81.416664 168.46533 ] i=0, j=4 : [8.2289195e-01 1.8850946e+07 1.8824596e+07 1.8811868e+07 1.8810806e+07 1.8851360e+07 1.8858580e+07 1.8865082e+07 1.8856786e+07 1.8834698e+07 1.8812542e+07 1.8840410e+07 1.8851772e+07 1.8828272e+07 1.8805144e+07 1.8753464e+07] [ -4.537772 43.01486 128.86517 -144.79663 -58.148712 28.016697 113.36693 -161.09952 -75.71944 10.387698 97.01891 -176.73624 -91.03516 -5.066524 81.36495 168.416 ] i=1, j=1 : [1.0703125e+00 2.1198574e+07 2.1198468e+07 2.1200706e+07 2.1204354e+07 2.1207394e+07 2.1210592e+07 2.1213980e+07 2.1214502e+07 2.1211078e+07 2.1208084e+07 2.1203318e+07 2.1199906e+07 2.1199490e+07 2.1199422e+07 2.1201506e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=2 : [3.0255443e-01 1.9842546e+07 1.9822806e+07 1.9843892e+07 1.9840338e+07 1.9862450e+07 1.9915776e+07 1.9869082e+07 1.9886876e+07 1.9874502e+07 1.9916506e+07 1.9860818e+07 1.9852112e+07 1.9862430e+07 1.9856802e+07 1.9782094e+07] [ -13.438189 36.331764 106.66788 177.15753 -112.63698 -42.667904 26.232067 95.152695 164.71597 -125.84274 -57.04393 12.023455 81.6166 151.61877 -138.80392 -68.17202 ] i=1, j=3 : [6.0923028e-01 1.9226362e+07 1.9199226e+07 1.9186324e+07 1.9185866e+07 1.9227322e+07 1.9233844e+07 1.9241142e+07 1.9233874e+07 1.9210488e+07 1.9187112e+07 1.9215924e+07 1.9228046e+07 1.9204644e+07 1.9181276e+07 1.9127228e+07] [ 27.769947 42.703403 128.55768 -145.10756 -58.460403 27.705835 113.05477 -161.4094 -76.028595 10.073961 96.70595 -177.04501 -91.34181 -5.3785596 81.0523 168.1034 ] i=1, j=4 : [4.0158242e-01 1.9328448e+07 1.9300760e+07 1.9288040e+07 1.9287180e+07 1.9328812e+07 1.9335378e+07 1.9343104e+07 1.9335230e+07 1.9312104e+07 1.9288674e+07 1.9316910e+07 1.9328962e+07 1.9306014e+07 1.9281690e+07 1.9227854e+07] [ -2.9737315 42.651325 128.50374 -145.1589 -58.512608 27.652988 113.0033 -161.4612 -76.08209 10.022581 96.65357 -177.098 -91.39446 -5.428794 81.00059 168.05406 ] i=2, j=2 : [9.1145831e-01 2.1063614e+07 2.1072412e+07 2.1073794e+07 2.1064520e+07 2.1065954e+07 2.1075728e+07 2.1071364e+07 2.1062368e+07 2.1070398e+07 2.1076172e+07 2.1066488e+07 2.1064342e+07 2.1074338e+07 2.1072602e+07 2.1063394e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=3 : [6.3495761e-01 2.1000886e+07 2.1010012e+07 2.1001984e+07 2.0994258e+07 2.1002518e+07 2.0995848e+07 2.1002450e+07 2.0995538e+07 2.0998724e+07 2.0982176e+07 2.1000366e+07 2.1004338e+07 2.0998886e+07 2.0997834e+07 2.1000634e+07] [ 37.668884 6.3691173 21.890072 37.738773 54.17163 70.36967 86.82529 103.42959 119.25559 135.92404 153.74457 170.92671 -172.95947 -156.996 -140.1526 -123.72142 ] i=2, j=4 : [4.9914476e-01 2.1112458e+07 2.1121160e+07 2.1113174e+07 2.1105192e+07 2.1113384e+07 2.1106536e+07 2.1113866e+07 2.1106242e+07 2.1109858e+07 2.1093326e+07 2.1110716e+07 2.1114624e+07 2.1109814e+07 2.1107850e+07 2.1111064e+07] [ 17.300526 6.3174915 21.83648 37.687477 54.119106 70.316826 86.77326 103.377754 119.20219 135.87302 153.692 170.87407 -173.0116 -157.04613 -140.2042 -123.77131 ] i=3, j=3 : [1.9843750e+00 2.1066954e+07 2.1077768e+07 2.1074254e+07 2.1067150e+07 2.1077934e+07 2.1075978e+07 2.1066574e+07 2.1077200e+07 2.1077400e+07 2.1067274e+07 2.1076740e+07 2.1078886e+07 2.1067922e+07 2.1076362e+07 2.1078974e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=4 : [7.5641072e-01 2.1178882e+07 2.1189288e+07 2.1185786e+07 2.1178488e+07 2.1189184e+07 2.1187050e+07 2.1178354e+07 2.1188350e+07 2.1188968e+07 2.1178902e+07 2.1187486e+07 2.1189576e+07 2.1179242e+07 2.1186810e+07 2.1189808e+07] [-22.68056 -0.05151776 -0.05351585 -0.05129419 -0.05260094 -0.05284297 -0.05213438 -0.05184063 -0.053415 -0.05095556 -0.05256404 -0.05258522 -0.05199263 -0.05012537 -0.0515584 -0.05001295] i=4, j=4 : [1.5338541e+00 2.1291406e+07 2.1301390e+07 2.1297906e+07 2.1290418e+07 2.1301028e+07 2.1298710e+07 2.1290728e+07 2.1300080e+07 2.1301118e+07 2.1291120e+07 2.1298822e+07 2.1300850e+07 2.1291146e+07 2.1297838e+07 2.1301230e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
i = 3
j = 4
print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
[0.78894097 1.0042653 1.0042318 1.0039454 1.0044326 1.0042237 1.0037963 1.0045887 1.0041753 1.0036979 1.0046744 1.0041174 1.0037167 1.0047096 1.0040163 1.0037845 ] [ 3.6842123e-01 7.2028515e-06 1.5285354e-03 -4.2635939e-04 -7.4397231e-04 9.6461612e-05 5.3657987e-04 -1.0565743e-03 4.2454293e-04 5.7491136e-05 3.0348494e-04 1.6275597e-04 7.8080792e-04 -2.5095593e-03 3.3959077e-04 -2.2838460e-03]
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))))
)
i=0, j=0 => 1.00004 1.00111 0.000 0.000 i=0, j=1 => 1.00072 1.00186 0.000 0.005 i=0, j=2 => 1.01776 1.02467 5.236 165.545 i=0, j=3 => 1.02472 1.03166 4.939 167.376 i=0, j=4 => 1.02277 1.02975 4.938 167.378 i=1, j=1 => 1.00139 1.00262 0.000 0.000 i=1, j=2 => 1.01850 1.02544 5.234 165.545 i=1, j=3 => 1.02542 1.03244 4.937 167.376 i=1, j=4 => 1.02347 1.03053 4.936 167.379 i=2, j=2 => 1.00239 1.00357 0.000 0.000 i=2, j=3 => 1.00405 1.00548 0.300 3.337 i=2, j=4 => 1.00218 1.00360 0.300 3.338 i=3, j=3 => 1.00555 1.00659 0.000 0.000 i=3, j=4 => 1.00370 1.00471 0.000 0.003 i=4, j=4 => 1.00182 1.00284 0.000 0.000
case = 'F1-912Hz-2Vpp_on_E1E2B1B2B3-UnitKCOEFFMatrices'
dir_Packets = dir_data1 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af1')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_unit = get_lfr_decom_l1_asm(file)
1 2022_03_10_14_58_28_packet_record_NORMAL.af1
case = 'F1-912Hz-2Vpp_on_E1E2B1B2B3-DefaultKCOEFFMatrices'
dir_Packets = dir_data1 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af1')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_default = get_lfr_decom_l1_asm(file)
print('asm mode :', asm_unit['mode'], '@F%d'%(LFR_Fs2F(asm_unit['fe'])))
print('asm time :', asm_unit['relative_time'])
print('asm shape:', asm_unit['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_unit['asm_idl'].shape
asm mode : NORMAL @F1 asm time : [ 0. 3.99992371 7.99984741 11.99977112 15.99969482 19.99961853 23.99954224 27.99946594 31.99938965 35.99931335 39.99923706 43.99916077 47.99908447 51.99900818 55.99893188 59.99885559] asm shape: (16, 104, 5, 5)
print('asm mode :', asm_default['mode'], '@F%d'%(LFR_Fs2F(asm_default['fe'])))
print('asm time :', asm_default['relative_time'])
print('asm shape:', asm_default['asm_idl'].shape)
F = 1
calib_mat_freqs_asm_BE = np.zeros((nfreq, ndim, ndim), dtype=complex)
calib_mat_freqs_asm_BE[:, 0:3, 0:3] = B_cal[F][index_freq[F], ...]
calib_mat_freqs_asm_BE[:, 3:5, 3:5] = E_cal[F][index_freq[F], ...]
asm_unit_calibrated = calibrate_sm(asm_unit['asm_idl'], calib_mat_freqs_asm_BE, echo=True)
i1 = index_from_date(912, asm_unit['freq'], epsi=None)
i2 = index_from_date(912, asm_default['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_default['freq'][i1]
np.array(asm_unit['freq'])
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_default['asm_idl'][:, i1, i, j]))
print(np.angle(asm_default['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit_calibrated[:, i1, i, j]))
print(np.angle(asm_unit_calibrated[:, i1, i, j], deg=True))
i = 0
j = 1
print(np.abs(asm_unit_calibrated[:, i1, i, j] / asm_default['asm_idl'][:-1, i2, i, j]))
print(np.angle(asm_unit_calibrated[:, i1, i, j] / asm_default['asm_idl'][:-1, i2, i, j], deg=True))
k0 = 1
k1= -1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j])),
np.max(np.abs(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j])),
np.min(abs(np.angle(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j], deg=True))))
)
case = 'F1-912Hz-2Vpp_on_E1E2B1B2B3_FSW_3.2.0.24'
dir_Packets = dir_data2 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af1')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_32024 = get_lfr_decom_l1_asm(file)
print('asm mode :', asm_32024['mode'], '@F%d'%(LFR_Fs2F(asm_32024['fe'])))
print('asm time :', asm_32024['relative_time'])
print('asm shape:', asm_32024['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_32024['asm_idl'].shape
i1 = index_from_date(912, asm_unit['freq'], epsi=None)
i2 = index_from_date(912, asm_32024['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_32024['freq'][i1]
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_32024['asm_idl'][:, i2, i, j]))
print(np.angle(asm_32024['asm_idl'][:, i2, i, j], deg=True))
i = 3
j = 4
print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_32024['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_32024['asm_idl'][:, i2, i, j], deg=True))
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j], deg=True))))
)
case = 'F1-912Hz-2Vpp_on_E1E2B1B2B3-KCOEFFInitMatrices'
dir_Packets = dir_data2 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af1')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_unitALE = get_lfr_decom_l1_asm(file)
1 2022_03_17_13_10_24_packet_record_NORMAL.af1
print('asm mode :', asm_unitALE['mode'], '@F%d'%(LFR_Fs2F(asm_unitALE['fe'])))
print('asm time :', asm_unitALE['relative_time'])
print('asm shape:', asm_unitALE['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_unitALE['asm_idl'].shape
asm mode : NORMAL @F1 asm time : [ 0. 3.99995422 7.99989319 11.99983215 15.99977112 19.99972534 23.99966431 27.99960327 31.9995575 35.99949646 39.99943542 43.99937439 47.99932861 51.99926758 55.99920654 59.99914551] asm shape: (16, 104, 5, 5)
i1 = index_from_date(912, asm_unit['freq'], epsi=None)
i2 = index_from_date(912, asm_unitALE['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_unitALE['freq'][i1]
(51, 912.0, 51, 912.0)
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
i=0, j=0 : [3.2812500e-01 2.0768036e+07 2.0764050e+07 2.0764100e+07 2.0762492e+07 2.0760184e+07 2.0761106e+07 2.0761324e+07 2.0762452e+07 2.0762996e+07 2.0764460e+07 2.0764748e+07 2.0767588e+07 2.0767156e+07 2.0769392e+07 2.0771470e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=1 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=2 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=3 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=1 : [7.8125000e-01 2.0622732e+07 2.0621126e+07 2.0619828e+07 2.0619380e+07 2.0618884e+07 2.0615356e+07 2.0619282e+07 2.0618502e+07 2.0620082e+07 2.0620030e+07 2.0621776e+07 2.0621248e+07 2.0624208e+07 2.0625696e+07 2.0627756e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=2 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=3 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=2 : [6.0937500e-01 2.0760014e+07 2.0757918e+07 2.0755192e+07 2.0755950e+07 2.0757776e+07 2.0761366e+07 2.0764350e+07 2.0764860e+07 2.0764542e+07 2.0764238e+07 2.0762556e+07 2.0757160e+07 2.0756748e+07 2.0755936e+07 2.0756840e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=3 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=3 : [8.7500000e-01 2.0512638e+07 2.0508508e+07 2.0507970e+07 2.0508914e+07 2.0510494e+07 2.0516198e+07 2.0518776e+07 2.0519032e+07 2.0518322e+07 2.0516156e+07 2.0511712e+07 2.0510064e+07 2.0509760e+07 2.0510830e+07 2.0515150e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=4, j=4 : [8.9062500e-01 2.0643796e+07 2.0639256e+07 2.0637216e+07 2.0640184e+07 2.0642284e+07 2.0646068e+07 2.0648228e+07 2.0647988e+07 2.0646124e+07 2.0645436e+07 2.0641624e+07 2.0638752e+07 2.0640480e+07 2.0640284e+07 2.0644842e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unitALE['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
i=0, j=0 : [1.5468750e+00 2.0753868e+07 2.0750388e+07 2.0750480e+07 2.0749564e+07 2.0748454e+07 2.0747934e+07 2.0748616e+07 2.0748970e+07 2.0748560e+07 2.0749280e+07 2.0748696e+07 2.0749066e+07 2.0751462e+07 2.0750802e+07 2.0751992e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=1 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=2 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=3 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=1 : [7.1875000e-01 2.0575776e+07 2.0575870e+07 2.0575438e+07 2.0573720e+07 2.0573546e+07 2.0574080e+07 2.0574152e+07 2.0573464e+07 2.0577576e+07 2.0574254e+07 2.0574826e+07 2.0576278e+07 2.0575292e+07 2.0576446e+07 2.0577186e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=2 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=3 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=2 : [7.3437500e-01 2.0704210e+07 2.0704086e+07 2.0700914e+07 2.0701946e+07 2.0704268e+07 2.0708116e+07 2.0710652e+07 2.0711522e+07 2.0713546e+07 2.0710398e+07 2.0709788e+07 2.0706142e+07 2.0704668e+07 2.0701640e+07 2.0701886e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=3 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=3 : [8.1250000e-01 2.0396636e+07 2.0393340e+07 2.0393994e+07 2.0395312e+07 2.0399256e+07 2.0401320e+07 2.0403232e+07 2.0405552e+07 2.0403332e+07 2.0401526e+07 2.0398054e+07 2.0395324e+07 2.0394964e+07 2.0393568e+07 2.0397760e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=4 : [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=4, j=4 : [7.9687500e-01 2.0595084e+07 2.0593344e+07 2.0595058e+07 2.0595354e+07 2.0597440e+07 2.0601128e+07 2.0603722e+07 2.0604128e+07 2.0602618e+07 2.0602190e+07 2.0598148e+07 2.0594924e+07 2.0592776e+07 2.0594214e+07 2.0596424e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
i = 1
j = 4
print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
[nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan] [nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan]
/tmp/ipykernel_244570/1962023636.py:3: RuntimeWarning: invalid value encountered in true_divide print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j])) /tmp/ipykernel_244570/1962023636.py:4: RuntimeWarning: invalid value encountered in true_divide print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))))
)
i=0, j=0 => 1.00057 1.00094 0.000 0.000 i=0, j=1 => nan nan nan nan i=0, j=2 => nan nan nan nan i=0, j=3 => nan nan nan nan i=0, j=4 => nan nan nan nan i=1, j=1 => 1.00201 1.00246 0.000 0.000 i=1, j=2 => nan nan nan nan i=1, j=3 => nan nan nan nan i=1, j=4 => nan nan nan nan i=2, j=2 => 1.00246 1.00270 0.000 0.000 i=2, j=3 => nan nan nan nan i=2, j=4 => nan nan nan nan i=3, j=3 => 1.00545 1.00576 0.000 0.000 i=3, j=4 => nan nan nan nan i=4, j=4 => 1.00205 1.00237 0.000 0.000
/tmp/ipykernel_244570/3097685521.py:6: RuntimeWarning: invalid value encountered in true_divide np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])), /tmp/ipykernel_244570/3097685521.py:7: RuntimeWarning: invalid value encountered in true_divide np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])), /tmp/ipykernel_244570/3097685521.py:8: RuntimeWarning: invalid value encountered in true_divide np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))), /tmp/ipykernel_244570/3097685521.py:9: RuntimeWarning: invalid value encountered in true_divide np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))))
case = 'F2-64Hz-2Vpp_on_E1E2B1B2B3-UnitKCOEFFMatrices'
dir_Packets = dir_data1 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af2')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_unit = get_lfr_decom_l1_asm(file)
1 2022_03_10_15_05_10_packet_record_NORMAL.af2
case = 'F2-64Hz-2Vpp_on_E1E2B1B2B3-DefaultKCOEFFMatrices'
dir_Packets = dir_DATA + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af2')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_default = get_lfr_decom_l1_asm(file)
print('asm mode :', asm_unit['mode'], '@F%d'%(LFR_Fs2F(asm_unit['fe'])))
print('asm time :', asm_unit['relative_time'])
print('asm shape:', asm_unit['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_unit['asm_idl'].shape
asm mode : NORMAL @F2 asm time : [ 0. 3.99992371 7.99984741 11.99978638 15.99971008 19.99963379 23.9995575 27.9994812 31.99940491 35.99932861 39.99925232 43.99919128 47.99911499 51.9990387 55.9989624 59.99888611] asm shape: (16, 96, 5, 5)
print('asm mode :', asm_default['mode'], '@F%d'%(LFR_Fs2F(asm_default['fe'])))
print('asm time :', asm_default['relative_time'])
print('asm shape:', asm_default['asm_idl'].shape)
F = 2
calib_mat_freqs_asm_BE = np.zeros((nfreq, ndim, ndim), dtype=complex)
calib_mat_freqs_asm_BE[:, 0:3, 0:3] = B_cal[F][index_freq[F], ...]
calib_mat_freqs_asm_BE[:, 3:5, 3:5] = E_cal[F][index_freq[F], ...]
asm_unit_calibrated = calibrate_sm(asm_unit['asm_idl'], calib_mat_freqs_asm_BE, echo=True)
i1 = index_from_date(64, asm_unit['freq'], epsi=None)
i2 = index_from_date(64, asm_default['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_default['freq'][i1]
np.array(asm_unit['freq'])
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_default['asm_idl'][:, i1, i, j]))
print(np.angle(asm_default['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit_calibrated[:, i1, i, j]))
print(np.angle(asm_unit_calibrated[:, i1, i, j], deg=True))
i = 0
j = 3
k1= -4
print(np.abs(asm_unit_calibrated[:, i1, i, j] / asm_default['asm_idl'][:k1, i2, i, j]))
print(np.angle(asm_unit_calibrated[:, i1, i, j] / asm_default['asm_idl'][:k1, i2, i, j], deg=True))
k0 = 1
k1= -4
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j])),
np.max(np.abs(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j])),
np.min(abs(np.angle(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit_calibrated[k0:, i1, i, j] / asm_default['asm_idl'][k0:k1, i2, i, j], deg=True))))
)
case = 'F2-64Hz-2Vpp_on_E1E2B1B2B3_FSW_3.2.0.24'
dir_Packets = dir_data2 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af2')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_32024 = get_lfr_decom_l1_asm(file)
print('asm mode :', asm_32024['mode'], '@F%d'%(LFR_Fs2F(asm_32024['fe'])))
print('asm time :', asm_32024['relative_time'])
print('asm shape:', asm_32024['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_32024['asm_idl'].shape
i1 = index_from_date(64, asm_unit['freq'], epsi=None)
i2 = index_from_date(64, asm_32024['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_32024['freq'][i1]
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_32024['asm_idl'][:, i2, i, j]))
print(np.angle(asm_32024['asm_idl'][:, i2, i, j], deg=True))
i = 0
j = 2
print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_32024['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_32024['asm_idl'][:, i2, i, j], deg=True))
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_32024['asm_idl'][k0:, i2, i, j], deg=True))))
)
case = 'F2-64Hz-2Vpp_on_E1E2B1B2B3-KCOEFFInitMatrices'
dir_Packets = dir_data2 + '/' + case + '/decom'
files = glob.glob(dir_Packets + '/*.af2')
files.sort()
print(len(files))
for file in files:
print(os.path.basename(file))
asm_unitALE = get_lfr_decom_l1_asm(file)
1 2022_03_17_13_05_30_packet_record_NORMAL.af2
print('asm mode :', asm_unitALE['mode'], '@F%d'%(LFR_Fs2F(asm_unitALE['fe'])))
print('asm time :', asm_unitALE['relative_time'])
print('asm shape:', asm_unitALE['asm_idl'].shape)
nspec, nfreq, ndim, ndim = asm_unitALE['asm_idl'].shape
asm mode : NORMAL @F2 asm time : [ 0. 3.99993896 7.99987793 11.99981689 15.99975586 19.99969482 23.99963379 27.99957275 31.99951172 35.99945068 39.99938965 43.99932861 47.99925232 51.99919128 55.99913025 59.99906921] asm shape: (16, 96, 5, 5)
i1 = index_from_date(64, asm_unit['freq'], epsi=None)
i2 = index_from_date(64, asm_unitALE['freq'], epsi=None)
i1, asm_unit['freq'][i1], i2, asm_unitALE['freq'][i1]
(57, 64.0, 57, 64.0)
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unit['asm_idl'][:, i1, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j], deg=True))
i=0, j=0 : [ 0. 19569292. 19567126. 19568844. 19569488. 19569428. 19568360. 19566660. 19571348. 19569760. 19568978. 19569054. 19566608. 19569090. 19567220. 19568286.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=1 : [ 0. 19449690. 19447414. 19449352. 19449048. 19450874. 19448468. 19448326. 19449620. 19448744. 19448992. 19449074. 19446880. 19449558. 19447298. 19450496.] [ 0. 0.00977211 -0.00378954 0.00543076 -0.00094565 0.00067971 0.0048035 0.00336218 -0.00071805 0.00154738 -0.00336428 0.00324421 0.00269584 0.00208715 0.00567587 0.00223507] i=0, j=2 : [ 0. 19529524. 19528498. 19529714. 19530704. 19529444. 19528430. 19527610. 19530370. 19529268. 19528852. 19528724. 19527758. 19528250. 19526892. 19528632.] [ 0. 0.6479112 1.8407507 3.0333145 4.217862 5.4025974 6.578345 7.752088 8.931496 10.121181 11.30142 12.494687 13.6476145 14.811148 15.981337 17.156614 ] i=0, j=3 : [ 0. 19398270. 19397292. 19397690. 19397544. 19399638. 19397284. 19397256. 19398876. 19398064. 19397000. 19398094. 19395184. 19395760. 19397288. 19396122.] [ 0. 0.7747546 2.3025057 3.857883 5.40566 6.929376 8.437868 9.946199 11.45015 12.957338 14.466389 15.977189 17.471016 18.984085 20.497 22.025557 ] i=0, j=4 : [ 0. 19456838. 19456580. 19456174. 19457690. 19456736. 19456248. 19454642. 19457754. 19455152. 19456510. 19455592. 19456500. 19456742. 19453608. 19454778.] [ 0. 0.7748144 2.3043892 3.8560944 5.401253 6.9308887 8.436542 9.9428215 11.447791 12.958006 14.470352 15.981724 17.471436 18.99007 20.494686 22.022432 ] i=1, j=1 : [ 0. 19330820. 19328432. 19330588. 19329348. 19333036. 19329308. 19330708. 19328646. 19328476. 19329744. 19329828. 19327884. 19330760. 19328110. 19333412.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=2 : [ 0. 19410172. 19409026. 19410462. 19410506. 19411136. 19408774. 19409502. 19408894. 19408496. 19409122. 19409004. 19408268. 19408966. 19407224. 19411080.] [ 0. 0.63811386 1.844556 3.0278811 4.2188106 5.401916 6.5735593 7.748743 8.9322195 10.119621 11.304823 12.491437 13.644886 14.809051 15.975668 17.154404 ] i=1, j=3 : [ 0. 19279722. 19278622. 19279242. 19278166. 19282116. 19278430. 19279936. 19278220. 19278100. 19278080. 19279180. 19276504. 19277284. 19278416. 19279366.] [ 0. 0.764951 2.3063164 3.8524513 5.406609 6.928696 8.433087 9.942861 11.450873 12.955778 14.469806 15.973936 17.468279 18.981985 20.491335 22.023352 ] i=1, j=4 : [ 0. 19337928. 19337546. 19337370. 19337944. 19338868. 19337032. 19336976. 19336730. 19334838. 19337222. 19336326. 19337444. 19337890. 19334394. 19337670.] [ 0. 0.7650108 2.3082004 3.8506613 5.402202 6.9302077 8.43176 9.939482 11.448515 12.956447 14.473768 15.978472 17.4687 18.987974 20.489017 22.02023 ] i=2, j=2 : [ 0. 19490526. 19490592. 19491328. 19492652. 19490196. 19489202. 19489274. 19490104. 19489526. 19489468. 19489122. 19489602. 19488122. 19487298. 19489700.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=3 : [ 0. 19359708. 19359838. 19359764. 19359946. 19360836. 19358492. 19359354. 19359062. 19358750. 19358064. 19358936. 19357474. 19356090. 19358138. 19357634.] [0. 0.12686585 0.46176744 0.8245694 1.1878387 1.5267832 1.8595581 2.1941137 2.5186713 2.836186 3.164993 3.482489 3.8233678 4.172932 4.515667 4.868936 ] i=2, j=4 : [ 0. 19418160. 19419026. 19418132. 19419974. 19417822. 19417346. 19416634. 19417822. 19415718. 19417448. 19416318. 19418670. 19416942. 19414346. 19416186.] [0. 0.12692213 0.4636373 0.82278866 1.1834147 1.5282868 1.8582442 2.1907296 2.516293 2.8368587 3.1689372 3.4870286 3.823814 4.1788926 4.51333 4.865806 ] i=3, j=3 : [ 0. 19229808. 19230018. 19229154. 19228204. 19232384. 19228706. 19230344. 19228948. 19228894. 19227596. 19229668. 19226296. 19225006. 19229886. 19226518.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=4 : [ 0. 19287868. 19288812. 19287128. 19287820. 19288992. 19287168. 19287246. 19287310. 19285478. 19286578. 19286664. 19287076. 19285448. 19285722. 19284676.] [ 0.0000000e+00 5.5698009e-05 1.8654208e-03 -1.7779486e-03 -4.4276314e-03 1.5007883e-03 -1.3108074e-03 -3.3858055e-03 -2.3832012e-03 6.7365810e-04 3.9392267e-03 4.5415279e-03 4.5302912e-04 5.9530078e-03 -2.3440330e-03 -3.1322318e-03] i=4, j=4 : [ 0. 19346102. 19347788. 19345272. 19347620. 19345768. 19345804. 19344316. 19345850. 19342228. 19345740. 19343832. 19348044. 19346076. 19341720. 19343008.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d :"%(i, j))
print(np.abs(asm_unitALE['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
i=0, j=0 : [ 0. 19553274. 19548478. 19547974. 19549188. 19550556. 19549624. 19550254. 19549374. 19555244. 19551908. 19550816. 19549286. 19547308. 19552160. 19550788.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=0, j=1 : [ 0. 19419328. 19417390. 19417316. 19416476. 19417660. 19417336. 19417486. 19416934. 19418810. 19418242. 19417188. 19415524. 19413796. 19417988. 19416302.] [ 0. 0.00950488 0.00230084 0.00263798 0.00356467 0.0011161 0.00878292 -0.00070744 -0.0002132 0.00529546 0.00521448 0.01055419 0.00423989 0.00519723 0.00799259 0.00169677] i=0, j=2 : [ 0. 19491022. 19487188. 19487676. 19487876. 19487818. 19488268. 19487544. 19487856. 19492380. 19489226. 19488236. 19487634. 19486508. 19488674. 19488730.] [ 0. 0.7373488 2.1312678 3.5367813 4.9502673 6.362338 7.7790794 9.170701 10.572221 11.969017 13.360941 14.770489 16.18052 17.589931 19.018991 20.418804 ] i=0, j=3 : [ 0. 19331044. 19326634. 19327372. 19327888. 19328546. 19327060. 19328268. 19327080. 19329286. 19328770. 19327696. 19326172. 19325770. 19328600. 19328538.] [ 0. 0.88160044 2.631748 4.378882 6.125564 7.882567 9.654468 11.414589 13.170698 14.913573 16.645483 18.36368 20.075768 21.795204 23.537054 25.249285 ] i=0, j=4 : [ 0. 19425522. 19423888. 19421780. 19422502. 19422652. 19421890. 19423642. 19421692. 19424866. 19422528. 19422144. 19421214. 19421314. 19424592. 19421494.] [ 0. 0.8787622 2.6308515 4.371177 6.129347 7.888136 9.650419 11.414536 13.170023 14.911857 16.648186 18.368034 20.07701 21.800316 23.534191 25.25165 ] i=1, j=1 : [ 0. 19286300. 19287182. 19287528. 19284666. 19285666. 19285942. 19285616. 19285392. 19283326. 19285488. 19284472. 19282676. 19281196. 19284740. 19282744.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=1, j=2 : [ 0. 19357496. 19356510. 19357412. 19355584. 19355336. 19356400. 19355198. 19355836. 19356384. 19355990. 19355040. 19354288. 19353412. 19354946. 19354670.] [ 0. 0.72783005 2.1289625 3.5341594 4.946702 6.36121 7.770282 9.171383 10.572434 11.963732 13.355726 14.759934 16.176262 17.584742 19.010971 20.417131 ] i=1, j=3 : [ 0. 19198614. 19197034. 19198178. 19196684. 19197146. 19196280. 19197002. 19196150. 19194430. 19196634. 19195596. 19193930. 19193774. 19195972. 19195578.] [ 0. 0.872078 2.6294417 4.376264 6.121999 7.8814363 9.645668 11.415266 13.170912 14.908288 16.640268 18.353127 20.0715 21.790016 23.529026 25.24762 ] i=1, j=4 : [ 0. 19292444. 19293636. 19291952. 19290656. 19290610. 19290468. 19291728. 19290120. 19289344. 19289750. 19289398. 19288322. 19288664. 19291306. 19287896.] [ 0. 0.8692404 2.6285453 4.36856 6.1257825 7.887005 9.641619 11.415213 13.170239 14.90657 16.642971 18.357483 20.072748 21.79513 23.52616 25.249983 ] i=2, j=2 : [ 0. 19429868. 19427016. 19428476. 19427684. 19426174. 19428014. 19425920. 19427446. 19430634. 19427668. 19426762. 19427080. 19426828. 19426322. 19427782.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=2, j=3 : [ 0. 19270642. 19267174. 19268886. 19268404. 19267638. 19267544. 19267382. 19267388. 19268272. 19267920. 19266924. 19266330. 19266784. 19266968. 19268280.] [0. 0.14426506 0.5005295 0.8420862 1.1753082 1.5202311 1.8754095 2.2438707 2.5984542 2.9445584 3.2845592 3.5931947 3.8952105 4.2052646 4.518044 4.8305154 ] i=2, j=4 : [ 0. 19364802. 19364132. 19363014. 19362718. 19361442. 19362082. 19362452. 19361720. 19363560. 19361388. 19361076. 19361082. 19362034. 19362656. 19360950.] [0. 0.14141549 0.49960417 0.8343597 1.1790913 1.5258288 1.8713833 2.243832 2.5978272 2.9428372 3.2872038 3.5975516 3.8964689 4.2104 4.515198 4.8328404 ] i=3, j=3 : [2.5000000e-01 1.9112784e+07 1.9108696e+07 1.9110662e+07 1.9110476e+07 1.9110452e+07 1.9108464e+07 1.9110204e+07 1.9108702e+07 1.9107316e+07 1.9109528e+07 1.9108436e+07 1.9106958e+07 1.9108102e+07 1.9108968e+07 1.9110128e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] i=3, j=4 : [ 0. 19206168. 19204856. 19204016. 19204016. 19203490. 19202220. 19204498. 19202258. 19201808. 19202230. 19201816. 19200928. 19202570. 19203872. 19202034.] [ 0.0000000e+00 -2.8526820e-03 -9.3305862e-04 -7.7318209e-03 3.7831173e-03 5.6054625e-03 -4.0199384e-03 -3.4309749e-05 -6.1391771e-04 -1.7216954e-03 2.6324652e-03 4.3564546e-03 1.2614906e-03 5.1410114e-03 -2.8410887e-03 2.3184430e-03] i=4, j=4 : [2.5000000e-01 1.9300008e+07 1.9301500e+07 1.9297826e+07 1.9298012e+07 1.9296980e+07 1.9296436e+07 1.9299256e+07 1.9296272e+07 1.9296768e+07 1.9295380e+07 1.9295654e+07 1.9295356e+07 1.9297502e+07 1.9299250e+07 1.9294380e+07] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
i = 0
j = 2
print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j]))
print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
[ nan 1.0019753 1.0021198 1.0021571 1.0021976 1.0021359 1.0020609 1.0020559 1.0021816 1.0018924 1.0020332 1.0020776 1.0020589 1.0021422 1.001961 1.0020475] [ nan -0.0894376 -0.290517 -0.5034669 -0.732405 -0.95974094 -1.2007345 -1.4186138 -1.6407254 -1.8478371 -2.059522 -2.2758024 -2.5329041 -2.7787838 -3.0376558 -3.2621908 ]
/tmp/ipykernel_244570/1627360238.py:3: RuntimeWarning: invalid value encountered in true_divide print(np.abs(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j])) /tmp/ipykernel_244570/1627360238.py:4: RuntimeWarning: invalid value encountered in true_divide print(np.angle(asm_unit['asm_idl'][:, i1, i, j] / asm_unitALE['asm_idl'][:, i2, i, j], deg=True))
k0 = 1
for i in range(5):
for j in range(5):
if i <= j:
print("i=%d, j=%d => %8.5f %8.5f %5.3f %5.3f"%(i, j,
np.min(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])),
np.max(np.abs(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j])),
np.min(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))),
np.max(abs(np.angle(asm_unit['asm_idl'][k0:, i1, i, j] / asm_unitALE['asm_idl'][k0:, i2, i, j], deg=True))))
)
i=0, j=0 => 1.00074 1.00112 0.000 0.000 i=0, j=1 => 1.00151 1.00184 0.000 0.009 i=0, j=2 => 1.00189 1.00220 0.089 3.262 i=0, j=3 => 1.00348 1.00371 0.107 3.224 i=0, j=4 => 1.00149 1.00186 0.104 3.229 i=1, j=1 => 1.00214 1.00263 0.000 0.000 i=1, j=2 => 1.00269 1.00291 0.090 3.263 i=1, j=3 => 1.00422 1.00443 0.107 3.224 i=1, j=4 => 1.00223 1.00258 0.104 3.230 i=2, j=2 => 1.00303 1.00334 0.000 0.000 i=2, j=3 => 1.00462 1.00484 0.002 0.120 i=2, j=4 => 1.00267 1.00297 0.002 0.118 i=3, j=3 => 1.00609 1.00638 0.000 0.000 i=3, j=4 => 1.00425 1.00449 0.000 0.008 i=4, j=4 => 1.00220 1.00273 0.000 0.000