python — Driver Interfaces

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

Attempt to load a given label from 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.

Using the only_* flags will limit the drivers used to construct ISDs. If you are not sure what input data you have, just leave the only_* parameters as False. Leaving/Setting all only_* parameters to False should satisfy most situations.

Only parameters explained and there uses: * only_isis_spice=True Used for spiceinit’d ISIS cubes, used, for example, when one has updated the ephemeris information on an ISIS cube. * only_naif_spice=True Used for example, when one has a data product or an ISIS cube, but not yet obtained ephemeris information.

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.

only_isis_spicebool

Explicitly searches for drivers constructed from the IsisSpice component class

only_naif_spicebool

Explicitly searches for drivers constructed from the NaifSpice component class

Returns

dict

The ISD as a dictionary

ale.drivers.loads(label, props='', formatter='ale', indent=2, verbose=False, only_isis_spice=False, only_naif_spice=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