clustertools.util.output module¶
For quickly writing key cluster properties to previously opened output files
- clustertools.util.output.fortout(cluster, filename='fort.10', sse=False, sse_filename='fort.12', reset_nbody=False, reset_nbody_mass=True, reset_nbody_radii=True)[source]¶
Output a snapshot in NBODY6 fort.10 format
- Parameters:
- clusterclass
StarCluster
- filenamestr
name of file to be written to (default: ‘fort.10’)
- ssebool
include file containing stellar evolution information
- sse_filenamestr
name of stellar evolution file to be written to (default: ‘fort.12’)
- reset_nbodybool
reset nbody scaling parameters (default: False)
- reset_nbody_massbool
reset nbody mass scaling parameter (default: False)
- reset_nbody_radiibool
reset nbody radii scaling parameter (default: False)
- Returns:
- None
- clustertools.util.output.gyrout(cluster, filename='init.nemo.dat', eps=None, epsunits=None, ro=8.275, vo=239.23725000000002)[source]¶
Output a snapshot in gyrfalcon/NEMO format
Note that units are converted to Walter Dehnen units (WDunits in GYRFALCON)
- Parameters:
- clusterclass
StarCluster
- filenamestr
name of file to be written to (default: ‘init.nemo.dat’)
- epsarray
values for softening length of individual particles (default : None)
- epsunitsstr
units for softening lengths (default: cluster.units)
- rofloat
galpy spaital scaling parameter, in case epsunits==’galpy’ (default: solar_ro)
- vofloat
galpy velocity scaling parameter, in case epsunits==’galpy’ (default: solar_vo)
- Returns:
- None
- clustertools.util.output.snapout(cluster, filename, energies=False, radec=False)[source]¶
- Output a snapshot in clustertools format
clustertools column format is mass,x,y,z,vx,vy,vz,id,kwtype where
positions and velocities are in cartiesian coordinates, id is the star id, and kwtype is the stars stellar evolution type - units and coordinate system will be cluster.units and cluster.origin. - if energies==True, columns for kinetic energy, potential energy, and total energy will be added - if radec==True, columns for RA, Dec, distance, Proper Motion in RA, Proper Motion in Dec, and radial velocity will be added
- Parameters:
- clusterclass
StarCluster
- filenamwstr
name of file to be written to
- energiesbool
include energies in output (default: False)
- radecbool
include sky coordinates of stars (default: False)
- Returns:
- None
- clustertools.util.output.sseout(cluster, filename)[source]¶
- Output simple stellar evolution information in clustertools format
clustertools column format is initial mass, kw type, current mass, epoch and ospin
masses are in solar masses, epoch and spin are in Nbody6 units
- Parameters:
- clusterclass
StarCluster
- filenamwstr
name of file to be written to
- Returns:
- None