Index: /branches/eam_branches/ipp-20140904/Ohana/src/libohana/doc/gsl.txt
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libohana/doc/gsl.txt	(revision 37536)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libohana/doc/gsl.txt	(revision 37536)
@@ -0,0 +1,26 @@
+
+I have used and modified code from gnu scientific library in certain
+cases (libohana/src/legendre.c).  here is the corresponding liscense.
+My versions of the gsl code may be distributed under the GSL.
+
+/* specfunc/legendre_poly.c
+ * 
+ * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or (at
+ * your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/* Author:  G. Jungman */
+
Index: /branches/eam_branches/ipp-20140904/Ohana/src/libohana/include/gsl_utils.h
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libohana/include/gsl_utils.h	(revision 37535)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libohana/include/gsl_utils.h	(revision 37536)
@@ -5,4 +5,13 @@
 
 # define GSL_SF_GAMMA_XMAX  171.0
+
+#define GSL_SQRT_DBL_MIN   1.4916681462400413e-154
+#define GSL_LOG_DBL_EPSILON   (-3.6043653389117154e+01)
+#ifndef M_SQRT3
+#define M_SQRT3    1.73205080756887729352744634151      /* sqrt(3) */
+#endif
+#ifndef M_LNPI
+#define M_LNPI     1.14472988584940017414342735135      /* ln(pi) */
+#endif
 
 # define GSL_IS_ODD(n) ((n) & 1)
Index: /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/spherical.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/spherical.c	(revision 37536)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/spherical.c	(revision 37536)
@@ -0,0 +1,37 @@
+# include "ohana.h"
+
+void VSH () {
+
+  // given a point on the sky R,D
+
+  // we are calculating 2 terms: (dR,dD) = (dR^B + dR^E, dD^B + dD^E)
+
+  // ^E terms are the 'electric' component, ^B are the 'magnetic' component
+
+  // dR^B = \sum_{l,m} b_{l,m} dR^B_{l,m} (l,m,R,D) 
+  // dD^B = \sum_{l,m} b_{l,m} dD^B_{l,m} (l,m,R,D)
+
+  // dR^E = \sum_{l,m} e_{l,m} dR^E_{l,m} (l,m,R,D) 
+  // dD^E = \sum_{l,m} e_{l,m} dD^E_{l,m} (l,m,R,D)
+  
+  // NOTE : as implemented by Valeri, the coeffs b_{l,m} are the same for both R and D
+  // components; ditto for e_{l,m}
+
+  // there are thus for X_l,m terms that need to be generated, for dR^B, dR^E, dD^B, dD^E.  Valeri calls
+  // these S_lm_lat and S_lm_lon
+
+  // dR^B_{l,m} = +S^D_{l,m}(l,m,R,D)
+  // dD^B_{l,m} = -S^R_{l,m}(l,m,R,D) / cos(D)
+
+  // dR^E_{l,m} = +S^R_{l,m}(l,m,R,D) / cos(D)
+  // dD^E_{l,m} = +S^D_{l,m}(l,m,R,D)
+
+  // S^R_{l,m} : 
+  // (m >  0) : -m S_{l,m}(l,-m,R,D) 
+  // (m <= 0) : -m S_{l,m}(l,-m,R,D)
+  // NOTE: these are in fact the same...
+
+  // S_^D_{l,m} :
+  // P_{l,m}(D) 
+  
+}
