cli

cli

PlanetaryPy unified CLI.

Usage: plp fetch mro.ctx.edr P02_001916_2221_XI_42N027W plp hifetch PSP_003092_0985 –browse plp ctxqv J05_046771_1950 plp catalog build

Functions

Name Description
catalog_ambiguous List instruments whose mission/instrument mapping is ambiguous.
catalog_build Build the PDS catalog database from pdr-tests definitions.
catalog_list Browse the pdr-tests catalog inventory.
catalog_samples Print the sample products in the catalog DB for a product type.
catalog_search Search the catalog (mission/instrument/product_key/product_id).
catalog_show Show full catalog + INDEX_REGISTRY info for a single product type.
catalog_summary Per-mission counts of instruments, product types, and products.
constants_cmd Print per-body planetary constants from PCK + NSSDC sources.
ctx_migrate Move existing CTX files on disk to match current [edr.local] layout.
ctxqv Show a downsampled quickview of a CTX image.
example_pid Print an example product ID from a registered PDS index.
fetch Download one or more PDS products by ID.
hibrowse Download a HiRISE browse JPEG from EXTRAS.
hiedr Download HiRISE EDR channel files by observation ID.
himos Create a HiRISE CCD mosaic from EDR data via ISIS.
indexes_counts Tabulate value frequencies for one or more index columns.
indexes_info Show config + cache status for a registered PDS index.
indexes_last Show the last entries of a registered PDS index, transposed.
indexes_list Browse the registered PDS indexes (the operational fetch surface).
indexes_peek Inspect a registered PDS index: shape, column names, a few random rows.
indexes_refresh Refresh upstream index config or re-download a single index.
indexes_select Filter a registered PDS index to specific PIDs and render the rows.
meta Print the metadata row for a product from its PDS cumulative index.
open_cmd Open a data product and report what’s inside.
pd_isna Lazy-import-friendly NaN check for index-display commands.
psa_datasets_cmd List PSA datasets (PDS3 data sets / PDS4 collections) for a mission.
psa_examples_cmd List example PSA products for a dataset or catalog product type.
psa_fetch_cmd Download an ESA PSA product by id.
psa_geometry_cmd Build/preview a PSA dataset’s geometry index for product discovery.
psa_instruments_cmd List ESA PSA instruments (optionally for one mission) with product counts.
psa_missions_cmd List the ESA PSA missions with their product counts (downloadable products).
psa_resolve_cmd Resolve a product id to its ESA PSA download URL.
search_fetch_cmd Download all files (data + label) for a product by LIDVID.
search_get_cmd Show a single product’s registry properties by LIDVID.
search_products_cmd Search the NASA PDS registry and print matching products.
spice_cached Show every SPICE kernel currently cached under storage_root.
spice_fetch Download a date-scoped subset of a mission’s SPICE kernels.
spice_generic Fetch one generic SPICE kernel by short alias.
spice_info Show date range + archive metadata for one mission.
spice_missions List every mission archive NAIF publishes (~39 entries).
spicer Show current SPICE data for a solar system body.

catalog_ambiguous

cli.catalog_ambiguous()

List instruments whose mission/instrument mapping is ambiguous.

[source]

catalog_build

cli.catalog_build(
    force=typer.Option(False, '--force', help='Force rebuild from scratch'),
    validate_urls=typer.Option(False, '--validate-urls', help='Run URL validation after build'),
)

Build the PDS catalog database from pdr-tests definitions.

[source]

catalog_list

cli.catalog_list(
    key=typer.Argument(None, help="Optional dotted key: 'mission' or 'mission.instrument'. Omit to list missions."),
)

Browse the pdr-tests catalog inventory.

Examples: plp catalog list # all missions plp catalog list cassini # cassini instruments plp catalog list cassini.iss # cassini.iss product types

[source]

catalog_samples

cli.catalog_samples(
    key=typer.Argument(..., help="Dotted catalog key 'mission.instrument.product_key'."),
    phase=typer.Option(None, '--phase', help="Filter to one mission phase (e.g. 'saturn', 'cruise')."),
    limit=typer.Option(20, '--limit', '-n', help='Cap rows printed (use 0 for all).'),
)

