Scope output data organization

I tried to develop a complete list of engineering parameters for the scope to write, as a single line, to a text log file whenever desired. The uses of such a log file would be for hardware/software debugging, general telescope history, and event files. The entries in this data line would be written once per second for general history, and these history files would have a naming convention of 'tylog_YYYY-MM-DD-SSSSS.txt'. The SSSSS would be UT seconds of day at the time the file was first opened. For higher resolution debugging purposes the same name would be used, but the lines would be written out at 16Hz, the basic cycle period of my control loop.

Because these files would be dense and lengthy, I added another type of log file, the event file. This file would be opened at the same moment as the 'tylog' file but would be named 'eventlog_YYYY-MM-DD-SSSSS.txt' and would contain single lines from the history file, triggered by screen clicks whenever a specific event was to be captured. This made the data reduction much easier because extraneous data was omitted, but could be recovered from the 'tylog' file if needed.

The events would be: 'max altitude' (star crossing the meridian), 'pitch_start' (zero point setting of the pitch angle), 'pitch_end' (separation angle), 'upper limb' (solar upper limb centered), 'lower limb' (solar lower limb centered), 'calculated_position' (scope at a goto point), 'centered' (target in the center of the FOV), and 'save_alt/az' (remember this alt/az position).

All subsequent data reductions would start with these data lines, and sections of these lines that were not needed in a particular reduction would be deleted. For example, all the hardware voltage settings, useful for motion analysis, would be dropped when reducing the data to meridian altitudes or separations. These deletions would make for smaller files, each with their own naming conventions similar to the above.

Every data line has 53 entries, all angles are in degrees. Because the scope writes data lines as a single string, these data lines start and end with a " (quote mark). If you download one of these files, you may want to use a text editor to delete the quote marks and resave. The resulting text file can be read into most spreadsheet programs. It has a format similar to a .csv file.

Here is an example from a separation run on July 17, 2021:


  • col 0 Always a quote mark, for compatibility with the scope software.

  • col 1 Software version

  • col 2 Modified Julian date. Add 2458849.5 to get the full JD. Last two digits are flaky because of the 6-digit limit for reals.

  • col 3 UT day fraction. The last digit is close to one second in granularity. Add this to int(col 2) to get a better MJD.

  • col 4 UTC from the computer clock. Usually correct within a few seconds.

  • col 5 Local Sidereal Time (degrees) as calculated from the computer clock and my longitude.

  • col 6 Star1 name. Needed for meridian altitudes or separations.

  • col 7 Star1 ra (degrees)

  • col 8 Star1 dec (degrees)

  • col 9 Star2 name (if a separation is being measured, otherwise ignored) (sometimes reads 'mag' if the next entry is a magnitude)

  • col 10 Star2 ra (degrees) (if a separation is being measured, otherwise ignored)

  • col 11 Star2 dec (degrees) (if a separation is being measured, otherwise ignored)

  • col 12 Calculated separation angle (if a separation is being measured, otherwise ignored)

  • col 13 Calculated roll angle (if a separation is being measured, otherwise ignored)

  • col 14 Observation type (text). This is usually the event name if the operator has flagged an event. A separation in this case.

  • col 15 Observation type (numeric). A code for the event type for later sorting.

  • col 16 scope ra (degrees) Estimated ra of the current pointing. May have software biases added.

  • col 17 scope dec (degrees) Estimated dec of the current pointing. May have software biases added.

  • col 18 scope alt (degrees) Estimated alt of the current pointing. May have software biases added.

  • col 19 scope az (degrees) Estimated az of the current pointing. May have software biases added.

  • col 20 Raw altitude encoder reading (degrees)

  • col 21 Raw az encoder reading (degrees)

  • col 22 Current pitch angle (degrees) (double that of the pitch mirror angle due to the reflection).

  • col 23 Initial pitch angle (degrees)

  • col 24 Effective separation angle (degrees) (current pitch - initial pitch) (calculated on-the-fly because of its simplicity)

  • col 25 Separation error (degrees) (measured - calculated) (calculated on-the-fly because of its simplicity)

  • col 26 Current roll (degrees) on-the-sky, zenith referenced, limited to +/- 180 degrees

  • col 27 Full roll = current roll (degrees) of roll axis rotation, unlimited angle

  • col 28 Vane position (degrees)

  • col 29 Calculated altitude of star1 (degrees), exo-atmospheric (refraction ignored)

  • col 30 Calculated azimuth of star1 (degrees)

  • col 31 Calculated altitude of star2 (degrees), exo-atmospheric (refraction ignored) (entry ignored if no star2)

  • col 32 Calculated azimuth of star2 (degrees) (entry ignored if no star2)

  • col 33 Vane status for the direct FOV (i.e. open, closed, solar filter)

  • col 34 Vane status for the pitch FOV

  • col 35 Tracking mode (target, static_hold, stopped, Az180 fixed, track_current position, home all, roll stow, to stow)

  • col 36 Altitude software correction (if enabled) (degrees)

  • col 37 Azimuth software correction (if enabled) (degrees)

  • col 38 Refraction software correction (never enabled) (degrees)

  • col 39 raw encoder counts (altitude)

  • col 40 raw encoder counts (azimuth)

  • col 41 raw encoder counts (pitch)

  • col 42 raw encoder counts (roll)

  • col 43 (vane) stepper counts

  • col 44 D-to-A drive voltage counts for altitude motor

  • col 45 D-to-A drive voltage counts for azimuth motor

  • col 46 D-to-A drive voltage counts for pitch motor

  • col 47 D-to-A drive voltage counts for roll motor

  • col 48 D-to-A drive voltage counts for vane motor

  • col 39 Alignment LED state (0,1) (on/off)

  • col 50 Scope amperes drawn

  • col 51 Power supply voltage

  • col 52 Quote mark for software compatibility


During this particular ten minute interval on July 17, 2021 the scope axes moved in the following way to obtain the separation measurement:

This tylog data file, as a text file, can be found here.

Like all software, the scope code was a work in progress. The exact data formats evolved as I grew more familiar with the instrument and the project. Early log files had fewer entries, or separate header files, but the basic data remained the same. The formats stabilized by the time I started the big push in early 2021.

The zipped tylog text files can be found here (200 MB), and the zipped text eventlogs here (4 MB).


Table of Contents Previous Page Next Page