{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ![HELP LOGO](https://avatars1.githubusercontent.com/u/7880370?s=100&v=4>)Legacy MIPS map homogenisation\n",
    "\n",
    "\n",
    "The original MIPS maps have been produced by IPAC. This code takes the individual image files and adds them into a single multi-layered fits files to have the homogeneous HELP format.  \n",
    "\n",
    "## Caveats \n",
    "* I've run this on the MIPS 24/70/160 micron maps\n",
    "* only puts in image, error and coverage files (and adds blank PSF extension)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h2> Guide</h2>\n",
    "<h3>Steps: </h3>\n",
    "* Obtain list of fields from sub-folders\n",
    "for each field:\n",
    "* read in coverage, image and noise\n",
    "* attach meta data\n",
    "* create PSF extension\n",
    "* Save out\n",
    "\n",
    "<h3>Things you may wish to edit</h3>\n",
    "* You'll need to change the folder path in the 2nd code block to point you where the files are in your system\n",
    "* Add in a specifc field (or switch to wild chracter) in the path to pick field(s)\n",
    "* read in more of the available files and add as additional extensions?????\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Importing libraries"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from datetime import datetime\n",
    "from itertools import product\n",
    "import glob\n",
    "\n",
    "import numpy as np\n",
    "import astropy as astropy\n",
    "\n",
    "from astropy.io import fits\n",
    "from astropy.table import Table\n",
    "from astropy.table import Column\n",
    "from astropy import wcs\n",
    "\n",
    "import shutil\n",
    "\n",
    "VERSION = \"0.9\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# This is where you set up the field and folders to work on\n",
    "the notebook needs to be run for each field in turn - commenting in/out as appropriate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#field_specified='HDF-N' \n",
    "#field_specified='XMM-LSS' \n",
    "#field_specified='AKARI-NEP' \n",
    "#field_specified='AKARI-SEP' \n",
    "#field_specified='Bootes' \n",
    "#field_specified='CDFS-SWIRE' \n",
    "#field_specified='COSMOS' \n",
    "#field_specified='EGS' \n",
    "#field_specified='ELAIS-N1' \n",
    "#field_specified='ELAIS-N2' \n",
    "#field_specified='ELAIS-S1' \n",
    "#field_specified='GAMA-09' \n",
    "#field_specified='GAMA-12' \n",
    "#field_specified='GAMA-15' \n",
    "#field_specified='NGP' \n",
    "#field_specified='SGP' \n",
    "#field_specified='Lockman-SWIRE' \n",
    "#field_specified='SA13' \n",
    "#field_specified='SPIRE-NEP' \n",
    "#field_specified='SSDF' \n",
    "#field_specified='xFLS' \n",
    "#field_specified='XMM-13hr' \n",
    "#field_specified='Herschel-Stripe-82' \n",
    "\n",
    "\n",
    "mainfolder='../../dmu17/dmu17_Legacy_maps/'\n",
    "moc_dir=   '../../dmu2/dmu2_field_coverages/'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# finding all the Legacy mosaic files in the folder"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Number of files found: 0\n"
     ]
    }
   ],
   "source": [
    "# finding all the Legacy mosaic files (other files should be there if the mosaic file is)\n",
    "filelist= glob.glob(f\"{mainfolder}/{field_specified}/data/*mosaic*.fits\", recursive=True)\n",
    "print(\"Number of files found:\", len(filelist))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Performing the homogenisation\n",
    "i.e. merging component files into a single multi-extension file and adding some keywords\n",
    "traps errors so that it can continue, e.g. if a file is missing\n",
    "skips over files if they've already been logged as \"downloaded\" (this could be improved to be an option"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "----------------\n",
      "0 ../../dmu17/dmu17_Legacy_maps//AKARI-SEP/data/SEP_MIPS24_mosaic_map_v1.fits\n",
      "AKARI-SEP\n"
     ]
    },
    {
     "ename": "FileNotFoundError",
     "evalue": "[Errno 2] No such file or directory: '../../dmu17/dmu17_Legacy_maps//AKARI-SEP/data/SEP_MIPS24_mosaic_unc_map_v1.fits'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-6-a753e693909f>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m     15\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     16\u001b[0m         \u001b[0;31m# Load in uncertainty map\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 17\u001b[0;31m     \u001b[0mnoise_map\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'mosaic'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'mosaic_unc'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     18\u001b[0m     noise_hdu = fits.ImageHDU(header=noise_map[ext].header,\n\u001b[1;32m     19\u001b[0m                                 data=noise_map[ext].data)\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py\u001b[0m in \u001b[0;36mfitsopen\u001b[0;34m(name, mode, memmap, save_backup, cache, lazy_load_hdus, **kwargs)\u001b[0m\n\u001b[1;32m    149\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    150\u001b[0m     return HDUList.fromfile(name, mode, memmap, save_backup, cache,\n\u001b[0;32m--> 151\u001b[0;31m                             lazy_load_hdus, **kwargs)\n\u001b[0m\u001b[1;32m    152\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    153\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py\u001b[0m in \u001b[0;36mfromfile\u001b[0;34m(cls, fileobj, mode, memmap, save_backup, cache, lazy_load_hdus, **kwargs)\u001b[0m\n\u001b[1;32m    388\u001b[0m         return cls._readfrom(fileobj=fileobj, mode=mode, memmap=memmap,\n\u001b[1;32m    389\u001b[0m                              \u001b[0msave_backup\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msave_backup\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcache\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcache\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 390\u001b[0;31m                              lazy_load_hdus=lazy_load_hdus, **kwargs)\n\u001b[0m\u001b[1;32m    391\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    392\u001b[0m     \u001b[0;34m@\u001b[0m\u001b[0mclassmethod\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py\u001b[0m in \u001b[0;36m_readfrom\u001b[0;34m(cls, fileobj, data, mode, memmap, save_backup, cache, lazy_load_hdus, **kwargs)\u001b[0m\n\u001b[1;32m   1037\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_File\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1038\u001b[0m                 \u001b[0;31m# instantiate a FITS file object (ffo)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1039\u001b[0;31m                 \u001b[0mfileobj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_File\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmemmap\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mmemmap\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcache\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcache\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1040\u001b[0m             \u001b[0;31m# The Astropy mode is determined by the _File initializer if the\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1041\u001b[0m             \u001b[0;31m# supplied mode was None\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/utils/decorators.py\u001b[0m in \u001b[0;36mwrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m    519\u001b[0m                             \u001b[0mkwargs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mnew_name\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    520\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 521\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mfunction\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    522\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    523\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mwrapper\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/io/fits/file.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, fileobj, mode, memmap, overwrite, cache)\u001b[0m\n\u001b[1;32m    176\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_open_fileobj\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moverwrite\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    177\u001b[0m         \u001b[0;32melif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 178\u001b[0;31m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_open_filename\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moverwrite\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    179\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    180\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_open_filelike\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moverwrite\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/io/fits/file.py\u001b[0m in \u001b[0;36m_open_filename\u001b[0;34m(self, filename, mode, overwrite)\u001b[0m\n\u001b[1;32m    553\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    554\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_try_read_compressed\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmagic\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mext\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mext\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 555\u001b[0;31m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_file\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfileobj_open\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIO_FITS_MODES\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mmode\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    556\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclose_on_error\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    557\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/lib/python3.6/site-packages/astropy/io/fits/util.py\u001b[0m in \u001b[0;36mfileobj_open\u001b[0;34m(filename, mode)\u001b[0m\n\u001b[1;32m    386\u001b[0m     \"\"\"\n\u001b[1;32m    387\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 388\u001b[0;31m     \u001b[0;32mreturn\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbuffering\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    389\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    390\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '../../dmu17/dmu17_Legacy_maps//AKARI-SEP/data/SEP_MIPS24_mosaic_unc_map_v1.fits'"
     ]
    }
   ],
   "source": [
    "for i, file in enumerate(filelist):\n",
    "    print('----------------')\n",
    "    print(i,file)\n",
    "    folders=file.split('/')\n",
    "    print(folders[len(folders)-3])\n",
    "    field=folders[len(folders)-3]\n",
    "    filename=folders[len(folders)-1]\n",
    "    ext=0\n",
    "    \n",
    "    # Load in image map\n",
    "    image_map=fits.open(file)\n",
    "    image_hdu = fits.ImageHDU(header=image_map[ext].header,\n",
    "                                  data=image_map[ext].data)\n",
    "    image_hdu.header['EXTNAME'] = \"IMAGE\"\n",
    " \n",
    "        # Load in uncertainty map\n",
    "    noise_map=fits.open(file.replace('mosaic','mosaic_unc'))\n",
    "    noise_hdu = fits.ImageHDU(header=noise_map[ext].header,\n",
    "                                data=noise_map[ext].data)\n",
    "    noise_hdu.header['EXTNAME'] = \"ERROR\"\n",
    " \n",
    "     \n",
    "            # Load in coverage map\n",
    "    cov_map=fits.open(file.replace('mosaic','mosaic_cov'))\n",
    "    cov_hdu = fits.ImageHDU(header=cov_map[ext].header,\n",
    "                                data=cov_map[ext].data)\n",
    "    cov_hdu.header['EXTNAME'] = \"COVERAGE\"\n",
    "\n",
    "            \n",
    "            #Create primary header\n",
    "        \n",
    "    CHNLNUM=image_hdu.header['CHNLNUM'] \n",
    "    primary_hdu = fits.PrimaryHDU()\n",
    "    primary_hdu.header.append((\n",
    "            \"CREATOR\", \"Herschel Extragalactic Legacy Project\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "            \"TIMESYS\", \"UTC\", \"All dates are in UTC time\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "            \"DATE\", datetime.now().replace(microsecond=0).isoformat(),\n",
    "            \"Date of file creation\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "        \"VERSION\", VERSION, \"HELP product version\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "        \"TELESCOP\", \"Spitzer\", \"Name of the telescope\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "        \"INSTRUME\", \"MIPS\", \"Name of the instrument\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "        \"FILTER\", CHNLNUM, \"1=24um,2=70um,3=160um\"\n",
    "        ))\n",
    "    primary_hdu.header.append((\n",
    "        \"FIELD\", field, \"Name of the HELP field\"\n",
    "        ))\n",
    "\n",
    "\n",
    "        #Add empty extension for PSF\n",
    "    psf_hdu = fits.ImageHDU()\n",
    "    psf_hdu.header['EXTNAME'] = \"PSF\"\n",
    "    psf_hdu.header.add_comment(\"The PSF is not available.\")\n",
    "\n",
    "    hdu_list = fits.HDUList([primary_hdu, image_hdu, noise_hdu, cov_hdu, psf_hdu])\n",
    "    hdu_list.writeto(file.replace('mosaic','help'),\n",
    "                 checksum=True, overwrite=True)\n",
    "    print(f\"{file} /  processed...\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Moving the files\n",
    "Once we run this code, we obtain the Help Legacy Maps, in the folder: /dmu17_Legacy_maps/'. We need to put them in /dmu17_HELP_Legacy_Maps/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "dest = f\"./{field_specified}/data/\"\n",
    "files = glob.glob(f\"{mainfolder}/{field_specified}/data/*_help.fits\", recursive=True)\n",
    "\n",
    "for f in files:\n",
    "        shutil.move(f, dest)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "-------------------------------------------------------------------------------\n",
    "\n",
    "![HELP LOGO](https://avatars1.githubusercontent.com/u/7880370?s=75&v=4)\n",
    "\n",
    "**Authors**:  This code was adapted from code used for SPIRE homogenisaton (Yannick Roehlly) and in turn adapted for PACS data (Peter Hurley). [Seb Oliver](http://www.sussex.ac.uk/profiles/91548)\n",
    "\n",
    " \n",
    "For a full description of the database and how it is organised in to `dmu_products` please the top level [readme](../readme.md).\n",
    " \n",
    "The Herschel Extragalactic Legacy Project, ([HELP](http://herschel.sussex.ac.uk/)), is a [European Commission Research Executive Agency](https://ec.europa.eu/info/departments/research-executive-agency_en)\n",
    "funded project under the SP1-Cooperation, Collaborative project, Small or medium-scale focused research project, FP7-SPACE-2013-1 scheme, Grant Agreement\n",
    "Number 607254.\n",
    "\n",
    "[Acknowledgements](http://herschel.sussex.ac.uk/acknowledgements)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
