<jupyter_start><jupyter_text>The energy travels along the direction dictated by the group velocity vector. We may then plot the group velocity as a function of the ray angle.<jupyter_code>plt.figure()
plt.polar(phase_angles, np.linalg.norm(m, axis=1)[:, 0])
ray_angle = np.arctan2(cg[:, 2, 0].real, cg[:, 1, 0].real)
ray_angle[ray_angle < 0] += 2*np.pi
plt.figure()
plt.polar(phase_angles, cp[:, 0], label='phase velocity')
plt.polar(phase_angles, np.linalg.norm(cg, axis=1)[:, 0], label='against phase angle')
plt.polar(ray_angle, np.linalg.norm(cg, axis=1)[:, 0], label='against ray angle')
#plt.polar(ray_angle - skew_angle, np.linalg.norm(cg, axis=1)[:, 0], label='against ray angle')
plt.legend()<jupyter_output><empty_output><jupyter_text>Group velocity vector is perpendicular to the tangent of the phase slowness curve. For isotropic media the ray angle is the same as the phase angle, but for anisotropic media there is a skew angle between the two, dependent on the level and form of anisotropy. Group velocity vector and the phase velocity are related through the skew angle $\phi$:$$c_g \cos{\phi} = c_p$$from where the skew angle can be calculated as$$\phi = \arccos {\frac{c_p}{c_g}}$$If we denote phase angle as $\theta$, then ray angle can be defined as $\theta + \phi$. However, one needs to acount for the fact that $\phi$ is sometimes positive and sometimes negative, which is not captured in the expression above. This is not discussed further here.<jupyter_code>skew_angle = np.arccos(cp[:, 0]/np.linalg.norm(cg, axis=1)[:, 0].real)
plt.figure()
plt.plot(phase_angles, phase_angles)
plt.plot(phase_angles, ray_angle)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12837432513497302, 'fraction_numerical': 0.011397720455908818, 'mean_word_length': 5.725806451612903, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '400440', 'license': 'MIT', 'n_tokens_mistral': 578, 'n_tokens_neox': 534, 'n_words': 194, 'path': 'notebooks/.ipynb_checkpoints/Slowness, group velocity, ray angles, etc.-checkpoint.ipynb', 'repo_name': 'michalkalkowski/srp_tracing', 'size': '1667'}