Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cosimoNigro authored and Bultako committed Dec 18, 2018
1 parent 023e5b4 commit 752a165
Show file tree
Hide file tree
Showing 291 changed files with 12,139 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ __pycache__/
# C extensions
*.so

# Mac environment
.DS_Store

# Distribution / packaging
.Python
build/
Expand Down Expand Up @@ -102,3 +105,5 @@ venv.bak/

# mypy
.mypy_cache/
.idea
.code
148 changes: 148 additions & 0 deletions 1_data.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data\n",
"\n",
"This notebook gives an overview of the dataset used in the joint Crab paper.\n",
"\n",
"TODO: write me"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"README.md\n",
"\u001b[34mfact\u001b[m\u001b[m\n",
"\u001b[34mfermi\u001b[m\u001b[m\n",
"\u001b[34mhess\u001b[m\u001b[m\n",
"\u001b[34mmagic\u001b[m\u001b[m\n",
"\u001b[34mother\u001b[m\u001b[m\n",
"\u001b[34mveritas\u001b[m\u001b[m\n"
]
}
],
"source": [
"!ls -1 data"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from gammapy.data import DataStore\n",
"from gammapy.spectrum import SpectrumObservationList"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Events and IRFs"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Data store:\n",
"HDU index table:\n",
"BASE_DIR: data/magic\n",
"Rows: 8\n",
"OBS_ID: 5029747 -- 5029748\n",
"HDU_TYPE: ['aeff', 'edisp', 'events', 'gti']\n",
"HDU_CLASS: ['aeff_2d', 'edisp_2d', 'events', 'gti']\n",
"\n",
"Observation table:\n",
"Observatory name: 'N/A'\n",
"Number of observations: 2\n"
]
}
],
"source": [
"data_store = DataStore.from_dir(\"data/magic\")\n",
"data_store.info()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Maps\n",
"\n",
"TODO: access pre-computed counts maps or show how to compute them here?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Spectra\n",
"\n",
"TODO: access pre-computed OGIP spectra and show a bit what they contain"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"SpectrumObservationList\n",
"Number of observations: 2\n"
]
}
],
"source": [
"spectrum_observations = SpectrumObservationList.read(\"results/spectra/magic\")\n",
"print(spectrum_observations)"
]
},
{
"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.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 752a165

Please sign in to comment.