Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monte Carlo cleanup and Python export #164

Open
ChristopherRabotin opened this issue Jun 5, 2023 · 0 comments
Open

Monte Carlo cleanup and Python export #164

ChristopherRabotin opened this issue Jun 5, 2023 · 0 comments
Labels
Interface: Python Kind: Improvement This is a proposed improvement Priority: normal Status: Design Issue at Design phase of the quality assurance process

Comments

@ChristopherRabotin
Copy link
Member

High level description

The Monte Carlo simulation manager in Nyx currently supports Rust only, and there's a rising need to expand this support to Python. By doing so, we would broaden the user base and facilitate integration with Python-based workflows, which are commonplace in the astrodynamics and data science communities.

Additionally, the software contains a "state generator" capable of producing new states like orbits and spacecraft structures based on dispersions, their Probability Density Functions (PDFs), as well as their mean and covariance. This functionality may be overlapping with similar capabilities present within the Monte Carlo module's "generators". It's essential to analyze this overlap and consider consolidating these functions to maintain coherence and reduce redundancy in the code.

In a related matter, the Kalman Filter estimate possesses a feature that generates a new state from an existing one and calculates the initial covariance. This functionality needs to be merged with the multivariate structure to streamline state generation and propagation processes, leading to a more efficient and consistent framework.

Overall, the proposed enhancements aim to expand Python compatibility, increase functionality coherence, and enhance the integration of state generation and covariance computation methods.

Requirements

  • Python Integration: The Monte Carlo simulation manager must be accessible and fully functional in Python, not just Rust. This extends the current capabilities and usability of Nyx for Python users.
  • Function Consolidation: Assess the overlap between the "state generator" and the "generators" in the Monte Carlo module. If they are indeed performing duplicate work, consolidate these functions into a singular, efficient one.
  • Covariance Computation: Merge the functionality in the Kalman Filter that generates a new state from an existing one and computes the initial covariance with the multivariate structure. This ensures a coherent and efficient workflow for state generation and covariance computation.
  • Build Spacecraft dynamics from Python using keywords instead of just a YAML file.

Test plans

  • Python Integration Test: Implement tests to validate that the Monte Carlo simulation manager works correctly in Python. This could involve running a set of predefined operations in both Rust and Python, then comparing the outputs to ensure they match within a specified tolerance.
  • Function Consolidation Test: After consolidating the "state generator" and the "generators" in the Monte Carlo module, test the new function with a variety of inputs to ensure it works as expected and returns results consistent with those of the original separate functions.
  • Covariance Computation Test: Once the covariance computation feature is merged with the multivariate structure, conduct tests that verify the correct calculation and use of covariance in state generation.
  • Python Unit Tests: Write Python unit tests for each method of the Monte Carlo simulation manager, making sure all functions work independently as expected in Python.
  • Python End-to-End Test: After the unit tests, perform end-to-end tests in Python. These tests should cover typical use-cases of the Monte Carlo simulation manager to ensure the whole system works together as expected when accessed through Python.

Design

There shouldn't be much design work in this, it's mostly cleaning up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Interface: Python Kind: Improvement This is a proposed improvement Priority: normal Status: Design Issue at Design phase of the quality assurance process
Projects
None yet
Development

No branches or pull requests

1 participant