The Navcam, or “sometimes things are easy”The Rosetta Navcam is the “Navigation Camera”. As we mentioned, it isn't quite in the same data format as the WAC & NAC data. However it is a lot simpler to process.
The Navcam data archives pulled from the Small Bodies archive hold three files (under data/cam1) for each image
- a .fit file: a FITS (Flexible Image Transport System) file with a header and image data
- a .lbl file: a PDS format label only file
- a .img file: the raw image data only file
We ignore the FITS file, since there isn't anything in there we can't get from the .lbl and .img file pair.
In theory for a given prefix the .lbl file and .img don't have to correspond directly (the .lbl file has an ^IMAGE field with and explicit target file name and offset), but in practice they always line up for the Navcam set.
And the .img files are all 2MByte files containing a single image of 1024*1024*16bpp – although the SOURCE_SAMPLE_BITS field in the .lbl file indicates these are actually 12bpp ranges we don't much care, since we read these as 16 bit values and can scale the dynamic range of the output anyway.
So to parse this all we have to do is: for a given file, load the .img file directly, pack the 16bpp data up and then move it all out into an openCV image structure, fiddle the gain to use the full 16bpp range, and we're done.
The code is essentially identical to the OSIRIS processing, except we don't even have to work out the offset in the .img file: we always load the complete file from the start, and the images are all the same size.
We can pull any other metadata on the image from the corresponding .lbl file, but otherwise that's it.