spc_to_results

giant.scripts.spc_to_results:

Convert SPC Autoregister results into a GIANT results pickle file format.

This script converts SPC Autoregister results into a format GIANT can understand. This is useful primarily for using GIANT to display the results and for comparison between GIANT SFN and SPC observations. It makes extensive use of the stereophotoclinometry module, so if you need to do work with SPC products beyond what this scripts provides look there.

For this script to run you need to have already run the Autoregister portion of SPC on your images. You also need to be sure that you have a giant camera file (as a dill or pickle file) which contains images that overlap with the images in the SPC directory.

Images are paired based on timestamp without regard for which camera was used, as SPC uses a way to identify cameras that is difficult to generalize to the GIANT convention. Therefore you need to be careful if you have multiple cameras processed in your SPC directory that have image times that are very close together.

Warning

This script load/saves some results from/to python pickle files. Pickle files can be used to execute arbitrary code, so you should never open one from an untrusted source.

Usage

Form a GIANT results file from an SPC directory

usage: spc_to_results [-h] [-d DIR] [-c CAMERA] [-o OUTPUT] [-s SUMFILES [SUMFILES ...]] [-m META_KERNEL] [-t TARGET] [-f TFRAME] [-l LMK_DISPLAYS [LMK_DISPLAYS ...]]

Named Arguments

-d, --dir

The SPC directory to extract the results from

Default: “./”

-c, --camera

The camera file containing the images that were processed

Default: “../giant/camera.dill”

-o, --output

The file to save the results to

Default: “./results.pickle”

-s, --sumfiles

A list of sum files to extract the results from

-m, --meta_kernel

The meta kernel to furnish for the predicted maplet locations

Default: “../meta_kernel.tm”

-t, --target

The spice target that the spc landmarks are on

Default: “BENNU”

-f, --tframe

The spice target frame that the spc landmarks are on

Default: “IAU_BENNU”

-l, --lmk_displays

The path to the landmark display files

WARNING: This script loads/saves some results from/to python pickle files. Pickle files can be used to execute arbitrary code, so you should never open one from an untrusted source.