I would like to know how could I align the coordinates/velocities in regards of the galactic plane for a disk subhalo such as the Jz corresponds to the Jz~Vc x R. For now on, I'm calculating the three components of the angular momentum by using averages of the velocity and positions within twice the stellar half mass radius, however, I think (probably I'm wrong), this axis are completely arbitrary, as they are not aligned with the galactic plane. How might I rotate an arbitrary disc subhalo to construct a basis of three angular momenta aligned with the galactic plane?
The mean angular momentum vector (of the star-forming gas, or of the stars within 2*rhalf) should work ok.
For more inspiration, you can also see this thread about using the moment of inertia tensor.
thanks, I will apply that procedure.