{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from astropy.table import Table" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "GASC = Table.read(\"GALEX-GASC_20170116.fits\")\n", "GMSC = Table.read(\"GALEX-GMSC_20170116.fits\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Column to keep\n", "\n", "- name: Unique identifier\n", "- ra, dec\n", "- field: Column added to the pristine catalogue to contain the HELP field name.\n", "- flux_nuv, fluxerr_nuv, flux_fuv, fluxerr_nuv: Total fluxes en errors\n", "\n", "## Flag selection\n", "\n", "EXTENDED: deblending parameters in the SExtractor program correctly measure most galaxies up to one arcminute in diameter. Galaxies larger than this will have a larger probability of being shredded into multiple sources by the GALEX pipeline. So that users can avoid these shredded galaxies in the catalog, the \"EXTENDED\" flag is given in the catalog for known optical sources with diameters (typically 25th magnitude isophote optical diameters, D25) greater than 1.5 arcminute. If a source in the catalogs lies within an elliptical aperture with major axis scaled to 1.25*D25, then EXTENDED is equal to one and zero otherwise.\n", "\n", "—> I propose to drop objects with EXTENDED equal to 1\n", "\n", "ARTIFACT_NUV, ARTIFACT_FUV: it is preconised to exclude sources with flags 2 and 3. It is also safer to exclude measures close to the edge of the field (flag=6)\n", "\n", "—> exclude objects with ARTIFACT=2 or 3 or 6\n", "\n", "MANFLAG: There are additional artifacts due to bright stars lying just off of the field-of-view that are not in general flagged by the standard GALEX pipeline. These artifacts are in general shaped like horseshoes or long, thin cones. The primary regions of both the GASC and GMSC were visually inspected and these artifacts are identified. For any source that lies within one of these flagged regions, the column MANFLAG will be set to one. In addition bright stars can create thin elliptical sources somewhat resembling an edge-on galaxy that lie perpendicular to the edge of the field-of-view. The location and shape parameters in the catalogs are used to flag such sources. Any source that is likely one of these artifacts will have MANFLAG set equal to two. \n", "\n", "—> Use only sources with MANFLAG=0" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### GASC mask" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "gasc_extended_mask = GASC['extended'] != 1\n", "gasc_artefact_nuv_mask = (GASC['artefact_nuv'] != 2) & (GASC['artefact_nuv'] != 3) & \\\n", " (GASC['artefact_nuv'] != 6)\n", "gasc_artefact_fuv_mask = (GASC['artefact_fuv'] != 2) & (GASC['artefact_fuv'] != 3) & \\\n", " (GASC['artefact_fuv'] != 6)\n", "gasc_manflag_mask = GASC['manflag'] == 0\n", "gasc_mask = gasc_extended_mask & gasc_artefact_nuv_mask & gasc_artefact_fuv_mask & \\\n", " gasc_manflag_mask" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### GMSC mask" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [], "source": [ "gmsc_extended_mask = GMSC['extended'] != 1\n", "gmsc_artefact_nuv_mask = (GMSC['artefact_nuv'] != 2) & (GMSC['artefact_nuv'] != 3) & \\\n", " (GMSC['artefact_nuv'] != 6)\n", "gmsc_artefact_fuv_mask = (GMSC['artefact_fuv'] != 2) & (GMSC['artefact_fuv'] != 3) & \\\n", " (GMSC['artefact_fuv'] != 6)\n", "gmsc_manflag_mask = GMSC['manflag'] == 0\n", "gmsc_mask = gmsc_extended_mask & gmsc_artefact_nuv_mask & gmsc_artefact_fuv_mask & \\\n", " gmsc_manflag_mask" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Creation of the HELP catalogue" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "help_gasc = GASC[\n", " 'field', 'name', 'ra', 'dec', 'flux_nuv', 'fluxerr_nuv', 'flux_fuv', 'fluxerr_fuv'\n", "][gasc_mask]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "help_gmsc = GMSC[\n", " 'field', 'name', 'ra', 'dec', 'flux_nuv', 'fluxerr_nuv', 'flux_fuv', 'fluxerr_fuv'\n", "][gmsc_mask]" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "## Notes\n", "\n", "The fluxes are already in μJy. They are not corrected for galactic extinction. This correction will occur during datafusion to use the same E(B-V) as for other fluxes to be corrected. The flux columns will then be named F_NUV, FErr_NUV, F_FUV, FErr_NUV to be usable by CIGALE." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Saving the catalogues" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": true }, "outputs": [], "source": [ "help_gasc.write(\"GALEX-GASC_20170116_HELP-SELECTED.fits\")\n", "help_gmsc.write(\"GALEX-GMSC_20170116_HELP-SELECTED.fits\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Some check" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The flag selection in the GASC catalogue changed the number of sourcesfrom 1924072 to 1884348\n", "The flag selection in the GMSC catalogue changed the number of sourcesfrom 3163240 to 3121917\n" ] } ], "source": [ "print(\"The flag selection in the GASC catalogue changed the number of sources\"\n", " \"from {} to {}\".format(len(GASC), len(help_gasc)))\n", "print(\"The flag selection in the GMSC catalogue changed the number of sources\"\n", " \"from {} to {}\".format(len(GMSC), len(help_gmsc)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "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.5.3" } }, "nbformat": 4, "nbformat_minor": 2 }