rahil-makadia / grss

Gauss-Radau Small-body Simulator. Maintainer: @rahil-makadia
https://rahil-makadia.github.io/grss/
GNU General Public License v3.0
6 stars 1 forks source link

singular optical covariance matrix #78

Open Pachacoti opened 3 months ago

Pachacoti commented 3 months ago

The following error is encountered when I tried to run

>>> fit_sim = fit.FitSimulation(init_sol, obs_df, init_cov, n_iter_max=n_iter_max, de_kernel=de_kernel, nongrav_info=nongrav_info)

for Apophis:

[[ 4.0e-08 -8.0e-08]
 [-8.0e-08  1.6e-07]]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mthui/Software/anaconda3/envs/grss/lib/python3.12/site-packages/grss/fit/fit_simulation.py", line 549, in __init__
    self._compute_obs_weights()
  File "/home/mthui/Software/anaconda3/envs/grss/lib/python3.12/site-packages/grss/fit/fit_simulation.py", line 772, in _compute_obs_weights
    raise ValueError("Optical covariance matrix is singular.")
ValueError: Optical covariance matrix is singular.
rahil-makadia commented 2 months ago

I took a look, and it seems that Apophis has an observation with perfect correlation in the observation database, which leads to a singular observation covariance. I would just remove that observation from the dataframe for now