diff --git a/lib/potential/gm_data.cpp b/lib/potential/gm_data.cpp index 3ce865e..fbf808c 100644 --- a/lib/potential/gm_data.cpp +++ b/lib/potential/gm_data.cpp @@ -343,7 +343,7 @@ void gctl::power_spectrum(array &P, const array &C, const array< { if (n < 0 || n >= N || C.size() < (N + 1)*(N + 2)/2 || S.size() < (N + 1)*(N + 2)/2) { - throw std::runtime_error("[gctl::power_spectrum_shc] Invalid input parameters."); + throw std::runtime_error("[gctl::power_spectrum] Invalid input parameters."); } P.resize(N - n + 1, 0); diff --git a/lib/potential/gm_data.h b/lib/potential/gm_data.h index c48ae07..3bf2b03 100644 --- a/lib/potential/gm_data.h +++ b/lib/potential/gm_data.h @@ -230,8 +230,9 @@ namespace gctl * @param n_max Maximum spherical harmonic degree to compute. * @param P A vector of all associated Legendgre polynomials evaluated at co_lati up to nMax. * The lenght must by greater or equal to (n_max+1)*(n_max+2)/2. The coefficients are stored - * in a degree major order. - * @param dP Derivative of P with respect to latitude + * in a degree major order. The index of the coefficient at degree n and order m is n*(n+1)/2 + m. + * @param dP Derivative of P with respect to latitude. The coefficients are stored in the same + * order as in P. */ void schmidt_legendre(double co_lati, int n_max, array &P, array &dP); @@ -239,8 +240,8 @@ namespace gctl * @brief Calculate the power spectrum of given spherical harmonic coefficients. * * @param P Returned power spectrum - * @param C Cosine coefficients strats from 0 order 0 degree up to least N order N degree - * @param S Sine coefficients strats from 0 order 0 degree up to least N order N degree + * @param C Cosine coefficients strats from 0 order 0 degree up to at least N order N degree + * @param S Sine coefficients strats from 0 order 0 degree up to at least N order N degree * @param R Reference radius (usually is 6371.2 km) * @param r Observation radius * @param n Strat order @@ -248,6 +249,6 @@ namespace gctl */ void power_spectrum(array &P, const array &C, const array &S, double R, double r, int n, int N); -} +}; #endif // _GCTL_GM_DATA_H \ No newline at end of file