Skip to content

Commit

Permalink
syntax warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie-Brown committed Oct 30, 2024
1 parent a03f487 commit 318cd1e
Showing 1 changed file with 23 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"id": "520b8fa0",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -229,9 +229,9 @@
" \n",
" contrast_plot = plt.figure(figsize=(14, 10))\n",
"\n",
" plt.plot(rawr, cperpix_5sigma, label=f\"Predicted Limit 5 sigma\", color='lightsteelblue')\n",
" plt.plot(rawr, cperpix_3sigma, label=f\"Predicted Limit 3 sigma\", color='steelblue')\n",
" plt.plot(rawr, cperpix_1sigma, label=f\"Predicted Limit 1 sigma\", color='midnightblue')\n",
" plt.plot(rawr, cperpix_5sigma, label='Predicted Limit 5 $\\sigma$', color='lightsteelblue')\n",
" plt.plot(rawr, cperpix_3sigma, label='Predicted Limit 3 $\\sigma$', color='steelblue')\n",
" plt.plot(rawr, cperpix_1sigma, label='Predicted Limit 1 $\\sigma$', color='midnightblue')\n",
"\n",
" plt.fill_between(rawr, cperpix_5sigma, color='lightsteelblue')\n",
" plt.fill_between(rawr, cperpix_3sigma, color='steelblue')\n",
Expand All @@ -243,7 +243,7 @@
" None \n",
" \n",
" if feature == 'companion':\n",
" if 'comp_sep' == None or 'comp_contrast' == None:\n",
" if 'comp_sep' is None or 'comp_contrast' is None:\n",
" raise NameError(\"Companion separation ('comp_sep') or companion contrast ('comp_contrast') or not specified.\") \n",
" comp_separation = comp_sep\n",
" comp_contrast = comp_contrast\n",
Expand All @@ -257,13 +257,13 @@
" diskprofile = disk_profile\n",
" \n",
" if diskprofile == 'flat':\n",
" if 'disk_contrast' == None:\n",
" if 'disk_contrast' is None:\n",
" raise NameError(\"Disk contrast not specified.\")\n",
" diskcontrast = disk_contrast\n",
" plt.axhline(diskcontrast, ls='--', linewidth=4, color='orange', label=target_name)\n",
" \n",
" elif diskprofile == 'sb_profile':\n",
" if 'disk_filename' == None:\n",
" if 'disk_filename' is None:\n",
" raise NameError(\"Surface brightness profile file name is not specified.\")\n",
" \n",
" diskfilename = disk_filename\n",
Expand All @@ -272,13 +272,13 @@
" disk_cont = disk_sb_profile[:, 1]\n",
" plt.plot(disk_r, disk_cont, ls='--', linewidth=4, color='orange', label=target_name)\n",
" \n",
" elif diskprofile == None:\n",
" elif diskprofile is None:\n",
" None\n",
" \n",
" else:\n",
" raise NameError(\"Disk profile not specified. Must be either 'flat' or 'sb_profile'.\")\n",
" \n",
" elif feature == None:\n",
" elif feature is None:\n",
" None\n",
" \n",
" plt.legend(fontsize=18, loc='best', markerscale=0.5)\n",
Expand All @@ -288,12 +288,8 @@
" plt.yscale('log')\n",
" plt.tick_params(axis='both', which='both', labelsize=20, size=6)\n",
" \n",
" if 'save_fig' not in kwargs:\n",
" None\n",
" else:\n",
" savefig = kwargs['save_fig']\n",
" if savefig:\n",
" contrast_plot.savefig('STIS_contrast_plot_'+target_name+'.pdf')"
" if save_fig:\n",
" contrast_plot.savefig('STIS_contrast_plot_'+target_name+'.pdf')"
]
},
{
Expand All @@ -312,10 +308,10 @@
"In the example below, is a test case demonstration for a theoretical point source companion in close angular separation to a bright star where the property values of a companion are defined in-line in the function call directly.\n",
"\n",
"- The point source example companion plotted here is shown at 0.6\" projected angular separation from it central star at a contrast ratio of 2e-5.\n",
"- The dark blue corresponds to the point source companion being under the 1$\\sigma$ direct detection limit. \n",
"- The medium blue corresponds to the parameter space of detectability within the 1-3$\\sigma$ regime.\n",
"- The light blue corresponds to the parameter space of detectability within the 3-5$\\sigma$ regime.\n",
"- Anything above the light blue 5$\\sigma$ contrast limit in the white region would be predicted to be detectable with the given observational set up.\n",
"- The dark blue corresponds to the point source companion being under the 1 $\\sigma$ direct detection limit. \n",
"- The medium blue corresponds to the parameter space of detectability within the 1-3 $\\sigma$ regime.\n",
"- The light blue corresponds to the parameter space of detectability within the 3-5 $\\sigma$ regime.\n",
"- Anything above the light blue 5 $\\sigma$ contrast limit in the white region would be predicted to be detectable with the given observational set up.\n",
"- The black dotted line shows the azimuthally averaged STIS PSF intensity for comparison, which is the expected contrast curve without coronagraphic post-processing techniques applied, and is an optional parameter to plot."
]
},
Expand Down Expand Up @@ -346,9 +342,9 @@
"\n",
"- The flat disk profile shown as the dotted orange line is plotted with at a contrast ratio of 1e-5.\n",
"- The dark blue corresponds to the disk brightness being under the 1$\\sigma$ direct detection limit, and therefore in this case you would not be confident in being able to directly detect the disk at close to the inner working angle with the given observational set up. \n",
"- The medium blue corresponds to the parameter space of detectability within the 1-3$\\sigma$ regime.\n",
"- The light blue corresponds to the parameter space of detectability within the 3-5$\\sigma$ regime.\n",
"- Anything above the light blue 5$\\sigma$ contrast limit in the white region would be predicted to be detectable with the given observational set up.\n",
"- The medium blue corresponds to the parameter space of detectability within the 1-3 $\\sigma$ regime.\n",
"- The light blue corresponds to the parameter space of detectability within the 3-5 $\\sigma$ regime.\n",
"- Anything above the light blue 5 $\\sigma$ contrast limit in the white region would be predicted to be detectable with the given observational set up.\n",
"- The black dotted line shows the azimuthally averaged STIS PSF intensity for comparison, and is an optional parameter to plot."
]
},
Expand Down Expand Up @@ -381,9 +377,9 @@
"\n",
"- The surface brightness disk profile shown as the dotted orange line is read in from a .txt file.\n",
"- Anything in the dark blue corresponds to the disk brightness being under the 1$\\sigma$ detection limit, and therefore you would not be confident in being able to directly detect the disk at close to the inner working angle with the given observational set up. \n",
"- The medium blue corresponds to the parameter space of detectability within the 1-3$\\sigma$ regime.\n",
"- The light blue corresponds to the parameter space of detectability within the 3-5$\\sigma$ regime.\n",
"- Anything above the light blue 5$\\sigma$ contrast limit in the white region would be predicted to be detectable with the given observational set up.\n",
"- The medium blue corresponds to the parameter space of detectability within the 1-3 $\\sigma$ regime.\n",
"- The light blue corresponds to the parameter space of detectability within the 3-5 $\\sigma$ regime.\n",
"- Anything above the light blue 5 $\\sigma$ contrast limit in the white region would be predicted to be detectable with the given observational set up.\n",
"- The black dotted line shows the azimuthally averaged STIS PSF intensity for comparison, and is an optional parameter to plot."
]
},
Expand Down Expand Up @@ -433,7 +429,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "test",
"display_name": "hst",
"language": "python",
"name": "python3"
},
Expand All @@ -447,7 +443,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.9.15"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 318cd1e

Please sign in to comment.