add local CALDB definition
"metadata": {},
"outputs": [],
"source": [
+ "import os\n",
+ "from pathlib import Path\n",
+ "\n",
"import numpy as np\n",
"import astropy\n",
"import gammapy\n",
"!ls -1 $GAMMAPY_DATA/cta-1dc/index/gps"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The access to the IRFs files requires to define a `CALDB` environment variable. We are going to define it only for this notebook so it won't overwrite the one you may have already defined."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "os.environ[\"CALDB\"] = os.environ[\"GAMMAPY_DATA\"] + \"/cta-1dc/caldb\""
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
"cell_type": "markdown",
"metadata": {},
"source": [
- "If you can't download the index files, or got errors related to the data acces using them, you can generate the `DataStore` directly from the event files"
+ "If you can't download the index files, or got errors related to the data acces using them, you can generate the `DataStore` directly from the event files."
]
},
{
"metadata": {},
"outputs": [],
"source": [
- "#import os\n",
- "#from pathlib import Path\n",
- "#path = Path(os.environ[\"GAMMAPY_DATA\"]) / \"cta-1dc/data\"\n",
- "#paths = list(path.rglob(\"*.fits\"))\n",
- "#data_store = DataStore.from_events_files(paths)\n",
- "#print(data_store)"
+ "path = Path(os.environ[\"GAMMAPY_DATA\"]) / \"cta-1dc/data\"\n",
+ "paths = list(path.rglob(\"*.fits\"))\n",
+ "data_store = DataStore.from_events_files(paths)\n",
+ "print(data_store)"
]
},
{