Print the sample products in the catalog DB for a product type.

Wraps planetarypy.catalog.example_products(). Useful to inspect what’s actually catalogued for a given product type, especially for archives without a registered fetch resolver where these samples are the only available products.

[source]

catalog_show

cli.catalog_show(
    key=typer.Argument(..., help="Dotted key 'mission.instrument.product_key' for full detail."),
)

Show full catalog + INDEX_REGISTRY info for a single product type.

[source]

catalog_summary

cli.catalog_summary()

Per-mission counts of instruments, product types, and products.

[source]

constants_cmd

cli.constants_cmd(
    ctx,
    query=typer.Argument(None, help="Body name (case-insensitive) for the full quantity table, 'Body.field' for one value, or 'list' to browse bodies by category. Examples: 'Mars', 'mars.GM', 'list', 'list moons'.", autocompletion=_complete_constants_query),
    category=typer.Argument(None, help="With 'list': category to drill into (planets, moons, asteroids, comets, dwarf_planets, mission_visited, sun).", autocompletion=_complete_constants_category),
    parent=typer.Argument(None, help="With 'list moons': restrict to one planet's moons (e.g. 'list moons saturn')."),
    at=typer.Option(None, '--at', '-t', help='Time-travel: show the value as of this date (YYYY, YYYY-MM, or YYYY-MM-DD). Walks PCK editions + NSSDC capture history.'),
)

Print per-body planetary constants from PCK + NSSDC sources.

Three forms:

 plp constants Mars # Rich table of every known constant plp constants Mars.GM # Just the value (stdout) + source (stderr) plp constants list # Browse bodies by category

For the single-field form, the quantity is printed to stdout and the source/reference goes to stderr, so output stays pipe-safe::

 plp constants Mars.GM | awk ‘{print $1}’

The list form is a discovery surface over the registry::

 plp constants list # category menu + counts plp constants list moons # every moon plp constants list moons saturn # moons of Saturn plp constants list dwarf_planets

Body name matching is case-insensitive (mars == Mars == MARS). Unknown bodies print the closest matches as a suggestion.

[source]

ctx_migrate

cli.ctx_migrate(
    dry_run=typer.Option(False, '--dry-run', '-n', help='Show what would be moved without touching anything'),
)

Move existing CTX files on disk to match current [edr.local] layout.

Scans each mrox_* volume folder under the configured EDR local root and relocates any file named <pid>.<ext> (26-char CTX product_id) to the location that the active config dictates. Idempotent: a second run does nothing.

Typical use: after switching [edr.local].with_pid between false and true, run this once to bring existing downloads (and any co-located derived files) into the new layout.

[source]

ctxqv

cli.ctxqv(
    ctx,
    imgid=typer.Argument(None, help='CTX product ID (short or full), e.g. J05_046771_1950', autocompletion=_complete_ctx_pid),
    stride=typer.Option(10, '--stride', '-s', help='Downsample factor'),
    save=typer.Option(None, '--save', '-o', help='Save to PNG instead of displaying'),
    stretch=typer.Option('1,99', '--stretch', '-p', help="Percentile stretch as 'low,high'. Use 'none' to disable."),
    edr=typer.Option(False, '--edr', help='Force raw EDR, skip calibrated files'),
    center_box=typer.Option(None, '--center-box', '-c', help='Show full-res center crop of N pixels (default 500 if flag used)'),
)

Show a downsampled quickview of a CTX image.

Automatically uses the best available level: map-projected > calibrated > cube > raw EDR.

Use –center-box to also show a full-resolution crop from the image center.

[source]

example_pid

cli.example_pid(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. mro.ctx.edr', shell_complete=_shell_complete_index_key),
)

Print an example product ID from a registered PDS index.

Useful as a seed for plp fetch, demo notebooks, and smoke tests.

Examples: plp example_pid mro.ctx.edr plp example_pid cassini.iss.index

[source]

fetch

cli.fetch(
    ctx,
    key=typer.Argument(None, help='Dotted product key, e.g. mro.ctx.edr'),
    product_ids=typer.Argument(None, help='One or more product identifiers. Optional when --pids-from is given.', autocompletion=_complete_product_id),
    pids_from=typer.Option(None, '--pids-from', help="Read PIDs from PATH. Plain text → one PID per line (blanks + '#'-comments ignored); .csv → parse and auto-detect the PID column via the index registry, or specify --pid-key. Use '-' for stdin (treated as plain text). Mutually exclusive with positional PIDs."),
    pid_key=typer.Option(None, '--pid-key', help='When --pids-from is a CSV, name the column to read PIDs from. Overrides the auto-detection that uses --key.'),
    pid_suffix=typer.Option(None, '--pid-suffix', help='Append this string to every PID read from --pids-from. E.g. --pid-suffix _RED turns each HiRISE obsid into the corresponding RED product. Ignored when PIDs are supplied as positional arguments.'),
    prefix=typer.Option(False, '--prefix', help='Treat each PID that has no exact PRODUCT_ID match but is a leading prefix of real ones as a request for ALL matching products (e.g. a HiRISE obsid → every CCD product). Reads the index to resolve; requires KEY to be a registered PDS index. Off by default to avoid surprise bulk downloads.'),
    workers=typer.Option(4, '--workers', '-w', help='Parallel download threads in batch mode (default 4).'),
    report=typer.Option('errors-only', '--report', help='Batch outcome report mode: errors-only (default) | full | jsonl | csv. Single-PID calls ignore this flag.'),
    force=typer.Option(False, '--force', '-f', help='Re-download even if cached'),
    label_only=typer.Option(False, '--label-only', '-l', help='Download only the label file'),
    here=typer.Option(False, '--here', '-H', help='Download into current directory instead of planetarypy storage'),
    folder=typer.Option(False, '--folder', '-d', help='Print the local folder instead of file paths (composes with `cd`; single-PID only)'),
)

Download one or more PDS products by ID.

Examples: plp fetch mro.ctx.edr P02_001916_2221_XI_42N027W # single plp fetch mro.ctx.edr P02_001916_2221_XI_42N027W P03_… # batch (variadic) plp fetch mro.ctx.edr –pids-from my_targets.txt # batch from file plp fetch mro.ctx.edr –pids-from - # batch from stdin plp fetch mro.hirise.edr ESP_075205_0930 –prefix # obsid → all CCDs cd (plp fetch –folder mro.ctx.edr P02_001916_2221_XI_42N027W)

[source]

hibrowse

cli.hibrowse(
    ctx,
    product_id=typer.Argument(None, help='HiRISE product ID, e.g. PSP_003092_0985_RED or PSP_004238_1135_RED1_1', autocompletion=_complete_hirise_obsid_rdr),
    annotated=typer.Option(True, '--annotated/--clean', '-a/-c', help='Annotated (default) or clean browse'),
    here=typer.Option(False, '--here', '-H', help='Download into current directory'),
    force=typer.Option(False, '--force', '-f', help='Re-download even if cached'),
)

Download a HiRISE browse JPEG from EXTRAS.

Bare observation IDs default to RDR RED browse.

Examples: plp hibrowse PSP_003092_0985_RED (annotated browse) plp hibrowse –clean PSP_003092_0985_RED (clean browse) plp hibrowse ESP_075422_2040_COLOR plp hibrowse PSP_004238_1135_RED1_1 (EDR CCD) plp hibrowse PSP_003092_0985 (defaults to RDR RED)

[source]

hiedr

cli.hiedr(
    ctx,
    obsid=typer.Argument(None, help='HiRISE observation ID, e.g. PSP_003092_0985', autocompletion=_complete_hirise_obsid_edr),
    red=typer.Option(False, '--red', help='Download RED CCDs (RED0–RED9, 20 files)'),
    ir=typer.Option(False, '--ir', help='Download IR CCDs (IR10–IR11, 4 files)'),
    bg=typer.Option(False, '--bg', help='Download BG CCDs (BG12–BG13, 4 files)'),
    ccds=typer.Option(None, '--ccds', help="Specific CCD numbers. Repeatable AND comma-separated: '--ccds 4 --ccds 5' is equivalent to '--ccds 4,5'."),
    here=typer.Option(False, '--here', '-H', help='Download into current directory'),
    force=typer.Option(False, '--force', '-f', help='Re-download even if cached'),
)

