Using Regim with StarTools

Guides, tutorials, tips & tricks.

Using Regim with StarTools

Postby Guy » Tue Sep 27, 2016 7:38 am

I was inspired by the post here to have a look at Regim by Andreas Rörig as an alternative to Deep Sky Stacker (DSS).
I thought it might be useful to share the setup I am currently using - and would be interested in others' experience and advice.

EDIT: Others have reported a problem with colours in some circumstances but I am having difficulty isolating the reason for this. I'll investigate this and will provide an update when I have a resolution. If anyone has similar issues please let me know.

One reason for problems with colour is that the camera is not supported directly by Regim and you need to set up DCRAW support.
I have described a simple colour test below so that you can check to see if you need to set up DCRAW support.

  • Follow the instructions on the web site and in the manual for installing it - make sure you have Java Runtime Environment 1.6.0 or higher installed.
  • Start Regim by clicking on regim.cmd (or regimSmall.cmd - which uses less memory - if that doesn't work)
Setting Up - Example for DSLR - with notes for OSC and monochrome cameras
- In the 'Preprocessing' Menu select 'Preprocessing'

Select 'Calibration' tab:
    Repair defects -unticked - only available for mono images
    Files are RAW -ticked - for DSLR and OSC images only
    Standard DSLR -ticked - for DSLR - tick 'Custom' for OSC CCD or if camera not recognised
    Stretch RAW to 16 bit -ticked - Output uses full 16-bit dynamic range
    Auto scaling -unticked
    Auto offset -unticked
Select 'Register' tab:
    'Manual one star/Comet' - unticked
    Parameters below kept at default:
      Number of stars - 130
      Star min. brightness - 0.05 - Lower threshold for star detection - see the 'Status' field for number of stars found
      Star max. brightness - 1.0 - Upper threshold
      FWHM low limit: - 2.0
      Transform mode - Linear
      Search radius - 10 - arcsecs/pixel - depends on image scale
    2x upsample -unticked
    Same scale -ticked - if all images have the same scale
    bicubic interpolation -ticked - untick if you have problems and image is oversampled
    normalize background -ticked - tick if using 'Sigma' or 'SDmask' - untick for 'Median' and other combination methods
Select 'Combination' tab:
    Option - 'Sigma' -with a sigma of 1.6 or 'Median' - select from: Blend, Median, Sigma, SDMask or Maximum
    Ignore black border -ticked - ignores any black border during combination
Select 'Files' tab
    Navigate to the correct folder.
    Select the type of sub-frame (RAW, TIF, FITS or JPEG) using the 'Files of Type' drop down list.
    Select Lights files and press 'Add to images'
    Select Darks files and press 'Add to darks'
    Select Flats files and press 'Add to flats'
    Select Flat Darks (Dark Flats) and press 'Add to flat darks'
    - You can use Bias frames instead of dark flats here if the Flats exposure time is not longer than a few seconds.

    do calibration -ticked
    do deblooming -unticked - tick if using a camera without antiblooming
    do normalisation -unticked
    do register -ticked
    do preview -unticked
    do combination -ticked

    Press the 'OK' button at the bottom of the form and processing will start
Processing takes a while.

When complete the resulting image is displayed -
The image is automatically stretched just for viewing - to see the unstretched image press the function key F4
You can adjust the stretch by moving the black and white point sliders on the right. This does not change the saved image.
Note: If colour, the resulting image is not white balanced.
Save the file in Tiff or Fits format.

Load into StarTools:
- If it is a (stacked) RAW monochrome image select 'Linear, was not Bayered or is white balanced'
- If it is a (stacked) RAW DSLR or OSC colour image select 'Linear, was Bayered, is not white balanced'
For more information on loading files in StarTools see StarTools Main Window Use.

RAW Support:
  • Regim supports RAW files itself using jrawio for RAW file conversion - which supports fewer cameras than dcraw. You can check support using the instructions below.
  • If your camera is not supported you may need to install dcraw (if not already installed) and point to where it is installed:
    'File' Menu - Preferences:
    'Use DCRaw' - tick
      - set the path to point to the location of the dcraw .exe file (e.g. C:\Program Files\dcraw\dcraw-9.24-ms-64-bit.exe)
      - Note: Version 8.98 (32-bit) of dcraw didn't work for me - it worked OK with version 9.27 (32-bit and 64-bit)
  • jrawio produces images which are slightly different in size to dcraw. So if you want to compare Regim with DSS directly you will need to use the dcraw option.
Temporary Files
- Regim makes a number of temporary .fit files which can be deleted after completion.

Memory use and Performance:
The cmd file you start Regim with affects how much memory is used and performance.
- regim.cmd uses 2GB RAM
- regimSmall.cmd uses 1GB RAM but will be slower
- regimLarge.cmd uses 3GB RAM and should be faster

Bicubic Interpolation Setting:
  • The user manual says not to use bicubic interpolation if the image is oversampled. However, problems have been reported which have been fixed by turning bicubic interpolation on. This is why the recommendation is to turn it on.
  • If you are experiencing problems which may relate to registration - try turning it off:
    - 'Register' tab - bicubic interpolation - unticked

Troubleshooting problems with colour
Checking Regim Settings:
  • Preprocess the single RAW file Colour_Test_1_RAW.CR2 on its own using Regim.
    Colour_Test_1_CDPP_TIFF-small.jpg (12.21 KiB) Viewed 4614 times
  • The Camera it was taken with was an unmodified Canon 1000D which is not supported directly by Regim so you will need to either:
    - set up DCRAW support as described above, or
    - in the 'Calibration' tab you will need select 'Custom' and tick 'First row contains red pixel'
  • Preprocess as described above but don't set up 'Register' tab and keep 'do register' unticked
  • Save the result as a tiff file
  • The result should look like SigmaCombinedFiles-dcraw-16b.tiff
    SigmaCombinedFiles-dcraw-16b-small.jpg (3.79 KiB) Viewed 4615 times

    - The short fatter blue pen should be on the right and the red pen on the left.
    - If not, there is a problem with the Regim settings - go back and check them.
    - If the image is very dark it might be because you have not ticked 'Stretch RAW to 16 bit' on the 'Calibration' tab.
Checking support for your camera:
  • Take a similar image with your own camera and repeat the test and check the image looks as expected.
    - If not, then the camera is not being properly supported and you will need to set up DCRAW support as described above.

Other functions
Regim also has some other interesting functions and tools not used here - it is worth exploring further. These include Photometry, Plate Solving and listing the stars in an image.

I'm still refining the settings and will update this post if my process changes
I'd be interested if anyone else has different settings they prefer - or any other experience or advice regarding Regim.

Last edited by Guy on Thu Jan 05, 2017 12:38 am, edited 15 times in total.
Posts: 79
Joined: Thu Feb 19, 2015 8:35 am

Re: Using Regim with StarTools

Postby admin » Fri Oct 07, 2016 4:09 am

Great guide! :thumbsup:

This deserves a sticky!

Now I will definitely have to give Regim a go next time I stack (to my shame I've never tried it...).
Ivo Jager
StarTools creator and astronomy enthusiast
User avatar
Site Admin
Posts: 1713
Joined: Thu Dec 02, 2010 10:51 pm
Location: Melbourne

Re: Using Regim with StarTools

Postby wedgef5 » Wed Oct 26, 2016 1:08 am

Thanks for posting this! I've been interested in using Regim for a couple of reasons. I'm a bit of a Java coder myself, and I would like to use something that is being more actively developed than DSS.

That said, I gae it a try with some NGC 7331 data I collected this past weekend, and the result wasn't very good. It appeared as though my flats had not been used at all (heavy vignetting) and there was virtually no color at all in the final image.

Have you seen either of these two issues?

Thanks again...

Posts: 10
Joined: Sun Oct 11, 2015 11:55 am

Re: Using Regim with StarTools

Postby Guy » Wed Oct 26, 2016 8:20 am

Hi Matt,

Unfortunately there seem to be issues experienced with colour - as I said in the post.
I've done some tests on daylight pictures to try and reproduce this and the colours appear fine - although obviously this may not be an entirely equivalent test.
Until now I hadn't heard of issues with flats being ignored.

There is active support for Regim directly from the author Andreas Rörig via the regim_astro group on Yahoo.
It is hosted by Yahoo Germany but provides good support in both German and English and subscribing to the group is easy.
If you describe the issue there and provide a way for him to recreate the problem I expect you will get a resolution.

What type of subs did you use? If from a DSLR did you use the native DSLR support or the external dcraw support?
One test you could do is to convert the files to TIF and then use regim with the TIF files and see if that works. This would eliminate any effect of the RAW conversion.

Please let us know how you get on.
As you say - it would be good to have an alternative to DSS which is actively being developed.

Posts: 79
Joined: Thu Feb 19, 2015 8:35 am

Re: Using Regim with StarTools

Postby smokey688i » Sun Dec 11, 2016 4:33 am


I finally had some success with Regim - bottom line, I had to enable bicubic interpolation on the Register tab, and use the dcraw option in Preferences to get it working. I'm guessing jrawio doesn't support my Nikon D5100.

I've been using DSS for some time with good results, but wanted to see if any improvement could be gained with Regim. Also, a fellow astrophotographer friend has been having issues with DSS crashing if he ran it with more than 25 or so light subs loaded (temp file overload error due to his many-megapixel camera), so it's a small victory that I was able to get Regim up and running.

Posts: 18
Joined: Mon Feb 16, 2015 2:52 am

Re: Using Regim with StarTools

Postby Guy » Sun Dec 11, 2016 12:05 pm

Hi Chris,

Thats good news.
Thanks for perservering with this and letting us know the settings that worked.
So what problems did you have when you had bicubic interpolation switched off?
I'll update the post wih your information.

Posts: 79
Joined: Thu Feb 19, 2015 8:35 am

Re: Using Regim with StarTools

Postby smokey688i » Sun Dec 11, 2016 7:35 pm seems enabling bicubic interpolation set things right, but when I disable it, I get an equally acceptable result now...

Previously I had seen a number of issues, including much less detail than the DSS output, a sort of crosshatch pattern, and color that would not process out in Startools.

But whatever the issue was, it seems enabling bicubic interpolation for a run fixed my problem...

Here's a sample of M31 I just processed, with bicubic interpolation on:!AmLjlsCWOS9Mjzs3Jh-SZI4arvBv
Posts: 18
Joined: Mon Feb 16, 2015 2:52 am

Re: Using Regim with StarTools

Postby Guy » Tue Dec 13, 2016 7:34 am

Thanks for the explanation Chris.
It'll be interesting to see if others have similar problems.

The image looks good.
To try and help others who have similar problems I have added a simple colour test to allow people to test their Regim settings and also support for their camera.

Posts: 79
Joined: Thu Feb 19, 2015 8:35 am

Return to Tutorials & Guides

Who is online

Users browsing this forum: No registered users and 2 guests