It takes a long time to capture enough data for a high-quality astrophotography image. Unfortunately, every image will be different in terms of quality. You have really good images, average images and poor images.

Take a look at the following two images. Which one is better?

I say the one on the right is better. You can make out more of the nebula, which probably means the sky was more transparent. However, the left one is pretty good as well and I want to use it in the final image.

But doing this manually for hundreds of images is not fun, which is why we use PixInsight Subframe Selector

Measure Subframes

To grade our frames, we run the PixInsight Subframe Selector.

The first step is to set the routine to measure subframes and select the image calibrated and cosmetically corrected files. These subframes should all use the same filter.

Before we can measure, we need to fill in the system parameters.

Measure Subframes
Measure Subframes

The easiest way to gather these system parameters is to simply upload one of the frames to Once processed and solved, will provide the subframe scale in arcseconds/pixel.

In this particular example, the subframe scale is 0.938 arcseconds/pixel.

An alternative method is to use the formula

Arcseconds/Pixel = (206.2648 * (Camera_Pixel_Size_in_μm) / (Telescope_Focal_Length_in_mm)

Once done, execute the process.

Subframe Weight Formulas

Once each subframe is measured, we get a graph of the results.

Subframe Weights
Subframe Weights

The big question is what criteria should we use to determine a good/bad subframe?

  • FWHM: Do we want to base it on how narrow the stars are, which might mean that these images are in better focus?
  • Eccentricity: Do we want to base it on how circular the stars are, which might mean that the telescope was tracking really well for the subframe
  • Stars: Do we want to base it on how many stars were detected, which might help us determine the transparency of the sky

You can change the measurement to see how each of the categories affects the graph. But in the end, you need to figure out what parameter(s) to use, and if you use more than one, how will each one get weighted.

Some sample formulas

Formula 1:

(40*((FWHM-FWHMMin))/(FWHMMax-FWHMMin)) + (10*(1-(Eccentricity - EccentricityMin)) / (EccentricityMax-EccentricityMin)) + (10*((Median - MedianMin) / (MedianMax-MedianMin))) + 40

Using the (Param-ParamMin) / (ParamMax-ParamMin) gives a percentage for the particular parameter. For some parameters, like Eccentricity, a lower value is better, which is why the formal for that section begins with a “1-“.

Each parameter also includes a weight, allowing us to put more emphasis on particular parameters. The weights equals 60, which requires us to end the formula with a +40 to give us a final total of 100.

This formula works pretty well, but I find the weight on FWHM to be too overpowering. Also, it doesn’t take into account the number of stars, which helps determine how transparent the sky is. I believe more stars = better transparency.

Formula 2:

This next formula is used by David Ault in his PixInsight tutorial.

(15*(1-(FWHM-FWHMMin)/(FWHMMax-FWHMMin)) + 15*(1-(Eccentricity-EccentricityMin)/(EccentricityMax-EccentricityMin)) + 20*(SNRWeight-SNRWeightMin)/(SNRWeightMax-SNRWeightMin))+50

I originally used this formula quite extensively. But I noticed that using SNRWeight doesn’t work extremely well. If the transparency is poor, then I might get more signal in the background sky fog due to the high light pollution I deal with. So subframes with worse seeing and more light pollution will come out higher than subframes with less light pollution.

Formula 3:

This next formula is what I’ve been using.

(15*(1-(FWHM-FWHMMin)/(FWHMMax-FWHMMin)) + 20*(1-(Eccentricity-EccentricityMin)/(EccentricityMax-EccentricityMin)) + 15*(Stars-StarsMin)/(StarsMax-StarsMin))+50  

Formula 2 was a big help in my formula 3. The main difference is that I substituted SNR with Stars. This is because of the light pollution in my area. A high SNR ratio doesn’t necessarily mean a good image. It could simply be that there is a lot of pollution in the sky reflecting all of the urban lights.

Formula 4:

With the early 2022 PixInsight release, a few new parameters were added, including PSF Flux. With this, I updated for formula as I think this is better than simply counting stars as Formula 3 did.

(20*(1-(FWHM-FWHMMin)/(FWHMMax-FWHMMin))) + (20*(1-(Eccentricity-EccentricityMin)/(EccentricityMax-EccentricityMin))) + (20*(PSFFlux-PSFFluxMin)/(PSFFluxMax-PSFFluxMin))+50

Take a look at the two images, which one is better?

Hard to tell, but if I had to pick one, I would say option 2 is a little better, but it is hard to decide. Now look at the Subframe Selector graph for these two images (They are identified as the ones with circles and no red cross). I’m comparing PSF Flux (blue line) and Stars (dashed line).

Comparing PSF Flux with Stars

With PSF Flux, the images are very similar. However, if I use Stars, the two images rate drastically different. But when we compare the two, we see that the quality is extremely similar.

This is why I’ve replaced Stars with PSF Flux in the formula.

But in the end, you will need to figure out what approach works best based on your conditions and customize your own formula.

Remove Bad Frames

Before we output our measurements, it is good to remove the worst frames. For this, I prefer to use a few different subframe selector parameters.


This helps determine how fat my stars are. Lower is better. The numerical value is based on your optical system, but the graph helps identify bad frames. For my system, anything above 5 is removed.

FWHM Graph
FWHM Graph

If you look at these two frames, the bad FWHM is blurrier than the good. This will hurt the detail in the final image.

With the bad FWHM frames discarded, we move onto PSF Flux.

PSF Flux

This identifies how many good stars we have in the image. Higher is better.

PSF Flux Graph
PSF Flux Graph

The bad result has a strong gradient that is washing out the image. This results in the PSF Flux showing a much lower result for this image. The bad image could be the result of high-thin clouds, twilight, or local light from neighbors or car.

Once we’ve discarded these frames, we can see how they would have been incorporated if we simply used a formula.

Subframe Selector Graph
Subframe Selector Graph

As you can see, some of the images would have been included in our final result.

Automatic Rejection Parameters

Although I no longer do this, you can have Subframe Selector automatically reject frames by creating a rejection formula. After manually rejecting frames based on the FHWM and PSF Flux from above, the remaining frames are often high-enough quality to keep.

However, if you want to use automatic rejection parameters, you can simply enter in your rejection formula.


This automates the pixel rejection process.

Automatic Rejection Formula
Automatic Rejection Formula
Automatic Rejection Formula Result
Automatic Rejection Formula Result

Identify Best Frames

It is a good idea to identify the best frame and the top 10% of your frames. We will use this information as part of the Star Alignment and the Local Normalization process.

Output Subframes

Once we determine the subframe weights and rejected poor subframes, it is time to output our new subframe inventory with a new weight parameter that we will using in the image integration process.

Subframe Selector Output
Subframe Selector Output

We do the following

  • Change the routine to Output Subframes
  • Select a new output directory
  • Define a keyword which will store the subframe weight
  • Execute

What’s Next

The next step is to take take our best image, as our reference frame, and align all other frames with PixInsight Star Alignment.