asteroid_spinprops 1.2.3__tar.gz → 1.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asteroid_spinprops
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: Collection of tools used for fitting sHG1G2 and SOCCA photometric models to sparse asteroid photometry
5
5
  License: MIT
6
6
  Author: Odysseas
@@ -210,7 +210,8 @@ def get_multiterm_period_estimate(
210
210
 
211
211
  rms = np.sqrt(np.mean(residuals**2))
212
212
  n_params = 2 * k + 1 + 3 * len(bands)
213
- dof = len(residuals) - n_params
213
+ dof = n_params
214
+ N = len(residuals)
214
215
 
215
216
  results.append((k, f_best, rms, dof, n_params))
216
217
 
@@ -219,13 +220,13 @@ def get_multiterm_period_estimate(
219
220
  for i in range(len(results) - 1):
220
221
  k, f_best, rss, dof, n_params = results[i]
221
222
  k_next, f_best_next, rss_next, dof_next, n_params_next = results[i + 1]
222
- F = ((rss - rss_next) / (dof - dof_next)) / (rss_next / dof_next)
223
+ F = ((rss**2/rss_next**2) - 1) * ((N - dof_next) / (dof_next - dof))
223
224
 
224
225
  # Here crit = Fstat value for which model_2 (more complex) is in fact better than model_1 (less complex)
225
226
  crit = ftest.ppf(
226
227
  q=0.99,
227
228
  dfn=n_params_next - n_params,
228
- dfd=len(residuals) - n_params_next,
229
+ dfd=N - n_params_next,
229
230
  )
230
231
 
231
232
  model_comparison.loc[i, "k"] = k
@@ -233,7 +234,7 @@ def get_multiterm_period_estimate(
233
234
  model_comparison.loc[i, "f_best"] = f_best
234
235
  model_comparison.loc[i, "Fstat"] = F
235
236
  model_comparison.loc[i, "alpha_crit"] = crit
236
- model_comparison.loc[i, "rms"] = rms
237
+ model_comparison.loc[i, "rms"] = rss
237
238
 
238
239
  cond = model_comparison["Fstat"] > model_comparison["alpha_crit"]
239
240
  model_comparison = model_comparison[
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "asteroid_spinprops"
3
- version = "1.2.3"
3
+ version = "1.2.4"
4
4
  description = "Collection of tools used for fitting sHG1G2 and SOCCA photometric models to sparse asteroid photometry"
5
5
  authors = [
6
6
  {name = "Odysseas",email = "odysseas.xenos@proton.me"}