Skip to content

Commit

Permalink
missing save in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrigno committed Sep 5, 2024
1 parent ce397af commit 19e12da
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"ename": "Exception",
"evalue": "failed to read with any method, tried: {'from_file_name_osa': FileNotFoundError(2, 'No such file or directory'), 'from_file_name_normal': FileNotFoundError(2, 'No such file or directory')}",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mException\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 6\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mogip\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtools\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m plot, transform_rmf, crab_ph_cm2_s_kev, convolve\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpylab\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mplt\u001b[39;00m\n\u001b[0;32m----> 6\u001b[0m crab_pha \u001b[38;5;241m=\u001b[39m \u001b[43mogip\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mspec\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mPHAI\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfrom_file_name\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcrab_pha.fits\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m crab_rmf \u001b[38;5;241m=\u001b[39m ogip\u001b[38;5;241m.\u001b[39mspec\u001b[38;5;241m.\u001b[39mRMF\u001b[38;5;241m.\u001b[39mfrom_file_name(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcrab_rmf.fits\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 8\u001b[0m crab_arf \u001b[38;5;241m=\u001b[39m ogip\u001b[38;5;241m.\u001b[39mspec\u001b[38;5;241m.\u001b[39mARF\u001b[38;5;241m.\u001b[39mfrom_file_name(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcrab_arf.fits\u001b[39m\u001b[38;5;124m\"\u001b[39m) \n",
"File \u001b[0;32m~/Soft/ogip/ogip/spec.py:62\u001b[0m, in \u001b[0;36mPHAI.from_file_name\u001b[0;34m(fn)\u001b[0m\n\u001b[1;32m 60\u001b[0m \u001b[38;5;129m@staticmethod\u001b[39m\n\u001b[1;32m 61\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mfrom_file_name\u001b[39m(fn):\n\u001b[0;32m---> 62\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mReadable\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfrom_file_name\u001b[49m\u001b[43m(\u001b[49m\u001b[43mPHAI\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfn\u001b[49m\u001b[43m)\u001b[49m\n",
"File \u001b[0;32m~/Soft/ogip/ogip/spec.py:47\u001b[0m, in \u001b[0;36mReadable.from_file_name\u001b[0;34m(cls, fn)\u001b[0m\n\u001b[1;32m 42\u001b[0m logger\u001b[38;5;241m.\u001b[39mdebug(\n\u001b[1;32m 43\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfailed to read with \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m: \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m, n, m, e\n\u001b[1;32m 44\u001b[0m )\n\u001b[1;32m 45\u001b[0m methods_tried[n] \u001b[38;5;241m=\u001b[39m e\n\u001b[0;32m---> 47\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m(\n\u001b[1;32m 48\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfailed to read with any method, tried: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmethods_tried\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n",
"\u001b[0;31mException\u001b[0m: failed to read with any method, tried: {'from_file_name_osa': FileNotFoundError(2, 'No such file or directory'), 'from_file_name_normal': FileNotFoundError(2, 'No such file or directory')}"
]
}
],
"outputs": [],
"source": [
"import numpy as np\n",
"import ogip\n",
Expand Down Expand Up @@ -116,13 +102,10 @@
}
],
"metadata": {
"interpreter": {
"hash": "6c0c14c3bc85a7c6c1cb359b38aedade0f64d7248b8647c7b1bd974c3ac87f4c"
},
"kernelspec": {
"display_name": "py10",
"language": "python",
"name": "py10"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down

0 comments on commit 19e12da

Please sign in to comment.