particles.ClusterParticles.from_file#
- classmethod ClusterParticles.from_file(filename, ptypes=None)[source]#
Generate cluster particles from an HDF5 file.
- Parameters:
filename (
string
) – The name of the file to read the model from.ptypes (
list
) – A list of the particle types to load.
Examples
>>> from cluster_generator import ClusterParticles >>> dm_particles = ClusterParticles.from_file("dm_particles.h5")