Skip to main content

SatSimJS widget for Jupyter and Marimo (Cesium-based)

Project description

SatViz

SatSim source code was developed under contract with AFRL/RDSM, and is approved for public release under Public Affairs release approval #AFRL-2022-1116.

The SatSimJS widget for Jupyter and Marimo.

alt text

Installation

pip install satviz

or with uv:

uv add satviz

Usage

SatViz loads SatSimJS from https://cdn.jsdelivr.net/npm/satsim@0.15.1/dist by default. Override satsim_base to point at a mirrored or locally served SatSimJS bundle that contains satsim.js and Cesium assets.

Jupyter

from satviz import SatSimJS
w = SatSimJS(height="1000px")
w

SatViz is a browser-embedded scenario widget. It does not wrap SatSimJS SimulationRuntime; applications that need authoritative sessions, runtime commands, or external control should run that SatSimJS runtime separately.

Marimo

import marimo as mo
from satviz import SatSimJS

widget = SatSimJS(height="900px")
w = mo.ui.anywidget(widget)
w

Example Notebook

From a checkout of this repository, install the development dependencies:

uv sync --group dev

The example notebook reads SATSIM_BASE from the environment and defaults to http://127.0.0.1:8080/dist for local development.

For local SatSimJS development, serve the SatSimJS repository root in a separate terminal:

cd $SATSIMJS_PATH
npm run build:cdn
npm run serve

Then open the notebook:

SATSIM_BASE=http://127.0.0.1:8080/dist uv run --group dev env PATH="$PWD/.venv/bin" jupyter lab examples/satviz_example.ipynb

Configuring fullscreen rectangle

Reserve space for headers/footers by customizing the overlay fullscreen rectangle from Python. Values can be numbers (pixels) or CSS strings.

from satviz import SatSimJS

w = SatSimJS(
    height="600px",                      # height when not fullscreen
    fullscreen_rect={
        "top": 64,                       # e.g., top banner height
        "left": 0,
        "width": "100vw",                # or e.g., "100vw"
        "height": "calc(100vh - 96px)",  # subtract top+bottom banners
        "zIndex": 10000,                 # optional overlay stacking order
    },
)
w

Release

To build and publish a release to PyPI:

  1. Confirm satsim@0.15.1 has been published to npm/jsDelivr.

  2. Bump version in pyproject.toml.

  3. Build and validate locally:

    uv pip install --upgrade build twine
    uv run python -m build
    uv run twine check dist/*
    
  4. Publish:

    • Manual: twine upload dist/* (requires a __token__ PyPI API token)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

satviz-0.5.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

satviz-0.5.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file satviz-0.5.0.tar.gz.

File metadata

  • Download URL: satviz-0.5.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for satviz-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5b9b9823a39d03eeca71336e68ee4a0eef56de53ddbf49ba0a1080ac48d2a3fa
MD5 6e3ae6d3e6e650c83f208659d65ddd4f
BLAKE2b-256 03fedf351438786bd2b17f4f85fc77dc94ddd068b504d1ad8669b827ef21324d

See more details on using hashes here.

File details

Details for the file satviz-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: satviz-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for satviz-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2e6f9333e40014cfde84b45b87599aa8d31d6f64684cc71b196e45240c37344
MD5 51c8ef8adbeda84a6d25d7280f30b08d
BLAKE2b-256 45ecc5ec96598dbbc6e7095b92e81bed0cc6f974adcf7fb6e1c36ebfcefe4f87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page