zeros (( len ( lon ), len ( colat )), dtype = np. Import numpy as np import scipy.special as sp # Compute spherical harmonic pattern Scipy provides a function for sampling the values of spherical harmonics at different longitudes and colatitudes. Because there are a total of \(\ell\) nodal lines, \(\vert m\vert\leq\ell\). If \(m\neq 0\), the pattern appears to rotate about the poles in a direction that depends on the sign of \(m\). The example above shows \(\ell=2\), and \(m=0\). The number of nodal lines on the surface (lines that are not affected by the harmonic pattern) is equal to \(\ell\), and \(\vert m\vert\) of these go through the poles. The patterns associated with pulsation modes in stars are an example from my own work, and they also have prominent application for computing the orbitals of electrons in atoms.Įach spherical harmonic is defined by two quantum numbers, \(\ell\) and \(m\). The important thing is that they are commonly encountered in spherically symmetric systems. I won’t go into much detail on spherical harmonics (too much detail can be found on Wikipedia and elsewhere). If you want to skip right ahead to using the script I wrote to generate these animations, you can find it here. ![]() These are useful for visualizing stellar pulsation geometries, and I often display these in talks or lectures. I bring these together to generate animated gifs of spherical harmonics like the one below. This post demonstrates three Python tricks: computing spherical harmonics, plotting map projections with Cartopy, and saving animations in matplotlib. Spherical harmonic animations with matplotlib and cartopy
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |