Created
June 17, 2014 12:57
-
-
Save cdeil/c49b786a9e6ceca19c95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:6f26d55ed37d1c9a5a4450e60dbcc846307443619247cd18e84431b923003326" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"fermi_catalog = FermiCatalog()\n", | |
"flux_points = fermi_catalog.flux_points('2FGL XXX')\n", | |
"\n", | |
"\n", | |
"flux_points = read_flux_points('hess_crab.txt')\n", | |
"flux_points.write('hess_crab.fits')\n", | |
"\n", | |
"compute_differential_flux_point(table, )\n", | |
"\n", | |
"compute_integral_flux_point(table)\n", | |
"\n", | |
"'ENERGY', 'DIFF_FLUX', 'DIFF_FLUX_ERR'\n", | |
"\n", | |
"'ENERGY_MIN', 'ENERGY_MAX', 'INT_FLUX', 'INT_FLUX_ERR'\n", | |
"\n", | |
"\n", | |
"_compute_x_lafferty(f, x_min, x_max)\n", | |
"\n", | |
"ebounds = []\n", | |
"int_flux = []\n", | |
"spectral_index = 2.3\n", | |
"\n", | |
"flux_points = FluxPoints(ebounds, int_flux)\n", | |
"flux_points.calc_diff_flux(xmethod='lafferty', ymethod='powerlaw', spectral_index=spectral_index)\n", | |
"return flux_points\n", | |
"\n", | |
"\n" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"from astropy.table import Table" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"t = Table()\n", | |
"t.meta['spectral_index'] = 3.2\n", | |
"t['flux'] = [1, 2, 3]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 4 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"print(t.meta)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"OrderedDict([('spectral_index', 3.2)])\n" | |
] | |
} | |
], | |
"prompt_number": 6 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment