function for spin coherent states