Tuesday, January 27, 2015

A freeware script generator for Nebulosity

After visiting a friend I decided to look into other image processing software packages. Some are more affordable than others, at least from my viewpoint.  I found that Nebulosity has a large number of fans. It comes from the same house that gives us PHD (for free!) and I downloaded the trial version.

I like how it works for the most part, but its image acquisition ability seems to me to be only average. I should clarify--it's not so much its capabilities as the interface. If you use a DSLR or a one-shot-color CCD, or your nightly imaging sessions tend to involve only one filter, the interface is perfectly fine.

If you use a monochrome CCD and multiple filters during a session it gets a little more complicated. You have the choice to use the GUI for each filter or a built-in script editor to program your filter sequence.
The script editor is helpful and easy to use. Some understanding of the commands will take you a long way.

What the Nebulosity script system lacks is a way to temporarily interrupt running scripts to perform other tasks such as refocusing when a filter is changed. The focusing tools provided by Nebulosity can only be accessed when a script is not being run. A running script can be aborted but you can't resume executing the script from the command at which it was aborted.

I've done some programming in the past, so I thought I'd try to build something that could make refocusing possible from within a script. The solution I adopted is to make use of Nebulosity's ability to listen to the Windows clipboard for commands--it's not an elegant solution, but it seems to work. I may or may not use this depending on what else I find available for image capture, but it was fun throwing it together!

The program is called (at the moment) NFeeder.

Here are some screen captures:

Script Editor tab of main screen (click to enlarge to actual size) 
The Script Editor is fairly simple. The usual stuff is defined: destination folder, object name prefix, the sequence of filters (including exposure time, binning, and number of frames to capture). Dark and Bias frames are considered as types of filters and can be chosen in the same way.

Filter wheel contents are defined using an editor:
Filterset editor
Repetitions of the filter sequence can be specified. If you want to refocus at appropriate times, that can be indicated. (Dark and Bias frames don't move the filter wheel or pause for refocusing.)

The generator parses the inputs and constructs a Nebulosity script, shown at right. You can edit this by hand if you want. The script can be saved and previously saved scripts can be loaded.

If you're not refocusing, you can save the script and run it from within Nebulosity just as it is. If you want the ability to refocus when the filter changes you need to move on to the Feeder tab:

Feeder tab of the main screen
The Feeder tab shows the same script that was created/edited on the Script Editor tab. NFeeder works like this:

  1. Start Nebulosity, connect to the camera and do whatever is best done within the Nebulosity interface: I prefer to set cooling and configure dithering from outside a script.
  2. Launch a stub script that puts Nebulosity into listening mode. The stub script can be created from this tab
  3. Start feeding a script to Nebulosity with the click of  a Start button. As it works NFeeder shows you which commands have been sent to Nebulosity. 
  4. When NFeeder reaches a point where refocusing should be done, it passes a command to Nebulosity to show a prompt dialog. Clicking cancel in the prompt dialog aborts the stub script and you're free to access Nebulosity's focusing tools.
  5. When you're done focusing, launch the stub again and click NFeeder's Resume button
  6. Repeat steps 3 and 4 until the session ends.
  7. Click Nebulosity's Abort button to end the stub.
This may sound complicated, but it's not. I've tried the program with a Canon DSLR and SBIG ST-8300M + 8-cell filter wheel, and it worked correctly.

Want to give it a try? Here's the download. The application files and installer were scanned by Avast antivirus. Your comments would be appreciated. Still on my to-complete list are the night vision mode and better help information.

Please keep in mind that I made this for fun for a very small group of people (i.e., mainly myself) so it's probably lacking in features that may make it useful to you. It's free for your use because I enjoyed making it.

And yes, I'm aware of some other programs that serve similar purposes. Commercial products include Sequence Generator Pro ($99) which does far more than I need and Astro Photography Tool (APT) which is an amazing value (and one I'll probably purchase). Both are standalone programs worth considering.

No comments:

Post a Comment