Configuring The Sequence - ac4lt/autonomous-nina-sequence GitHub Wiki

There are two global constants that must be defined for the sequence to work properly. These are named THIS_OBSERVATORY and RUN_CONTINUOUSLY. They are defined on the Sequencer Powerups page in NINA.

Set THIS_OBSERVATORY to the integer you have chosen for your rig. The sequence comes from the repository with six predefined observatories so choose a number larger than that for your setup. Note that although the sequence defines the observatory names as constants (e.g. the constant SRO_PW14 is defined as 1 and DSOC_CERAVOLO is defined as 2), you can only use those constant names in the sequence. In the Sequencer Powerups configuration screen you must use the integer value (so 7 and not MY_SETUP assuming that's the constant you define in the sequence).

If you want the sequence to run forever so long as unfinished targets exist in the Target Scheduler database, set RUN_CONTINUOUSLY to 1. If you want the sequence to run one night and then stop, set it to 0.

Variables and Constants

By convention, constants have uppercase names (e.g. THIS_OBSERVATORY) and variables have lowercase names (e.g. get_darks). Variables have an initial value which is set the first time the Define Variable instruction is executed by the sequencer. The also have a current value. This current value can be changed at any time in a running sequence and this is how darks are requested by the user.

Observatory-specific Instructions

The THIS_OBSERVATORY constant is used to identify which set of equipment the sequence should power on and power off. For example, here is an example for the pre-defined SRO_PW14 observatory:

Here are the general groups of variables you need to set for your observatory:

  • desired_camera_temperature

This is the temperature to which you want your camera cooled.

  • get_(bb|nb)bin(1|2)(darks|bias)

Set these variable to 1 to instruct the sequence to take the darks or biases and 0 to not take them. The naming convention is

  • bb is intended as a dark or bias for a broadband sub
  • nb is intended as a dark or bias for a narrowband sub
  • bin1 or bin2 is for camera binning
  • bias or dark is for the type of calibration frame

Here's how to interpret one: get_nb_bin1_darks is the variable to enable or disable darks intended for bin1 narrowband lights

  • get_xx_flat_darks

If you are using flat darks (matched dark length frames to your flat exposure length instead of bias) then you can set any of these to 1 to enable getting flat darks. The naming convention is the first letter of the filter name followed by a number to indicate the binning. For example, get_o1_flat_darks is the variable to enable or disable flat darks for bin1 O-III.

  • (bb|nb)_bin(1|2)_gain
  • (bb|nb)_bin(1|2)_offset

These variables are used to set the gain and offset for CMOS cameras when getting darks and biases. The are named in the same manner as the variable to enable or disable darks or biases so bb_bin2_gain is the variable for setting the gain for getting the broadband bin2 darks.

If you are using a camera with fixed gain and offset then you may omit these variables.

  • has_flat_panel_cover

Set this to 1 if your rig has a device like a flip-flat that can open and close. Set it to 0 if you do not.

  • in_shared_observatory

Set this to 1 if you are in an observatory where you do not control the roof directly. Set it to 0 if you do control the roof.

Roof Status

If you are in an observatory where you control the roof then you probably have an ASCOM Dome driver configured in NINA. The Sequencer Powerups plugin will provide us with the roof status with the RoofStatus variable. However, if your roof is controlled outside of NINA (the normal condition if you are in a shared observatory) or you don't actually have a roof because you aren't in an observatory then you need to point Sequencer Powerups at a Roof Status file. Most shared observatories provide a file that contains the current roof status. Sequencer Powerups can read that file and pass the info on to the sequence. If you aren't in an observatory then make a file that contains the single word "OPEN" and set Sequencer Powerups to look for "OPEN" and it will report that the "roof" is always open.

Scripts

The sequence expects three external scripts to exist. These are used to do things that currently aren't possible to do within NINA. The sequence expects them to exist but they need not actually do anything. The release zip file for the sequence contains scripts you can use. The startup and shutdown scripts contain a single comment and may be used as is. The SendToDiscord script needs to have a Discord webhook URL added to work. You can configure a webhook from within Discord (or have your server admin provide you with the hook).

startup.bat

This script is called from the "power on" template. This is called after any observatory-specific activities happen. It can be used to turn power on if there isn't an ASCOM switch driver available. For those with 10Micron mounts it can "pulse" the mount to turn it on. Any power on related activities that can't be done from within NINA but can be accomplished from a Windows batch file can be done here.

shutdown.bat

This is called from the "power off" container in the main sequence. It is called after the sequence disconnects from all the equipment (except for Switch, Observing Conditions and Safety Monitor) and after any observatory-specific NINA sequence happens. It can be used to turn off power when there is no ASCOM switch driver available. Users of 10micron mounts can use it to "pulse" the mount to turn it off. As with startup, any power off related activities that can't be done from NINA but can be done from a Windows batch file can be done here.

SendToDiscord.bat

Although the Discord Alert plugin is a convenient way to send Discord messages from within NINA, it can't send formatted messages that show the state of the sequence, particularly the value of Sequencer Powerups variables. This script is used in those cases where the Discord Alert plugin cant' be used. If you plan to use it, then you need to supply a Discord webhook URL in the script. If you don't plan to use Discord then you can comment out the command in the script and the sequence will run without error (although also without any Discord notifications).