Skip to content

Commit

Permalink
Many documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jzuhone committed Nov 26, 2018
1 parent 0ce3d0c commit 4f8ae40
Show file tree
Hide file tree
Showing 17 changed files with 93 additions and 169 deletions.
24 changes: 9 additions & 15 deletions doc/source/cookbook/Cosmo_Source_Catalog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib\n",
"matplotlib.rc(\"font\", size=18)\n",
"import soxs"
"import soxs\n",
"import aplpy"
]
},
{
Expand All @@ -38,9 +36,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"exp_time = (200.0, \"ks\") \n",
Expand Down Expand Up @@ -79,7 +75,7 @@
"metadata": {},
"outputs": [],
"source": [
"soxs.instrument_simulator(\"my_cat_simput.fits\", \"cosmo_cat_evt.fits\", exp_time, \"hdxi\", \n",
"soxs.instrument_simulator(\"my_cat_simput.fits\", \"cosmo_cat_evt.fits\", exp_time, \"lynx_hdxi\", \n",
" sky_center, overwrite=True)"
]
},
Expand All @@ -93,9 +89,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.write_image(\"cosmo_cat_evt.fits\", \"cosmo_img.fits\", emin=0.7, emax=7.0, overwrite=True)"
Expand All @@ -114,10 +108,10 @@
"metadata": {},
"outputs": [],
"source": [
"import aplpy\n",
"fig = aplpy.FITSFigure(\"cosmo_img.fits\")\n",
"fig.show_colorscale(stretch='sqrt', cmap=\"cubehelix\")\n",
"fig.recenter(30.0, 45.0, width=0.33333333, height=0.333333)"
"fig.recenter(30.0, 45.0, width=0.33333333, height=0.333333)\n",
"fig"
]
}
],
Expand All @@ -137,7 +131,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.7.0"
}
},
"nbformat": 4,
Expand Down
30 changes: 11 additions & 19 deletions doc/source/cookbook/Make_Background_File.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib\n",
"matplotlib.rc(\"font\", size=18)\n",
"import soxs"
"import soxs\n",
"import aplpy"
]
},
{
Expand All @@ -38,12 +36,10 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"exp_time = (300.0, \"ks\") # in seconds\n",
"exp_time = (100.0, \"ks\") # in seconds\n",
"fov = 50.0 # in arcmin, used only for the point source generation\n",
"sky_center = [22.,-27.0] # in degrees"
]
Expand All @@ -58,9 +54,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.make_point_source_list(\"point_source_table.dat\", exp_time, fov, sky_center, prng=24, area=1000.0)"
Expand All @@ -79,7 +73,7 @@
"metadata": {},
"outputs": [],
"source": [
"soxs.make_background_file(\"bkgnd_evt.fits\", exp_time, \"aciss_cy0\", sky_center, \n",
"soxs.make_background_file(\"bkgnd_evt.fits\", exp_time, \"chandra_aciss_cy0\", sky_center, \n",
" input_sources=\"point_source_table.dat\", overwrite=True, prng=24)"
]
},
Expand All @@ -93,9 +87,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.write_image(\"bkgnd_evt.fits\", \"bkgnd_img.fits\", overwrite=True)"
Expand All @@ -114,10 +106,10 @@
"metadata": {},
"outputs": [],
"source": [
"import aplpy\n",
"fig = aplpy.FITSFigure(\"bkgnd_img.fits\")\n",
"fig.show_colorscale(stretch='sqrt', cmap=\"plasma\")\n",
"fig.recenter(22., -27.0, width=0.5, height=0.5)"
"fig.recenter(22., -27.0, width=0.5, height=0.5)\n",
"fig"
]
}
],
Expand All @@ -137,7 +129,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.7.0"
}
},
"nbformat": 4,
Expand Down
36 changes: 12 additions & 24 deletions doc/source/cookbook/Point_Source_Catalog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib\n",
"matplotlib.rc(\"font\", size=18)\n",
"import soxs"
"import soxs\n",
"import aplpy"
]
},
{
Expand All @@ -38,9 +36,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"exp_time = (300.0, \"ks\") # in seconds\n",
Expand All @@ -58,9 +54,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.make_point_sources_file(\"my_cat\", \"ptsrc\", exp_time, fov, sky_center, prng=24, \n",
Expand All @@ -84,12 +78,10 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.instrument_simulator(\"my_cat_simput.fits\", \"ptsrc_cat_evt.fits\", exp_time, \"hdxi\", sky_center, \n",
"soxs.instrument_simulator(\"my_cat_simput.fits\", \"ptsrc_cat_evt.fits\", exp_time, \"lynx_hdxi\", sky_center, \n",
" overwrite=True, ptsrc_bkgnd=False)"
]
},
Expand All @@ -103,9 +95,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.write_image(\"ptsrc_cat_evt.fits\", \"ptsrc_img.fits\", emin=0.7, emax=2.0, overwrite=True)"
Expand All @@ -121,15 +111,13 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import aplpy\n",
"fig = aplpy.FITSFigure(\"ptsrc_img.fits\")\n",
"fig.show_colorscale(stretch='sqrt', cmap=\"plasma\")\n",
"fig.recenter(22., -27.0, width=0.03, height=0.03)"
"fig.recenter(22., -27.0, width=0.03, height=0.03)\n",
"fig"
]
}
],
Expand All @@ -149,7 +137,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.7.0"
}
},
"nbformat": 4,
Expand Down
45 changes: 12 additions & 33 deletions doc/source/cookbook/Radial_Profile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib\n",
"matplotlib.rc(\"font\", size=18)\n",
"import matplotlib.pyplot as plt\n",
Expand All @@ -33,9 +30,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"emin = 0.05 # keV\n",
Expand All @@ -47,9 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"kT = 6.0\n",
Expand All @@ -71,9 +64,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"pos = soxs.BetaModel(30.0, 45.0, 50.0, 0.67)"
Expand Down Expand Up @@ -108,12 +99,10 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.instrument_simulator(\"beta_model_simput.fits\", \"evt.fits\", (100.0, \"ks\"), \"hdxi\", [30., 45.], \n",
"soxs.instrument_simulator(\"beta_model_simput.fits\", \"evt.fits\", (100.0, \"ks\"), \"lynx_hdxi\", [30., 45.], \n",
" overwrite=True, ptsrc_bkgnd=False)"
]
},
Expand All @@ -127,9 +116,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.make_exposure_map(\"evt.fits\", \"expmap.fits\", 2.3, overwrite=True)"
Expand All @@ -145,9 +132,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"soxs.write_radial_profile(\"evt.fits\", \"profile.fits\", [30.0, 45.0], \n",
Expand All @@ -164,9 +149,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"f = pyfits.open(\"profile.fits\")\n",
Expand All @@ -183,9 +166,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"plt.figure(figsize=(8,8))\n",
Expand All @@ -206,9 +187,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"plt.figure(figsize=(8,8))\n",
Expand Down Expand Up @@ -236,7 +215,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.7.0"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 4f8ae40

Please sign in to comment.