Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Mar 18, 2024
1 parent f9a0a08 commit fb90a0b
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions notebooks/adler_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.gridspec as gridspec\n",
"import astropy.units as u\n"
"import astropy.units as u"
]
},
{
Expand Down Expand Up @@ -133,7 +133,7 @@
},
"outputs": [],
"source": [
"getattr(planetoid.Observations,\"phaseAngle\")"
"getattr(planetoid.Observations, \"phaseAngle\")"
]
},
{
Expand All @@ -156,14 +156,14 @@
"y_plot = \"reduced_mag\"\n",
"\n",
"x = getattr(planetoid.Observations, x_plot)\n",
"y = getattr(planetoid.Observations,y_plot)\n",
"y = getattr(planetoid.Observations, y_plot)\n",
"xerr = planetoid.Observations.magErr\n",
"\n",
"fig = plt.figure()\n",
"gs = gridspec.GridSpec(1, 1)\n",
"ax1 = plt.subplot(gs[0,0])\n",
"ax1 = plt.subplot(gs[0, 0])\n",
"\n",
"ax1.errorbar(x,y,xerr, fmt = \"o\")\n",
"ax1.errorbar(x, y, xerr, fmt=\"o\")\n",
"\n",
"ax1.invert_yaxis()\n",
"ax1.set_xlabel(x_plot)\n",
Expand All @@ -188,9 +188,9 @@
"outputs": [],
"source": [
"# define the phase curve\n",
"pc = PhaseCurve(abs_mag = planetoid.SSObject.r_H * u.mag,\n",
" phase_param = planetoid.SSObject.r_G12,\n",
" model_name = \"HG12_Pen16\")"
"pc = PhaseCurve(\n",
" abs_mag=planetoid.SSObject.r_H * u.mag, phase_param=planetoid.SSObject.r_G12, model_name=\"HG12_Pen16\"\n",
")"
]
},
{
Expand Down Expand Up @@ -226,7 +226,7 @@
},
"outputs": [],
"source": [
"alpha = np.linspace(0,np.amax(planetoid.Observations.phaseAngle)) * u.deg\n",
"alpha = np.linspace(0, np.amax(planetoid.Observations.phaseAngle)) * u.deg\n",
"alpha"
]
},
Expand Down Expand Up @@ -271,16 +271,16 @@
"y_plot = \"reduced_mag\"\n",
"\n",
"x = getattr(planetoid.Observations, x_plot)\n",
"y = getattr(planetoid.Observations,y_plot)\n",
"y = getattr(planetoid.Observations, y_plot)\n",
"xerr = planetoid.Observations.magErr\n",
"\n",
"fig = plt.figure()\n",
"gs = gridspec.GridSpec(1, 1)\n",
"ax1 = plt.subplot(gs[0,0])\n",
"ax1 = plt.subplot(gs[0, 0])\n",
"\n",
"ax1.errorbar(x,y,xerr, fmt = \"o\")\n",
"ax1.errorbar(x, y, xerr, fmt=\"o\")\n",
"\n",
"ax1.plot(alpha.value,red_mag.value)\n",
"ax1.plot(alpha.value, red_mag.value)\n",
"\n",
"ax1.invert_yaxis()\n",
"ax1.set_xlabel(x_plot)\n",
Expand Down Expand Up @@ -309,14 +309,14 @@
"y_plot = \"reduced_mag\"\n",
"\n",
"x = getattr(planetoid.Observations, x_plot)\n",
"y = getattr(planetoid.Observations,y_plot)\n",
"y = getattr(planetoid.Observations, y_plot)\n",
"xerr = planetoid.Observations.magErr\n",
"\n",
"fig = plt.figure()\n",
"gs = gridspec.GridSpec(1, 1)\n",
"ax1 = plt.subplot(gs[0,0])\n",
"ax1 = plt.subplot(gs[0, 0])\n",
"\n",
"ax1.errorbar(x,y,xerr, fmt = \"o\")\n",
"ax1.errorbar(x, y, xerr, fmt=\"o\")\n",
"\n",
"ax1.invert_yaxis()\n",
"ax1.set_xlabel(x_plot)\n",
Expand Down Expand Up @@ -359,8 +359,7 @@
},
"outputs": [],
"source": [
"pc_fit = PhaseCurve(abs_mag = pc.abs_mag,\n",
" model_name = \"HG\")"
"pc_fit = PhaseCurve(abs_mag=pc.abs_mag, model_name=\"HG\")"
]
},
{
Expand Down Expand Up @@ -396,9 +395,11 @@
},
"outputs": [],
"source": [
"pc_fit.FitModel(phase_angle = planetoid.Observations.phaseAngle * u.deg,\n",
" reduced_mag = planetoid.Observations.reduced_mag * u.mag,\n",
" mag_err = planetoid.Observations.magErr * u.mag)"
"pc_fit.FitModel(\n",
" phase_angle=planetoid.Observations.phaseAngle * u.deg,\n",
" reduced_mag=planetoid.Observations.reduced_mag * u.mag,\n",
" mag_err=planetoid.Observations.magErr * u.mag,\n",
")"
]
},
{
Expand All @@ -423,17 +424,17 @@
"y_plot = \"reduced_mag\"\n",
"\n",
"x = getattr(planetoid.Observations, x_plot)\n",
"y = getattr(planetoid.Observations,y_plot)\n",
"y = getattr(planetoid.Observations, y_plot)\n",
"xerr = planetoid.Observations.magErr\n",
"\n",
"fig = plt.figure()\n",
"gs = gridspec.GridSpec(1, 1)\n",
"ax1 = plt.subplot(gs[0,0])\n",
"ax1 = plt.subplot(gs[0, 0])\n",
"\n",
"ax1.errorbar(x,y,xerr, fmt = \"o\")\n",
"ax1.errorbar(x, y, xerr, fmt=\"o\")\n",
"\n",
"ax1.plot(alpha.value,pc.ReducedMag(alpha).value, label = pc.model_name)\n",
"ax1.plot(alpha.value,pc_fit.ReducedMag(alpha).value, label = pc_fit.model_name)\n",
"ax1.plot(alpha.value, pc.ReducedMag(alpha).value, label=pc.model_name)\n",
"ax1.plot(alpha.value, pc_fit.ReducedMag(alpha).value, label=pc_fit.model_name)\n",
"\n",
"ax1.invert_yaxis()\n",
"ax1.set_xlabel(x_plot)\n",
Expand Down

0 comments on commit fb90a0b

Please sign in to comment.