python — Driver Interfaces

ale.drivers.load(label, props={}, formatter='ale', verbose=False)

Attempt to load a given label from all possible drivers.

This function opens up the label file and attempts to produce an ISD in the format specified using the supplied properties. Drivers are tried sequentially until an ISD is successfully created. Drivers that use external ephemeris data are tested before drivers that use attached ephemeris data.

Parameters

labelstr

String path to the given label file

propsdict

A dictionary of optional keywords/parameters for use in driver loading. Each driver specifies its own set of properties to use. For example, Drivers that use the NaifSpice mix-in use the ‘kernels’ property to specify an explicit set of kernels and load order.

formatter{‘ale’, ‘isis’, ‘usgscsm’}

Output format for the ISD. As of 0.8.0, it is recommended that the ale formatter is used. The isis and usgscsm formatters are retrained for backwards compatability.

verbosebool

If True, displays debug output specifying which drivers were attempted and why they failed.

Returns

dict

The ISD as a dictionary

ale.drivers.loads(label, props='', formatter='ale', indent=2, verbose=False)

Attempt to load a given label from all possible drivers.

This function is the same as load, except it returns a JSON formatted string.

See load for shared parameter documentation.

Parameters

indentint

The number of spaces to indent each nested component of the JSON string. See json.dumps.

Returns

str

The ISD as a JSON formatted string

See Also

load