alternative to load DataStore
"outputs": [],
"source": [
"data_store = DataStore.from_dir(\"$GAMMAPY_DATA/cta-1dc/index/gps\")\n",
- "data_store"
+ "print(data_store)"
+ ]
+ },
+ {
+ "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"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "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)"
]
},
{
