Пример #1
0
# Me, connected lobes subset , highest flux
name = 'This study'
frequency = '150 MHz'
RMS = '0.071' #mJ/beam
SNR = '10'
Source_density = 879/424. # 2.07311321 per square degree # Only > 9.41 mJy flux sources
														# that have a redshift measurement
													# and are connected lobes
										# 1549/424 = 3.65330189 connected lobes >9.41 mJy
Resolution = '6x6'
area = '424' # square degrees
SL = '$<$0.1'#\%
Redshift = '0.69' # 0.68848131918907163 = median redshift of the 879 connected lobes >9.41 flux sources
Scale = '5' #degrees
Phys_scale_planck15 = ( (Planck15.arcsec_per_kpc_comoving(0.69) )**-1 * (5*u.degree).to(u.arcsec) ).to(u.Mpc) 
h = Planck15.H0 / (100 * u.km/u.s/u.Mpc)
Phys_scale = Phys_scale_planck15 * h
print (Phys_scale)
Phys_scale = '%i'%Phys_scale.to(u.Mpc).value #$h^{-1}$ Mpc
# Mpc
F.write('%s,%s,%s,%s,%.1f,%s,%s,%s,%s,%s,%s'%(name,frequency,RMS,SNR,Source_density,Resolution,area,SL,Scale,Redshift,Phys_scale)  )
F.write('\n')


# Me_again, but now the value_added_subset, 
#  For n = 500:
# log10 SL data : -2.381
# log10 SL upper bound: -2.897
# lgo10 SL lower bound: -1.922
name = 'This study'
Пример #2
0
	# Obtains image boundaries in RA/Dec and plots map position on sky
	naxis1 = hdulist[0].header["NAXIS1"]  # image width
	naxis2 = hdulist[0].header["NAXIS2"]  # image height

	w = WCS(hdulist[0].header)  # obtains WCS information

	RA_max, DEC_min = w.wcs_pix2world([[1,1]], 1)[0]  # bottom-left edge (SE)
	RA_min, DEC_max = w.wcs_pix2world([[naxis1, naxis2]], 1)[0]  # top-right edge (NW)

	# finds indices of the clusters, the centers of which are inside the image field
	boundaries = (RA_min, RA_max, DEC_min, DEC_max)  # image boundaries
	infield = func.is_infield(RA, Dec, boundaries)

	if len(infield[infield==True]) != 0:
		# cosmological distance calculator -- angular radius [arcsec]
		R_map = R_kpc[infield]*p15.arcsec_per_kpc_comoving(z[infield])*u.kpc
	else:  # continues if no clusters are found
		continue

	# rebins the image with 'pixscale' and updates header
	# assumes square pixels
	hdr = hdulist[0].header.copy()  # copies original header
	old_pixsize = np.abs(hdulist[0].header["CDELT1"])
	zoom = old_pixsize/pixsize  # computes image scale factor

	rebin = cv2.resize(img.astype(float), dsize=(0,0),
					fx=zoom, fy=zoom, interpolation=cv2.INTER_CUBIC)  # rebins image
	rebin /= zoom**2  # normalised image data [Jy/px]

	hdr["NAXIS2"], hdr["NAXIS1"] = np.array(np.shape(rebin))  # dimensions
	hdr["CDELT2"], hdr["CDELT1"] = pixsize, -pixsize  # pix size