N.I.N.A. My Advanced Sequence

This is a walk-through in N.I.N.A. using My Advanced Sequence as it is configured today. I seem to always be tweaking and trying to improve on stability and automation. In this version, I am really happy with the results I am getting, with very few errors, very good handling of environmental conditions, such as clouds interfering with guiding, deviations in HFR and automated refocusing due to temperature variances and/or seeing conditions, deltas in alignment greater than threshold with automated plate solving and re-alignment on the target. I’ve even automated my calibration frames so I can just have coffee in the mornings and sometimes get a little bit extra sleep!

What is N.I.N.A.?

I understand that the idea of astrophotography sequencing may be new to some readers. I’d like to spend a brief time on introducing this. There are many different astronomy and astrophotography applications which can assist us in managing our equipment, finding our targets, capturing images, managing our image files, and many other tasks that we may do regularly as part of our astronomy/astrophotography workflows. I’d like to mention some of my favorites and this is not an exhaustive list.

  • N.I.N.A. (Nighttime Imaging ‘N’ Astronomy) Is an open source, freely available, suite of astrophotography imaging tools.
  • SharpCap Has both free and paid versions and is an easy to use set of astrophotography imaging tools. I especially enjoy SharpCap for Solar System imaging but know many who use it for Deep Sky Object imaging with incredible results.
  • Stellarium is a free and open source planetarium program which allows you to view the night sky and plan observations sessions. It integrates with other astrophotography suite applications for use in target acquisition.
  • KStars/Ekos A feature rich planetarium and capture suite which is freely available and open source. This is most notably found within the StellarMate, a cross-platform astrophotography suite for Windows, MacOS, and Linux

N.I.N.A., specifically, is a freely available suite of astrophotography imaging tools. It is comprised of several modules to aid in equipment management and control, target planning, framing, imaging, and implements a plugin architecture which allows it to be extended by other open source developers. It is really incredibly full featured, potentially to the extent that for new users it can be a bit daunting to ramp up into comfortable use. But like any other software application, some time spent with documentation, in the N.I.N.A. Discord, and working with the software, the learning curve is definitely manageable and fun to get in to.

N.I.N.A. Advanced Sequencer

Ok, so by the heading of this section, we can surmise that we are leaving the introductory phase of N.I.N.A. and into a bit more advanced topic. I welcome you to comment below if you have any questions and would be more than happy to assist your or point you in the direction of information that might help you find information you are looking for. This article is not going to get into the specific details of the N.I.N.A. Advances sequencer, that is much better done from the official documentation (link below). What this article intends to do is provide details into my own Advanced Sequence and describe in details how I have the sequence organized and configured to meet the needs of my own astrophotography sessions. I hope that through this I can help provide you with some ideas that might help you in creating or modifying your own advanced sequence. As always, if you have suggestions on how I might approach things differently or improve on processes, please comment below!

AstroAF – How To Automate Your Astrophotography with NINA

The Advanced Sequencer is a module which allows you to plan an imaging session step-by-step in a very controlled and granular way. Each step can be controlled with instructions and customized with parameters, event triggers, conditions and processes. I do suggest that if you are not familiar with the Advanced Sequencer in N.I.N.A. that you go have a look through their Advanced Sequencer Documentation.

My Sequence Organization

In my advanced sequence I have a high-level process outline that consists of the following:

  1. Startup Sequence Process
  2. Sequential Imaging And Flats Instruction Set
  3. Sequence End Process

Each one of these sequence sections provides process instructions that are relevant to their title, e.g. Startup Sequence Process is the organization and configuration of startup steps to prepare for imaging. I will get in to details of each section of the sequence.

Startup Sequence Process

Startup Sequence Process

In my Sequence Startup I have 3 tasks which include: Wait for Time, Robocopy Start, and Send to Pushover. These instructions setup my sequence start conditions and do some configuration for a couple of tasks.

Wait for Time Options

The Wait for Time instruction defines parameters for when the sequence should begin. This allows me to start a sequence at any time and schedule it to run at a given configuration. The sequence will be queued up and remain in a waiting state until the Wait for Time configuration is met. In this case, I have configured Nautical Dark with an offset of 15 minutes. So, no matter what the actual time of day is, the instruction is based off of the time calculated for Nautical Dark of that particular day. The offset tells the instruction to begin 15 minutes prior to Nautical Dark so that I can get through the various steps prior to imaging by the time we actually reach Nautical Dark. There are a series of time options to choose from within the Source dropdown list. You can configure this however best meets your own needs for starting your imaging sequence.

Robocopy Start: Robocopy is a file and directory replication tool provided with all Windows installations. Robocopy can be configured to continuously monitor a source folder for changes and then replicate the folder contents automatically. The Robocopy Start instructions initializes Robocopy to begin monitoring the source directory for changes. When it detects that the file contents have changed, it will replicate the changes to the destination directory.

