{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Masterlist overview\n", "\n", "This notebook summarises some important properties of the data presented here. This includes\n", "\n", "- The area covered by each field\n", "- The number of total sources in each field\n", "- The number of bands which we have data for in each field\n", "- The size of the masterlist in each field" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/opt/anaconda3/envs/herschelhelp_internal/lib/python3.6/site-packages/seaborn/apionly.py:6: UserWarning: As seaborn no longer sets a default style on import, the seaborn.apionly module is deprecated. It will be removed in a future version.\n", " warnings.warn(msg, UserWarning)\n" ] } ], "source": [ "from astropy.table import Table, Column\n", "from astropy import units as u\n", "import numpy as np\n", "\n", "from pymoc import MOC\n", "\n", "from herschelhelp_internal.masterlist import find_last_ml_suffix\n", "\n", "import os\n", "import humanfriendly" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The definition of HELP DR1\n", "Here we define DR1, which should be considered the principle definition in terms of the dated masterlist file that defines the object list on a given field. In some cases it is different to the masterlist used by an intermediate step because it was in progress as that step began. Nevertheless these files define DR1 so any discrepencies will force these objects lists through. The most likely upshot if this is that there may be objects in the dr1 masterlist that were not used in further steps and therefore lack, photozs, fir fluxes, or Cigale fits." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "dr1 = [\n", "# Field suffix\n", "['AKARI-NEP', '20180215' ],\n", "['AKARI-SEP', '20180221' ],\n", "['Bootes', '20180520' ], \n", "['CDFS-SWIRE', '20180613' ],\n", "['COSMOS', '20180619' ],\n", "['EGS', '20180501' ],\n", "['ELAIS-N1', '20171016' ],\n", "['ELAIS-N2', '20180218' ],\n", "['ELAIS-S1', '20180416' ],\n", "['GAMA-09', '20180601' ],\n", "['GAMA-12', '20180218' ],\n", "['GAMA-15', '20180213' ],\n", "['HDF-N', '20180427' ],\n", "['Herschel-Stripe-82', '20180307' ],\n", "['Lockman-SWIRE', '20180219' ],\n", "['NGP', '20180219' ],\n", "['SA13', '20180501' ],\n", "['SGP', '20180221' ],\n", "['SPIRE-NEP', '20180220' ],\n", "['SSDF', '20180221' ],\n", "['xFLS', '20180501' ],\n", "['XMM-13hr', '20180501' ],\n", "['XMM-LSS', '20180504' ]]" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "masterlist_summary = Table()\n", "masterlist_summary.add_column(Column(data = np.array(dr1)[:,0], name = 'field'))\n", "masterlist_summary.add_column(Column(data =np.full(len(masterlist_summary), '', dtype=\"S20\"), name = 'dr1_suffix'))\n", "masterlist_summary.add_column(Column(data =np.full(len(masterlist_summary), '', dtype=\"S20\"), name = 'last_suffix'))\n", "masterlist_summary.add_column(Column(data =np.full(len(masterlist_summary), 0, dtype=int), name = 'objects'))\n", "masterlist_summary.add_column(Column(data =np.full(len(masterlist_summary), np.nan, dtype=float), name = 'area_sq_degrees'))\n", "masterlist_summary.add_column(Column(data =np.full(len(masterlist_summary), 0, dtype=int), name = 'file_size_bytes'))\n", "masterlist_summary.add_column(Column(data =np.full(len(masterlist_summary), '', dtype=\"S20\"), name = 'file_size_readable'))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Total HELP area: 1269.6205101879136 sqare degrees\n" ] } ], "source": [ "help_moc = MOC(filename='../dmu2/help_coverage_MOC.fits')\n", "print('Total HELP area: {} sqare degrees'.format(help_moc.area_sq_deg))" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "for field in dr1:\n", " number_objects = len(Table.read('dmu1_ml_{}/data/master_list_cross_ident_{}_{}.fits'.format(field[0], \n", " field[0].lower(), \n", " field[1])))\n", " masterlist_summary['objects'][masterlist_summary['field'] == field[0]] = number_objects\n", " \n", " \n", " moc = MOC(filename='../dmu2/dmu2_field_coverages/{}_MOC.fits'.format(field[0]))\n", " area = moc.area_sq_deg\n", " masterlist_summary['area_sq_degrees'][masterlist_summary['field'] == field[0]] = area\n", " \n", " masterlist_summary['dr1_suffix'][masterlist_summary['field'] == field[0]] = field[1]\n", " masterlist_summary['last_suffix'][masterlist_summary['field'] == field[0]] = find_last_ml_suffix('dmu1_ml_{}/data/'.format(field[0]))\n", " \n", " size = os.stat('dmu1_ml_{}/data/master_catalogue_{}_{}.fits'.format(field[0], \n", " field[0].lower(), \n", " field[1])).st_size\n", "\n", " \n", " \n", " #Can't install packages on Vulcain\n", " #size_readable = humanfriendly.format_size(size)\n", " masterlist_summary['file_size_bytes'][masterlist_summary['field'] == field[0]] = size\n", " masterlist_summary['file_size_readable'][masterlist_summary['field'] == field[0]] = humanfriendly.format_size(size)\n", " \n", "\n", " \n", " #TODO:\n", " num_surveys = 0.\n", " \n", " #Mean depth in g\n", " mean_depth = 0.\n", " \n", " num_bands = 0." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Table length=23\n", "
idx | field | dr1_suffix | last_suffix | objects | area_sq_degrees | file_size_bytes | file_size_readable |
---|---|---|---|---|---|---|---|
0 | AKARI-NEP | 20180215 | 20180215 | 531746 | 9.194732358779467 | 348848640 | 348.85 MB |
1 | AKARI-SEP | 20180221 | 20180221 | 844172 | 8.713306475131118 | 538606080 | 538.61 MB |
2 | Bootes | 20180520 | 20180520 | 3481661 | 11.42815299095486 | 5002044480 | 5 GB |
3 | CDFS-SWIRE | 20180221 | 20180221 | 2171051 | 12.971246403717068 | 5705593920 | 5.71 GB |
4 | COSMOS | 20180516 | 20180516 | 2599374 | 5.083863478496816 | 10517175360 | 10.52 GB |
5 | EGS | 20180501 | 20180501 | 1412613 | 3.566383275122158 | 3808480320 | 3.81 GB |
6 | ELAIS-N1 | 20171016 | 20180216 | 4026292 | 13.507484555454763 | 5242279680 | 5.24 GB |
7 | ELAIS-N2 | 20180218 | 20180218 | 1783240 | 9.167479903991113 | 2007964800 | 2.01 GB |
8 | ELAIS-S1 | 20180416 | 20180416 | 1655564 | 9.002940646885508 | 1970156160 | 1.97 GB |
9 | GAMA-09 | 20171206 | 20180601 | 12937982 | 62.01393417284915 | 19652852160 | 19.65 GB |
10 | GAMA-12 | 20180218 | 20180218 | 12369415 | 62.70933280772107 | 14633066880 | 14.63 GB |
11 | GAMA-15 | 20180213 | 20180213 | 14232880 | 61.70114565980842 | 16595585280 | 16.6 GB |
12 | HDF-N | 20180427 | 20180427 | 130679 | 0.6717832558166041 | 185996160 | 186 MB |
13 | Herschel-Stripe-82 | 20180307 | 20180307 | 50196455 | 363.22747930641884 | 127047306240 | 127.05 GB |
14 | Lockman-SWIRE | 20180219 | 20180219 | 4366298 | 22.413863402949218 | 5195931840 | 5.2 GB |
15 | NGP | 20180219 | 20180501 | 6759591 | 177.6981971077162 | 4954806720 | 4.95 GB |
16 | SA13 | 20180501 | 20180501 | 9799 | 0.27416379328431184 | 2721600 | 2.72 MB |
17 | SGP | 20180221 | 20180221 | 29790690 | 294.5684540900642 | 45192530880 | 45.19 GB |
18 | SPIRE-NEP | 20180220 | 20180220 | 2674 | 0.1280660469377391 | 1203840 | 1.2 MB |
19 | SSDF | 20180221 | 20180221 | 12661903 | 111.11624949343539 | 8078319360 | 8.08 GB |
20 | xFLS | 20180501 | 20180501 | 977148 | 7.44043242140754 | 1050474240 | 1.05 GB |
21 | XMM-13hr | 20180501 | 20180501 | 38629 | 0.7570240166583633 | 10676160 | 10.68 MB |
22 | XMM-LSS | 20180504 | 20180504 | 8705837 | 21.75457939331374 | 28241838720 | 28.24 GB |