Download HiRISE EDR channel files by observation ID.

Downloads both channels (0 and 1) for each CCD in the selected color. If no color flag is given, defaults to –red.

Examples: plp hiedr PSP_003092_0985 –red (all 20 RED files) plp hiedr PSP_003092_0985 –red –ccds 4,5 (RED4+RED5 only, 4 files) plp hiedr PSP_003092_0985 –ir (IR10+IR11, 4 files) plp hiedr PSP_003092_0985 –bg (BG12+BG13, 4 files) plp hiedr PSP_003092_0985 –here –ccds 4,5 (download to current dir)

[source]

himos

cli.himos(
    ctx,
    obsid=typer.Argument(None, help='HiRISE observation ID, e.g. PSP_003092_0985', autocompletion=_complete_hirise_obsid_edr),
    red=typer.Option(False, '--red', help='Process RED CCDs'),
    ir=typer.Option(False, '--ir', help='Process IR CCDs'),
    bg=typer.Option(False, '--bg', help='Process BG CCDs'),
    ccds=typer.Option(None, '--ccds', help="Specific CCD numbers. Repeatable AND comma-separated: '--ccds 4 --ccds 5' is equivalent to '--ccds 4,5'."),
    mapfile=typer.Option(None, '--map', '-m', help='ISIS map projection file (.map)'),
    overwrite=typer.Option(False, '--force', '-f', help='Reprocess even if mosaic exists'),
)

Create a HiRISE CCD mosaic from EDR data via ISIS.

Full pipeline: download → hi2isis → spiceinit → hical → histitch → cubenorm → cam2map → equalizer → automos.

If no color flag is given, defaults to –red.

Examples: plp himos PSP_003092_0985 (all 10 RED CCDs) plp himos PSP_003092_0985 –ccds 4,5 (RED4+RED5 central pair) plp himos PSP_003092_0985 –ir (IR mosaic) plp himos PSP_003092_0985 –red –ir –bg (all three colors) plp himos PSP_003092_0985 –map mymap.map (custom projection)

[source]

indexes_counts

cli.indexes_counts(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. mro.ctx.edr', shell_complete=_shell_complete_index_key),
    column=typer.Argument(None, help='Column to tabulate. For several columns use --columns.'),
    columns=typer.Option(None, '--columns', '-c', help="Tabulate several columns (one block each). Repeatable AND comma-separated: '-c TARGET_NAME -c MISSION_PHASE_NAME' is equivalent to '--columns TARGET_NAME,MISSION_PHASE_NAME'."),
    top=typer.Option(10, '--top', '-t', help='Show the N most frequent values (default 10). Use 0 for all.'),
    dropna=typer.Option(False, '--dropna', help='Exclude missing (NaN) values from the counts.'),
)

Tabulate value frequencies for one or more index columns.

A quick pandas.value_counts view: how many rows carry each distinct value of a column, with percent-of-total. Handy for categorical columns (TARGET_NAME, MISSION_PHASE_NAME, INSTRUMENT_MODE_ID) where you want the lay of the land before filtering.

Examples: plp indexes counts mro.ctx.edr TARGET_NAME plp indexes counts mro.ctx.edr MISSION_PHASE_NAME –top 0 plp indexes counts mro.ctx.edr -c TARGET_NAME,MISSION_PHASE_NAME

[source]

indexes_info

cli.indexes_info(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. cassini.iss.index', shell_complete=_shell_complete_index_key),
)

Show config + cache status for a registered PDS index.

[source]

indexes_last

cli.indexes_last(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. mro.ctx.edr', shell_complete=_shell_complete_index_key),
    rows=typer.Option(3, '--rows', '-n', help='Number of trailing rows to show (default 3).'),
    sort=typer.Option(False, '--sort', '-s', help='Sort by a time column before taking the last rows. Auto-detects START_TIME / OBSERVATION_TIME / IMAGE_TIME / TIME.'),
    columns=typer.Option(None, '--columns', '-c', help="Column projection. Repeatable AND comma-separated: '-c PRODUCT_ID -c IMAGE_TIME' is equivalent to '--columns PRODUCT_ID,IMAGE_TIME'. Applied AFTER --sort so the time column can drive sorting even if you project it away."),
)

Show the last entries of a registered PDS index, transposed.

Default order is file order (most PDS indexes are appended chronologically so the last row IS the newest). Pass --sort to actually sort by a time column when one is present — useful when the index file isn’t chronologically ordered.

The output format matches plp indexes peek so columns line up the same way; only the row selection differs.

[source]

indexes_list

cli.indexes_list(
    key=typer.Argument(None, help="Optional dotted key: 'mission' or 'mission.instrument'. Omit to list missions."),
    tree=typer.Option(False, '--tree', help='Render as a tree (mirrors planetarypy.pds.print_available_indexes).'),
)

Browse the registered PDS indexes (the operational fetch surface).

Examples: plp indexes list # all missions, summary table plp indexes list cassini # cassini instruments plp indexes list cassini.iss # cassini.iss indexes (with cache status) plp indexes list –tree # full tree (legacy print_available_indexes)

[source]

indexes_peek

cli.indexes_peek(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. cassini.cda.index', shell_complete=_shell_complete_index_key),
    rows=typer.Option(3, '--rows', '-n', help='Number of random rows to show (default 3).'),
    columns=typer.Option(None, '--columns', '-c', help="Column projection. Repeatable AND comma-separated: '-c PRODUCT_ID -c IMAGE_TIME' is equivalent to '--columns PRODUCT_ID,IMAGE_TIME'. Default keeps every column."),
)

Inspect a registered PDS index: shape, column names, a few random rows.

Useful when an index has a non-standard schema (e.g. cassini.cda.index has FILE_SPECIFICATION_NAME / DATA_SET_ID instead of the usual PRODUCT_ID column) and you want to see what’s actually there before deciding which column to use as the product identifier.

Output is transposed (one row of the index per column of the table) so it stays readable whether the index has 4 columns or 71.

[source]

indexes_refresh

cli.indexes_refresh(
    ctx,
    config=typer.Option(False, '--config', help='Force-refresh upstream URL config (planetarypy_index_urls.toml).'),
    cache=typer.Option(None, '--cache', help="Re-download a specific index's cumulative parquet.", shell_complete=_shell_complete_index_key),
)

Refresh upstream index config or re-download a single index.

[source]

indexes_select

cli.indexes_select(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. mro.ctx.edr', shell_complete=_shell_complete_index_key),
    product_ids=typer.Argument(None, help='One or more PIDs to filter to. Optional when --pids-from is given.'),
    pids_from=typer.Option(None, '--pids-from', help="Read PIDs from PATH. Plain text → one PID per line (blanks + '#'-comments ignored); .csv → parse and auto-detect the PID column via the index registry, or specify --pid-key. Use '-' for stdin (treated as plain text). Mutually exclusive with positional PIDs."),
    pid_key=typer.Option(None, '--pid-key', help='When --pids-from is a CSV, name the column to read PIDs from. Overrides the auto-detection that uses KEY.'),
    pid_suffix=typer.Option(None, '--pid-suffix', help="Append this string to every PID read from --pids-from. Useful for files that carry observation-level identifiers when the index actually keys on a more specific product (e.g. HiRISE obsid + '_RED')."),
    fmt=typer.Option('auto', '--format', help='Output format: auto (default) | table | csv | jsonl. auto = transposed Rich table when matched rows < --max-table-rows, otherwise CSV.'),
    max_table_rows=typer.Option(None, '--max-table-rows', help='Max filtered rows that still get the transposed table; above this count --format=auto switches to CSV. Defaults to the `max_table_rows` config key (3 if unset).'),
    report=typer.Option('errors-only', '--report', help='Missing-PID report mode: errors-only (default summary on stderr) | full (list every missing PID on stderr).'),
    columns=typer.Option(None, '--columns', '-c', help="Column projection. Repeatable AND comma-separated: '-c PRODUCT_ID -c IMAGE_TIME' is equivalent to '--columns PRODUCT_ID,IMAGE_TIME'. Applied to every output format (table / csv / jsonl)."),
)

