Closed jameswilburlewis closed 1 year ago
I suspect this is the issue:
fac_matrix_make, mms_fgm_name1,other_dim='xgse',newname = mms_fgm_name1+'_fac_mat'
tvector_rotate, mms_fgm_name1+'_fac_mat', mms_fgm_name1, newname = mms_fgm_name1+'_fac'
[...]
twavpol,'mms1_fgm_b_gse_'+fgm_data_rate+'_l2_bvec_fac' ,$
nopfft=nopfft_input,steplength=steplength_input,bin_freq=bin_freq_input
He's using the same FGM data to generate the FAC matrices, then (after rotating to FAC) to do the wavpol analysis. So the FAC-X and FAC-Y components are zeroed out in the data he's passing to twavpol. The degpol quantity is coming out 0 everywhere (i.e. all noise) and that's causing the other quantities to get NaN filled. The twavpol crib sheets for THEMIS and MMS use FGM data to establish the FAC system, then use higher cadence SCM data to do the polarization analysis (so there's something there in the X and Y components).
I suggested possibly decimating the FGM data to generate FAC matrices at a lower cadence, then using the full resolution data for the wavpol analysis. I also pointed him to the THEMIS FGM wave survey code & example summary plot, to see a different technique for analyzing FGM waves,
Via email from aaabid@ustc.edu.cn:
I am calculating EMIC waves events. I have calculated wave normal angle through scm and fgm. Referee suggest that calculate through fgm. but through fgm no figure shown in the plot. I have attached both code.
His code re-fgm.pro:
re-fgm.pro.txt