The angular momentum operators need as a basis set two lists defining the spin up and spin down orbitals. These lists must have length $2l+1$ whereby $l$ is the angular momentum of the shell under consideration. The orbital quantum numbers $m_l=-l$ to $m_l=l$ are assigned to the spin-orbitals in both lists in the same order. The basis:
IndexDn = {0,2,4} IndexUp = {1,3,5}
thus defines a $p$ shell (due to the 3-fold degeneracy) and spin-orbital $0$ has the quantum numbers $l=1$, $m_l=-1$ and $\sigma=-1/2$. The standard basis used is the basis of complex spherical harmonics for the angular part, as defined in section \ref{Section_Orbital_representations}.