Filter a registered PDS index to specific PIDs and render the rows.

Built for the “I have a small list of PIDs, show me those rows” case — the natural companion to plp fetch ... --pids-from. Output goes to stdout (so it pipes cleanly); the resolution report (prefix expansions and missing PIDs) always goes to stderr regardless of --format.

A PID that matches no full PRODUCT_ID exactly but is a leading prefix of real ones expands automatically to all matching products — so a HiRISE obsid handed to the per-CCD EDR index returns every CCD product. An exact match is never expanded.

Examples: plp indexes select mro.ctx.edr P02_001916_2221_XI_42N027W plp indexes select mro.ctx.edr P_A P_B P_C plp indexes select mro.hirise.edr ESP_075205_0930 # obsid → all CCD products plp indexes select mro.ctx.edr –pids-from my_targets.txt plp indexes select mro.ctx.edr –pids-from - –format jsonl < pids.txt

[source]

meta

cli.meta(
    ctx,
    key=typer.Argument(None, help='Dotted index key, e.g. mro.ctx.edr', shell_complete=_shell_complete_index_key),
    product_id=typer.Argument(None, help='Product identifier', autocompletion=_complete_product_id),
    long=typer.Option(False, '--long', '-l', help='Request the long form when the index has a custom display (no effect on indexes that always return the full row).'),
)

Print the metadata row for a product from its PDS cumulative index.

Thin wrapper around planetarypy.pds.get_meta(key, product_id, long=...). Matches the product ID against the configured (or conventional) PID column, tolerant of case and PDS path/extension/version-suffix decoration. Indexes may register custom display logic (short summaries, multi-row aggregation, …) which the --long flag toggles into the full-row form.

Examples: plp meta mro.ctx.edr P02_001916_2221_XI_42N027W plp meta cassini.iss.index 1_N1454725799

[source]

open_cmd

cli.open_cmd(
    ctx,
    path=typer.Argument(None, help='Path to a local data product (PDS3 .LBL/.IMG, FITS, GeoTIFF, .cub).'),
    show=typer.Option(False, '--show', help='Display the default image object in a viewer window.'),
)

Open a data product and report what’s inside.

Examples: plp open P02_001916_2221_XI_42N027W.LBL plp open mycube.tif –show

[source]

pd_isna

cli.pd_isna(v)

Lazy-import-friendly NaN check for index-display commands.

[source]

psa_datasets_cmd

cli.psa_datasets_cmd(
    ctx,
    mission=typer.Argument(None, help="PSA mission, e.g. 'Mars Express'."),
    instrument=typer.Argument(None, help="Optional PSA instrument, e.g. 'ASPERA'."),
)

List PSA datasets (PDS3 data sets / PDS4 collections) for a mission.

[source]

psa_examples_cmd

cli.psa_examples_cmd(
    ctx,
    key=typer.Argument(None, help="PSA dataset (from `psa datasets`) or catalog key 'mission.instrument.product_type'."),
    n=typer.Option(5, '-n', '--number', help='How many examples to show.'),
)

List example PSA products for a dataset or catalog product type.

[source]

psa_fetch_cmd

cli.psa_fetch_cmd(
    ctx,
    product_id=typer.Argument(None, help='PDS product id to download from the PSA.'),
    dest=typer.Option(None, '--dest', help='Storage root (default: {storage_root}/psa).'),
    zip_bundle=typer.Option(False, '--zip', help='Fetch the PSA product zip bundle instead of the direct file(s).'),
    no_extract=typer.Option(False, '--no-extract', help="With --zip: keep the zip; don't unpack."),
)

