Modif data access in image_fitting_with_sherpa
"outputs": [],
"source": [
"# Read the fits file to load them in a sherpa model\n",
- "hdr = fits.getheader(\"G300-0_test_counts.fits\")\n",
+ "hdr = fits.getheader(\"../datasets/G300-0_test_counts.fits\")\n",
"wcs = WCS(hdr)\n",
"\n",
"sh.set_stat(\"cash\")\n",
"sh.set_method(\"simplex\")\n",
- "sh.load_image(\"G300-0_test_counts.fits\")\n",
+ "sh.load_image(\"../datasets/G300-0_test_counts.fits\")\n",
"sh.set_coord(\"logical\")\n",
"\n",
- "sh.load_table_model(\"expo\", \"G300-0_test_exposure.fits\")\n",
- "sh.load_table_model(\"bkg\", \"G300-0_test_background.fits\")\n",
- "sh.load_psf(\"psf\", \"G300-0_test_psf.fits\")"
+ "sh.load_table_model(\"expo\", \"../datasets/G300-0_test_exposure.fits\")\n",
+ "sh.load_table_model(\"bkg\", \"../datasets/G300-0_test_background.fits\")\n",
+ "sh.load_psf(\"psf\", \"../datasets/G300-0_test_psf.fits\")"
]
},
{
"bkg.ampl = 1\n",
"sh.freeze(bkg)\n",
"\n",
- "resid = Map.read(\"G300-0_test_counts.fits\")\n",
+ "resid = Map.read(\"../datasets/G300-0_test_counts.fits\")\n",
"resid.data = sh.get_data_image().y - sh.get_model_image().y\n",
"resid_smooth = resid.smooth(radius=6)\n",
"resid_smooth.plot();"
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
- "display_name": "Python 3",
+ "display_name": "Python [default]",
"language": "python",
"name": "python3"
},
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.6.0"
+ "version": "3.6.1"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": true,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": true,
+ "toc_window_display": false
},
"varInspector": {
"cols": {
