ST5000 Image Formats

Description of ST5000 Image Files

Change Log
Version Date Comments
1.0 26-Aug-2003 Initial Release
1.1 29-Feb-2016 Update for Mk4
1.2 15-Sep-2023 Update for Mk5

Introduction

The tracker stacks referrered to in this document:

Annoyingly, these designations do not track the software version numbers embedded in the software ("build numbers").

The Mark I and Mark II ST5000 star trackers produce various kinds of "primitive" image types, and the ST5000 image handling software can transform these primitive types into "reduced" types. This note describes these data products.

Each version has a video ram into which the image is written by the frame grabber.

Each frame grabber has a natural line length. This is the number of video ram bytes between 2 sensor pixels in the same sensor column.

Each frame grabber has its own style of writing pixels into image ram.

The "active area" is that part of image ram into which the grabbing is done.

Note that the natural line length of the mk1 is larger than the active area. You save the first 768 bytes, then ignore the next 256. For the mk2 and mk4 units, the lengths agree, so no bytes are ignored.

File Types:

The file types vary by how much image ram they represent, which data management codes are built into them, and whether the fields have been shuffled into frames. Embedded line numbers are encoded MSB first:

line[0] = (length >> 8) & 0xff
line[1] = (length >> 0) & 0xff

length = ((line[0] << 8) + line[1]) & 0xffff

File types vary according to suffix:

.raw: This is an old mk1 style no longer used. Two routing codes, then line number, then data:

.vram: This is a complete copy of image ram. The mk1 unit embeds line numbers, but the mk2, writing straight to disk, does not.

.grab: This is the fundamental file type transmitted over the RS232 line. Only the active area is transmitted. Line numbers begin each line, so that dropped lines (due to transmission errors) can be indentified.

.field: A .grab file is turned into a .field file by sorting lines according to their embedded line number, then discarding the line numbers. Missing lines in the grab files show up as dark rows in the field file.

.frame: A frame is produced by interleaving the even and odd fields. The "field height" is the number of video ram lines between adjacent sensor lines.

You can convert between field and frame lines (FH = field height):
frame = 2 * field (field line < FH)
frame = 2 * (field-FH) + 1 (field line >= FH)

field = frame/2 (frame line even)
field = frame/2 + FH (frame line odd)

Finally, there is the "good" part of the image to work with. This has to allow for the ragged edges in the grab, the late start of the image in the mk2 unit, and so on. Only good sensor data should be included. Remember to account for the area of the search and track boxes: the good area should be inset enough to prevent edge collisions.

Note: the mk2 unit shows a little variation in the "210" figure. This may be due to part-to-part variation in the flash ADC. It has been seen as large as 215, in which case the image is "shifted right" with wraparound: 5-ish pixels from the right edge of the sensor appear at the left of the frame.