Download an ESA PSA product by id.

By default fetches the product’s file(s) directly from the PSA FTP archive (no zip, no redundant volume manifest). Use –zip for the bundled zip.

[source]

psa_geometry_cmd

cli.psa_geometry_cmd(
    ctx,
    dataset=typer.Argument(None, help='PSA dataset id (group or member), from `plp psa datasets`.'),
    columns=typer.Option(None, '--columns', '-c', help='Columns to show (comma-sep or repeated).'),
    head=typer.Option(10, '--head', '-n', help='Rows to preview.'),
    pids=typer.Option(False, '--pids', help='Print unique PRODUCT_IDs (one per line) instead.'),
    no_aggregate=typer.Option(False, '--no-aggregate', help='Only this dataset, not base + EXT volumes.'),
    force=typer.Option(False, '--force', help='Rebuild the parquet cache.'),
)

Build/preview a PSA dataset’s geometry index for product discovery.

Parses the per-dataset PDS3 geometry table(s) (incidence, Ls, lat/lon, pixel scale, …) into one filterable table, aggregating base + EXT volumes by default. Use the Python API (planetarypy.psa.geometry_index) for filtering; --pids dumps the unique PRODUCT_IDs for piping into a fetch.

[source]

psa_instruments_cmd

cli.psa_instruments_cmd(
    mission=typer.Argument(None, help="Optional mission filter, e.g. 'Mars Express' or 'Rosetta'."),
)

List ESA PSA instruments (optionally for one mission) with product counts.

[source]

psa_missions_cmd

cli.psa_missions_cmd()

List the ESA PSA missions with their product counts (downloadable products).

[source]

psa_resolve_cmd

cli.psa_resolve_cmd(
    ctx,
    product_id=typer.Argument(None, help='PDS product id to resolve in the PSA.'),
    all_=typer.Option(False, '--all', help='Show all matching granules.'),
)

Resolve a product id to its ESA PSA download URL.

[source]

search_fetch_cmd

cli.search_fetch_cmd(
    ctx,
    lidvid=typer.Argument(None, help='Product LIDVID to download.'),
    dest=typer.Option(None, '--dest', help='Destination directory.'),
)

Download all files (data + label) for a product by LIDVID.

[source]

search_get_cmd

cli.search_get_cmd(
    ctx,
    lidvid=typer.Argument(None, help='Product LIDVID (or LID).'),
)

Show a single product’s registry properties by LIDVID.

[source]

search_products_cmd

cli.search_products_cmd(
    ctx,
    target=typer.Option(None, '--target', help='Target LID, e.g. a planet.'),
    instrument=typer.Option(None, '--instrument', help='Instrument LID.'),
    instrument_host=typer.Option(None, '--instrument-host', help='Mission/host LID.'),
    processing_level=typer.Option(None, '--processing-level', help='raw | calibrated | derived | partially-processed | telemetry.'),
    after=typer.Option(None, '--after', help='Observation ends after this ISO date.'),
    before=typer.Option(None, '--before', help='Observation starts before this ISO date.'),
    observationals=typer.Option(False, '--observationals', help='Only observational products.'),
    query=typer.Option(None, '--query', '-q', help='Raw PDS API query clause.'),
    fields=typer.Option(None, '--fields', '-f', help='Registry property columns to show.'),
    limit=typer.Option(20, '--limit', '-n', help='Max products to return.'),
)

Search the NASA PDS registry and print matching products.

Examples: plp search products -q ’lid like “urn:nasa:pds:cassini_iss_saturn*“’ plp search products –processing-level raw –observationals -n 5

[source]

spice_cached

cli.spice_cached(
    bytes_total=typer.Option(False, '--total', '-T', help='Also print cumulative on-disk size at the bottom.'),
)

Show every SPICE kernel currently cached under storage_root.

Walks {storage_root}/spice_kernels/ and groups by top-level directory: generic (LSK/PCK/DE-series/satellites) and per-mission subsets (cassini, mro, …). Useful before kicking off a plp spice fetch to check whether kernels are already on disk.

 Examples: plp spice cached plp spice cached –total

