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

Impossible to join planets with the new WoMa update #19

Open
Francyrad opened this issue Aug 30, 2024 · 2 comments
Open

Impossible to join planets with the new WoMa update #19

Francyrad opened this issue Aug 30, 2024 · 2 comments

Comments

@Francyrad
Copy link

Dear developers

I updated WoMa , I saw that you fixed the swiftisimio format-bug, which is amazing.

By the way, when I try to join my planets with python, i get this error:

Traceback (most recent call last):
  File "/Users/francyrad/Documents/script_test/simulation_creation.py", line 76, in <module>
    pos_tar, vel_tar, h_tar, m_tar, rho_tar, p_tar, u_tar, matid_tar = load_to_woma(earth_file)
                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/francyrad/Documents/script_test/simulation_creation.py", line 34, in load_to_woma
    pos = np.array(data.gas.coordinates - box_mid)
                   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
  File "/opt/homebrew/lib/python3.11/site-packages/swiftsimio/objects.py", line 1080, in __array_ufunc__
    ret = super().__array_ufunc__(ufunc, method, *inputs, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/unyt/array.py", line 1931, in __array_ufunc__
    raise UnitOperationError(ufunc, u0, u1)
unyt.exceptions.UnitOperationError: The <ufunc 'subtract'> operator for unyt_arrays with units 'dimensionless' (dimensions '1') and 'm' (dimensions '(length)') is not well defined.

But i don't get it when I try to join two old HDF5 PLANETS that were ran on swiftsim for relaxations. I don't need to relax these because they are a quick test, but i believed that the problem was fixed. Am I getting something wrong?

I have updated swiftisimio to the latest versions. Here are my dependencies:

Requirement already satisfied: swiftsimio in /opt/homebrew/lib/python3.11/site-packages (8.0.1)
Requirement already satisfied: numpy in /opt/homebrew/lib/python3.11/site-packages (from swiftsimio) (1.24.4)
Requirement already satisfied: h5py in /opt/homebrew/lib/python3.11/site-packages (from swiftsimio) (3.8.0)
Requirement already satisfied: unyt>=2.9.0 in /opt/homebrew/lib/python3.11/site-packages (from swiftsimio) (3.0.2)
Requirement already satisfied: numba>=0.50.0 in /opt/homebrew/lib/python3.11/site-packages (from swiftsimio) (0.57.0)
Requirement already satisfied: llvmlite<0.41,>=0.40.0dev0 in /opt/homebrew/lib/python3.11/site-packages (from numba>=0.50.0->swiftsimio) (0.40.0)
Requirement already satisfied: sympy>=1.7 in /opt/homebrew/lib/python3.11/site-packages (from unyt>=2.9.0->swiftsimio) (1.12)
Requirement already satisfied: packaging>=20.9 in /opt/homebrew/lib/python3.11/site-packages (from unyt>=2.9.0->swiftsimio) (23.0)
Requirement already satisfied: mpmath>=0.19 in /opt/homebrew/lib/python3.11/site-packages (from sympy>=1.7->unyt>=2.9.0->swiftsimio) (1.3.0)

I hope you can help me to solve the problem

Francesco

@jkeger
Copy link
Collaborator

jkeger commented Oct 5, 2024

Hi Fracesco, just a quick note to say apologies for the delay in responding to this! I'm currently swamped with other work but will try to get back to you as soon as possible, though that realistically may still be a month or so away.

@Francyrad
Copy link
Author

@jkeger please don't forgive me

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

2 participants