Roll back IQU=0 for pol > 1, test multiple smoothings with nan handling
|
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 353 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 559 KiB After Width: | Height: | Size: 735 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_FWHM100_rot.png
Normal file
|
After Width: | Height: | Size: 334 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_FWHM100_rot_IQU.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_FWHM100_rot_P.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_FWHM100_rot_P_err.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_FWHM100_rot_SNRi.png
Normal file
|
After Width: | Height: | Size: 330 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_FWHM100_rot_SNRp.png
Normal file
|
After Width: | Height: | Size: 650 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100.png
Normal file
|
After Width: | Height: | Size: 453 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_IQU.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_P.png
Normal file
|
After Width: | Height: | Size: 337 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_P_err.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_SNRi.png
Normal file
|
After Width: | Height: | Size: 453 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_SNRp.png
Normal file
|
After Width: | Height: | Size: 562 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_rot.png
Normal file
|
After Width: | Height: | Size: 310 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_rot2.png
Normal file
|
After Width: | Height: | Size: 310 KiB |
|
After Width: | Height: | Size: 78 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_rot2_P.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
|
After Width: | Height: | Size: 167 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 185 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_rot_IQU.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
plots/3C405_x136060/3C405_FOC_gaussian_after_FWHM100_rot_P.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 177 KiB |
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 562 KiB |
@@ -102,11 +102,11 @@ def main():
|
|||||||
smoothing_FWHM = 1.00 #If None, no smoothing is done
|
smoothing_FWHM = 1.00 #If None, no smoothing is done
|
||||||
smoothing_scale = 'arcsec' #pixel or arcsec
|
smoothing_scale = 'arcsec' #pixel or arcsec
|
||||||
# Rotation
|
# Rotation
|
||||||
rotate_stokes = False #rotation to North convention can give erroneous results
|
rotate_stokes = True #rotation to North convention can give erroneous results
|
||||||
rotate_data = False #rotation to North convention can give erroneous results
|
rotate_data = False #rotation to North convention can give erroneous results
|
||||||
# Polarization map output
|
# Polarization map output
|
||||||
figname = '3C405_FOC' #target/intrument name
|
figname = '3C405_FOC' #target/intrument name
|
||||||
figtype = '_combine_FWHM100' #additionnal informations
|
figtype = '_combine_FWHM100_rot' #additionnal informations
|
||||||
SNRp_cut = 3 #P measurments with SNR>3
|
SNRp_cut = 3 #P measurments with SNR>3
|
||||||
SNRi_cut = 30 #I measurments with SNR>30, which implies an uncertainty in P of 4.7%.
|
SNRi_cut = 30 #I measurments with SNR>30, which implies an uncertainty in P of 4.7%.
|
||||||
step_vec = 1 #plot all vectors in the array. if step_vec = 2, then every other vector will be plotted
|
step_vec = 1 #plot all vectors in the array. if step_vec = 2, then every other vector will be plotted
|
||||||
|
|||||||
@@ -1018,8 +1018,8 @@ def compute_Stokes(data_array, error_array, headers, FWHM=None,
|
|||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
#I_stokes[mask]=0.
|
#I_stokes[mask]=0.
|
||||||
Q_stokes[mask]=0.
|
#Q_stokes[mask]=0.
|
||||||
U_stokes[mask]=0.
|
#U_stokes[mask]=0.
|
||||||
|
|
||||||
#Stokes covariance matrix
|
#Stokes covariance matrix
|
||||||
Stokes_cov = np.zeros((3,3,I_stokes.shape[0],I_stokes.shape[1]))
|
Stokes_cov = np.zeros((3,3,I_stokes.shape[0],I_stokes.shape[1]))
|
||||||
@@ -1427,4 +1427,20 @@ def rotate2_Stokes(I_stokes, Q_stokes, U_stokes, Stokes_cov, headers, ang):
|
|||||||
|
|
||||||
new_headers.append(new_header)
|
new_headers.append(new_header)
|
||||||
|
|
||||||
|
# Nan handling :
|
||||||
|
fmax = np.finfo(np.float64).max
|
||||||
|
|
||||||
|
new_I_stokes[np.isnan(new_I_stokes)] = 0.
|
||||||
|
new_Q_stokes[new_I_stokes == 0.] = 0.
|
||||||
|
new_U_stokes[new_I_stokes == 0.] = 0.
|
||||||
|
new_Q_stokes[np.isnan(new_Q_stokes)] = 0.
|
||||||
|
new_U_stokes[np.isnan(new_U_stokes)] = 0.
|
||||||
|
new_Stokes_cov[np.isnan(new_Stokes_cov)] = fmax
|
||||||
|
P[np.isnan(P)] = 0.
|
||||||
|
s_P[np.isnan(s_P)] = fmax
|
||||||
|
s_PA[np.isnan(s_PA)] = fmax
|
||||||
|
debiased_P[np.isnan(debiased_P)] = 0.
|
||||||
|
s_P_P[np.isnan(s_P_P)] = fmax
|
||||||
|
s_PA_P[np.isnan(s_PA_P)] = fmax
|
||||||
|
|
||||||
return new_I_stokes, new_Q_stokes, new_U_stokes, new_Stokes_cov, P, debiased_P, s_P, s_P_P, PA, s_PA, s_PA_P, new_headers
|
return new_I_stokes, new_Q_stokes, new_U_stokes, new_Stokes_cov, P, debiased_P, s_P, s_P_P, PA, s_PA, s_PA_P, new_headers
|
||||||
|
|||||||