TomWagg / cogsworth

A Python package for performing self-consistent population synthesis and galactic dynamics simulations
https://cogsworth.readthedocs.io/
MIT License
16 stars 3 forks source link

p.create_population() #138

Open Her00000 opened 1 week ago

Her00000 commented 1 week ago

Based on your tutorial, I created hydropop, like this

p = cogsworth.hydro.pop.HydroPopulation(star_particles=particle,
                                        galactic_potential=low_res_pot,
                                        cluster_radius=3 * u.pc,
                                        cluster_mass=10000 * u.Msun,
                                        virial_parameter=1.0,
                                        max_ev_time=13.736 * u.Gyr,
                                        processes=5)

then p.create_population()

  0%|          | 0/108 [00:00<?, ?it/s]**WARNINGWARNINGWARNINGWARNING: AstropyDeprecationWarning: The run function is deprecated and may be removed in a future version.**
        Use Integrator call method instead. [gala.potential.potential.core]WARNING
: AstropyDeprecationWarning: The run function is deprecated and may be removed in a future version.
        Use Integrator call method instead. [gala.potential.potential.core]: AstropyDeprecationWarning: The run function is deprecated and may be removed in a future version.
        Use Integrator call method instead. [gala.potential.potential.core]: AstropyDeprecationWarning: The run function is deprecated and may be removed in a future version.
        Use Integrator call method instead. [gala.potential.potential.core]: AstropyDeprecationWarning: The run function is deprecated and may be removed in a future version.
        Use Integrator call method instead. [gala.potential.potential.core]

100%|██████████| 108/108 [00:25<00:00,  4.16it/s]
[51.6s] Get orbits (run gala)
Overall: 51.7s

Do you need to change the code?

TomWagg commented 1 week ago

Ah yes the deprecation warnings are from gala not cogsworth (see this issue: https://github.com/adrn/gala/pull/389), it'll be fixed in gala v1.9.2.

Good point though, I can add a filter to cogsworth to hide these warnings in the meantime.