Skip to content

Observing Plan Syntax

Objectives

After evaluation of pros and cons, we decided to introduce new file format for observation plans, which will be used by the new (2022+) OCM observatory software. As, in some simplification, observations plan is a sequence of command, the format of Observations Plan file is basically a syntax of kind of programming language. because we want the new format to be human-readable, -editable and -manageable, we decide to introduce new language instead of using e.g. JSON syntax. New format should be somehow similar to ols obsplan files for the IRIS and V16 telescopes and in general to be readable and understandable by astronomers without need to RTFM (read the fantastic manual).

We want to keep the syntax well-defined and intuitively but uniquely transformable to python dictionary object (and therefore to JSON, YAML etc.). Moreover, we want to provide any developers with python package for parsing anf formatting those files.

Introduction

We want the new language to act as internal language of the software, so the simplest form is just single command to be executed rather than full-fledged observation plan. E.g. we want following text to be proper "program":

  WAIT ut=23:02:23
or, a bit more complicated single command
  OBJECT HD193901 20:23:35.8 -21:22:14.0 seq=5/Ic/60,5/V/70
Both of single command lines are understandable for OCM astronomers (wait for UT 23:02:23, make photos of object HD193901 and ra/dec coordinates 20:23:35.8 -21:22:14.0 five times for 60 seconds with filter Ic and five times for 70 seconds with filter V). Syntactical break down of the last command goes as follows: * command: OBJECT * positional arguments (later Args): HD193901, 20:23:35.8, -21:22:14.0 - some from the tail may be optional * keyword arguments (later Kwargs): argument named sequence of value 5/I/60,5/V/70. all keyword arguments can be optional

Sequences

Sequence is a number of commands each written in unique, single line e.g:

WAIT ut=16:00:00
ZERO seq=15/Ic/0
DARK ZZ01 seq=10/V/300,10/Ic/200
DOMEFLAT AL2 seq=7/V/20,7/u/20
DOMEFLAT AL3 seq=10/i/100
SKYFLAT HD23 alt=60.0 az=270.0 seq=10/r/20,10/V/30
SKYFLAT HD24 seq=10/g/a,10/V/a
WAIT sec=600
FOCUS NG31 12:12:12 20:20:20
OBJECT HD193901 20:23:35.8 -21:22:14.0 seq=1/V/300
OBJECT FF_Aql 18:58:14.75 17:21:39.29 seq=5/Ic/60,5/V/70
OBJECT V496_Aql 19:08:20.77 -07:26:15.89 seq=1/V/20

Syntax Details

Commands

OBJECT

  • Description: Main observing plan command. If ra, dec or alt, az is not given, but seq is given, program will do seq in actual telescope position. This command is possible to dithering in option.
  • Default: Coordinates epoch is J2000.0, dome is follow telescope, mirror covers are not opening/closing, dome cover is not opening/closing, dithering is OFF, tracking is ON.
  • Args: object_name, ra, dec
  • Kwargs: seq, az, alt, tracking, dither, dome_follow, focus_offset, mirror_cover, epoch, read_mod, test, observer, uobi, sciprog, pi
  • Syntax: OBJECT [object_name] [optional: ra] [optional: dec] [optional: kwargs]
  • Example: OBJECT FF_Aql 18:58:14.75 17:21:39.29 seq=5/Ic/60,5/V/70 dome_follow=off

SKYFLAT

  • Description: Morning / evening sky flats command. If ra, dec or alt, az is not given, but seq is given, program will do seq in actual telescope position.
  • Default: Coordinates epoch is J2000.0, dome is follow telescope, mirror covers are not opening/closing, dome cover is not opening/closing, dithering is ON (see dither kwarg), tracking is ON.
  • Args: object_name, ra, dec
  • Kwargs: seq, az, alt, tracking, dither, dome_follow, focus_offset, mirror_cover, epoch, read_mod, test, observer, uobi, sciprog, pi
  • Syntax: SKYFLAT [optional: object_name] [optional: ra] [optional: dec] [optional: kwargs]
  • Example: SKYFLAT Z022 18:58:14.75 17:21:39.29 seq=5/Ic/5,5/V/a

Note

Please notice about SKYFLAT auto exposure option - see seq.

DOMEFLAT

  • Description: Dome flat command. The command get dome position and screen position from settings.
  • Default: Mirror covers are not opening/closing, dome cover is not opening/closing, screen ligth is not on/off, tracking is OFF.
  • Args: object_name
  • Kwargs: seq, screen_light, mirror_cover, read_mod, focus_offset, test, observer, uobi, sciprog, pi
  • Syntax: DOMEFLAT [optional: object_name] [optional: kwargs]
  • Example: DOMEFLAT W1 seq=5/Ic/5,5/V/5 screen_light=auto

