Commit c0200f70 by Maximilian Schanner

### Some annotations

parent b496dd5e
 ... @@ -158,8 +158,13 @@ def location(posterior, mu_dips, cov_dips, n_points=10000, ... @@ -158,8 +158,13 @@ def location(posterior, mu_dips, cov_dips, n_points=10000, n = len(posterior) n = len(posterior) # calculate the density # calculate the density # This should be similar to eq. (6) in Khokhlov 2006 and can be straight- # forwardly calculated by integrating out the amplitude of the dipole # vector in spherical coordinates (don't forget the transformation matrix!) for it in range(n**3): for it in range(n**3): prc = np.linalg.inv(cov_dips[it]) prc = np.linalg.inv(cov_dips[it]) # the spherical coordinates are unusual, since the dipole coordinates # are [z, x, y] zv = np.array([np.sin(theta), zv = np.array([np.sin(theta), np.cos(theta) * np.cos(phi), np.cos(theta) * np.cos(phi), np.cos(theta) * np.sin(phi)]) np.cos(theta) * np.sin(phi)]) ... @@ -179,6 +184,7 @@ def location(posterior, mu_dips, cov_dips, n_points=10000, ... @@ -179,6 +184,7 @@ def location(posterior, mu_dips, cov_dips, n_points=10000, * np.cos(theta) * zk / np.sqrt(zalpha**3) * dummy * np.cos(theta) * zk / np.sqrt(zalpha**3) * dummy lat = np.rad2deg(theta) lat = np.rad2deg(theta) lon = np.rad2deg(phi) lon = np.rad2deg(phi) # have the longitude consistent with others lon[np.where(180 < lon)] -= 360 lon[np.where(180 < lon)] -= 360 return lat, lon, dens return lat, lon, dens ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!