revamp imagerie
|
Before Width: | Height: | Size: 1024 KiB |
BIN
data/IC5063_x3nl030/IR/IC5063_WFPC2_F606W.png
Normal file
|
After Width: | Height: | Size: 741 KiB |
|
Before Width: | Height: | Size: 566 KiB After Width: | Height: | Size: 684 KiB |
|
Before Width: | Height: | Size: 626 KiB After Width: | Height: | Size: 613 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 316 KiB |
|
Before Width: | Height: | Size: 270 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 307 KiB After Width: | Height: | Size: 296 KiB |
|
Before Width: | Height: | Size: 351 KiB After Width: | Height: | Size: 327 KiB |
|
Before Width: | Height: | Size: 838 KiB After Width: | Height: | Size: 828 KiB |
|
Before Width: | Height: | Size: 854 KiB After Width: | Height: | Size: 843 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol.png
Normal file
|
After Width: | Height: | Size: 746 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_IQU.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_I_err.png
Normal file
|
After Width: | Height: | Size: 452 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_P.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_P_err.png
Normal file
|
After Width: | Height: | Size: 432 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_P_flux.png
Normal file
|
After Width: | Height: | Size: 459 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_SNRi.png
Normal file
|
After Width: | Height: | Size: 942 KiB |
BIN
plots/IC5063_x3nl030/IC5063_FOC_combine_FWHM020_pol_SNRp.png
Normal file
|
After Width: | Height: | Size: 957 KiB |
|
Before Width: | Height: | Size: 589 KiB After Width: | Height: | Size: 436 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010.png
Normal file
|
After Width: | Height: | Size: 556 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_IQU.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_I_err.png
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_P.png
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_P_err.png
Normal file
|
After Width: | Height: | Size: 274 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_P_flux.png
Normal file
|
After Width: | Height: | Size: 336 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_SNRi.png
Normal file
|
After Width: | Height: | Size: 517 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM010_SNRp.png
Normal file
|
After Width: | Height: | Size: 656 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020.png
Normal file
|
After Width: | Height: | Size: 526 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_IQU.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_I_err.png
Normal file
|
After Width: | Height: | Size: 338 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_P.png
Normal file
|
After Width: | Height: | Size: 303 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_P_err.png
Normal file
|
After Width: | Height: | Size: 337 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_P_flux.png
Normal file
|
After Width: | Height: | Size: 391 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_SNRi.png
Normal file
|
After Width: | Height: | Size: 618 KiB |
BIN
plots/MKN463_x2rp030/MRK463_FOC_combine_FWHM020_SNRp.png
Normal file
|
After Width: | Height: | Size: 936 KiB |
BIN
plots/NGC1068_x274020/NGC1068_Capetti_vs_us.png
Normal file
|
After Width: | Height: | Size: 630 KiB |
BIN
plots/NGC1068_x274020/NGC1068_FOC_analysis.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
@@ -20,17 +20,17 @@ from astropy.wcs import WCS
|
|||||||
def main():
|
def main():
|
||||||
##### User inputs
|
##### User inputs
|
||||||
## Input and output locations
|
## Input and output locations
|
||||||
globals()['data_folder'] = "../data/NGC1068_x274020/"
|
# globals()['data_folder'] = "../data/NGC1068_x274020/"
|
||||||
infiles = ['x274020at.c0f.fits','x274020bt.c0f.fits','x274020ct.c0f.fits',
|
# infiles = ['x274020at.c0f.fits','x274020bt.c0f.fits','x274020ct.c0f.fits',
|
||||||
'x274020dt.c0f.fits','x274020et.c0f.fits','x274020ft.c0f.fits',
|
# 'x274020dt.c0f.fits','x274020et.c0f.fits','x274020ft.c0f.fits',
|
||||||
'x274020gt.c0f.fits','x274020ht.c0f.fits','x274020it.c0f.fits']
|
# 'x274020gt.c0f.fits','x274020ht.c0f.fits','x274020it.c0f.fits']
|
||||||
psf_file = 'NGC1068_f253m00.fits'
|
## psf_file = 'NGC1068_f253m00.fits'
|
||||||
globals()['plots_folder'] = "../plots/NGC1068_x274020/"
|
# globals()['plots_folder'] = "../plots/NGC1068_x274020/"
|
||||||
|
|
||||||
# globals()['data_folder'] = "../data/IC5063_x3nl030/"
|
globals()['data_folder'] = "../data/IC5063_x3nl030/"
|
||||||
# infiles = ['x3nl0301r_c0f.fits','x3nl0302r_c0f.fits','x3nl0303r_c0f.fits']
|
infiles = ['x3nl0301r_c0f.fits','x3nl0302r_c0f.fits','x3nl0303r_c0f.fits']
|
||||||
# psf_file = 'IC5063_f502m00.fits'
|
# psf_file = 'IC5063_f502m00.fits'
|
||||||
# globals()['plots_folder'] = "../plots/IC5063_x3nl030/"
|
globals()['plots_folder'] = "../plots/IC5063_x3nl030/"
|
||||||
|
|
||||||
# globals()['data_folder'] = "../data/NGC1068_x14w010/"
|
# globals()['data_folder'] = "../data/NGC1068_x14w010/"
|
||||||
# infiles = ['x14w0101t_c0f.fits','x14w0102t_c0f.fits','x14w0103t_c0f.fits',
|
# infiles = ['x14w0101t_c0f.fits','x14w0102t_c0f.fits','x14w0103t_c0f.fits',
|
||||||
@@ -122,10 +122,10 @@ def main():
|
|||||||
crop = False #Crop to desired ROI
|
crop = False #Crop to desired ROI
|
||||||
final_display = False
|
final_display = False
|
||||||
# Polarization map output
|
# Polarization map output
|
||||||
figname = 'NGC1068_FOC' #target/intrument name
|
figname = 'IC5063_FOC' #target/intrument name
|
||||||
figtype = '_combine_FWHM020' #additionnal informations
|
figtype = '_combine_FWHM020' #additionnal informations
|
||||||
SNRp_cut = 5. #P measurments with SNR>3
|
SNRp_cut = 3. #P measurments with SNR>3
|
||||||
SNRi_cut = 50. #I measurments with SNR>30, which implies an uncertainty in P of 4.7%.
|
SNRi_cut = 60. #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
|
||||||
# if step_vec = 0 then all vectors are displayed at full length
|
# if step_vec = 0 then all vectors are displayed at full length
|
||||||
|
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ def polarization_map(Stokes, data_mask=None, rectangle=None, SNRp_cut=3., SNRi_c
|
|||||||
if display is None:
|
if display is None:
|
||||||
# If no display selected, show intensity map
|
# If no display selected, show intensity map
|
||||||
vmin, vmax = 0., np.max(stkI.data[stkI.data > 0.]*convert_flux)
|
vmin, vmax = 0., np.max(stkI.data[stkI.data > 0.]*convert_flux)
|
||||||
im = ax.imshow(stkI.data*convert_flux, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(stkI.data*convert_flux, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda}$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda}$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
||||||
levelsI = np.linspace(vmax*0.01, vmax*0.99, 10)
|
levelsI = np.linspace(vmax*0.01, vmax*0.99, 10)
|
||||||
print("Total flux contour levels : ", levelsI)
|
print("Total flux contour levels : ", levelsI)
|
||||||
@@ -281,7 +281,7 @@ def polarization_map(Stokes, data_mask=None, rectangle=None, SNRp_cut=3., SNRi_c
|
|||||||
# Display polarisation flux
|
# Display polarisation flux
|
||||||
pf_mask = (stkI.data > 0.) * (pol.data > 0.)
|
pf_mask = (stkI.data > 0.) * (pol.data > 0.)
|
||||||
vmin, vmax = 0., np.max(stkI.data[pf_mask]*convert_flux*pol.data[pf_mask])
|
vmin, vmax = 0., np.max(stkI.data[pf_mask]*convert_flux*pol.data[pf_mask])
|
||||||
im = ax.imshow(stkI.data*convert_flux*pol.data, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(stkI.data*convert_flux*pol.data, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda} \cdot P$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda} \cdot P$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
||||||
levelsPf = np.linspace(vmax*0.01, vmax*0.99, 10)
|
levelsPf = np.linspace(vmax*0.01, vmax*0.99, 10)
|
||||||
print("Polarized flux contour levels : ", levelsPf)
|
print("Polarized flux contour levels : ", levelsPf)
|
||||||
@@ -290,24 +290,24 @@ def polarization_map(Stokes, data_mask=None, rectangle=None, SNRp_cut=3., SNRi_c
|
|||||||
elif display.lower() in ['p','pol','pol_deg']:
|
elif display.lower() in ['p','pol','pol_deg']:
|
||||||
# Display polarization degree map
|
# Display polarization degree map
|
||||||
vmin, vmax = 0., 100.
|
vmin, vmax = 0., 100.
|
||||||
im = ax.imshow(pol.data*100., vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(pol.data*100., vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$P$ [%]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$P$ [%]")
|
||||||
elif display.lower() in ['s_p','pol_err','pol_deg_err']:
|
elif display.lower() in ['s_p','pol_err','pol_deg_err']:
|
||||||
# Display polarization degree error map
|
# Display polarization degree error map
|
||||||
vmin, vmax = 0., 10.
|
vmin, vmax = 0., 10.
|
||||||
p_err = deepcopy(pol_err.data)
|
p_err = deepcopy(pol_err.data)
|
||||||
p_err[p_err > vmax/100.] = np.nan
|
p_err[p_err > vmax/100.] = np.nan
|
||||||
im = ax.imshow(p_err*100., vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(p_err*100., vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$\sigma_P$ [%]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$\sigma_P$ [%]")
|
||||||
elif display.lower() in ['s_i','i_err']:
|
elif display.lower() in ['s_i','i_err']:
|
||||||
# Display intensity error map
|
# Display intensity error map
|
||||||
vmin, vmax = 0., np.max(np.sqrt(stk_cov.data[0,0][stk_cov.data[0,0] > 0.])*convert_flux)
|
vmin, vmax = 0., np.max(np.sqrt(stk_cov.data[0,0][stk_cov.data[0,0] > 0.])*convert_flux)
|
||||||
im = ax.imshow(np.sqrt(stk_cov.data[0,0])*convert_flux, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(np.sqrt(stk_cov.data[0,0])*convert_flux, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$\sigma_I$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$\sigma_I$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
||||||
elif display.lower() in ['snr','snri']:
|
elif display.lower() in ['snr','snri']:
|
||||||
# Display I_stokes signal-to-noise map
|
# Display I_stokes signal-to-noise map
|
||||||
vmin, vmax = 0., np.max(SNRi[SNRi > 0.])
|
vmin, vmax = 0., np.max(SNRi[SNRi > 0.])
|
||||||
im = ax.imshow(SNRi, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(SNRi, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$I_{Stokes}/\sigma_{I}$")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$I_{Stokes}/\sigma_{I}$")
|
||||||
levelsSNRi = np.linspace(SNRi_cut, vmax*0.99, 10)
|
levelsSNRi = np.linspace(SNRi_cut, vmax*0.99, 10)
|
||||||
print("SNRi contour levels : ", levelsSNRi)
|
print("SNRi contour levels : ", levelsSNRi)
|
||||||
@@ -316,7 +316,7 @@ def polarization_map(Stokes, data_mask=None, rectangle=None, SNRp_cut=3., SNRi_c
|
|||||||
elif display.lower() in ['snrp']:
|
elif display.lower() in ['snrp']:
|
||||||
# Display polarization degree signal-to-noise map
|
# Display polarization degree signal-to-noise map
|
||||||
vmin, vmax = SNRp_cut, np.max(SNRp[SNRp > 0.])
|
vmin, vmax = SNRp_cut, np.max(SNRp[SNRp > 0.])
|
||||||
im = ax.imshow(SNRp, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(SNRp, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$P/\sigma_{P}$")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$P/\sigma_{P}$")
|
||||||
levelsSNRp = np.linspace(SNRp_cut, vmax*0.99, 10)
|
levelsSNRp = np.linspace(SNRp_cut, vmax*0.99, 10)
|
||||||
print("SNRp contour levels : ", levelsSNRp)
|
print("SNRp contour levels : ", levelsSNRp)
|
||||||
@@ -325,7 +325,7 @@ def polarization_map(Stokes, data_mask=None, rectangle=None, SNRp_cut=3., SNRi_c
|
|||||||
else:
|
else:
|
||||||
# Defaults to intensity map
|
# Defaults to intensity map
|
||||||
vmin, vmax = 0., np.max(stkI.data[stkI.data > 0.]*convert_flux*2.)
|
vmin, vmax = 0., np.max(stkI.data[stkI.data > 0.]*convert_flux*2.)
|
||||||
im = ax.imshow(stkI.data*convert_flux, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = ax.imshow(stkI.data*convert_flux, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda}$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA$]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda}$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA$]")
|
||||||
|
|
||||||
if (display is None) or not(display.lower() in ['default']):
|
if (display is None) or not(display.lower() in ['default']):
|
||||||
@@ -427,7 +427,7 @@ class align_maps(object):
|
|||||||
self.ax1.set_facecolor('k')
|
self.ax1.set_facecolor('k')
|
||||||
|
|
||||||
vmin, vmax = 0., np.max(data[data > 0.]*convert_flux)
|
vmin, vmax = 0., np.max(data[data > 0.]*convert_flux)
|
||||||
im1 = self.ax1.imshow(data*convert_flux, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im1 = self.ax1.imshow(data*convert_flux, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
|
|
||||||
fontprops = fm.FontProperties(size=16)
|
fontprops = fm.FontProperties(size=16)
|
||||||
px_size = self.wcs_map.wcs.get_cdelt()[0]*3600.
|
px_size = self.wcs_map.wcs.get_cdelt()[0]*3600.
|
||||||
@@ -455,7 +455,7 @@ class align_maps(object):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
for key_i, val_i in value:
|
for key_i, val_i in value:
|
||||||
kwargs[key_i] = val_i
|
kwargs[key_i] = val_i
|
||||||
im2 = self.ax2.imshow(other_data*other_convert, aspect='auto', **kwargs)
|
im2 = self.ax2.imshow(other_data*other_convert, aspect='equal', **kwargs)
|
||||||
|
|
||||||
fontprops = fm.FontProperties(size=16)
|
fontprops = fm.FontProperties(size=16)
|
||||||
px_size = self.wcs_other.wcs.get_cdelt()[0]*3600.
|
px_size = self.wcs_other.wcs.get_cdelt()[0]*3600.
|
||||||
@@ -575,7 +575,7 @@ class overplot_radio(align_maps):
|
|||||||
|
|
||||||
#Display UV intensity map with polarization vectors
|
#Display UV intensity map with polarization vectors
|
||||||
vmin, vmax = 0., np.max(stkI.data[stkI.data > 0.]*convert_flux)
|
vmin, vmax = 0., np.max(stkI.data[stkI.data > 0.]*convert_flux)
|
||||||
im = self.ax.imshow(stkI.data*convert_flux, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=1.)
|
im = self.ax.imshow(stkI.data*convert_flux, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=1.)
|
||||||
cbar_ax = self.fig2.add_axes([0.95, 0.12, 0.01, 0.75])
|
cbar_ax = self.fig2.add_axes([0.95, 0.12, 0.01, 0.75])
|
||||||
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda}$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
cbar = plt.colorbar(im, cax=cbar_ax, label=r"$F_{\lambda}$ [$ergs \cdot cm^{-2} \cdot s^{-1} \cdot \AA^{-1}$]")
|
||||||
|
|
||||||
@@ -654,8 +654,8 @@ class overplot_pol(align_maps):
|
|||||||
|
|
||||||
#Display Stokes I as contours
|
#Display Stokes I as contours
|
||||||
levels_stkI = np.rint(np.linspace(10,99,10))/100.*np.max(stkI.data[stkI.data > 0.]*convert_flux)
|
levels_stkI = np.rint(np.linspace(10,99,10))/100.*np.max(stkI.data[stkI.data > 0.]*convert_flux)
|
||||||
cont_stkI = self.ax.contour(stkI.data*convert_flux, transform=self.ax.get_transform(self.wcs_UV), levels=levels_stkI, colors='grey')
|
cont_stkI = self.ax.contour(stkI.data*convert_flux, transform=self.ax.get_transform(self.wcs_UV), levels=levels_stkI, colors='grey', alpha=0.)
|
||||||
self.ax.clabel(cont_stkI, inline=True, fontsize=8)
|
#self.ax.clabel(cont_stkI, inline=True, fontsize=8)
|
||||||
|
|
||||||
self.ax.autoscale(False)
|
self.ax.autoscale(False)
|
||||||
|
|
||||||
@@ -680,7 +680,7 @@ class overplot_pol(align_maps):
|
|||||||
|
|
||||||
#Display pixel scale and North direction
|
#Display pixel scale and North direction
|
||||||
fontprops = fm.FontProperties(size=16)
|
fontprops = fm.FontProperties(size=16)
|
||||||
px_size = self.wcs_other.wcs.get_cdelt()[0]*3600.
|
px_size = self.wcs_UV.wcs.get_cdelt()[0]*3600.
|
||||||
px_sc = AnchoredSizeBar(self.ax.transData, 1./px_size, '1 arcsec', 3, pad=0.5, sep=5, borderpad=0.5, frameon=False, size_vertical=0.005, color='w', fontproperties=fontprops)
|
px_sc = AnchoredSizeBar(self.ax.transData, 1./px_size, '1 arcsec', 3, pad=0.5, sep=5, borderpad=0.5, frameon=False, size_vertical=0.005, color='w', fontproperties=fontprops)
|
||||||
self.ax.add_artist(px_sc)
|
self.ax.add_artist(px_sc)
|
||||||
north_dir = AnchoredDirectionArrows(self.ax.transAxes, "E", "N", length=-0.08, fontsize=0.03, loc=1, aspect_ratio=-1, sep_y=0.01, sep_x=0.01, angle=-self.Stokes_UV[0].header['orientat'], color='w', arrow_props={'ec': None, 'fc': 'w', 'alpha': 1,'lw': 2})
|
north_dir = AnchoredDirectionArrows(self.ax.transAxes, "E", "N", length=-0.08, fontsize=0.03, loc=1, aspect_ratio=-1, sep_y=0.01, sep_x=0.01, angle=-self.Stokes_UV[0].header['orientat'], color='w', arrow_props={'ec': None, 'fc': 'w', 'alpha': 1,'lw': 2})
|
||||||
@@ -762,7 +762,7 @@ class crop_map(object):
|
|||||||
vmin, vmax = 0., np.max(data[data > 0.]*convert_flux)
|
vmin, vmax = 0., np.max(data[data > 0.]*convert_flux)
|
||||||
if hasattr(self, 'im'):
|
if hasattr(self, 'im'):
|
||||||
self.im.remove()
|
self.im.remove()
|
||||||
self.im = self.ax.imshow(data*convert_flux, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno', alpha=self.mask_alpha, origin='lower')
|
self.im = self.ax.imshow(data*convert_flux, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno', alpha=self.mask_alpha, origin='lower')
|
||||||
if hasattr(self, 'cr'):
|
if hasattr(self, 'cr'):
|
||||||
self.cr[0].set_data(*wcs.wcs.crpix)
|
self.cr[0].set_data(*wcs.wcs.crpix)
|
||||||
else:
|
else:
|
||||||
@@ -967,7 +967,7 @@ class image_lasso_selector:
|
|||||||
self.ax = ax
|
self.ax = ax
|
||||||
self.mask_alpha = 0.1
|
self.mask_alpha = 0.1
|
||||||
self.embedded = True
|
self.embedded = True
|
||||||
self.displayed = self.ax.imshow(self.img, vmin=self.vmin, vmax=self.vmax, aspect='auto', cmap='inferno',alpha=self.mask_alpha)
|
self.displayed = self.ax.imshow(self.img, vmin=self.vmin, vmax=self.vmax, aspect='equal', cmap='inferno',alpha=self.mask_alpha)
|
||||||
plt.ion()
|
plt.ion()
|
||||||
|
|
||||||
lineprops = {'color': 'grey', 'linewidth': 1, 'alpha': 0.8}
|
lineprops = {'color': 'grey', 'linewidth': 1, 'alpha': 0.8}
|
||||||
@@ -996,7 +996,7 @@ class image_lasso_selector:
|
|||||||
|
|
||||||
def update_mask(self):
|
def update_mask(self):
|
||||||
self.displayed.remove()
|
self.displayed.remove()
|
||||||
self.displayed = self.ax.imshow(self.img, vmin=self.vmin, vmax=self.vmax, aspect='auto', cmap='inferno',alpha=self.mask_alpha)
|
self.displayed = self.ax.imshow(self.img, vmin=self.vmin, vmax=self.vmax, aspect='equal', cmap='inferno',alpha=self.mask_alpha)
|
||||||
array = self.displayed.get_array().data
|
array = self.displayed.get_array().data
|
||||||
|
|
||||||
self.mask = np.zeros(self.img.shape[:2],dtype=bool)
|
self.mask = np.zeros(self.img.shape[:2],dtype=bool)
|
||||||
@@ -1390,12 +1390,12 @@ class pol_map(object):
|
|||||||
ax = self.ax
|
ax = self.ax
|
||||||
if hasattr(self, 'im'):
|
if hasattr(self, 'im'):
|
||||||
self.im.remove()
|
self.im.remove()
|
||||||
self.im = ax.imshow(self.data, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno')
|
self.im = ax.imshow(self.data, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno')
|
||||||
self.cbar = plt.colorbar(self.im, cax=self.cbar_ax, label=label)
|
self.cbar = plt.colorbar(self.im, cax=self.cbar_ax, label=label)
|
||||||
fig.canvas.draw_idle()
|
fig.canvas.draw_idle()
|
||||||
return self.im
|
return self.im
|
||||||
else:
|
else:
|
||||||
im = ax.imshow(self.data, vmin=vmin, vmax=vmax, aspect='auto', cmap='inferno')
|
im = ax.imshow(self.data, vmin=vmin, vmax=vmax, aspect='equal', cmap='inferno')
|
||||||
ax.set_xlim(0,self.data.shape[1])
|
ax.set_xlim(0,self.data.shape[1])
|
||||||
ax.set_ylim(0,self.data.shape[0])
|
ax.set_ylim(0,self.data.shape[0])
|
||||||
plt.colorbar(im, pad=0.025, aspect=80, label=label)
|
plt.colorbar(im, pad=0.025, aspect=80, label=label)
|
||||||
@@ -1475,4 +1475,3 @@ class pol_map(object):
|
|||||||
if not self.region is None:
|
if not self.region is None:
|
||||||
ax.contour(self.region.astype(float),levels=[0.5], colors='white', linewidths=0.8)
|
ax.contour(self.region.astype(float),levels=[0.5], colors='white', linewidths=0.8)
|
||||||
fig.canvas.draw_idle()
|
fig.canvas.draw_idle()
|
||||||
|
|
||||||
@@ -16,30 +16,30 @@ Stokes_IR = fits.open("../data/IC5063_x3nl030/IR/u2e65g01t_c0f_rot.fits")
|
|||||||
|
|
||||||
levelsMorganti = np.array([1.,2.,3.,8.,16.,32.,64.,128.])
|
levelsMorganti = np.array([1.,2.,3.,8.,16.,32.,64.,128.])
|
||||||
|
|
||||||
#levels18GHz = np.array([0.6, 1.5, 3, 6, 12, 24, 48, 96])/100.*Stokes_18GHz[0].data.max()
|
##levels18GHz = np.array([0.6, 1.5, 3, 6, 12, 24, 48, 96])/100.*Stokes_18GHz[0].data.max()
|
||||||
levels18GHz = levelsMorganti*0.28*1e-3
|
#levels18GHz = levelsMorganti*0.28*1e-3
|
||||||
A = overplot_radio(Stokes_UV, Stokes_18GHz)
|
#A = overplot_radio(Stokes_UV, Stokes_18GHz)
|
||||||
A.plot(levels=levels18GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/18GHz_overplot_forced.png')
|
#A.plot(levels=levels18GHz, SNRp_cut=3.0, SNRi_cut=60.0, savename='../plots/IC5063_x3nl030/18GHz_overplot_forced.png')
|
||||||
|
|
||||||
#levels24GHz = np.array([1.,1.5, 3, 6, 12, 24, 48, 96])/100.*Stokes_24GHz[0].data.max()
|
##levels24GHz = np.array([1.,1.5, 3, 6, 12, 24, 48, 96])/100.*Stokes_24GHz[0].data.max()
|
||||||
levels24GHz = levelsMorganti*0.46*1e-3
|
#levels24GHz = levelsMorganti*0.46*1e-3
|
||||||
B = overplot_radio(Stokes_UV, Stokes_24GHz)
|
#B = overplot_radio(Stokes_UV, Stokes_24GHz)
|
||||||
B.plot(levels=levels24GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/24GHz_overplot_forced.png')
|
#B.plot(levels=levels24GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/24GHz_overplot_forced.png')
|
||||||
|
#
|
||||||
levels103GHz = np.linspace(1,99,11)/100.*np.max(deepcopy(Stokes_103GHz[0].data[Stokes_103GHz[0].data > 0.]))
|
#levels103GHz = np.linspace(1,99,11)/100.*np.max(deepcopy(Stokes_103GHz[0].data[Stokes_103GHz[0].data > 0.]))
|
||||||
C = overplot_radio(Stokes_UV, Stokes_103GHz)
|
#C = overplot_radio(Stokes_UV, Stokes_103GHz)
|
||||||
C.plot(levels=levels103GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/103GHz_overplot_forced.png')
|
#C.plot(levels=levels103GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/103GHz_overplot_forced.png')
|
||||||
|
#
|
||||||
levels229GHz = np.linspace(1,99,11)/100.*np.max(deepcopy(Stokes_229GHz[0].data[Stokes_229GHz[0].data > 0.]))
|
#levels229GHz = np.linspace(1,99,11)/100.*np.max(deepcopy(Stokes_229GHz[0].data[Stokes_229GHz[0].data > 0.]))
|
||||||
D = overplot_radio(Stokes_UV, Stokes_229GHz)
|
#D = overplot_radio(Stokes_UV, Stokes_229GHz)
|
||||||
D.plot(levels=levels229GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/229GHz_overplot_forced.png')
|
#D.plot(levels=levels229GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/229GHz_overplot_forced.png')
|
||||||
|
#
|
||||||
levels357GHz = np.linspace(1,99,11)/100.*np.max(deepcopy(Stokes_357GHz[0].data[Stokes_357GHz[0].data > 0.]))
|
#levels357GHz = np.linspace(1,99,11)/100.*np.max(deepcopy(Stokes_357GHz[0].data[Stokes_357GHz[0].data > 0.]))
|
||||||
E = overplot_radio(Stokes_UV, Stokes_357GHz)
|
#E = overplot_radio(Stokes_UV, Stokes_357GHz)
|
||||||
E.plot(levels=levels357GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/357GHz_overplot_forced.png')
|
#E.plot(levels=levels357GHz, SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/357GHz_overplot_forced.png')
|
||||||
|
#
|
||||||
F = overplot_pol(Stokes_UV, Stokes_S2)
|
#F = overplot_pol(Stokes_UV, Stokes_S2)
|
||||||
F.plot(SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/S2_overplot_forced.png', norm=LogNorm(vmin=5e-20,vmax=5e-18))
|
#F.plot(SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/S2_overplot_forced.png', norm=LogNorm(vmin=5e-20,vmax=5e-18))
|
||||||
|
|
||||||
G = overplot_pol(Stokes_UV, Stokes_IR, norm=LogNorm(vmin=1e-17,vmax=5e-15), cmap='inferno_r')
|
G = overplot_pol(Stokes_UV, Stokes_IR, norm=LogNorm(vmin=1e-17,vmax=5e-15), cmap='inferno_r')
|
||||||
G.plot(SNRp_cut=3.0, SNRi_cut=80.0, savename='../plots/IC5063_x3nl030/IR_overplot_forced.png', norm=LogNorm(vmin=1e-17,vmax=5e-15), cmap='inferno_r')
|
G.plot(SNRp_cut=3.0, SNRi_cut=60.0, savename='../plots/IC5063_x3nl030/IR_overplot_forced.png', norm=LogNorm(vmin=1e-17,vmax=5e-15), cmap='inferno_r')
|
||||||
|
|||||||