Robocopy Start Configuration

In my case, I have my source directory configured to the location on my astrophotography MiniPC to the directory where N.I.N.A. stores the images transferred in from my camera. My destination directory is a network location that I have configured to replicate the image files to my processing MacBook. Facilitating the use of Robocopy requires the installation of the Remote Copy plugin into N.I.N.A. and is available from the Plugins module within N.I.N.A. I have a video on setting up this configuration:

Mac And MeLe Q3 Mini Astro PC Network Folder Share

The Send to Pushover instruction sends me an automated notification, in this case I have it configured to send me a notification to the Pushover application. This is facilitated through a plugin which is installed via the Plugins module in N.I.N.A. called Ground Station. This plugin gives you several options of sending out notifications from your N.I.N.A. sequence, including SMS, email, IFTTT, text to voice, and Telegram services. The Pushover app is installed on my iPhone and I setup my account with an API key obtained from Pushover so that I can configure and connect the plugin from within N.i.N.A. I am using a personal tier account with Pushover, currently a $5 one-time license purchase with no subscription required.

Sequential Imaging And Flats Instruction Set

Target: This section of the advanced sequence is the meat and potatoes of the entire sequence process. There is a lot going on in here and I will break it down into sections for you. At the top of this sequence section is the Target Instruction, which provides the information needed about the intended target, e.g. the target name, camera framing rotation degrees, target RA and DEC coordinates, and a graph which will allow you to see the target transit times and degrees, along with comparison to the current Moon transit. The way I use this from my template is to replace the target in the template with the one I setup in the Framing Assistant or from the Sky Atlas.

Sequential Imaging And Flats Instruction Set

Exposure Information: Below the Target information box there is an exposure information block which will provide summary information including the number of exposures taken for the target, filter used, exposure time, type of exposure, binning, gain, offset, and ROI.

Triggers: In the Triggers section are defined a series of event triggers that are performed when certain conditions are met. In my case, I have my Meridian Flip configured here. When the sequence is actively in progress, the Meridian Flip trigger will provide the time until flip information and the Meridian Flip will be executed when that time is reached. It provides a range of time, so that it will not interrupt an exposure, instead it will wait until an exposure has completed when within the time range and then interrupt the next start of image exposure in order to perform the Meridian Flip.
The next trigger in this set is Center After Drift. This performs a quick plate solve on each image (as I have it configured after every 1 exposure) when it completes and checks the alignment delta of the current image with the target coordinates. This check runs in parallel with the image exposures and does not take any time away from image capture. If the delta is greater than the configured amount, it will halt the next exposure and perform an alignment before again proceeding with next exposure. This trigger can be configured with a threshold that will cause the trigger to fire. If the image solver evaluates the alignment to be outside of this threshold then the trigger will run the alignment process.
Restore Guiding trigger detects if guiding has lost a star or was interrupted for any other reason. If that is the case then the trigger will attempt to restore guiding by communicating with PHD2 and re-initializing the guiding process. This is very useful for when clouds roll in and out and guiding was interrupted due to these conditions.
Failures to Pushover sends an error notification here that alerts me to the error condition encountered in the session. We can set different priorities/severities here, in this case I am using Emergency. This will generate an audible sound on my computer and send me a notification that is highlighted in red.

Loop Conditions

I do not define any loop conditions at this point in the Sequential Imaging And Flats Instruction Set.

Instructions

In this block I begin performing telescope (Rig) setup instructions. This begins with my Equipment Checks block that provides instructions to Unpark the Scope, Set the Tracking Rate, in this case Sidereal, and begin Cool Camera.

Setup Rig Instructions

Notable configurations in this instruction set are the Set Tracking, where you care able to configure the mount’s tracking rate appropriate for your target. Available options are included in a dropdown list within the instruction and include: Sidereal, King, Solar, Lunar, and Stopped.

The Cool Camera instruction will start your camera cooling and will halt progress of the sequence until the configure temperature, in Celsius is reached. Once the camera is cooled to the configured temperature, the sequence will progress into the next steps.

Target Start Conditions

In the Target Start Conditions block of the sequence there is an initial instruction that is an additional wait condition. In my system I have created a Custom Horizon file that N.I.N.A. uses to further define obstructions in my observing location. The discussion of creating a custom horizon file is outside of the scope of this article but would be a good topic for a future article. Let me know if you are interested in the comments!

Target Start Conditions


The Wait Until Above Horizon instruction will pause the sequence until the target is above the horizon that I have defined from my custom horizon file. You can see the Custom Horizon outline in the above image, it provides horizon information, such as trees, structures, etc.. When there is a present obstruction mapped on the target transit graph, it is used to determine if the target object is free of horizon obstructions. Once the target is free of any mapped obstructions, the sequence will continue.

Custom Horizon

