clustertools.analysis.orbits module¶
Functions and Operations related to the cluster’s orbit
- clustertools.analysis.orbits.initialize_orbit(cluster, from_centre=False, ro=None, vo=None, zo=None, solarmotion=None)[source]¶
Initialize a galpy orbit instance for the cluster
- Parameters:
- clusterclass
StarCluster
- from_centrebool
intialize orbits from cluster’s exact centre instead of cluster’s position in galaxy (default :False)
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- Returns:
- orbitclass
GALPY orbit
- clustertools.analysis.orbits.initialize_orbits(cluster, ro=None, vo=None, zo=None, solarmotion=None)[source]¶
Initialize a galpy orbit for every star in the cluster
- Parameters:
- clusterclass
StarCluster
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- Returns:
- orbitclass
GALPY orbit
- clustertools.analysis.orbits.interpolate_orbit(cluster, pot=None, tfinal=None, nt=1000, from_centre=False, ro=None, vo=None, zo=None, solarmotion=None)[source]¶
Interpolate past or future position of cluster and escaped stars
- Parameters:
- clusterclass
StarCluster
- cluster_potclass
Galpy potential for host cluster that orbit is to be integrated in if None, assume a Plumme Potential
- potclass
galpy Potential that orbit is to be integrate in (default: None)
- tfinalfloat
final time (in cluster.units) to integrate orbit to (default: 12 Gyr)
- ntint
number of timesteps
- from_centrebool
intialize orbits from cluster’s exact centre instead of cluster’s position in galaxy (default :False)
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- Returns:
- x,y,zfloat
interpolated positions of each star
- vx,vy,vzfloat
interpolated velocities of each star
- clustertools.analysis.orbits.interpolate_orbits(cluster, pot=None, tfinal=None, nt=1000, ro=None, vo=None, zo=None, solarmotion=None)[source]¶
Interpolate past or future position of stars within the cluster
- Parameters:
- clusterclass
StarCluster
- potclass
Galpy potential for host cluster that orbit is to be integrated in if None, assume a Plumme Potential
- tfinalfloat
final time (in cluster.units) to integrate orbit to (default: 12 Gyr)
- ntint
number of timesteps
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- Returns:
- x,y,zfloat
interpolated positions of each star
- vx,vy,vzfloat
interpolated velocities of each star
- clustertools.analysis.orbits.orbit_interpolate(cluster, pot=None, tfinal=None, nt=1000, ro=None, vo=None, zo=None, solarmotion=None)[source]¶
Interpolate past or future position of cluster and escaped stars
same as interpolate_orbit, but included for legacy purposes
- Parameters:
- clusterclass
StarCluster
- cluster_potclass
Galpy potential for host cluster that orbit is to be integrated in if None, assume a Plumme Potential
- potclass
galpy Potential that orbit is to be integrate in (default: None)
- tfinalfloat
final time (in cluster.units) to integrate orbit to (default: 12 Gyr)
- ntint
number of timesteps
- from_centrebool
intialize orbits from cluster’s exact centre instead of cluster’s position in galaxy (default :False)
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- Returns:
- x,y,zfloat
interpolated positions of each star
- vx,vy,vzfloat
interpolated velocities of each star
- clustertools.analysis.orbits.orbital_path(cluster, tfinal=0.1, nt=1000, pot=None, from_centre=False, skypath=False, initialize=False, ro=None, vo=None, zo=None, solarmotion=None, plot=False, **kwargs)[source]¶
Calculate the cluster’s orbital path
- Parameters:
- clusterclass
StarCluster
- tfinalfloat
final time (in cluster.units) to integrate orbit to (default: 0.1 Gyr)
- ntint
number of timesteps
- potclass
galpy Potential that orbit is to be integrate in (default: None)
- from_centrebool
genrate orbit from cluster’s exact centre instead of its assigned galactocentric coordinates (default: False)
- skypathbool
return sky coordinates instead of cartesian coordinates (default: False)
- initializebool
Initialize and return Orbit (default: False)
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- plotbool
plot a snapshot of the cluster in galactocentric coordinates with the orbital path (defualt: False)
- Returns:
- tfloat
times for which path is provided
- x,y,zfloat
orbit positions
- vx,vy,vzfloat
orbit velocity
- oclass
galpy orbit (if initialize==True)
- History
- 2018 - Written - Webb (UofT)
- clustertools.analysis.orbits.orbital_path_match(cluster, tfinal=0.1, nt=1000, pot=None, path=None, from_centre=False, skypath=False, to_path=False, do_full=False, ro=None, vo=None, zo=None, solarmotion=None, plot=False, projected=False, **kwargs)[source]¶
Match stars to a position along the orbital path of the cluster
- Parameters:
- clusterclass
StarCluster
- tfinalfloat
final time (in cluster.units) to integrate orbit to (default: 0.1 Gyr)
- ntint
number of timesteps
- potclass
galpy Potential that orbit is to be integrate in (default: None)
- patharray
array of (t,x,y,x,vx,vy,vz) corresponding to the tail path. If none path is calculated (default: None)
- from_centrebool
genrate orbit from cluster’s exact centre instead of its assigned galactocentric coordinates (default: False)
- skypathbool
return sky coordinates instead of cartesian coordinates (default: False) if True, projected is set to True
- to_pathbool
measure distance to the path itself instead of distance to central point along the path (default: False)
- do_fullbool
calculate dpath all at once in a single numpy array (can be memory intensive) (default:False)
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- plotbool
plot a snapshot of the cluster in galactocentric coordinates with the orbital path (defualt: False)
- projectedbool
match to projected orbital path, which means matching just x and y coordinates or Ra and Dec coordinates (not z, or dist) (default:False)
- Returns:
- tstarfloat
orbital time associated with star
- dprogfloat
distance along the orbit to the progenitor
- dpath
distance to centre of the orbital path bin (Default) or the orbit path (to_path = True)
- clustertools.analysis.orbits.orbits_interpolate(cluster, pot=None, tfinal=None, nt=1000, ro=None, vo=None, zo=None, solarmotion=None)[source]¶
Interpolate past or future position of stars within the cluster
same as interpolate_orbits, but kept for legacy purposes
- Parameters:
- clusterclass
StarCluster
- potclass
Galpy potential for host cluster that orbit is to be integrated in if None, assume a Plumme Potential
- tfinalfloat
final time (in cluster.units) to integrate orbit to (default: 12 Gyr)
- ntint
number of timesteps
- rofloat
distance to the Galactic centre (Default: None)
- vofloat
circular velocity at ro (Default: None)
- zofloat
Sun’s distance above the Galactic plane (default: None)
- solarmotionfloat
array representing U,V,W of Sun (default: None)
- Returns:
- x,y,zfloat
interpolated positions of each star
- vx,vy,vzfloat
interpolated velocities of each star