MastCam Image Sorting Engine
Most of my work involved MSL’s MastCam, which produces images of
Martian scenery. These images are associated with PDS labels, which are basically files
with extensive data for each image. To display the thousands of available images
properly, I had to query the MSL library and automate an engine for parsing data from
these PDS labels and presenting them to the user graphically.
In order to do this, I had to generate a CSV file with the data points
we care about from all of the labels, meaning my engine had to parse every label one by
one, extract the necessary data, and insert it into a larger lookup table that I would
then query to get information for the user interface. All of this data was extracted by
querying the appropriate MSL database URLs directly.
Loading the images into the scene required a similar
the engine queried the URL for the image file associated with a specific observation
product ID, instead of the PDS label. Jargon aside, this means that I was able to get
the data and images for each observation from the MSL database correctly, which I then
presented in the graphical user interface for the user to see.
So now that I was able to present images and data, the bigger
underlying issue was data sorting. There are hundreds of thousands of data points in the
PDS labels for each sol (each sol being a day on mars), and we had to figure out how to
allow users to sort through it. This meant making a menu where the user can select on a
sol, and will then be taken to a menu for all the sequences of images for that day.
Then, they could select a sequence, and see the individual observations in that given
sequence. Designing the implementation for this was actually more complex than one would
think, and required a lot of iteration before I was able to come up with a solution that
worked smoothly by storing values in dictionary data structures.
When one of the specific observations in the observation list is selected, the engine
displays the correct image to the user in a preview window and then gives them options
to view its corresponding camera cone, or add it to their image gallery, which can then
be downloaded to the user’s directory of interest.