FOCUS

  • Description: Focusing command. If ra, dec or alt, az is not given, but seq it is, program will do seq in actual telescope position.
  • Default: Coordinates epoch is J2000.0, dome is follows telescope, mirror covers are not opening/closing, dome cover is not opening/closing, tracking is ON.
  • Args: object_name, ra, dec
  • Kwargs: seq,az, alt, pos, auto_focus, tracking, focus_offset, dome_follow, mirror_cover, read_mod, test, epoch, observer, uobi
  • Syntax: FOCUS [optional: object_name] [optional: ra] [optional: dec] [pos] [seq] [optional: kwargs]
  • Example: FOCUS RR1 18:58:14.75 17:21:39.29 pos=15200/100 seq=5/Ic/3 auto_focus=on

DARK

  • Description: This command is executing dark exposures.
  • Default: Mirror covers are not opening/closing, dome cover is not opening/closing.
  • Args: object_name
  • Kwargs: seq, mirror_cover, read_mod, test, focus_offset, observer, uobi, sciprog, pi
  • Syntax: DARK [optional: object_name] [optional: kwargs]
  • Example: DARK FF_Aql22 seq=5/Ic/60,5/V/70

ZERO

  • Description: This command is executing zero exposures.
  • Default: Mirror covers are not opening/closing, dome cover is not opening/closing.
  • Args: object_name
  • Kwargs: seq, mirror_cover, read_mod, test, focus_offset, observer, uobi, sciprog, pi
  • Syntax: ZERO [optional: object_name] [optional: kwargs]
  • Example: ZERO FF_Aql22 seq=5/Ic/0,5/V/0 mirror_cover=close

SNAP

  • Description: Command snap behaves like OBJECT with difference that exposure is not saved to data storage. Snap image is always one and is saved locally. Use this command for tests. If ra, dec or alt, az is not given, but seq it is, program will do seq in actual telescope position. This command is possible to dithering.
  • Default: Coordinates epoch is J2000.0, dome is follow telescope, mirror covers are not opening/closing, dome cover is not opening/closing, dithering is OFF, tracking is ON.
  • Args: object_name, ra, dec
  • Kwargs: seq, az, alt, tracking, dither, dome_follow, focus_offset, mirror_cover, epoch, read_mod, test, observer, uobi, sciprog, pi
  • Syntax: SNAP [optional: object_name] [optional: ra] [optional: dec] [optional: kwargs]
  • Example: SNAP FF_Aql 18:58:14.75 17:21:39.29 seq=1/Ic/60 dome_follow=off

STOP

  • Description: This command is stops program execution.
  • Kwargs: observer, uobi
  • Syntax: STOP [optional: kwargs]
  • Example: STOP

WAIT

  • Description: This command is waits for time event.
  • Kwargs: sec,ut, sunrise, sunset, observer, uobi
  • Syntax: WAIT [kwargs]
  • Example: WAIT ut=22:23:33

Args

object_name

  • Description: This field is identifying object and is saved to fits header.
  • Syntax: [object name text without space]
  • Example: FF_Aql

Note

In the future it will be used to get the object coordinates.

ra

  • Description: Right ascension coordinate, use only together with dec, put it in hour angle.
  • Syntax: [right ascension in hour angle]
  • Range: [00:00:00, 23:59:59.99]
  • Example: 18:58:14.75

Warning

Do not use together with lt, az kwargs.

dec

  • Description: Declination coordinate, use only together with ra, put it in sexagesimal.
  • Syntax: [declination in degrees sexagesimal]
  • Range: [-90:00:00, 90:00:00]
  • Example: -17:21:39.29

Warning

Do not use together with alt, az kwargs.

Kwargs

seq

  • Description: Sequence of sub-exposures with designated filters. Filter names must match with available filters in filter wheel. Time of sub-exposure is set in seconds. Sky flats auto exposure option: to avoid manual SKYFLATS exposure calculation, set "a" option instead exposure time in seq (example: seq=5/r/a,5/V/a). The SKYFLAT command will wait to the proper light conditions to do exposures and will end if conditions will be not satisfying anymore. How it works: exposure procedure is starting but image is not taken -> camera is making short exposures (like 1s) and calculate mean (doing that many times if necessary) -> if mean reach set parameters camera making image normal way but with exposure time calculated from measure -> procedure starts again on another image. Sequence multiplier: to avoid putting same sequences in one command like seq=1/V/1,1/r/1,1/V/1,1/r/1 there is possibility to use syntax seq=2x(1/V/1,1/r/1).
  • Syntax: seq=[number of subexposures 1]/[filter name 1]/[time of subexposures 1],[number of subexposures 2]/[filter name 2]/[time of subexposures 2],...
  • Syntax OPTION: seq=[number of subexposures 1]/[filter name 1]/a,...
  • Syntax OPTION: seq=[number of repetitions]x([number of subexposures 1]/[filter name 1]/[time of subexposures 1],...)
  • Example: seq=10/Ic/20,10/V/30,5/V/50

alt

  • Description: Telescope altitude, use only together with az kwarg, put it in degrees.
  • Syntax: alt=[altitude in degrees]
  • Range: [0, 90]
  • Example: alt=75.0

Warning

Do not use together with ra, dec args.

az

  • Description: Telescope azimuth, use only together with alt kwarg, put it in degrees.
  • Syntax: alt=[azimuth in degrees]
  • Range: [0, 360]
  • Example: az=182.3

Warning

Do not use together with ra, dec args.

