{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"# DataIO Examples\n",
"\n",
"For these examples we will use 2 hrs of simulated Crab data with the Compton sphere mass model. This is an idealized mass model with a full-sky instantanious field of view, used only for development. The file can be downloaded using the cosipy utility function below. \n",
"\n",
"wasabi path: ComptonSphere/mini-DC2/GalacticScan.inc1.id1.crab2hr.extracted.tra.gz
\n",
"File size: 322 MB"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from cosipy.util import fetch_wasabi_file\n",
"fetch_wasabi_file('ComptonSphere/mini-DC2/GalacticScan.inc1.id1.crab2hr.extracted.tra.gz')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data formats overview"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The COSI high-level analysis data is composed of a stream of time-tagged events. Each event has an associated timestamp ($t$), measured energy ($E_m$), and the three parameters of the Compton Data Space (CDS): scattering polar angle ($\\phi$), and the longitude and latitude angles defining the direction of the first scattered gamma ray ($\\psi$ and $\\chi$). See these references for an explanation of the CDS: [1](https://github.com/cositools/cosi-data-challenge-2/tree/main/cosipy-intro#the-compton-data-space),[2](https://arxiv.org/abs/2308.11436), [3](https://arxiv.org/abs/2102.13158).\n",
"\n",
"There are three formats that contain time-tagged events:\n",
"* tra files. These have the extension \".tra\". They are text files generated by MEGAlib that contain track information. You can read about the format in MEGALib's [Mimrec documentation](https://github.com/zoglauer/megalib/blob/main/doc/Mimrec.pdf). Most users won't need to use these files.\n",
"* FITS files. These have the extension \".fits\". They are essentially tra files that have been converted into the [FITS](https://fits.gsfc.nasa.gov/) format. This is the typical starting point for a cosipy analysis.\n",
"* Unbinned HDF5 files. These have the extension \".h5\" or \".hdf5\". This is another option for converting the tra files into a binary format, in this case ([HDF5](https://www.hdfgroup.org/solutions/hdf5/)). Some examples use an HDF5 format instead of FITS, since it can be more computationally efficient.\n",
"\n",
"Currently, all the analyses in cosipy use binned data. These are also HDF5 binary files and have the extension \".h5\" or \".hdf5\". They contain a 4-dimensional sparse histogram corresponding to the variables $t$, $E_m$, $\\phi$ and $\\psi\\phi$. The binned direction of the scattered gamma ray ($\\phi$ and $\\psi\\phi$) is encoded as a pixel in a [HEALpix](https://healpix.sourceforge.io/) map."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
10:44:43 WARNING The naima package is not available. Models that depend on it will not be functions.py:48\n", " available \n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:43\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m The naima package is not available. Models that depend on it will not be \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=693506;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/functions/functions_1D/functions.py\u001b\\\u001b[2mfunctions.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=503482;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/functions/functions_1D/functions.py#48\u001b\\\u001b[2m48\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251mavailable \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING The GSL library or the pygsl wrapper cannot be loaded. Models that depend on it functions.py:69\n", " will not be available. \n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m The GSL library or the pygsl wrapper cannot be loaded. Models that depend on it \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=113949;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/functions/functions_1D/functions.py\u001b\\\u001b[2mfunctions.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=603534;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/functions/functions_1D/functions.py#69\u001b\\\u001b[2m69\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251mwill not be available. \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:45 WARNING The ebltable package is not available. Models that depend on it will not be absorption.py:36\n", " available \n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:45\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m The ebltable package is not available. Models that depend on it will not be \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=436481;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/functions/functions_1D/absorption.py\u001b\\\u001b[2mabsorption.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=892811;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/functions/functions_1D/absorption.py#36\u001b\\\u001b[2m36\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251mavailable \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING We have set the min_value of K to 1e-99 because there was a postive transform parameter.py:704\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m We have set the min_value of K to \u001b[0m\u001b[1;37m1e-99\u001b[0m\u001b[1;38;5;251m because there was a postive transform \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=378295;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py\u001b\\\u001b[2mparameter.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=468787;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py#704\u001b\\\u001b[2m704\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING We have set the min_value of K to 1e-99 because there was a postive transform parameter.py:704\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m We have set the min_value of K to \u001b[0m\u001b[1;37m1e-99\u001b[0m\u001b[1;38;5;251m because there was a postive transform \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=847982;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py\u001b\\\u001b[2mparameter.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=933240;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py#704\u001b\\\u001b[2m704\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING We have set the min_value of K to 1e-99 because there was a postive transform parameter.py:704\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m We have set the min_value of K to \u001b[0m\u001b[1;37m1e-99\u001b[0m\u001b[1;38;5;251m because there was a postive transform \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=266236;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py\u001b\\\u001b[2mparameter.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=82342;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py#704\u001b\\\u001b[2m704\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING We have set the min_value of K to 1e-99 because there was a postive transform parameter.py:704\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m We have set the min_value of K to \u001b[0m\u001b[1;37m1e-99\u001b[0m\u001b[1;38;5;251m because there was a postive transform \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=532777;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py\u001b\\\u001b[2mparameter.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=637640;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py#704\u001b\\\u001b[2m704\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING We have set the min_value of F to 1e-99 because there was a postive transform parameter.py:704\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m We have set the min_value of F to \u001b[0m\u001b[1;37m1e-99\u001b[0m\u001b[1;38;5;251m because there was a postive transform \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=105550;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py\u001b\\\u001b[2mparameter.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=364215;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py#704\u001b\\\u001b[2m704\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING We have set the min_value of K to 1e-99 because there was a postive transform parameter.py:704\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m We have set the min_value of K to \u001b[0m\u001b[1;37m1e-99\u001b[0m\u001b[1;38;5;251m because there was a postive transform \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=259140;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py\u001b\\\u001b[2mparameter.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=552462;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/astromodels/core/parameter.py#704\u001b\\\u001b[2m704\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:45 INFO Starting 3ML! __init__.py:35\n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:45\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;49mINFO \u001b[0m \u001b[1;38;5;251m Starting 3ML! \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=603244;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=905296;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#35\u001b\\\u001b[2m35\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING WARNINGs here are NOT errors __init__.py:36\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m WARNINGs here are \u001b[0m\u001b[1;31mNOT\u001b[0m\u001b[1;38;5;251m errors \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=689267;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=873945;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#36\u001b\\\u001b[2m36\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING but are inform you about optional packages that can be installed __init__.py:37\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m but are inform you about optional packages that can be installed \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=480669;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=815;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#37\u001b\\\u001b[2m37\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING to disable these messages, turn off start_warning in your config file __init__.py:40\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m \u001b[0m\u001b[1;31m to disable these messages, turn off start_warning in your config file\u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=282557;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=230210;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#40\u001b\\\u001b[2m40\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING no display variable set. using backend for graphics without display (agg) __init__.py:46\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m no display variable set. using backend for graphics without display \u001b[0m\u001b[1;38;5;251m(\u001b[0m\u001b[1;38;5;251magg\u001b[0m\u001b[1;38;5;251m)\u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=269009;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=577205;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#46\u001b\\\u001b[2m46\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: dev is an invalid version and will not be supported in a future release\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "
10:44:50 WARNING ROOT minimizer not available minimization.py:1345\n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:50\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m ROOT minimizer not available \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=966875;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/minimizer/minimization.py\u001b\\\u001b[2mminimization.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=265165;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/minimizer/minimization.py#1345\u001b\\\u001b[2m1345\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING Multinest minimizer not available minimization.py:1357\n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m Multinest minimizer not available \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=72521;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/minimizer/minimization.py\u001b\\\u001b[2mminimization.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=605572;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/minimizer/minimization.py#1357\u001b\\\u001b[2m1357\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:52 WARNING PyGMO is not available minimization.py:1369\n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:52\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m PyGMO is not available \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=145891;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/minimizer/minimization.py\u001b\\\u001b[2mminimization.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=446981;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/minimizer/minimization.py#1369\u001b\\\u001b[2m1369\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:53 WARNING The cthreeML package is not installed. You will not be able to use plugins which __init__.py:94\n", " require the C/C++ interface (currently HAWC) \n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:53\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m The cthreeML package is not installed. You will not be able to use plugins which \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=19565;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=389702;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#94\u001b\\\u001b[2m94\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251mrequire the C/C++ interface \u001b[0m\u001b[1;38;5;251m(\u001b[0m\u001b[1;38;5;251mcurrently HAWC\u001b[0m\u001b[1;38;5;251m)\u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:54 WARNING Could not import plugin HAWCLike.py. Do you have the relative instrument __init__.py:144\n", " software installed and configured? \n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:54\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m Could not import plugin HAWCLike.py. Do you have the relative instrument \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=918898;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=693090;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#144\u001b\\\u001b[2m144\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251msoftware installed and configured? \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING Could not import plugin FermiLATLike.py. Do you have the relative instrument __init__.py:144\n", " software installed and configured? \n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m Could not import plugin FermiLATLike.py. Do you have the relative instrument \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=263202;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=975208;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#144\u001b\\\u001b[2m144\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251msoftware installed and configured? \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:56 WARNING No fermitools installed lat_transient_builder.py:44\n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:56\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m No fermitools installed \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=421856;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/utils/data_builders/fermi/lat_transient_builder.py\u001b\\\u001b[2mlat_transient_builder.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=511842;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/utils/data_builders/fermi/lat_transient_builder.py#44\u001b\\\u001b[2m44\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
10:44:56 WARNING Env. variable MKL_NUM_THREADS is not set. Please set it to 1 for optimal __init__.py:387\n", " performances in 3ML \n", "\n" ], "text/plain": [ "\u001b[38;5;46m10:44:56\u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m Env. variable MKL_NUM_THREADS is not set. Please set it to \u001b[0m\u001b[1;37m1\u001b[0m\u001b[1;38;5;251m for optimal \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=189740;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=150136;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#387\u001b\\\u001b[2m387\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251mperformances in 3ML \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
WARNING Env. variable NUMEXPR_NUM_THREADS is not set. Please set it to 1 for optimal __init__.py:387\n", " performances in 3ML \n", "\n" ], "text/plain": [ "\u001b[38;5;46m \u001b[0m\u001b[38;5;46m \u001b[0m\u001b[38;5;134mWARNING \u001b[0m \u001b[1;38;5;251m Env. variable NUMEXPR_NUM_THREADS is not set. Please set it to \u001b[0m\u001b[1;37m1\u001b[0m\u001b[1;38;5;251m for optimal \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b]8;id=297232;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=411648;file:///zfs/astrohe/Software/COSIMain_u2/lib/python3.9/site-packages/threeML/__init__.py#387\u001b\\\u001b[2m387\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[38;5;46m \u001b[0m \u001b[1;38;5;251mperformances in 3ML \u001b[0m\u001b[1;38;5;251m \u001b[0m\u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from cosipy import BinnedData\n", "%matplotlib inline " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get the unbinned COSI dataset\n", " \n", "Define an instance of the BinnedData object. Input parameters are passed from inputs.yaml.