1
|
IDL>
|
2
|
IDL>
|
3
|
IDL> img = COMPLEX(0,1)
|
4
|
IDL>
|
5
|
IDL> ; vecteurs B et E dans le repère des axes principaux
|
6
|
IDL> aa = 2.000000 * 1e+3
|
7
|
IDL> bb = 1.000000 * 1e+3
|
8
|
IDL>
|
9
|
IDL> B_PA = [aa,-img*bb,0]
|
10
|
IDL> vphi = +1.000000 * 1e+1
|
11
|
IDL> Et = -vphi*[img*bb,aa,0.]
|
12
|
IDL> El = [0.,0.,0.*aa*(0.5 + img*0.15)]
|
13
|
IDL> E_PA = Et + El
|
14
|
IDL>
|
15
|
IDL> pm, B_PA
|
16
|
IDL> pm, E_PA
|
17
|
IDL>
|
18
|
IDL> ; matrice de passage, orthonormée directe, du repère des axes principaux vers le repère du SCM
|
19
|
IDL> phi_n = 90.00 * !DPI / 180
|
20
|
IDL> theta_n = 30.00 * !DPI / 180
|
21
|
IDL> n1 = SIN(theta_n)*COS(phi_n)
|
22
|
IDL> n2 = SIN(theta_n)*SIN(phi_n)
|
23
|
IDL> n3 = COS(theta_n)
|
24
|
IDL> print, n1^2+n2^2+n3^2
|
25
|
IDL> print, n1, n2, n3
|
26
|
IDL>
|
27
|
IDL> A = n2 / SQRT(1-n3^2)
|
28
|
IDL> B = -n1 / SQRT(1-n3^2)
|
29
|
IDL> C = 0.
|
30
|
IDL> D = n1*n3 / SQRT(1-n3^2)
|
31
|
IDL> E = n2*n3 / SQRT(1-n3^2)
|
32
|
IDL> F = -SQRT(1-n3^2)
|
33
|
IDL> print, A^2+B^2+C^2
|
34
|
IDL> print, D^2+E^2+F^2
|
35
|
IDL>
|
36
|
IDL> invR_M = [[A,B,C],[D,E,F],[n1,n2,n3]]
|
37
|
IDL> pm, invR_M
|
38
|
IDL> print, DETERM(invR_M)
|
39
|
IDL> pm, invR_M # TRANSPOSE(invR_M)
|
40
|
IDL>
|
41
|
IDL> ; vecteur B et E dans le repère du SCM
|
42
|
IDL> B_SCM = invR_M # B_PA
|
43
|
IDL> E_SCM = invR_M # E_PA
|
44
|
IDL>
|
45
|
IDL> pm, B_SCM
|
46
|
IDL> pm, E_SCM
|
47
|
IDL>
|
48
|
IDL> ; matrice spectrale 6x6 dans le repère du SCM
|
49
|
IDL> BE_SCM = [B_SCM,E_SCM]
|
50
|
IDL> sm_6x6 = BE_SCM # CONJ(BE_SCM)
|
51
|
IDL>
|
52
|
IDL> pm, sm_6x6
|
53
|
IDL> pm, IMAGINARY(sm_6x6) / (aa*bb)
|
54
|
IDL> print, n1, n2, n3
|
55
|
IDL>
|
56
|
IDL> R1 = RANDOMN(seed, 6) * aa * 1/40
|
57
|
IDL> R2 = RANDOMN(seed, 6) * img * bb * 1/40
|
58
|
IDL> RR = R1 + R2
|
59
|
IDL>
|
60
|
IDL> sm_6x6 = sm_6x6 + RR # CONJ(RR)
|
61
|
IDL>
|
62
|
IDL> ; matrice spectrale 5x5 dans le repère du SCM
|
63
|
IDL> sm_5x5 = sm_6x6(0:4,0:4)
|
64
|
IDL>
|
65
|
IDL> ; mise en forme pour routine propre sous idl
|
66
|
IDL> nfreq = 1
|
67
|
IDL> sm_idl = COMPLEXARR(5,5,1,nfreq)
|
68
|
IDL> IF nfreq EQ 1 THEN sm_idl(*,*) = sm_5x5 ELSE FOR k=0, nfreq-1 DO sm_idl(*,*,0,k) = sm_5x5
|
69
|
IDL>
|
70
|
IDL> ; conversion de la matrice spectrale 5x5 dans le format du prog C
|
71
|
IDL> NB_VALUES_PER_SPECTRAL_MATRIX = 25
|
72
|
IDL> NB_BINS_COMPRESSED_MATRIX_f0 = nfreq
|
73
|
IDL> TOTAL_SIZE_COMPRESSED_MATRIX_f0 = NB_BINS_COMPRESSED_MATRIX_f0 * NB_VALUES_PER_SPECTRAL_MATRIX
|
74
|
IDL> sm_c = FLTARR(TOTAL_SIZE_COMPRESSED_MATRIX_f0)
|
75
|
IDL>
|
76
|
IDL> sm_idl2c, sm_idl, sm_c
|
77
|
IDL> pm, sm_idl(*,*,0,0)
|
78
|
IDL> print, sm_c(0:24)
|
79
|
IDL>
|
80
|
IDL> ; enregistrement dans un fichier (binaire ou ascii)
|
81
|
IDL> ; file_name = 'C:\Documents and Settings\chust\DD CHUST\Missions\Solar Orbiter\LFR\Prog C\tests bp Paul\tests1\sm_test1.dat'
|
82
|
IDL> ;file_name = '/WIN/Users/chust/DD CHUST/Missions/Solar Orbiter/LFR/Prog C/tests bp Paul/tests2/sm_test.dat'
|
83
|
IDL> file_name = '/WIN/Users/chust/DD CHUST/Missions/Solar Orbiter/LFR/Prog C/tests bp Paul/tests7/sm_test.dat'
|
84
|
IDL> write_sm_c_binary, sm_c, file_name
|
85
|
IDL>
|
86
|
IDL> ;file_name = 'C:\Documents and Settings\chust\DD CHUST\Missions\Solar Orbiter\LFR\Prog C\tests bp Paul\tests1\sm_test1.txt'
|
87
|
IDL> ;file_name = '/WIN/Users/chust/DD CHUST/Missions/Solar Orbiter/LFR/Prog C/tests bp Paul/tests2/sm_test.txt'
|
88
|
IDL> file_name = '/WIN/Users/chust/DD CHUST/Missions/Solar Orbiter/LFR/Prog C/tests bp Paul/tests7/sm_test.txt'
|
89
|
IDL> write_sm_c_ascii, sm_c, file_name
|
90
|
IDL>
|
91
|
IDL> ; calcul de BP sous idl
|
92
|
IDL>
|
93
|
IDL> sm_3b2e_characterization_lfr, sm_idl, trace_sm_b, trace_sm_e, $
|
94
|
IDL> degree_polar_3b, degree_polar_2e, degree_polar_3b2e, $
|
95
|
IDL> wave_nvector_3b, wave_ellipti_3b, $
|
96
|
IDL> Sx, vphi, Sx_arg, vphi_arg, $
|
97
|
IDL> k44_pe=1., k55_pe=1, k45_pe=COMPLEX(1,1), $
|
98
|
IDL> k14_sx=COMPLEX(1,1), k15_sx=COMPLEX(1,1), $
|
99
|
IDL> k24_sx=COMPLEX(1,1), k25_sx=COMPLEX(1,1), $
|
100
|
IDL> k34_sx=COMPLEX(1,1), k35_sx=COMPLEX(1,1), $
|
101
|
IDL> k24_ny=COMPLEX(1,1), k25_ny=COMPLEX(1,1), $
|
102
|
IDL> k34_ny=COMPLEX(1,1), k35_ny=COMPLEX(1,1), $
|
103
|
IDL> k24_nz=COMPLEX(1,1), k25_nz=COMPLEX(1,1), $
|
104
|
IDL> k34_nz=COMPLEX(1,1), k35_nz=COMPLEX(1,1), $
|
105
|
IDL> alphaM = 45.*(!PI/180)
|
106
|
IDL>
|
107
|
IDL> PRINT, 'PSD_B :', trace_sm_b, format='(A, 1e16.8)'
|
108
|
IDL> PRINT, 'PSD_E :', trace_sm_e, format='(A, 1e16.8)'
|
109
|
IDL> PRINT, 'DOP :', degree_polar_3b^2, format='(A, 1e16.8)'
|
110
|
IDL> PRINT, 'ELLIP :', wave_ellipti_3b, format='(A, 1e16.8)'
|
111
|
IDL> PRINT, 'NVEC :', wave_nvector_3b, format='(A, 3e16.8)'
|
112
|
IDL> PRINT, 'SX :', Sx, format='(A, 2(e16.8))'
|
113
|
IDL> PRINT, 'SX_arg :', Sx_arg, format='(A, I16)'
|
114
|
IDL> PRINT, 'VPHI :', vphi, format='(A, 2(e16.8))'
|
115
|
IDL> PRINT, 'VPHI_arg:', vphi_arg, format='(A, I16)'
|
116
|
IDL>
|
117
|
IDL> sm_normalization, sm_idl, sm_idl_norm
|
118
|
IDL> pm, sm_idl_norm(*,*,0,0)
|
119
|
( 2000.00, 0.00000)
|
120
|
( -0.00000, -1000.00)
|
121
|
( 0.00000, 0.00000)
|
122
|
( 0.00000, -10000.0)
|
123
|
( -20000.0, 0.00000)
|
124
|
( 0.00000, 0.00000)
|
125
|
1.0000000
|
126
|
3.0616170e-17 0.50000000 0.86602540
|
127
|
1.0000000
|
128
|
1.0000000
|
129
|
1.0000000 5.3028762e-17 3.0616170e-17
|
130
|
-6.1232340e-17 0.86602540 0.50000000
|
131
|
0.0000000 -0.50000000 0.86602540
|
132
|
1.0000000
|
133
|
1.0000000 -3.0814879e-33 0.0000000
|
134
|
-3.0814879e-33 1.0000000 0.0000000
|
135
|
0.0000000 0.0000000 1.0000000
|
136
|
( 2000.0000, -5.3028762e-14)
|
137
|
( -1.2246468e-13, -866.02540)
|
138
|
( 0.0000000, 500.00000)
|
139
|
( -1.0605752e-12, -10000.000)
|
140
|
( -17320.508, 6.1232340e-13)
|
141
|
( 10000.000, 0.0000000)
|
142
|
( 4000000.0, 0.0000000)( -1.9900510e-10, 1732050.8)( -2.6514381e-11, -1000000.0)( -1.5908629e-09, 20000000.)( -34641016., -3.0616170e-10)
|
143
|
( 20000000., -5.3028762e-10)
|
144
|
( -1.9900510e-10, -1732050.8)( 750000.00, 0.0000000)( -433012.70, 6.1232340e-11)( 8660254.0, -3.0616170e-10)( 1.5908629e-09, 15000000.)
|
145
|
( -1.2246468e-09, -8660254.0)
|
146
|
( -2.6514381e-11, 1000000.0)( -433012.70, -6.1232340e-11)( 250000.00, 0.0000000)( -5000000.0, -5.3028762e-10)( 3.0616170e-10, -8660254.0)
|
147
|
( 0.0000000, 5000000.0)
|
148
|
( -1.5908629e-09, -20000000.)( 8660254.0, 3.0616170e-10)( -5000000.0, 5.3028762e-10)( 1.0000000e+08, 0.0000000)( 1.2246468e-08, 1.7320508e+08)
|
149
|
( -1.0605752e-08, -1.0000000e+08)
|
150
|
( -34641016., 3.0616170e-10)( 1.5908629e-09, -15000000.)( 3.0616170e-10, 8660254.0)( 1.2246468e-08, -1.7320508e+08)( 3.0000000e+08, 0.0000000)
|
151
|
( -1.7320508e+08, 6.1232340e-09)
|
152
|
( 20000000., 5.3028762e-10)( -1.2246468e-09, 8660254.0)( 0.0000000, -5000000.0)( -1.0605752e-08, 1.0000000e+08)( -1.7320508e+08, -6.1232340e-09)
|
153
|
( 1.e+08, 0.0000000)
|
154
|
0.0000000 0.86602540 -0.50000000 10.000000 -1.5308085e-16 -2.6514381e-16
|
155
|
-0.86602540 0.0000000 3.0616170e-17 -1.5308085e-16 7.5000000 -4.3301270
|
156
|
0.50000000 -3.0616170e-17 0.0000000 -2.6514381e-16 -4.3301270 2.5000000
|
157
|
-10.000000 1.5308085e-16 2.6514381e-16 0.0000000 86.602540 -50.000000
|
158
|
1.5308085e-16 -7.5000000 4.3301270 -86.602540 0.0000000 3.0616170e-15
|
159
|
2.6514381e-16 4.3301270 -2.5000000 50.000000 -3.0616170e-15 0.0000000
|
160
|
3.0616170e-17 0.50000000 0.86602540
|
161
|
( 4.00110e+06, 0.00000)( -2198.91, 1.73193e+06)( 1881.06, -1.00002e+06)( 623.725, 2.00017e+07)( -3.46423e+07, -1443.34)
|
162
|
( -2198.91, -1.73193e+06)( 754425., 0.00000)( -436785., 234.539)( 8.65882e+06, -3316.11)( 2717.20, 1.50028e+07)
|
163
|
( 1881.06, 1.00002e+06)( -436785., -234.539)( 253229., 0.00000)( -4.99895e+06, 2903.30)( -2170.48, -8.66275e+06)
|
164
|
( 623.725, -2.00017e+07)( 8.65882e+06, 3316.11)( -4.99895e+06, -2903.30)( 1.00003e+08, 0.00000)( -2947.39, 1.73206e+08)
|
165
|
( -3.46423e+07, 1443.34)( 2717.20, -1.50028e+07)( -2170.48, 8.66275e+06)( -2947.39, -1.73206e+08)( 3.00003e+08, 0.00000)
|
166
|
4.00110e+06 -2198.91 1.73193e+06 1881.06 -1.00002e+06 623.725 2.00017e+07 -3.46423e+07 -1443.34 754425. -436785. 234.539 8.65882e+06
|
167
|
-3316.11 2717.20 1.50028e+07 253229. -4.99895e+06 2903.30 -2170.48 -8.66275e+06 1.00003e+08 -2947.39 1.73206e+08 3.00003e+08
|
168
|
TRACE_SM_B FLOAT = Array[1]
|
169
|
TRACE_SM_E FLOAT = Array[1]
|
170
|
DEGREE_POLAR_3B FLOAT = Array[1]
|
171
|
DEGREE_POLAR_2E FLOAT = Array[1]
|
172
|
DEGREE_POLAR_3B2E
|
173
|
FLOAT = Array[1]
|
174
|
WAVE_NVECTOR_3B FLOAT = Array[3]
|
175
|
WAVE_ELLIPTI_3B FLOAT = Array[1]
|
176
|
SX COMPLEX = Array[1]
|
177
|
VPHI COMPLEX = Array[1]
|
178
|
SX_ARG INT = Array[1]
|
179
|
VPHI_ARG INT = Array[1]
|
180
|
PSD_B : 5.00874950e+06
|
181
|
PSD_E : 2.26797168e+08
|
182
|
DOP : 9.96132076e-01
|
183
|
ELLIP : 7.98565149e-01
|
184
|
NVEC : 1.17274933e-04 5.00031590e-01 8.66007149e-01
|
185
|
SX : -4.64141600e+06 -5.73210920e+07
|
186
|
SX_arg : 1
|
187
|
VPHI : 1.02704763e+01 -2.75164342e+00
|
188
|
VPHI_arg: 0
|
189
|
( 4.00110e+06, 0.00000)( -0.00126564, 0.996859)( 0.00186877, -0.993484)( 3.11815e-05, 0.999933)( -0.999894, -4.16596e-05)
|
190
|
( -0.00126564, -0.996859)( 754425., 0.00000)( -0.999317, 0.000536599)( 0.996884, -0.000381781)( 0.000180613, 0.997241)
|
191
|
( 0.00186877, 0.993484)( -0.999317, -0.000536599)( 253229., 0.00000)( -0.993381, 0.000576937)( -0.000249021, -0.993885)
|
192
|
( 3.11815e-05, -0.999933)( 0.996884, 0.000381781)( -0.993381, -0.000576937)( 1.00003e+08, 0.00000)( -1.70164e-05, 0.999986)
|
193
|
( -0.999894, 4.16596e-05)( 0.000180613, -0.997241)( -0.000249021, 0.993885)( -1.70164e-05, -0.999986)( 3.00003e+08, 0.00000)
|
194
|
IDL>
|
195
|
|
196
|
|
197
|
|
198
|
|