Add Nyx Python tutorials - #46
Conversation
- Added tutorial for Mission Design based on `test_mission_design.py`. - Added tutorial for Orbit Determination based on `test_orbit_determination.py`. - Added tutorial for Spacecraft Definition based on `test_spacecraft.py`. - Included index page for the Tutorials section. - Updated mkdocs.yml navigation to include the new tutorials under the Nyx section. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Visit the preview URL for this PR (updated for commit 4dcd409): https://nyx-space--pr46-nyx-tutorials-473435-wxe5ck5y.web.app (expires Wed, 08 Jul 2026 22:19:42 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: ecf6068ed4b2d3d429c02e3ebe5890356e4315eb |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Tutorials section to the documentation, adding guides for Mission Design, Orbit Determination, and Spacecraft Definition, along with updating the navigation configuration. The review feedback highlights opportunities to clean up the tutorial code examples by removing unused imports, standardizing the import path for Epoch across files, and using keyword arguments consistently for better readability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| import logging | ||
| from nyx_space import DragData, ExportCfg, Mass, Spacecraft, SRPData |
There was a problem hiding this comment.
| from nyx_space.orbit_determination import ( | ||
| GroundStation, | ||
| GroundTrackingArcSim, | ||
| Handoff, | ||
| KalmanVariant, | ||
| LocalFrame, | ||
| Location, | ||
| MeasurementType, | ||
| ProcessNoise, | ||
| Scheduler, | ||
| SigmaRejection, | ||
| SpacecraftEstimate, | ||
| SpacecraftODProcess, | ||
| StochasticNoise, | ||
| TrkConfig, | ||
| ) |
There was a problem hiding this comment.
SigmaRejection is imported from nyx_space.orbit_determination but never used in the tutorial. It should be removed.
| from nyx_space.orbit_determination import ( | |
| GroundStation, | |
| GroundTrackingArcSim, | |
| Handoff, | |
| KalmanVariant, | |
| LocalFrame, | |
| Location, | |
| MeasurementType, | |
| ProcessNoise, | |
| Scheduler, | |
| SigmaRejection, | |
| SpacecraftEstimate, | |
| SpacecraftODProcess, | |
| StochasticNoise, | |
| TrkConfig, | |
| ) | |
| from nyx_space.orbit_determination import (\n GroundStation,\n GroundTrackingArcSim,\n Handoff,\n KalmanVariant,\n LocalFrame,\n Location,\n MeasurementType,\n ProcessNoise,\n Scheduler,\n SpacecraftEstimate,\n SpacecraftODProcess,\n StochasticNoise,\n TrkConfig,\n) |
| gs1 = GroundStation( | ||
| "Denver, CO", | ||
| Location( | ||
| 39.7420, -104.9915, 1.8, Frames.IAU_EARTH_FRAME.to_frameuid(), [], True | ||
| ), | ||
| stochastic_noises, | ||
| ) |
There was a problem hiding this comment.
For consistency and readability, it is recommended to use keyword arguments when defining gs1 and its Location, matching the style used for gs0.
| gs1 = GroundStation( | |
| "Denver, CO", | |
| Location( | |
| 39.7420, -104.9915, 1.8, Frames.IAU_EARTH_FRAME.to_frameuid(), [], True | |
| ), | |
| stochastic_noises, | |
| ) | |
| gs1 = GroundStation(\n name=\"Denver, CO\",\n location=Location(\n latitude_deg=39.7420,\n longitude_deg=-104.9915,\n height_km=1.8,\n frame=Frames.IAU_EARTH_FRAME.to_frameuid(),\n terrain_mask=[],\n terrain_mask_ignored=True,\n ),\n stochastic_noises=stochastic_noises,\n) |
| from nyx_space.anise.analysis import OrbitalElement | ||
| from nyx_space.anise.astro import Orbit | ||
| from nyx_space.anise.constants import Frames | ||
| from nyx_space.anise.time import Epoch |
There was a problem hiding this comment.
| almanac = MetaAlmanac.latest() | ||
|
|
||
| # Define Atmospheric Drag. We use the MSIS-00 empirical atmosphere model. | ||
| drag = Drag(AtmDensity.msis00()) |
There was a problem hiding this comment.
There is no MSIS00 drag model in Nyx yet. It's also missing some parameters. Use verbatim
drag = Drag(
AtmDensity.earth_exponential(),
almanac.frame_info(Frames.IAU_EARTH_FRAME),
estimate=False,
)
There was a problem hiding this comment.
Updated the drag configuration to use earth_exponential with the correct arguments.
| od_dev_sol = od_proc_deviation.process_arc(estimate, trk_arc) | ||
|
|
||
| # Export the whole orbit determination solution into a single Parquet file. | ||
| od_dev_sol.to_parquet("od_dev_smoothed.pq", ExportCfg(False)) |
There was a problem hiding this comment.
Export this X od_dev.pq (remove the smoothed keyword).
There was a problem hiding this comment.
Fixed the export file name to od_dev.pq.
- Use earth_exponential for Drag model in mission_design tutorial instead of MSIS00. - Use `od_dev.pq` instead of `od_dev_smoothed.pq` in orbit_determination tutorial. Co-authored-by: ChristopherRabotin <4823784+ChristopherRabotin@users.noreply.github.com>
Adds new Nyx python tutorials covering mission design, orbit determination, and spacecraft definition, based on existing Python test files. Includes documentation site navigation updates.
PR created automatically by Jules for task 4734355618943678767 started by @ChristopherRabotin