|
253 | 253 | " fig = plt.figure(fignum, figsize=(10, 3))\n", |
254 | 254 | " sp1, sp2, sp3 = [fig.add_subplot(1, 3, i) for i in range(1, 4)]\n", |
255 | 255 | " sp1.imshow(\n", |
256 | | - " matplotlib.colors.LogNorm()(gas_map.to_value(u.solMass / u.kpc**2).T),\n", |
| 256 | + " matplotlib.colors.LogNorm()(gas_map.to_physical_value(u.solMass / u.kpc**2).T),\n", |
257 | 257 | " cmap=\"viridis\",\n", |
258 | 258 | " extent=disc_region,\n", |
259 | 259 | " origin=\"lower\",\n", |
|
271 | 271 | " transform=sp1.transAxes,\n", |
272 | 272 | " )\n", |
273 | 273 | " sp2.imshow(\n", |
274 | | - " matplotlib.colors.LogNorm()(dm_map.to_value(u.solMass / u.kpc**2).T),\n", |
| 274 | + " matplotlib.colors.LogNorm()(dm_map.to_physical_value(u.solMass / u.kpc**2).T),\n", |
275 | 275 | " cmap=\"inferno\",\n", |
276 | 276 | " extent=halo_region,\n", |
277 | 277 | " origin=\"lower\",\n", |
|
294 | 294 | " transform=sp2.transAxes,\n", |
295 | 295 | " )\n", |
296 | 296 | " sp3.imshow(\n", |
297 | | - " matplotlib.colors.LogNorm()(star_map.to_value(u.solMass / u.kpc**2).T),\n", |
| 297 | + " matplotlib.colors.LogNorm()(star_map.to_physical_value(u.solMass / u.kpc**2).T),\n", |
298 | 298 | " cmap=\"magma\",\n", |
299 | 299 | " extent=disc_region,\n", |
300 | 300 | " origin=\"lower\",\n", |
|
424 | 424 | "from scipy.spatial.transform import Rotation\n", |
425 | 425 | "\n", |
426 | 426 | "Lstars = sg.halo_catalogue.exclusive_sphere_10kpc.angular_momentum_stars.squeeze()\n", |
427 | | - "zhat = (Lstars / np.sqrt(np.sum(Lstars**2))).to_value(\n", |
| 427 | + "zhat = (Lstars / np.sqrt(np.sum(Lstars**2))).to_physical_value(\n", |
428 | 428 | " u.dimensionless\n", |
429 | 429 | ") # we'll align L with the z-axis\n", |
430 | 430 | "arb = (\n", |
|
467 | 467 | ], |
468 | 468 | "source": [ |
469 | 469 | "plt.plot(\n", |
470 | | - " sg.stars.spherical_velocities.r.to_value(u.km / u.s),\n", |
471 | | - " sg.stars.spherical_velocities.phi.to_value(u.km / u.s),\n", |
| 470 | + " sg.stars.spherical_velocities.r.to_physical_value(u.km / u.s),\n", |
| 471 | + " sg.stars.spherical_velocities.phi.to_physical_value(u.km / u.s),\n", |
472 | 472 | " \",k\",\n", |
473 | 473 | " rasterized=True,\n", |
474 | 474 | ")\n", |
|
0 commit comments