Dark Frame Acquisition script for TheSkyX v2.2

Over the last few cloudy nights, I finished an automation assistant script, and am making it available here.

This is a JavaScript script to run within TheSkyX to acquire a large number of dark frames.  It automates the following sequence:

  1. Delay until a specified start time (so you can start the script before the desired acquisition time then go out for dinner).  (Since TheSky’s scripting environment doesn’t include a good “delay” feature, it takes and discards long camera exposures to achieve this delay);
  2. At specified start time, turn on camera cooling and wait until the specified target temperature is reached;
  3. If the target temperature can’t be reached (i.e. the ambient temperature is higher than the camera’s cooler can handle), turn off cooling, wait a while, and retry;
  4. Once target temperature has stabilized, take sets of dark frames – you can specify multiple sets, giving number of frames, exposure length, and binning for each;
  5. Stop dark frame acquisition at a given later time (for me, dawn the following morning);
  6. Also stop acquisition if the CCD temperature rises – indicating rising ambient has overwhelmed the cooler.

The idea is:

  • Enter into the script all the dark frames I want for a given temperature.
  • Then run it overnight – where there isn’t enough time to capture them all.
  • Next day, comment-out or delete the lines for the sets that were successfully captured, and modify the frame-count in the set that was interrupted in-progress.
  • Repeat the next night.

This script is highly dependent on TheSkyX, and would require extensive modification to work in any other system.  It works on both the Mac and PC versions of TheSkyX.  I have no way to test it on the Linux version but would expect it to work there.  It requires a connected CCD with cooling, but does not require or assume any other connected gear.

Run it from within TheSkyX using the “Run Javascript” command in the Tools menu.  First edit some of the parameters near the top of the script to specify your desired time window, target temperature, etc.

Copyright ©2019 Richard McDonald.

You are free to use and modify this script, and to redistribute it freely.  Modified versions should be marked as such so they are not confused with the original.

Download here.   Then change the file name suffix from “.txt” to “.js”.  (I’m not storing it and downloading it as “.js” because that presents security vulnerabilities.)

One thought on “Dark Frame Acquisition script for TheSkyX v2.2

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.