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:
- mk1: Poynting VFD4 commercial frame grabber with a 68070 processor, no OS
- mk2: PC104 stack, 486 or Geode processor, QNX
- mk3: PC104 stack, 486 or Geode processor, QNX
- mk4: PC104 stack, with an Allied Vision Manta camera instead of the Cohu model, 2x2 down-binned and coerced into mk3 image format
- mk5: Linux system, with the Allied Vision Manta camera, uses full image with smaller pixels
Annoyingly, these designations do not track the software version numbers embedded in the software ("build numbers").
- mk1: N/A (lost in prehistory)
- mk2: 2.01 to 4.47
- mk3: 2.01 to 4.45, then 5.01 to 5.13
- mk4: 6.01 and later
- mk5: 7.01 and later
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.
- mk1 image ram: 2**20 bytes
- mk2 image ram: 2**19 bytes (each; it has two of these, A & B)
- mk3 image ram: 2**19 bytes (each; it has two of these, A & B)
- mk4 image ram: 2**19 bytes (each; it has two of these, A & B)
- mk5 image ram: 2**21 bytes (each; it has two of these, A & B)
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.
- mk1 natural line length: 1024
- mk2 natural line length: 910
- mk3 natural line length: 910
- mk4 natural line length: 910
- mk5 natural line length: 1388
Each frame grabber has its own style of writing pixels into image ram.
- The mk1 sensor data fall roughly between bytes 10 and 765. There is essentially no dead space before the start of the even field, and no dead space between the even and odd fields
- The mk2 sensor data fall roughly between bytes 210 and 950. There is dead space (about 20 lines) before the even field, and also between the fields (also about 20 lines)
- The mk3 sensor data fall roughly between bytes 210 and 950. There is dead space (about 20 lines) before the even field, and also between the fields (also about 20 lines)
- The mk4 sensor data fall roughly between bytes 140 and 920. There is dead space (about 20 lines) before the even field, and also between the fields (also about 20 lines)
- The mk5 sensor data fall between bytes 0 and 1387. There is no dead space
The "active area" is that part of image ram into which the grabbing is done.
- mk1 active area: 768 x 480 = 368,640
- mk2 active area: 910 x 525 = 477,750
- mk3 active area: 910 x 525 = 477,750
- mk4 active area: 910 x 525 = 477,750
- mk5 active area: 1388 x 1038 = 1,440,744
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:
- mk1: 2+2+768 x 480 = 772 x 480 = 370,560
- mk2: N/A
- mk3: N/A
- mk4: N/A
- mk5: N/A
.vram: This is a complete copy of image ram. The mk1 unit embeds line numbers, but the mk2, writing straight to disk, does not.
- mk1: 2+1024 x 1024 = 1026 x 1024 = 1,050,624 bytes
- mk2: 2**19 = 524,288 bytes
- mk3: 2**19 = 524,288 bytes
- mk4: 2**19 = 524,288 bytes
- mk5: 2**21 = 2,097,152 bytes
.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.
- mk1: 2+768 x 480 = 770 x 480 = 369,600
- mk2: 2+910 x 525 = 912 x 525 = 478,800
- mk3: 2+910 x 525 = 912 x 525 = 478,800
- mk4: 2+910 x 525 = 912 x 525 = 478,800
- mk5: 2+1388 x 1038 = 1390 x 1038 = 1,442,820
.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.
- mk1: 768 x 480 = 368,640
- mk2: 910 x 525 = 477,750
- mk3: 910 x 525 = 477,750
- mk4: 910 x 525 = 477,750
- mk5: N/A
.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.
- mk1 field height: 241
- mk2 field height: 263
- mk3 field height: 263
- mk4 field height: 288
- mk5 field height: N/A
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)
- mk1 frame: 768 x 480 = 368,640
- mk2 frame: 910 x 525 = 477,750
- mk3 frame: 910 x 525 = 477,750
- mk4 frame: 910 x 525 = 477,750
- mk5 frame: 1388 x 1038 = 1,440,744
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.
- mk1 good area: 740 x 460 + 10 + 12 = 340,400 good pixels
- mk2 good area: 740 x 460 + 210 + 40 = 340,400 good pixels
- mk3 good area: 740 x 460 + 210 + 40 = 340,400 good pixels
- mk4 good area: 694 x 460 + 180 + 40 = 319,240 good pixels
- mk5 good area: 1344 x 1024 + 22 + 7 = 1,376,256 good pixels
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.