from astropy.table import Table, join # In[2]: import seaborn as sns # This notebook uses all the raw data from the XID+PACS catalogue, maps, PSF and relevant MOCs to create XID+ prior object and relevant tiling scheme # ## Read in MOCs # The selection functions required are the main MOC associated with the masterlist. As the prior for XID+ is based on IRAC detected sources. # In[3]: #Sel_func=pymoc.MOC() #Sel_func.read('../../dmu4/dmu4_sm_GAMA-09/data/holes_GAMA-09_ukidss_k_O16_20180417.fits') Final = pymoc.MOC() Final.read('./data/testMoc.fits') # ## Read in CIGALE predictions catalogue # In[4]: cigale = Table.read( '../../dmu28/dmu28_GAMA-09/data/GAMA9_Ldust_prediction_results.fits') # In[5]: cigale['id'].name = 'help_id' # In[6]:
'_20190328.fits') centre = np.long((MIPS_psf[1].header['NAXIS1'] - 1) / 2) radius = 5 # ## Read in MOCs & Files # The selection functions required are the main MOC associated with the masterlist. Here we use the DataFusion-Spitzer MOC. print('read in MOCs') filename = np.sort( glob.glob(f"../../dmu17/dmu17_HELP-SEIP-maps/{field}/data/*help.fits", recursive=True)) moc_file = np.sort( glob.glob(f"../../dmu17/dmu17_HELP-SEIP-maps/{field}/data/*moc.fits", recursive=True)) Sel_func = pymoc.MOC() Sel_func.read('../../dmu4/dmu4_sm_' + field + '/data/holes_Herschel-Stripe-82_irac_i1_O16_20180423.fits') ###################################################################### with open('./data/large_tiles.csv', 'w') as l_tiles_file: tiles_writer = csv.writer(l_tiles_file, delimiter=',') tiles_writer.writerow(['job_array']) l_tiles_file.close() with open('./data/tiles.csv', 'w') as tiles_file: tiles_writer = csv.writer(tiles_file, delimiter=',') tiles_writer.writerow(['job_array']) tiles_file.close()
centre = np.long((MIPS_psf[1].header['NAXIS1'] - 1) / 2) radius = 5 ###################################################################### # ## Read in MOCs & Files # The selection functions required are the main MOC associated with the masterlist. Here we use the DataFusion-Spitzer MOC. print('read in MOCs') filename = np.sort( glob.glob(f"../../dmu17/dmu17_HELP_SEIP_maps/{field}/data/*help.fits", recursive=True)) moc_file = np.sort( glob.glob(f"../../dmu17/dmu17_HELP_SEIP_maps/{field}/data/*moc.fits", recursive=True)) dmu0_MOC = pymoc.MOC() dmu0_MOC.read('../../dmu0/dmu0_NEP-Spitzer/data/NEP-Spitzer-APJ_MOC.fits') holes = pymoc.MOC() holes.read('../../dmu4/dmu4_sm_AKARI-NEP/data/holes_AKARI-NEP_O16_MOC.fits') Sel_func = dmu0_MOC.intersection(holes) ###################################################################### with open('./data/large_tiles.csv', 'w') as l_tiles_file: tiles_writer = csv.writer(l_tiles_file, delimiter=',') tiles_writer.writerow(['job_array']) l_tiles_file.close() with open('./data/tiles.csv', 'w') as tiles_file:
import xidplus import numpy as np #get_ipython().run_line_magic('matplotlib', 'inline') from astropy.table import Table, join from astropy.io import fits from astropy import wcs import seaborn as sns # This notebook uses all the raw data from the XID+PACS catalogue, maps, PSF and relevant MOCs to create XID+ prior object and relevant tiling scheme # ## Read in MOCs # The selection functions required are the main MOC associated with the masterlist. As the prior for XID+ is based on IRAC detected sources. # In[ ]: Sel_func = pymoc.MOC() Sel_func.read( '../../dmu4/dmu4_sm_NGP/data/holes_NGP_ukidss_k_O16_20190204_MOC.fits') # ## Read in CIGALE predictions catalogue # In[14]: cigale = Table.read( '../../dmu28/dmu28_NGP/data/NGP_results_Ldust_prediction.fits') # In[5]: cigale['id'].name = 'help_id' # In[15]:
ax.set_xlim(0, 10) ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) fig.savefig('pointing-offset.pdf', bbox_inches='tight', pad_inches=0.01) #all sky noise map. import pymoc import healpy averagerms = Table.read(allskynoise) # Get a dictionary with HPX tilenumber as key. hpxdict = dict(zip(averagerms['Tilenum'], averagerms['RMS'])) # Turn it into a MOC mymoc = pymoc.MOC(order=6, cells=hpxdict.keys()) # Turn it into a np array of the right setup for healpy. order = mymoc.order skymap = np.zeros(12 * 4**order) for cell in mymoc.flattened(order): skymap[cell] = hpxdict[cell] maskedmap = healpy.ma(skymap, badval=0) fig = plt.figure(figsize=(7, 5)) cmap = matplotlib.cm.gist_heat cmap.set_bad('0.7') cmap.set_under('white') healpy.visufunc.mollview(maskedmap, unit=r'mJy arcsec$^{-2}$',