Next we enter the Prepare Target instruction set where I set the Switch Filter, in this case to Luminance because I am preparing to perform plate solving in the Slew and Center command, which will instruct the mount to slew and center on the target coordinates and plate solve it to ensure alignment. Once alignment is solved, the Start Guiding instruction is run and calls out to PHD2 to begin guiding. If you wish, you can configure the Start Guiding instruction to force a calibration. In my case, this is disabled.

Mono Imaging Instruction Set

In the Mono Imaging Instruction Set I setup triggers and loop conditions which will manage the imaging session throughout the remainder of the sequence. It is the largest part of the sequence configuration but is pretty straight forward in what is going on. This area has been an experimental section for me as I am using the Sequencer Powerups plugin, installed through the plugin module. Sequencer Powerups is a very powerful plugin that allows us to implement various programmatic controls, expressions, constants, variables, and conditions into our sequence. In this case, I am using a set of constants to define key value pairs to use within my imaging exposures. This allows me to make changes for specific values, such as number of exposures and/or exposure time from the constant, rather than looking for it in the exposure command itself.

Mono Imaging Instruction Set

At the top of this instruction set I define an AF After HFR Increase trigger. If you noticed, I do not run an Autofocus process within my sequence because prior to beginning my sequence I have already run autofocus. If I was remote or needed to schedule a sequence when I was not going to be present during the sequence start, I would put an Autofocus instruction above in the Target Start Conditions block. AFAfter HFR Increase will automatically run an autofocus procedure if the HFR delta is greater than a defined threshold. In my case, I have that set to run autofocus if the HFR delta is greater than 10% after a sample size of 10 HFR samples.
I then set a Loop Condition to Loop Until Time. Like the Wait Until instructions, this provides the same list of options. In my case I am looping exposures until Astronomical Dawn with 0 offset. At this time in the sequence, the exposures will stop looping and will then continue on to next steps in the sequence.
Following the Loop Conditions, I drop into the Instructions for the exposures themselves. I setup the constants in the Constant/Variable Container and then use the Sequencer Powerups Smart Exposure + instructions for each exposure type and filter that I will be using for a night. I will manually disable exposures that I do not intend to take during the night. For example, if I am running an Ha/Oiii session, I will disable all of the LRGB exposures in the loop. IN each exposure, I am using the constant key names in the exposure configuration. For example, the key “NumExp” defines a constant value of 5, I am using that key in the Number of Exposures field of the Smart Exposure + instruction. Likewise, I am using “LumExp” for the exposure time of my Luminance Smart Exposure + instruction.
Also note that at the bottom of my Smart Exposures + I have a Dither instruction. I run dither at the end of each exposure loop which equates to running a dither every 5 images for each filter. This is a much more efficient way to dither than placing dither on each exposure instruction and can result in a nice increase of images captured vs time spent dithering.

Mono Imaging Loop End

When the Mono Imaging Instruction Set looping of exposures has completed, we then enter into the next section which is a waiting period prior to running calibration frames. In this section I send off a notification that the Imaging session has ended, stop guiding, park the scope, warm the camera, and then Wait For Time. In the case of the Wait For Time instruction, I have it configured to trigger at Sunrise with no offset, this is a good setting for me and the brightness conditions for my location. When the Wait For Time threshold is met, the sequence will continue.

Automated Setup For Flat Frames

Once the sequence continues at sunrise I cool the camera and send off another notification that the Flats calibration frames exposures have begun. I then unpark the scope and slew to the Zenith using the Slew To Alt/Az command. I configure this at 90 degree Alt and AZ configuration. I then provide individual Twilight Sky Flats within loop condition of this instruction set. As with the main imaging exposures, I disable Sky Flats exposures that I do not wish to use for the session, only enabling those that match what is in the main imaging loop.

End Sequence Process

Once the calibration frames instruction set completes, I then enter the end sequence process. The first thing I do is send myself a notification that the Flats frames have completed. Then, I enter my AF Sequence End set.

AF Sequence End

In this final instruction set, I perform the sequence end processes for shutdown. I park the scope from the sky flats position to home, I switch the filter back to Luminance so it is ready for me on the next night’s session autofocus and alignment, I then warm the camera and send the stop command to Robocopy with a wait before stop duration of 300 seconds. The wait before stop on Robocopy is to ensure that there has been enough time to replicate the last of the flat frames to the network drive. Finally, I send myself a notification that the sequence has completed.

Sum Up

So that was a lot of describing my Advanced Sequence configuration. I hope that it helped you to get a better understanding of your own advanced sequence setup and potentially some ideas on additional ways you can setup and configure your automation. As always, if you have any questions or suggestions for how I might improve my own sequence, please feel free to leave those below in the comments! I welcome your comments and any questions or suggestions you may have!

Here is my NINA AF Advanced Sequence Template, please feel free to download and adapt it to your own needs!
Cheers!
Doug

Leave a Reply

Your email address will not be published. Required fields are marked *