Fun with the Milky Way

While not entirely useful at the moment. There is support for generating simplistic spiral galaxy distribtuions.

[1]:
import popsynth
import ipyvolume as ipv


from astropy.coordinates import SkyCoord

%matplotlib inline

import matplotlib.pyplot as plt
from jupyterthemes import jtplot

purple = "#B833FF"

popsynth.update_logging_level("INFO")
from popsynth.populations.spatial_populations import MWRadialPopulation
[2]:
ld = popsynth.distributions.pareto_distribution.ParetoDistribution()
ld.alpha = 3
ld.Lmin = 1
[3]:
synth = MWRadialPopulation(rho=1, luminosity_distribution=ld)
[4]:
population = synth.draw_survey()
 INFO     |  The volume integral is 9676.75575509912 
 INFO     |  Expecting 9580 total objects 
 INFO     |  applying selection to fluxes 
 WARNING  |  NO HIDDEN OBJECTS 
 INFO     |  Detected 9580 distances 
 INFO     |  Detected 9580 objects out to a distance of 23.01 
[5]:
fig = population.display_obs_fluxes_sphere(
    cmap="magma", background_color="black", size=0.1
)
/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/traittypes/traittypes.py:97: UserWarning: Given trait value dtype "float64" does not match required type "float64". A coerced copy has been created.
  warnings.warn(
/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/jupyter_client/session.py:718: UserWarning: Message serialization failed with:
Out of range float values are not JSON compliant
Supporting this message is deprecated in jupyter-client 7, please make sure your message is JSON-compliant
  content = self.pack(content)