Deep Sky Stacker Image Helper

I love Deep Sky Stacker but I find it a little fiddly and error prone to load the images and stack them, but since it comes with a command line interface I realised I could script the whole process to manage dozens of images automatically. Although this script will process the images, if you wish, you can just use it to make the file lists and load them into DSS for processing by hand, it is up to you.

Note this script is just something I use to process Canon raw images which I think others may find handy. I hope you find this script useful!

The whole process relies on having all images named and stored with a specific file system hierarchy and file naming convention. So in short you have to name your files and store them as detailed below. This may seem like a real pain, but it a) forces you to organise your work and b) the names ensure both you and the software know what-is-what.

Quick-start for the impatient

  • All of the source and example files are stored in BitBucket, you can also download a zip of the latest version from here, using the Download repository link on the page, once downloaded unzip it somewhere
  • Download and install Groovy if you don’t have it.
  • Setup your folder hierarchy, to help here is an empty folder hierarchy for you to unzip
  • Place your calibration images in the appropriate folder. Then run the following to make sure the calibration hierarchy is OK:
    groovy dssih.groovy -i
  • Place your actual images in the RawImageData folder. Then Run:
    groovy dssih.groovy -m
  • Then run PROCESS_ALL.BAT in the Results folder.
  • DSS command line will process your images and place the resultant tif into the results folder. You will then need to do your final post processing in Gimp/Photoshop/…
  • File Naming Convention

    Folders

    iso folders: must be named after the iso setting then “iso”, eg for images with an iso of 3200 the folder is named 3200iso.
    exposure folders: must be named after the time in seconds with an s on the end, eg for images with an exposure of 300 seconds the folder is named 300s.
    temperature folders: must be named after the temperature in degrees, eg for images taken at a temperature of -5°C the folder is named -5c (if positive use a plus sign!)

    Files

    image files: I use Backyard EOS which names the file quite handily, as long as each file name contains iso/exposure/temperature in part of the name separated by underscores the script should be able to find the matching calibration images.

    File Hierarchy

    Calibration folder

    This folder contains 3 sub folders which must be named: bias_offset, darks and flats. Within the bias_offset folder there is a sub-folder for each iso set of bias frames. For the darks you have a folder for each exposure, then a further sub folder for each iso, finally there is a sub folder for each temperature. Last and not least the flats are stored with optical setup sub folders and then a further sub folder for each iso sets. The final leaves in the tree will probably contain a few dozen images. Here is an example with a few images in some folders to give you an idea of the layout. See the usage section below for the -i option which helps see if the layout is OK.

    Calibration
       ├── bias_offset
       │   ├── 3200iso
       │   │   ├── BIAS_Tv16400s_3200iso_20161106-13h29m37s563ms.CR2
       │   │   └── BIAS_Tv16400s_3200iso_20161106-13h29m42s286ms.CR2
       │   └── 6400iso
       │       ├── BIAS_Tv16400s_6400iso_20161106-13h33m05s512ms.CR2
       │       └── BIAS_Tv16400s_6400iso_20161106-13h33m11s717ms.CR2
       ├── darks
       │   ├── 300s
       │   │   ├── 2500iso
       │   │   │   └── +30c
       │   │   └── 3200iso
       │   │       ├── +14c
       │   │       │   └── DARK_300s_3200iso_+14c_20161108-21h56m31s560ms.CR2
       │   │       ├── +15c
       │   │       │   └── DARK_300s_3200iso_+15c_20161109-18h57m03s355ms.CR2
       │   │       ├── +16c
       │   │       │   ├── DARK_300s_3200iso_+16c_20161109-19h33m28s765ms.CR2
       │   │       │   └── DARK_300s_3200iso_+16c_20161109-20h09m53s582ms.CR2
       │   │       └── +8c
       │   │           └── DARK_300s_3200iso_+8c_20161109-18h20m36s163ms.CR2
       │   └── 600s
       │       ├── 3200iso
       │       │   ├── +14c
       │       │   └── +16c
       │       │       └── DARK_600s_3200iso_+16c_20161108-22h01m38s967ms.CR2
       │       └── 6400iso
       │           └── +23c
       └── flats
           ├── Celestron
           │   └── 3200iso
           │       ├── FLAT_1s_3200iso_20160910-15h40m36s654ms.CR2
           │       └── FLAT_1s_3200iso_20160910-15h40m43s747ms.CR2
           └── WO66
               ├── 3200iso
               │   ├── FLAT_1s_3200iso_20161106-14h05m18s356ms.CR2
               │   └── FLAT_1s_3200iso_20161106-14h05m23s645ms.CR2
               └── 6400iso
                   ├── FLAT_1s_6400iso_20161106-14h07m16s178ms.CR2
                   └── FLAT_1s_6400iso_20161106-14h07m22s196ms.CR2
    

    Image Folder

    The folder containing your light frames (aka sub, aka the real images!) has three sub folders for the main catalogues, then in each is a folder for each object, finally there is a folder for each imaging session. Here is an example.

       RawImageData
       ├── Caldwell
       │   ├── C14-NGC869+884-Double-Cluster
       │   │   └── WO66_3200iso-3600s-2016-11-01
       │   │       ├── DOUBLECLUSTER_LIGHT_240s_3200iso_+14c_20161102-20h50m54s658ms.CR2
       │   │       └── DOUBLECLUSTER_LIGHT_240s_3200iso_+14c_20161102-20h59m17s566ms.CR2
       │   ├── C18+C17+NGC278
       │   │   └── WO66_3200iso-900s-3x300s-2016-11-01
       │   └── C9-Sh2-155-Cave-Nebula
       │       └── WO66_3200iso-3600s-2016-11-01
       ├── Messier
       │   ├── M13
       │   │   └── Celestron_20160210
       │   │       ├── M13_LIGHT_180s_3200iso_+21c_20160914-21h02m56s456ms.CR2
       │   │       └── M13_LIGHT_180s_3200iso_+24c_20160914-21h06m07s174ms.CR2
       │   └── M31
       │       └── WO66_3200iso-3600s-2016-11-01
       │           ├── M31_LIGHT_240s_3200iso_+11c_20161102-18h53m42s121ms.CR2
       │           └── M31_LIGHT_240s_3200iso_+13c_20161102-18h58m16s955ms.CR2
       └── Other
           ├── IC1318-Sadr-Region
           │   ├── WO66_3200iso-4500s-5x900s-2016-11-01
           │   │   ├── LIGHT_900s_3200iso_+14c_20161104-18h54m29s252ms.CR2
           │   │   └── LIGHT_900s_3200iso_+15c_20161104-18h39m23s235ms.CR2
           │   └── WO66_3200iso-720s-3x240s-2016-11-01
           └── NGC6992
               └── WO66_3200iso-3600s-2016-11-01
                   ├── NGC6992_LIGHT_240s_3200iso_+13c_20161101-21h15m36s646ms.CR2
                   └── NGC6992_LIGHT_240s_3200iso_+14c_20161101-20h20m21s831ms.CR2
    

    Results Folder

    You will be pleased to know this is just an empty folder to start with. Once you run the script a batch file and a file list will appear for each imaging session. You will also get a PROCESS_ALL.BAT file.

        Results
        ├── Messier_M31_WO66_3200iso-3600s-2016-11-01.bat
        ├── Messier_M31_WO66_3200iso-3600s-2016-11-01.tif
        ├── Messier_M31_WO66_3200iso-3600s-2016-11-01_file_list.txt
        └── PROCESS_ALL.BAT
    

    Properties file for DSSIH

    Here is a properties file. All lines starting with a # are comments. The software needs to know a few basic locations etc, detail these in there.

    #################################################################
    # A NOTE ON PATHS, USE A FORWARD SLASH / OR TWO BACKSLASHES \\. #
    #################################################################
    
    # Where are the calibration files?
    calibrationFolder:D:/Users/Jim/OneDrive/AstroWorkingFolder/Calibration
    
    # Where are your images to stack?
    rawImageFolder:D:/Users/Jim/OneDrive/AstroWorkingFolder/RawImageData
    
    # Where do you want the resultant images?
    resultsImageFolder:D:/Users/Jim/OneDrive/AstroWorkingFolder/Results
    
    # Where is DeepSkyStacker Command line program?  Note this ends in "CL"!
    dssClPath:C:/Program Files (x86)/DeepSkyStacker/DeepSkyStackerCL.exe
    
    # For canon raw files use: CR2
    imageExtension:CR2
    
    # Options to pass to the DSS command line
    # See: http://deepskystacker.free.fr/english/commandline.htm
    dssOptions:/R /S /OF16 /OC2
    
    # Append this file to the file list, it makes sure you get the same configuration each time.
    # Just comment out this line to disable this feature (i.e. put a # on at the start of the line).
    dssConfig:dss.dsssettings
    
    # If you dont have the right files, which can I use instead?
    defaultIso:3200iso
    defaultExposure:300s
    defaultTemperature:+16c
    
    #################################################################
    

    Properties files for DSS itself

    The file list text files can also include settings for DSS, the best was to make these settings is to open DSS adjust your settings and then save an image file list out of DSS. This will contain a section at the end which looks like the snippet below. Cut and paste this section into the file you name in the dssConfig property in the DSSIH properties file. I’ve provided one for you, see the file dss.dsssettings in the download above (line 26).

    #WS#Software\DeepSkyStacker\FitsDDP|BayerPattern=4
    #WS#Software\DeepSkyStacker\FitsDDP|BlueScale=1.0000
    #WS#Software\DeepSkyStacker\FitsDDP|Brighness=1.0000
    #WS#Software\DeepSkyStacker\FitsDDP|DSLR=Generic RGGB
    ... lines omitted ...
    #WS#Software\DeepSkyStacker\Stacking|SaveCalibrated=0
    #WS#Software\DeepSkyStacker\Stacking|SaveCalibratedDebayered=0
    #WS#Software\DeepSkyStacker\Stacking|SaveCometImages=0
    #WS#Software\DeepSkyStacker\Stacking|UseDarkFactor=0
    

    Usage

    You can either get information about your image calibration library with:

    groovy dssih.groovy -i
    

    Or you can make the processing scripts with:

    groovy dssih.groovy -m
    

    This second option will create a whole buch of batch files and file lists in your image results folder. Run any of the batch files or the single PROCESS_ALL.BAT to do the lot. When any batch file has completed the finished tiff should be in the results folder.

Comments are closed.