tracking

  • Description: This kwarg is overwriting default tracking on/off.
  • Syntax: tracking=[values]
  • Values: [on, off]
  • Example: tracking=off

dome_follow

  • Description: This kwarg is overwriting default dome following telescope position. If off the dome will not follow the telescope position.
  • Syntax: dome_follow=[values]
  • Values: [off]
  • Example: dome_follow=off

mirror_cover

  • Description: This kwarg is operating mirror covers, which are OFF by default for safety reasons. The auto value is opening covers on begin or closing on begin (for dark/zero) if necessary but not closing at end. The open value opens at the beginning. The close value is closing at the end and on the beginning (for dark/zero).
  • Syntax: mirror_cover=[values]
  • Values: [auto, open, close]
  • Example: mirror_cover=close

screen_light

  • Description: This kwarg is operating dome screen light and it is OFF by default. The auto value is turning on screen light at the beginning and turning the light off at the end, on is turning the light at the beginning and off is turning the light off at the end. This kwarg is working only with DOMEFLAT.
  • Syntax: screen_light=[values]
  • Values: [auto, on, off]
  • Example: screen_light=on

dither

  • Description: This kwarg is operating dithering option. 'Dither mode' is the way how dithering works, for example 'basic' mode do random movement +/-'dithering distance' in both ra and dec direction. 'Dithering distance' value is the maximum step given in minutes coordinate. 'Dithering every exposure' value is describing how often dithering will happen (value 1 mean that dithering is working on every exposure, value 2 mean dithering is working on first, third, fifth exposure). Syntax OPTION: dither=off - turning off the dithering.
  • Syntax: dither=[dither mode]/['dithering every exposure' in integer]/['dithering distance' in minutes float]
  • Syntax OPTION: dither=off
  • Values: dither mode = [basic]
  • Example: dither=basic/2/1

Note

In future there will be more 'Dither mode' added.

epoch

  • Description: This kwarg is operating ra, dec coordinate epoch.
  • Syntax: epoch=[epoch]
  • Values: epoch = [..., 1975, 2000, 2025, 2050, ...]
  • Example: epoch=2025

read_mod

  • Description: This kwarg is operating camera readout mode.
  • Syntax: read_mod=[mode]
  • Values: mode = [0, 1, 2, 3, ...]
  • Example: read_mod=2

test

  • Description: This kwarg is set exposure as test (no processing by pipeline). If 0 or kwarg not put - test mode OFF, if kwarg 1 then test ON.
  • Syntax: test=[val]
  • Values: val = [0, 1]
  • Example: test=1

pos

  • Description: This kwarg is operating focusing procedure. 'Focusing target' is approximately focusing target. 'Focusing step' is step value used to create focusing curve. For example pos=15700/100 value will create focuser steps [15500, 15600, 15700, 15800, 15900].
  • Syntax: pos=['focusing target' in integer]/['focusing step' in integer]
  • Example: pos=15700/100

auto_focus

  • Description: This kwarg is operating focusing. With pos kwarg is composing automatically focusing procedure. Sentence auto_focus=off is equal to not mention this kwarg at all.
  • Syntax: auto_focus=[on, off]
  • Example: auto_focus=on

focus_offset

  • Description: This kwarg is operating filter focus offset. The values of filter offsets are taken from general config. Sentence focus_offset=off is equal to not mention this kwarg at all.
  • Syntax: focus_offset=[on, off]
  • Example: focus_offset=on

sec

  • Description: This kwarg is specifying how many second program will wait.
  • Syntax: sec=[seconds float]
  • Example: sec=320.0

ut

  • Description: This kwarg is specifying UT time to wait.
  • Syntax: ut=[UT time]
  • Example: ut=0:03:23

sunrise

  • Description: This kwarg is specifying sunrise position to wait.
  • Syntax: sunrise=[float sun alt position]
  • Example: sunrise=-8

sunset

  • Description: This kwarg is specifying sunset position to wait.
  • Syntax: sunset=[float sun alt position]
  • Example: sunset=-18

uobi

  • Description: This kwarg is identification number used by software.
  • Syntax: uobi=[integer number]
  • Example: uobi=12222351

pi

  • Description: This kwarg is name of the Principal Investigator.
  • Syntax: pi=[string without space]
  • Example: pi=jkowalski

sciprog

  • Description: This kwarg is name of the science program.
  • Syntax: sciprog=[string without space]
  • Example: sciprog=deb_sbcr

observer

  • Description: This kwarg is specifying observers name that will be added to fits header.
  • Syntax: observer=[observers name]
  • Example: observer=JonArt_MikeSmith_AnnR

Note

Please don't use space in observers name.

Comments

We will use "line comments" indicated by the hash # sign. Parser will ignore # and anything which follows it to the end of the line.

Note

Please use space after # (example: # OBJECT seq=3/r/5).

Automatic planning with TPG

Telescope Plan Generator (TPG) is a module of TOI that is responsible for generating the plan automatically for WK06, ZB08, and in the future for JK15. It proved extremely useful for scheduling observations of eclipsing binaries and other variable stars that require dance phase coverage.

Detailed description of TPG's features is available in the GitHub repository.