Showing posts with label Sh2-264. Show all posts
Showing posts with label Sh2-264. Show all posts

Sunday, November 30, 2025

Using PixInsight PixelMath to Correct a Flat Frame Issue

In my last post I talked about a problem I had with flat frames collected at f/2. To correct the issue I used the processes AutomaticBackgroundExtraction and GradientCorrection. This worked very well for two of my images, but I recognized it might not with the huge nebula Sh2-264, (AKA the Lambda Orionis / Angelfish Nebula).

I tried the ABE+GC method on this and it failed spectacularly by obliterating the eastern half of the nebula. So my approach will instead be to use a method that employs PixelMath and an ad hoc model of the donut hole.

Here is the hole as seen in the green master frame from one the other images collected the same night:


Green Master Frame with the donut at center in all its glory


This donut appears in the master green frame of Sh2-264, if not as prominently. So I'll use the above photo as the basis for the correction's structure. It's worth noting that the master frames have already been flatted, so either my system is dust-free, or the flatting took care of any dust donuts. What I'm about to do is apply a simple correction that's limited to the central area of the image.

At the very center the brightness doesn't seem diminished and no correction is needed. As distance from the center increases the distortion progressively darkens to form a ring, then quickly brightens again. It's this ring that must be brightened. Because I'm correcting the master linear frames I'll use simple multiplication of the existing pixel values.

Eyeballing this led me to a polynomial model of the needed correction. Here it is in an Excel graph.

Sixth-order polynomial fit to estimated donut darkness

The horizontal axis is scaled distance from the donut's center, with the value 1 corresponding to radius of the ring's darkest values at about 700 pixels from center. The vertical axis is a dimensionless value for the darkness of the donut relative the image's true background.

This is a complex shape that is fit well by a sixth-order polynomial 

So, how to make use of that polynomial? Let's look at the PixelMath script!


Script for hole correction. Click for larger version


This is a simple script. Basically it looks at the distance a pixel is from the center of the hole, calculates the factor by which to increase the pixel's brightness, and multiplies the pixel's existing brightness by that factor. Pixels outside the donut (R > 1.38)  are left unchanged. 

The constants are essentially input parameters that can be played with to refine the correction. The main adjustment is Amplitude; too large a value and the donut becomes a light ring, too small and there's not enough improvement.

The multiplier is 

        1.0 + (polynomial value times Amplitude). 

I found the best result used Amplitude = 0.04, so at most the correction is a 4% increase in linear value.

So what did this do? Here is the Sh2-264 Green Master before and after the script is applied:

Uncorrected


Corrected


Note that these are given the "Boosted" PixInsight stretch to emphasize the hole; it won't be this evident in the final image.  The script did a fair job, I think. 
 
My post-WBPP workflow for this image uses ABE to subtract first order light pollution from each master light frame; the script is then applied to each channel. After that I return to my conventional workflow: CombineChannels, BlurXTerminator to reduce chromatic aberration prior to color calibration, and so on. 

The result:


Finished Image, corrected (1/4 scale)


North is up; The Angelfish swims nicely westward! I think the best way to validate any image is to compare it with clearly superior one by an accomplished imager, so I used Adam Block's superb image for this one. I think my processing does a very decent job of reproducing his in the central area of the nebula, so I'm happy!

This completes the rehabbing of the Iowa Star Party images.  Next I'll be revisiting some of my images from 2022. Also, Masters of PixInsight are doing a workshop on mosaics in December, so maybe I'll finally process that Veil Nebula mosaic data I've been sitting on.

Wednesday, October 29, 2025

Iowa Star Party Results

Back from the Iowa Star Party, and my first field use of my Samyang lens. Mostly the results were good; shooting with the Samyang at f/2 appears to have great potential, but I need practice to make it really great.

The first night of the three-night party was on-and-off cloudy with enough breaks to keep visual observers happy, but it was not sufficient for the deep sky imaging I wanted to do. I collected some frames mainly to practice with the system.

The second night was almost perfect. Thunderstorms had moved through during the day and were gradually drifting off to the east as the night progressed. Frequent lightning flashes illuminated the eastern sky at for a while but diminished so that by the time I stopped (around 3 AM) they were not a factor. I used the first three hours of darkness to image the Heart Nebula / Soul Nebula / Double cluster area:

Heart and Soul Nebulae, Double Cluster

Next up was an hour on the central Orion area (20 minutes per channel). I didn't do a good job with processing this.

Central Orion (M42, Horsehead, Flame)

To illustrate what the lens can do, here's the Orion Nebula from the above image, post-processed for higher dynamic range:


M42 from above image

It's pretty, but it's only 1293 x 1326 pixels, so at 300 DPI it's only good for a 4 x 6 inch print. 

It was getting into the wee hours of the morning, but I couldn't stop--I get so few opportunities to image in Orion. I just had to image the Lambda nebula around Orion's head, something I had imaged eleven year earlier in H-alpha on an unusually warm February evening. This is based on a ridiculously short 30 minutes of total exposure (10 minutes per channel) and really illustrates the power of shooting at f/2: 


Nebulosity at the head of Orion (Betelgeuse is at lower left)

(All three of the above full images are at half-scale. For full scale images, see my AstroBin gallery.)

Alas, the third night was not to be. The cold front came through and the day was windy and brisk. late in the afternoon it started raining; online sources suggested that clearing might happen around midnight -- or later. I decided to call it a star party and get some good sleep before the return drive the next morning.

After an imaging session it's always good to reflect on what was learned, and this trip had some lessons beyond learning that my sleeping bag advertised as being good to 20 F was definitely not.

Rotating the system proved very doable. It was awkward at first, but so is everything. I found it almost impossible take the focusing belt on and off without messing up the focus, but the penalty for that is minor. My NINA advanced sequence design with added pauses seemed to work out fine.

The first night I found that R-G-B-Dither cyclic acquisition was problematic. I was doing this to make drizzle processing possible. Mostly this worked, but occasionally PHD2 went wildly unstable in RA and suffered death-by-overcorrection. I'm not sure if this is a settling time issue or what. The second night I turned dither completely off and guiding was fine. The ASI 2600MM seems not to need dithering, but if I'm to drizzle, I'll need it.

Look again at the above images, and notice the slightly darker circular area at the center of each image: a donut hole. This arose because of bad flats; here is the stretched value of the ratio between older, correct flats and those from Iowa. 


Lovely radial symmetry about the image center, but this should be a nearly uniform field aside from any changes in dust. 

I tried using the older flats in place of the new ones, but that failed. Because my system is currently almost dust free, I tried skipping the flats and using PixInsight to correct the vignetting. That also failed. My next attempt will be to use Photoshop to manually correct this issue. 

My guess for what caused this is improper focus. I deferred shooting flats until I returned from Iowa, and in that time the zero reference point on the EAF was lost. This made it almost impossible to reproduce the focus used for the light frames, resulting in the poor flats. One clear night should make it possible to shoot some new flats at proper focus.

The weather forecast is mildly optimistic for the first week of November with highs in the 60s; will that warmth will bring the clear night I need?