Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Target Scheduler Container

The primary instruction associated with the plugin is Target Scheduler Container. This instruction replaces the Deep Sky Object Instruction Set container that you would typically use as the parent for your imaging instructions and triggers. Triggers can be added to it as needed and should interact with the plugin as expected - for example various autofocus triggers, meridian flip, center after drift, etc. See below for more information on triggers.

You can have a parent container (e.g. Sequential Instruction Set container) and add Target Scheduler Container to it. This parent container may have loop conditions and/or triggers to handle safety and other global concerns. Containers above Target Scheduler Container in the sequence hierarchy may need to use the Target Scheduler Condition loop condition to break out in certain scenarios.

See the technical details for more information.

Interface

The following shows a Target Scheduler Container instruction after adding to a sequence but before the sequence is running.

It consists of three main areas:

  1. Target Details. When the planner returns a target to image, the details - including the nighttime/altitude chart - will be displayed here.
  2. Plan Progress. Each plan returned by the planner will generate an expandable section here containing details on what is happening and what has been completed.
  3. Custom Triggers/Instructions. Expand Custom Event Containers to get access to the Triggers and other event-based instruction containers. Drag/drop other NINA sequence items to those areas as needed.

Triggers

Sequence triggers are generally used to either invoke some operation or interrupt execution based on the state of the software and the attached equipment. Unlike the DSO Instruction Set container which has a fixed target for the duration of an imaging session, the Target Scheduler Container may get a new target each time it calls the Planning Engine. This poses challenges when using triggers that depend on knowing the coordinates of the current target:

  • During a Wait period, the target has default coordinates of RA 0 and Dec 0.
  • When the planner returns a new target the coordinates are updated to reflect that target.

Any triggers placed under Target Scheduler Container should be thoroughly tested before unattended operation. In general, it’s not necessary (and perhaps incorrect) to put any of the core NINA triggers inside this triggers container. Triggers added by other plugins may need to be placed here but you’re on your own.

In releases prior to 4.0.5.0, it was necessary to place the Center After Drift trigger into the Triggers list inside Target Scheduler Container so that it could follow the current target. However, the code will now recognize a Center After Drift trigger placed into the same container that holds Target Scheduler Container and automatically update it when the target changes. This provides a much better user experience since the trigger display updates properly.

Custom Event Instructions

Five areas are provided to drag/drop sequence instructions for execution at specific times during planner operation:

  • Before Wait: run before each wait operation. For example, park the mount.
  • After Wait: run after each wait operation. For example, unpark the mount.
  • Before New Target: run before each new or changed target begins imaging. Instructions here will be run after a slew/center so that items like autofocus can be performed pointing at the target.
  • After New Target: run after each new or changed target completes imaging or is interrupted.
  • After Each Target: run after every target plan, regardless of whether it’s new or not. An important use case of this is with the Target Scheduler Immediate Flats instruction.

Expand the individual containers to add items and then drag/drop instructions to the drop area as usual. In general, any NINA instruction can be added but you should always test before unattended operation.

Note that the Before/After New Target instructions will only be executed when the target is new or changed from the previous plan. Returning to the same target is a common occurrence since the planner will often select the same target if nothing else is available.

If you’re running synchronized, these containers will run only on the server, not clients.

A timeline shows precisely when the event containers will be executed:

Coordinates Injection

Some core NINA instructions assume that they can inherit target coordinates from the surrounding context - for example a parent DSO Container. Since targets are dynamic with Target Scheduler, we have to take steps to inject the current target coordinates into those instructions if running as part of a custom event container. For the Before New Target, After New Target, and After Each Target containers, the following instructions (if found) will have this behavior:

  • Slew To Ra/Dec
  • Slew and center
  • Slew, center and rotate

In general, you shouldn’t have to add these instructions to an event container since Target Scheduler usually handles all target slewing for you. However, when using Target Scheduler Immediate Flats with a wall panel flat device, you probably need Slew To Ra/Dec to return to the current target when the flats are complete.

Custom Instruction Dos and Don’ts

  • You can elect to use Park Scope in Begin Wait and Unpark Scope in After Wait. If you do so, you should set the Park on Wait preference to false. However, the benefit of using the preference is that it will skip the park/unpark if the wait period is less than a minute. In contrast, doing this in Before/After Wait would park/unpark even for a five second wait.
  • There is no need to add instructions to stop tracking or guiding at the start of a wait - that will be done automatically and will also restart when the next target begins.
  • You should not add any instructions to take exposures. Doing so would confuse the scheduler mechanism used to watch images as they progress through the regular NINA image pipeline.
  • You should not add instructions in response to safety interrupts (park/unpark, close/open RoR, etc). Instead, you should handle that logic in the regular safety portions of your sequence.
  • You can conceivably add other containers (e.g. Sequential or Parallel Instruction Set) but this has not been extensively tested.
  • If you use instructions added by other plugins, you should test extensively.

Validation

Target Scheduler Container will perform the usual sequence validation checks on any triggers and instructions added to the custom event containers. If validation fails, the standard validation error marker will be displayed and the reason is available by mousing over the offending instruction. Be aware that Target Scheduler Container will be skipped entirely if validation errors remain when the sequence reaches that point.

Instruction User Interface

The Target Scheduler Container interface in the advanced sequencer is similar to the core Deep Sky Object Instruction Set container - the main difference being that the target coordinates and altitude chart will update dynamically as the Planning Engine returns new targets.

Before imaging begins, these elements will be empty. When the instruction starts, the Planning Engine will be called and (if a target was selected), the elements will update to reflect that target.

In addition, the area below the chart will have a panel detailing the individual NINA instructions executed to implement the plan. Each time the Planning Engine returns a new target to image, a new expandable line will be added. This history will be retained for viewing until the sequence is reset. It is not saved when you save a sequence file.