This commit is contained in:
张壹 2025-03-26 22:18:47 +08:00
parent a71ff2d2ad
commit 54b56f610f
2 changed files with 7 additions and 6 deletions

View File

@ -343,7 +343,7 @@ void gctl::power_spectrum(array<double> &P, const array<double> &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);

View File

@ -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<double> &P, array<double> &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<double> &P, const array<double> &C, const array<double> &S,
double R, double r, int n, int N);
}
};
#endif // _GCTL_GM_DATA_H