rahil-makadia / grss

Gauss-Radau Small-body Simulator. Maintainer: @rahil-makadia
https://rahil-makadia.github.io/grss/
MIT License
5 stars 0 forks source link

Oscillatory behavior of grss.fit.FitSimulation.filter_lsq() #43

Closed Pachacoti closed 8 months ago

Pachacoti commented 8 months ago

By chance I encounter a situation where there is no convergence in the orbital solution with asteroid (1566) Icarus. Rather, the equilibrium turns out to be oscillatory between two RMS values, which should not happen. I've tried different initial condition values but it just didn't help. My gut feeling is that this is caused by some of the bad outliers. The following is just a copy of the outputs I had:

>>> fit_sim.filter_lsq()
Iteration       Unweighted RMS      Weighted RMS        Chi-squared     Reduced Chi-squared
1            31.836          12.182          490247.453          126.352
2            31.392          11.885          469864.100          121.099
3            31.392          11.885          469868.731          121.100
Converged without rejecting outliers. Starting outlier rejection now...
4            4.146           5.193           7842.118            2.435
5            5.734           5.359           15865.943           4.822
6            10.901          9.744           46691.113           14.936
7            4.526           6.064           7945.102            2.337
8            61.607          45.862          7057710.287             2072.140
9            4.559           9.744           7509.586            2.266
10           68.774          74.668          15706754.952            4998.967
11           48.223          24.802          1950870.070             593.330
12           60.913          35.487          4043622.686             1207.052
13           3.303           28.167          6108.411            1.745
14           3.302           4.760           3816.540            1.079
15           3.532           4.779           4640.068            1.326
16           5.273           4.966           11746.093           3.366
17           42.173          26.511          2364099.628             677.781
18           5.300           7.304           10401.501           2.932
19           3.192           4.761           3463.222            0.976
20           3.460           4.779           4502.867            1.288
21           4.067           4.862           6402.694            1.824
22           6.620           6.091           46566.127           13.154
23           3.387           4.778           4214.280            1.206
24           5.312           5.054           11505.927           3.254
25           3.410           4.778           4321.441            1.237
26           5.312           5.054           11506.174           3.254
27           3.410           4.778           4321.453            1.237
28           5.312           5.054           11506.107           3.254
29           3.410           4.778           4321.450            1.237
30           5.312           5.054           11506.274           3.254
31           3.410           4.778           4321.468            1.237
32           5.312           5.054           11505.915           3.254
33           3.410           4.778           4321.459            1.237
34           5.312           5.054           11506.042           3.254
35           3.410           4.778           4321.477            1.237
36           5.312           5.054           11505.956           3.254
37           3.410           4.778           4321.462            1.237
38           5.312           5.054           11506.182           3.254
39           3.410           4.778           4321.447            1.237
40           5.312           5.054           11506.135           3.254
41           3.410           4.778           4321.447            1.237
42           5.312           5.054           11505.979           3.254
43           3.410           4.778           4321.472            1.237
44           5.312           5.054           11505.972           3.254
45           3.410           4.778           4321.433            1.237
46           5.312           5.054           11505.866           3.254
47           3.410           4.778           4321.434            1.237
48           5.312           5.054           11505.838           3.254
49           3.410           4.778           4321.457            1.237
50           5.312           5.054           11505.929           3.254
WARNING: Maximum number of iterations reached without converging.
rahil-makadia commented 8 months ago

Glad to see you have GRSS running on your machine! I think there are a couple of things to try in such a case:

  1. You can try changing the outlier rejection criteria for rejecting and recovering observations using the FitSiulation.reject_criteria attribute. The default is [3.0, 2.8] for the rejection and recovery $\chi$ values. Try making this stricter (maybe [2.0, 1.8]) and see if that helps.
  2. Try and see what observations are leading to this ambiguity in the minimum RMS values. You can do this by adding a data cutoff that removes the first/last apparition.
  3. If you are using Gaia observations, you can try using a different data release (DR3 instead of FPR) or removing them altogether if you just need a nominal solution and not the one that uses the most data

If none of this gives a stable solution, I am hoping in the next few months to add new filters to GRSS. I am currently preparing for one of my PhD program exams, so I don't have the necessary time for reproducing this problem and looking into this in detail. I should maybe be able to look at this in a few weeks' time.

Pachacoti commented 8 months ago

I found the culprit, which is a set of Gaia FPR astrometry from 4-Oct-2015. After they were manually rejected, the convergence could be reached within 10 iterations. While Option 1 leads to a converged solution, the orbital elements are strongly skewed. Problems of this kind usually occur under circumstances where the observing arcs are pretty short. So it's interesting to see this happening also here. Good luck to your PhD exams!

rahil-makadia commented 8 months ago

That's great to hear! I'm closing the issue for now but feel free to reopen if you run into issues with fitting the Icarus orbit again.