Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmo_array.in_cgs() returns Comoving quantity when original array was physical #185

Open
mladenivkovic opened this issue Mar 4, 2024 · 1 comment
Assignees

Comments

@mladenivkovic
Copy link
Collaborator



        data = swiftsimio.load(snapshot_name)
        gas = data.gas
        u = gas.internal_energies

        u_phys = u.to_physical()

        #  print(u_phys[:1])
        #  [1.0279273e-19] kpc**2/kyr**2 (Physical)


        u_phys_cgs = u_phys.in_cgs()
        #  print(u_phys_cgs[:1])
        #  [982.7783] erg/g (Comoving)

        u_phys.convert_to_cgs()
        #  print(u_phys[:1])
        #  [982.7783] erg/g (Physical)
        # ok, this works.

@MatthieuSchaller
Copy link
Member

This case will be covered correctly now with the changes proposed to the outputs to handle physical elements better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants