rahil-makadia / grss Goto Github PK
View Code? Open in Web Editor NEWGauss-Radau Small-body Simulator. Maintainer: @rahil-makadia
Home Page: https://rahil-makadia.github.io/grss/
License: MIT License
Gauss-Radau Small-body Simulator. Maintainer: @rahil-makadia
Home Page: https://rahil-makadia.github.io/grss/
License: MIT License
The high-precision Earth binary orientation files do not have data before Jan-01-1972, therefore I need to make SPICE aware of an IAU_EARTH frame that is valid for times before this. Currently, there is no workaround for this, and an error will be thrown if a user attempts to fit astrometry before 1972.
Need to add capability to propagate state transition matrices alongside states and additional parameters to have the option of using analytic partials for orbit fitting
By chance I was confronted with a new issue that get_mpc_optical_obs_array crashed when reading optical observations of 530871:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/fit/fit_optical.py", line 955, in get_mpc_optical_obs_array
observer_program_codes) = get_optical_data(body_id, de_kernel_path, optical_obs_file,
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/fit/fit_optical.py", line 137, in get_optical_data
full_obs_code = get_space_based_observer_code(obs_time_mjd_tdb, first_80, last_80)
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/fit/fit_optical.py", line 37, in get_space_based_observer_code
if last_80[32] == '1':
IndexError: string index out of range
I suspect that this issue is caused by the following observation:
r0871K10A85R* x2010 01 07.86121 21 48 04.53 +63 48 59.2 L~0I1lC51
which, unlike other C51 measurements, does not contain the state vector of the spacecraft.
The Sun J2 acceleration calculation needs to account for Sun pole direction (or for that matter, the J2 calcs need to take body pole directions as input)
I did a git pull
to update grss
but then I started to have the following issues popping out frequently with exactly the same steps of downloading optical + radar observations.
Issue 1:
Software/anaconda3/lib/python3.9/site-packages/grss/fit/fit_simulation.py:47: RuntimeWarning: invalid value encountered in sqrt
variance = np.sqrt(np.diag(self.covariance))
Issue 2:
The package seems to be more vulnerable to rejection of `bad' Gaia FPR observations compared to before. The following example is with 5786:
1 0.501 9.000 825.862 0.301
2 0.861 9.682 2229.015 0.811
3 3.579 29.089 38730.936 14.094
4 23.208 171.871 1582192.194 575.761
5 141.711 1038.769 58744111.822 21377.042
6 857.477 6260.708 2145982043.198 780925.052
7 65441.396 81808.656 14619462321301.691 5320037234.826
8 111617.170 244251.420 35633434073642.562 12967042967.119
9 325809.396 1169012.455 447851888690552.000 162973758621.016
Warning: Downleg light time did not converge for body integBody_pert_w_minus at time 58017.4, change from previous iteration was 1.43635e-15
10 403163.630 42274032.154 1835539810212089.500 667954807209.640
WARNING: Maximum number of iterations reached without converging.
After getting rid of the Gaia FPR observations, the convergence is quick:
Iteration Unweighted RMS Weighted RMS Chi-squared Reduced Chi-squared
1 0.530 0.553 733.074 0.307
2 0.527 0.548 719.551 0.301
3 0.527 0.548 719.551 0.301
Converged without rejecting outliers. Starting outlier rejection now...
4 0.466 0.493 582.173 0.245
5 0.466 0.492 580.154 0.245
6 0.466 0.492 580.154 0.245
Converged after rejecting outliers. Rejected 9 out of 1198 optical observations.
The previous outlier rejection algorithm may have worked even better.
Need to handle the case when the solution epoch is at such a time that the first observation after the epoch had an emit time before the epoch
Add impact/close approach detection and calculations as well as B-plane calculation for future propagation (start with Öpik frame but need to have B.R & B.T framework as well)
While the installation went smoothly, I encountered the following error when I
import grss
in python3
:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/__init__.py", line 2, in <module>
from . import fit
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/fit/__init__.py", line 5, in <module>
from .fit_simulation import *
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/fit/fit_simulation.py", line 7, in <module>
from .. import prop
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/prop/__init__.py", line 2, in <module>
from .prop_parallel import *
File "/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/prop/prop_parallel.py", line 5, in <module>
from . import prop_simulation as prop
ImportError: cannot import name 'prop_simulation' from partially initialized module 'grss.prop' (most likely due to a circular import) (/home/mthui/Software/anaconda3/lib/python3.9/site-packages/grss/prop/__init__.py)
Any idea as to how to fix this?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.