def Smin(surv_str,duty=0.06): s = Survey(surv_str) gl,gb = get_glgb() Tsky = tsky_glgb(gl,gb,s.freq) cov = np.loadtxt(surv_str+'.cov',dtype='float') cov_inds = [cov > 0.0] # Return an array based on tsky map. Smin = calcFlux(s.SNRlimit, s.beta, s.tsys, Tsky, s.gain, s.npol, s.tobs, s.bw, duty) # Print some pertinent information: print '' print 'Survey: '+s.surveyName print 'Center frequency (MHz): '+str(s.freq) print 'Tsky mean, median (K): '+str(np.mean(Tsky[cov_inds]))+', '+str(np.median(Tsky[cov_inds])) print 'Smin mean, median (mJy): '+str(np.mean(Smin[cov_inds]))+', '+str(np.median(Smin[cov_inds])) print '' # Set positions without coverage == 999999.0 not_cov_inds = [cov == 0.0] Smin[not_cov_inds] = 999999.0 return Smin
import matplotlib.pyplot as plt import numpy as np from cov import get_glgb from plot_cov import get_colorlist surv_list = ['AODRIFT','GBNCC','GBT350','HTRU-Nh','HTRU-Nl','HTRU-Nm','HTRU-Sh', 'HTRU-Sl','HTRU-Sm','PALFA-Mi','PALFA-Wi','PMPS','SMPS'] col = np.loadtxt('all.dat', usecols=[1],dtype='str',unpack=True) smin,ncov = np.loadtxt('all.dat',dtype='float',usecols=[0,2],unpack=True) # What kind of plot?? # 0: smin, 1: most sensitive survey, 2: redundancy plot_type = 2 gl,gb = get_glgb() deg2rad = np.pi/180. f = plt.figure() ax = f.add_subplot(111,projection='mollweide') if plot_type == 0: outfile = 'lowest_smin.pdf' cm = plt.cm.get_cmap('RdYlBu') # To avoid major outliers, find 10th and 90th percentiles of sensitivity distribution smin_lo = np.percentile(smin,10.0) smin_hi = np.percentile(smin,90.0) plt.scatter(gl*deg2rad,gb*deg2rad,edgecolor='',s=1.5,c=smin,cmap=cm,vmin=smin_lo,vmax=smin_hi) cbar = plt.colorbar()