Astro Pixel Processor – Mosaic Color (RGB) Processing

Astro Pixel Processor – RGB-Ha Mosaic


This is an overview of the processing steps to create a color mosaic using red, green, blue, and hydrogen alpha channels. Note, these setting may not work with your data and should be used as guidelines. This is my attempt to document the overall process when creating an RGBHa Mosaic Image using APP. These notes are created for the Astro Pixel Processor (APP) 1.075 version which is the latest when this article was written. Also note that these settings deviate from the default settings.

Here is a process overview:

  • Process channels (Red, Green, Blue, Ha7) as a separate panel
    • R,G,B,HA – lights
    • Bias – all channels
    • Flat – all channels
    • Dark – RGB 120s channel, and Ha7 using 60s channel (depends on what exposure times used.
  • Create Bad Pixel Map (for each panel (part)
  • Create Master Bias, Dark, Flat (these master files will be applied to the other panels/parts during the processing of the other parts)

Panel/Part Processing

This step will need to be done for each part/panel of the mosaic. The idea is to create a fits image for each channel (R, G, B, and Ha7) using identical processing. These will later be used to create a mosaic representing each channel. Again, note that your settings may be different in processing your images.

  • Calibrate –> default
  • Analyse Stars –> default
  • Register –> default
  • Normalize –> default Integrate (non-default settings)
  • Integrate per channel
  • Local Normalization Correction (LNC)
    • 1st degree LNC
    • LNC iterations – 1
  • Outlier Rejections
    • LN winsor clip
      • Kappa – 3.0
      • iterations – 1
    • Create outlier rejection map – checked

Putting it all Together

Once the panels are processed, it’s time to create directories for each Color/Filter Channel. Create the new data folders and copy/rename each channel/filter based upon parts. For example:

├── Blue
│   ├── Part1_Blue.fits
│   ├── Part2_Blue.fits
│   └── Part3_Blue.fits
├── Green
│   ├── Part1_Green.fits
│   ├── Part2_Green.fits
│   └── Part3_Green.fits
├── Ha7
│   ├── Part1_Ha7.fits
│   ├── Part2_HA7.fits
│   └── Part3_Ha7.fits
└── Red
    ├── Part1_Red.fits
    ├── Part2_Red.fits
    └── Part3_Red.fits

Each of the above files were copied and renamed from the final process channel image name and copied to the above directory paths:

├── St-avg-600.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Hydrogen-alpha_1stLNC_it1.fits
├── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Blue_1stLNC_it1.fits
├── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Green_1stLNC_it1.fits
└── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Red_1stLNC_it1.fits

├── St-avg-600.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Hydrogen_alpha_1stLNC_it1.fits
├── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Blue_1stLNC_it1.fits
├── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Green_1stLNC_it1.fits
└── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Red_1stLNC_it1.fits

├── St-avg-600.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Hydrogen-alpha_1stLNC_it1.fits
├── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Blue_1stLNC_it1.fits
├── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Green_1stLNC_it1.fits
└── St-avg-960.0s-LNWC_1_3.0_none-x_1.0_LZ3-NS-full-eq-add-sc_BWMV_nor-AAD-RE-noMBB-Red_1stLNC_it1.fits

APP Mosaic Processing

This process will take the images created and create the mosaic image the each of the R,G,B, and Ha Channels.

  • LOAD
    • add the processed “Lights” parts/panels
    • automatic #stars target: set to 2600 (best for mosaics
      • Note Ha7 channel will have less star density
    • dynamic distortion – checked
    • Quadrilaterals
      • Scale start 1
      • Scale stop 10
    • Same Camera/Optics – Unchecked (since each part has already been processed).
    • Mosaic Mode – Checked
    • Registration Model
      • projective
    • Mode Advanced
    • add-scale
    • BMV
  • Integration (typical, may need changes in MBB)
    • Integrate per channel
    • weights – equal
    • integrate – average
    • Composition, mode – full
    • Local normalization Correction, LNC degree – 4th degree LNC
      • LNC iterations 3
    • Multi-band blending
      • enable MBB – checked
      • 10%
    • outlier rejection, no rejection

Using the above settings, integrate each channel: Red, Green, Blue, Ha7 by selecting the three parts and then “integrate”. This will create a mosaic for each channel. Verify each image by reviewing after completion. Adjust if necessary the integration parameters (MBB, LNC, etc).

Then use the Tools to “combine RGB” images. For the Ha7 channel, assign to the desired color channel and review the combined images. Once done, you can save and play around with adjusting the image with APP processing menu on right side.

I normally save the final processed image as a TIFF image so that I can further process it using Light Room.

Final Results

Below is a three panel mosaic combined using the above data. I’ve assigned the Ha7 channel to “green”.

NGC6992 RGB/Ha7 with Ha7 Channel assigned to Green.

First RGB/Ha Image

Finally, a clear night that was not below -15C/5F. It’s been a tough winter here in Minnesota. Back in January I got a Mini ZWO filter wheel and filters for my ZWO asi178mmc camera and just recently got a chance to test the new setup. During this period of no-imaging, I was able to build a Dew System for both my guide and main telescope and review my cable management (more on this later).

I wanted to image a simple target and test the the overall function of the filter wheel, focuser integration in EKOS/Kstars. I didn’t want to spend a lot of time imaging as this was a test. So, the simplest and colorful image to test the new setup was Imaging Orion’s Nebula (M42).

The M42 images were taken using the following exposures:

  • Red – 8 x 120s
  • Green – 8 x 120s
  • Blue – 8 x 120s
  • Ha 7nm – 5 x 120s
  • Dark , Flats, Bias Frames processed.
  • I used Astro Pixel Processor (APP) for processing and did some post processing with Adobe Light room.

Below Shows the results:

I am sure that I can process the image data better, and will go back and examine the overall color processing using APP. I will get the process flow better and there are some questions regarding the Ekos focusing routines that I need to better understand and setup as I found that Ekos was focusing quite often during the imaging. I also used the Ekos Scheduler to execute the image capturing process.

Kstars – Why do I use it?

Initially, I wanted a Linux imaging software to replace my old Meade DSI pro.  I found the Kstar with Ekos allowed me to use my old Meade DSI pro CCD imager and run under Linux.

Why Linux?  Lots of reasons.  Mainly, I never cared much for Windows and found the OS very limiting.  I like the reliability and Unix utilities running under Linux; it makes connectivity easy to the remote server.  Note – Kstars/Ekos will also run under Windows and MacOS.

I was familiar to Kstars but not with Ekos.  It was a bit overwhelming to understand, and use Ekos, but once I was familiar with the operation and understanding how the software interacted with Kstars, remote Indi lib servers, it became easier to use.

I think Kstars/Ekos is great for remote operation.  And that is the next big reason why I am using this software as I live in Minnesota where it’s challenging to image out in the elements whether it’s summer or winter months.  In the summer months, the mosquitoes are out in full force and in the winter, well, it’s downright cold.  I wanted to be in my nice basement while controlling the telescope and taking images.

I wanted to use a simple server at the telescope, not an expensive laptop. This is where Indilib (INDI) really shines.  The Indi Server software runs on various ARM platforms.  I have installed Indi on Pine64, Raspberry Pi3, and Odroid-4u.  I can setup a little server with minimal hardware and fuss.

Setup Overview

Here is the remote block diagram of the remote setup:

Latest setup(2019.03.11)

For an internet connection, I use a LAN/WIFI router  near the telescope pier to provide a good WiFi signal to my tablet.  This allows a remote desktop connection between the the main computer and tablet  to allow manual focus, polar alignment, guide scope alignment, etc.  I am also using hard-wire Ethernet connection rather than WiFi connection to interface to the remote Odroid computer.  This is to allow maximum transfer speed during image transfers to the main computer.

The Desktop is running Linux Mint 18.2 using the latest (bleeding) distribution of Kstars/Ekos.

The software integrates with my favorite guiding software, PHD2.  I can either use the built-in guiding module or use PHD2 software running locally on the Ekos server. 


This is a web based manager for the Ekos server.  This allows to manage the drivers and startup the server.  Once the server is powered up I can manage the devices and start the server using the WebManager.

Features, I like

  • Ekos Scheduler
  • Ekos Web Manager
  • PHD2 Integration
  • Astrometry Plate Solving
  • Full Observatory Automation
  • Mosaic Support in Ekos Scheduler
  • Polar Alignment
  • Ekos Live Cloud Support
  • Good Forum Support

I hope to go into these features with later blog posts.

More Info on Kstars/Ekos


For people who don’t want to bother with loading images to a raspberry pi and wants support for Kstar/Ekos, I recommend getting Stellarmate.  This is available here   They have some excellent tutorial videos explaining setup and operation.  You can get the hardware, or the integrated image.  This is supported on Raspberry Pi3 and 3B using 16GB class 10 micro SD card.

More to follow with future articles.

Image Gallery

This gallery is my basic Astronomical Deep Sky Gallery.  I’ll be updating this regularly.  Started to add some color images. (Updated May 17, 2019)

Astrometry – Intro

This is a simple article about astrometry and imaging.  Astrometry involves precise measurements of positions and movements of stars and other celestial bodies.  Astrophotographers  can take an image of the sky without the known celestial coordinates, and using various sites, or data can determine the position and coordinates of the objects in the image.

Many astronomical telescope control programs use astrometry data to position a telescope in a precise location. Some will even model the mount to aid in more precise position when skewing the telescope. (Ktars/Ekos does both of these functions.)

Below is an example of uploading an image to an astrometry site ( to determine the precise location.

Select an image to upload:

After upload, the image will be submitted and processed. Once completed you will see the screen below (if successful):

Next, press the “Go to results page” ,  it will bring you to  imaging solutions page as shown below:

If you select the “view in WorldWide Telescope”, you will be transfered to the World Wide Telescope and there you can explore your image in detail.

Another Arduino Focuser Variation

I  made an Arduino Focuser for my William Optics ZS 73 (see my original Orion Astrograph version).  The focuser is basically the same as the Orion Astrograph focuser except for the bracket and layout.  The bracket is the same except it does not have  the tabs in the Orion version.  Also, it attaches to the dove tail.  I removed the fine focusing knob and attached another belt sprocket.

William Optics Focuser

Latest Images and a Look Back

I started out taking astronomical images back in the mid 1990’s using CCD imaging.  This was when  CCD cameras were very expensive and not very practical for the amateur astronomers.   I found a book about making your own CCD camera, The Cookbook Camera by Richard Berry.  I built several of these camera CB-245 and modified the cooling system. The cookbook  CCD resolution was 378×242 pixels (my current camera has 3097×2080). 

Andromeda Galaxy – M31 (Old Cookbook Camera Image)

By the mid 2000’s they became obsolete.  I then purchased a Meade DSI pro camera and continued imaging.

Andromeda Galaxy – M31 (Meade DSI Pro CCD)

Fast forward to the present, I got back into the hobby and found that the prices have come down quite a bit.  I purchased a ZWO asi 178MMC camera which is cooled and the price point was which I could afford.  I’ve been re-learning and purchasing new equipment.

I have finally got a number of “good” images that is a vast improvement from my old Cookbook days and Meade DSI Pro cameras.  It’s been some learning curves with the equipment and software. I will be writing some useful articles about using Linux with Indi Library Drivers and my setup.  I will cover the lessons that I have learned during this process.

Andromeda Galaxy – M31 (ZWO asi178mmc)
IC5146 – Cocoon Nebula

NGC 6992 – Veil Nebula

Dumbell Nebula – M27
Veil Nebula (ngc 6992/6995)

Arduino Focuser

I wanted to make a focuser for my Orion Astrograph 8 inch reflector using an existing  Indi Library driver for Kstars/Ekos.  It had to be  simple and I wanted to avoid writing a  new driver for Indi Library.  During my research, I found some documentation for JMI Smart Focuser that explains the command set.  This seemed like an easy solution using an Arduino and a stepper motor.  I then reviewed the Indi Library source code to find out what calls the JMI Smart Focuser driver is  making to the  focuser. Seeing that the Smart Focuser driver was making minimal commands to the JMI Focouser, I decided to create my own simple focuser using the Arduino Nano.

Arduino Focuser

First Version

My first version that I built used  a separate Focuser controller which plugged into the remote stepper motor assembly.  This used an LED display and had a hand controller and powered by a separate 12V power supply.  I found that I never really utilized the display focus buttons, so I simplified the focuser design.

First Version
First Version

Second Version (Simplified Version)

The minimal Arduino  Focuser  uses  a Nano Arduino and  is powered by the USB connection.  There are no other external connections.   It plugs directly into my Indi server’s powered hub. (I have also powered it from my ZWO asi178mmc camera using its  built-in USB hub).

Parts List – for Simplified Version

  • Arduino Nano
  • ELEGOO 5 sets 28BYJ-48 ULN2003 5V Stepper Motor + ULN2003 Driver
  • Protoboard (for mounting the Arduio Nano and Stepper controller)
  • Aluminum GT2 Timing Belt Pulley, 16 Teeth Bore 5mm with 6mm
  • MXL Belt 76MXL/B95MXL 6mm Width 2.032mm Pitch
  • RMP .063 3003 H14 Aluminum Sheet, 12″ x 12″

All above parts  are available online via when this article was published.

Below is the layout of the simplified focuser that includes the electronic parts layout and wiring:

Focuser II – Completed Module
Focuser II – Backside

Bracket Assembly

Below shows the Mounting Bracket for the focuser board and stepper motor.  Note, you will need to add the mounting holes of the stepper assembly and oblong these  holes for adjustment purposes.  The MXL belt is perfect for the Orion Astrograph focuser and will slide on and off the fine adjustment knob.  Here is a pdf file of the assembly:   Focuser.pdf

You should be able to print out the file and make a direct template. All units are in millimeters.


I have included both schematics for the first versions and the simplified version.  

First Version Schematic Diagram
Simplified  Focuser Version Schematic Diagram

Arduino Code

The Arduino code (Version 0.60) is provided in a zip file.  It has been complied using Arduino IDE 1.8.5.  I have included the stepper accelerator library in the zip file that I used for this version.  For more information regarding the stepper accelerator library,  follow this link:   Accel Stepper Library

The code supports both versions and by default the displays are commented out for the simplified version. Here is the zip file:  Arduino Focuser V0.6 zip

Ham Radio – interests waning

I have been active in Amateur Radio on and off for over 43 years.  Things have changed quite a bit since I started.  I remember the days before the Internet where I would listen for hours to other ham radio operators talking about their projects, describing various circuits and enjoying other ham’s conversations.

I was always learning something and getting involved with interesting conversations.  Today it’s different. You don’t have as much on the technical side.  Some conversations make me cringe, either too political or religious, or just plain bad behavior.   There are always weekend contest which interfere with my enjoyment of the hobby.   I am not very  interested  in participating in contests and have found that contesters  are getting more rude through the years with no concern other than making a contest contact.

The digital modes seem like the are now driven by total automation. I used to enjoy the low powered modes that kept the bandwidth small. It seems like FT8 has taken over most of the digital modes now.  In my opinion,  FT8 is a joke with people running higher and higher power to make contacts; where is the fun in that?

I still enjoy a CW conversation now and then, but when your noise level is at S9 due to all the lousy electronics in your neighborhood, and the band conditions are terrible, it’s a bit turn off.

So it’s time to shift hobbies and if anyone knows me, they know I have plenty.  I’ll be sharing some astronomy projects as well as my learning process regarding astro imaging.  I’ve done CCD imaging back in the mid 90’s with a Cookbook Camera.  But, the current technology is amazing.

73, for now.

CCD Imaging with the LX200 8 inch f/5


It’s that time of year where I like to take out the telescope. Bugs are dying off, less humidity, and nights are longer.  I have a pedestal mount that I attached during these months. I hopefully will build a simple enclosure to help expedite the setup time. The scope is remotely controlled and I used a CCD imager as my eyes. Even though this scope is up in age, it works well and guides well.  I’ll upload some of my astronomy projects as time permits.

M101 – Pinwheel Galaxy, Meade dsi pro