Closed jeremykaram closed 4 years ago
Hello, and thanks for catching this typo. I just pushed the fix. However I wanted to clarify that clustertools.load_cluster(ctype="amuse", fname="file_name")
does not accept "fname" or "filename" as one of the arguments. It actually gets an AMUSE particle dataset. If you want to read from an AMUSE snapshot, I think you would have to use read_set_from_file from AMUSE:
from amuse.io import read_set_from_file
stars=read_set_from_file(filename, "hdf5")
cluster=clustertools.load_cluster(ctype="amuse", particles=stars)
That being said, I have also just pushed an untested option that does exactly this. So if you pull the latest release then your original command clustertools.load_cluster(ctype="amuse", filename="file_name")
should work, albeit with fname changed to filename. I'll try to test it soon, but if you want to give it a try please feel free.
Thanks again
Jeremy
Great. Thanks for pointing out working with AMUSE particles. That makes sense. Also the new untested option seems to work well for me so all is good. Thanks again!
Hello, I am trying to load a star cluster using hdf5 dump files from a simulation I ran using AMUSE. However, when I try and use
clustertools.load_cluster(ctype="amuse", fname="file_name")
I am met with an error in theload.py
file of theanalysis
directory. The error claims that a function calledget_amuse_particles
is not defined. Is there a specific argument I am missing in theload_cluster
function perhaps? Thank you for the help. Jeremy