ellipsoidal.py 484 B

1234567891011121314
  1. """Calculate the axes of the ellipsoidal merger remnant"""
  2. import numpy as np
  3. from analysis import utils
  4. # Calculate ellipsoidal axes of remnant
  5. # Simply calculate the integrals r_i, r_j and obtain the principal axes
  6. data = utils.loadData('hyperbolic_halo', 30000)
  7. r_vec = data['r_vec'][data['types'][:,1]!='dark'] #Luminous components only
  8. I = np.sum(r_vec[:,np.newaxis,:] * r_vec[:,:,np.newaxis], axis=0)
  9. eig, _ = np.linalg.eigh(I)
  10. print(np.sqrt(eig/eig[1]))
  11. # we obtain 10:11:13