[source]

spice_fetch

cli.spice_fetch(
    ctx,
    mission=typer.Argument(None, help='NAIF mission shorthand, e.g. cassini, mro, dawn.', autocompletion=_complete_spice_mission),
    start=typer.Option(None, '--start', '-s', help='UTC start date (inclusive), e.g. 2006-06-01'),
    stop=typer.Option(None, '--stop', '-e', help='UTC stop date (inclusive), e.g. 2006-06-30'),
    save_location=typer.Option(None, '--save-location', '-d', help='Directory for downloaded kernels + metakernel (default: planetarypy storage_root)'),
)

Download a date-scoped subset of a mission’s SPICE kernels.

Thin wrapper around planetarypy.spice.archived_kernels. get_metakernel_and_files(). Generates a metakernel referencing the subsetted kernels; prints the metakernel path to stdout so shell composition Just Works:

 ISIS_PRE=‘spiceinit from=input.cub mkpre=$(plp spice fetch
cassini –start 2006-06-01 –stop 2006-06-30)’

 Examples: plp spice fetch cassini –start 2006-06-01 –stop 2006-06-30 plp spice fetch mro -s 2014-01-01 -e 2014-01-31

[source]

spice_generic

cli.spice_generic(
    ctx,
    name=typer.Argument(None, help="Short alias (lsk/pck/masses/de432s/de430/mar099s) or a full path-fragment relative to NAIF's generic_kernels/ URL.", autocompletion=_complete_generic_alias),
    force=typer.Option(False, '--force', '-f', help='Re-download even if the local cache already has the file.'),
)

Fetch one generic SPICE kernel by short alias.

Generic kernels are the ones needed for any SPICE work — leapseconds, planetary constants, DE-series planetary ephemerides — and they get cached once under {storage_root}/spice_kernels/generic/.

The aliases the command knows about:

 lsk naif0012.tls (leapseconds) pck pck00010.tpc (planetary constants) masses de-403-masses.tpc (DE-403 body masses) de432s de432s.bsp (JPL DE432s ephemeris, default ~10 MB, 1950-2050) de430 de430.bsp (JPL DE430 ephemeris, full range ~120 MB) mar099s mar099s.bsp (Mars satellite ephemeris)

Pass a full path-fragment for unlisted kernels (e.g. lsk/naif0011.tls for an older LSK).

 Examples: plp spice generic lsk plp spice generic de430 plp spice generic lsk/naif0011.tls # full path for non-default

[source]

spice_info

cli.spice_info(
    ctx,
    mission=typer.Argument(None, help='NAIF mission shorthand, e.g. cassini, mro, dawn.', autocompletion=_complete_spice_mission),
)

Show date range + archive metadata for one mission.

Use this before plp spice fetch to discover the date window the archive covers, the cumulative bundle size, and the upstream archive/readme URLs.

 Examples: plp spice info cassini plp spice info mro

[source]

spice_missions

cli.spice_missions()

List every mission archive NAIF publishes (~39 entries).

Each row shows the shorthand to use as the mission argument to plp spice info / plp spice fetch, the full mission name, the date range covered by the archive, and the cumulative kernel-bundle size on the NAIF subsetter.

 Examples: plp spice missions

[source]

spicer

cli.spicer(
    ctx,
    body=typer.Argument(None, help='NAIF body name, e.g. Mars, Moon, Enceladus'),
    time=typer.Option(None, '--time', '-t', help='UTC time (default: now)'),
    lon=typer.Option(None, '--lon', help='Longitude [deg] for surface illumination'),
    lat=typer.Option(None, '--lat', help='Latitude [deg] for surface illumination'),
)

Show current SPICE data for a solar system body.

Without –lon/–lat, shows global properties (L_s, subsolar point, solar constant). With coordinates, adds surface illumination.

Examples: plp spicer Mars plp spicer Moon –time 2024-06-15T12:00:00 plp spicer Mars –lon 137.4 –lat -4.6

[source]