Skip to content

Commit

Permalink
BUG: catch sporadic mpl scatter plot color arguments error
Browse files Browse the repository at this point in the history
  • Loading branch information
lzkelley committed Nov 16, 2023
1 parent 986d8f8 commit 18b20db
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions notebooks/discrete_illustris.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@
" if uniform:\n",
" color = ax._get_lines.get_next_color()\n",
"\n",
" _draw_gwb_sample(ax, gwb, color=color, num=nreals)\n",
" try:\n",
" _draw_gwb_sample(ax, gwb, color=color, num=nreals)\n",
" except ValueError as err:\n",
" log.warning(f\"Error trying to run `_draw_gwb_sample`: {err}\")\n",
"\n",
" _draw_gwb_conf(ax, gwb, color=color)\n",
" plot._draw_plaw(ax, gwb.freqs*YR, f0=1, color='0.5', lw=2.0, ls='--')\n",
"\n",
Expand Down Expand Up @@ -861,7 +865,7 @@
"outputs": [],
"source": [
"# choose frequencies at which to calculate GWB, use standard PTA frequencies\n",
"fobs, _ = utils.pta_freqs(num=40)\n",
"fobs, _ = utils.pta_freqs(num=10)\n",
"\n",
"# calculate eccentric GWB, using eccentric population\n",
"gwb_eccen_eccen = holo.gravwaves.GW_Discrete(evo_eccen, fobs, nreals=100)\n",
Expand Down Expand Up @@ -917,18 +921,18 @@
"metadata": {},
"outputs": [],
"source": [
"# ---- Create initial population\n",
"# # ---- Create initial population\n",
"\n",
"pop = holo.population.Pop_Illustris()\n",
"# pop = holo.population.Pop_Illustris()\n",
"\n",
"# ---- Evolve binary population\n",
"# # ---- Evolve binary population\n",
"\n",
"# create a fixed-total-time hardening mechanism\n",
"fixed = holo.hardening.Fixed_Time.from_pop(pop, 2.0 * GYR)\n",
"# Create an evolution instance using population and hardening mechanism\n",
"evo = holo.evolution.Evolution(pop, fixed)\n",
"# evolve binary population\n",
"evo.evolve()"
"# # create a fixed-total-time hardening mechanism\n",
"# fixed = holo.hardening.Fixed_Time.from_pop(pop, 2.0 * GYR)\n",
"# # Create an evolution instance using population and hardening mechanism\n",
"# evo = holo.evolution.Evolution(pop, fixed)\n",
"# # evolve binary population\n",
"# evo.evolve()"
]
},
{
Expand Down

0 comments on commit 18b20db

Please sign in to comment.