Showing posts with label image processing. Show all posts
Showing posts with label image processing. Show all posts

Sunday, October 27, 2024

First Pass at the Veil Mosaic

I finally had enough data to make a very flawed Veil mosaic. Here it is at 1/5 scale:

Click for 1/5 scale image

And here is the link to download the full-scale image. You can use the cloud site's .jpg to look at it, but I suggest you use your own image viewer. Minor advisory, this is a large image, about 10K by 10K pixels and the file size is 12.5Mb.


You should immediately see some interesting things in the full image, some of which I'll detail here. I'll start with the major flaws (all the images below are at full scale if you click on them).

1) What's the big circular thing?

Bad Flat!

This is in the upper left mosaic panel, and results from improper calibration (using an outdated flat, rookie mistake.)

2) What's all that noise?

So Noisy!

Again in the upper left mosaic panel and comes from not only the poor calibration but also insufficient data.

3) What's with all the black pixels?

Pepper Spray

This is found in the upper and middle left panel; it results from pushing the panel a little too aggressively in one post-processing stage.

4) That green thing can't possibly be right!

Streaks to Left of Center: Not Really Green!

So far as I know there aren't any green nebulae. For reasons I don't understand this feature shows up rather strongly in the green channel compared to the red and blue channels; it's quite strong in luminance. I've seen one other LRGB image of this area, and it didn't have these green bits, so I must conclude something in my processing is at fault here.


The Dastardly 52 Cygni

There was one other flaw I had to skate around. I used the script Star Reduction from Blanshan and Cranfield to perform star reduction. It requires a starless image; this can be made either using StarXTerminator (aka SXT) or StarNet2. I used SXT, and it had a lot of difficulty with Magnitude 4.2 52 Cygni (see above image). It essentially suppressed the northern end of NGC 6960! So I switched over to StarNet2 and it handled things fine. 

Notice that StarNet2 didn't handle it 100% cleanly either, giving it what look like (but aren't) diffraction spikes. Looks kind of cool, I think, but then I grew up as a Newt user.

Now for some positives:

1) No seams. I used Photometric Mosaic, and not only didn't it produce seams, but it avoided the pinched stars that GradientMergeMosaic plagues me with. 

2) Color calibration by SpectrophotometricColorCalibration (SPCC). I can't say enough positive about SPCC. My old workflow made color correction very fiddly, with the result depending on how I felt the day of processing more than any sort of objective measure.

3) Not narrowband. For good reason the Veil is usually imaged in narrowband, but that results in false colors. It's nice to see things more as they "really" are (aside from a Green nebula).

4) Not oversaturated. In my opinion oversaturation is very common now. I've said before that a guiding principle of processing should be that less is more; this idea applies to sharpening, stretching, and also color enhancement. I did bump this a half step using ColorSaturation, but pushing it further seemed like too much of a good thing.

5) Reasonably sharp. Here's a neat feature at the south end of of the East Veil. This looks good thanks mainly to BlurXTerminator (BXT). In fact, aside from the one issue seen in SXT, I think the triad of BXT, SXT, and NoiseXTerminator (NXT) is difficult to beat.

An Optical Spiral That's Probably Not a Real Spiral
   

I suspect this curly-thing at center is nothing more than an undulation in a plane seen edgeways, but it does look fun.

So, with those issues listed above this thing obviously isn't done yet. The other night I shot additional light frames for the two panels that suffered from noise (along with same-night flat frames), and I think I can make sure that pepper spray of black pixels can be avoided.

This means doing much the processing over again, but that's life.



Friday, March 11, 2016

Trying My New Battery; Color Balance Issues

The weather has been cooperating a little better this last week, and I've been able to try out my battery-based imaging setup. I haven't done much more than image an hour here, a couple of hours there, but the results are about as expected.

Here are two images from my inner red zone back yard,

M42:

As you can see I was unable to completely eradicate the sky brightness gradient.

The Rosette:

Both are taken without filters only because I don't have one. A decent filter would have improved these greatly.

Here are a couple from some distance north of the Twin Cities in a yellow zone,

75m of the M81/82 area:


I have this delusion that I'll be able to image the integrated flux nebula.

The southern portion of Auriga (including some dark lines from tree branches):

The first two images came out horribly red/magenta heavy, and it was a lot of work getting the color right. I passed that off as a consequence of the camera mod and light pollution. The second two appeared just as red on the display screen while working on getting the exposure right, but they came out fairly neutral because I chose the ImagesPlus RAW conversion that ignores the camera's white balance; I used "Bayer No White Balance" instead of "At Capture White Balanced Color."

Color balance isn't an issue when CCD imaging, particularly if your filters are balanced by the manufacturer to give equal white signals in each channel.

The question is now which is better, a custom white balance or using the "no white balance" processing option. There's only one way to find out, and that will require a sunny day, a few sheets of white printer paper, and a clear night. That's my next task.

Oh, and the battery worked perfectly. It's nice to have the power right there in such a light package. 35Ah, less than 23 pounds. My little battery case now has two power sockets, but the volt meter has yet to arrive.

Friday, December 12, 2014

The Importance of Bias Frames

The rule I came to understand for using bias frames was this: Temperature-regulated cameras don't need them when the dark frame exposure time and temperature match those of the light frames. In other words, bias frames are useful only when you're trying to match dark and light frames that differ in exposure time or temperature.

Is this really true? Some people say it's not, and that bias frames should always be used. My experience seems to agree. But is there a way to verify this? That's what I tried to do with some simple analysis using my SBIG ST-8300M CCD camera.

I started by shooting twenty three-minuted dark frames at a temperature of -25C. Ten of these I set aside for later testing. The remaining ten were combined using three different methods (average, median, min/max exclude average). The result was three master dark frames, one for each common method of combining dark frames.

I then shot twenty bias frames at -25C. The ST-8300M's shortest exposure time is 0.04 seconds, so that's what was used. These were averaged to create a master bias frame.

Next, the ten dark frames that were set aside (it's helpful at  this point to think of them as light frames) were calibrated with each of the master dark frames, both with and without the master bias frame. This created six sets of calibrated frames. 

Each set of calibrated frames was then stacked using average, median, min/max excluded average, weighted median and sigma clipping (at 2.55 standard deviations). These are some of the standard stacking methods offered by ImagesPlus. The result is thirty images. ImagesPlus was then used to calculate the noise in each image (represented by the standard deviation of each image's pixels, in this case), and the results are given in the tables below:
Noise in processed images. Top table: noise present when the master bias frame is used. Each column is for a different dark frame combining method (AVG = average, MED= median, MME = min/max exclude). Each row corresponds to a different "light" frame stacking method (WMED = weighted median,  S255 = sigma clipping at 2.55 standard deviations. The row of numbers below each column is the column average. Bottom Table: as in the top table, but the calibration was performed without the master bias frame.
The results show that the exclusion of the master bias frame roughly doubled the standard deviation of the pixel values!

The images below show a comparison between the lowest noise (using min/max for dark combine and light stacking and bias for calibration) and the greatest noise (using median for combine and stacking, with no bias information). ImagesPlus digital development was applied equally to both stacked images.

Best case: Min/max combine and stack, bias included in calibration

Worst case: Median combine and stack, bias not included in calibration.

The lowest noise levels corresponded to combining dark frames using either an average or a min/max exclusion method and then stacking light frames with the min/max exclude method. Because both dark and light frames can be contaminated by cosmic rays, it makes sense to use some sort of rejection combine method in their processing. Both median and min/max perform about the same when the bias information is included. When the bias frame information is not included the min/max method clearly outperforms the median method.

I think that from now on I'll always use bias frames!

Wednesday, August 7, 2013

Two images from last weekend: M17, M20/21; Processing workflow.

I'm REALLY pleased with how this image of M17 came out:

Messier 17 (Omega or Swan Nebula), click for full size
The previous night's image was not quite as successful--M20 and 21. More about why in the next blog entry.
M20 (Triffid) and M21
Both images are full-frame. For all the gory details of acquisition, look at my gallery on AstroBin. By way of a quick summary, both are LRGB images made with an SBIG ST8300M CCD, TeleVue 102 apo and autoguided CGEM mount under mag 6+ skies. Dark and bias frames only, no flats.

Imaging is SO much faster doing LRGB in the dark than it is to use narrowband filters under light-polluted skies. 

I realize that the colors in the M17 image may look a little muted to you, but I kind of like them this way. What's particularly pleasing about the image from my standpoint is three-fold: The stars are nice and round right out to the edge of the field, meaning that my field flattener is doing its job perfectly; The merging of the LRGB channels seems to be spot-on. And finally, guiding with the Orion mini-guider works great at the 700mm focal length of the TV102 to correct mount errors. I'll eventually try out the mini on my C925.

My processing workflow continues to evolve. These two images were made by ping-ponging back and forth between Images Plus and Photoshop:
  • Calibrate, align and stack using IP
  • Stretch using PS
  • Noise cleanup and star size reduction in IP
  • LRGB combine in PS using Annie's Actions
  • Color balance in IP
  • Masked sharpening in PS
Yes, I know that's a mess, and some will say that all can be done in IP or PS or Maxim or whatever. Good for you if you can function with only one software package, but at this point I can't. I'm using IP 4.5, so probably some of the changes that have gone into later versions would make it a better processing tool. 

Wednesday, February 20, 2013

Pixels, Levels and Curves--Oh My!

(I've slowly come to a sort of useful understanding of how some basic tools of image processing work. This is an attempt to put into words those concepts that are elusive to me. I hope these little essays will help a few people starting out with imaging processing. It's meant to be purely introductory)

Pixels, Levels and Curves, Oh My!


Part I


In which a house made of light, dark and bias frames falls on the Wicked Witch of Noise.


Your imaging sensor (whether DSLR or CCD) is a digital device based on discrete bits of information that are either on or off. Most of what it does is an exercise in counting, not measuring.

Sensor pixels act like little buckets, and photons of light as electrons (imagine them as tiny marbles, if you want). For simplicity let’s assume that a pixel can hold 65,536 electrons.  (This capacity will vary from sensor to sensor.) In binary notation, the number of electrons in this pixel can be unambiguously given by a positive 16-bit integer. (In this case we say the bucket has a 16-bit depth.)

We define black as the case where there are zero electrons in the bucket; white is when the pixel is filled to capacity.

Electrons are added to the pixel through a number of effects.  Let’s consider the primary cause: Photons coming from our target object that interact with pixel to liberate an electron.

Imagine two side-by-side pixels, both getting light from a telescope pointed at an object of uniform brightness. You might reasonably assume that both pixels will fill with electrons at the same rate, and after letting a certain amount of time to pass, both pixels would have the same number of electrons in them.  You would be wrong! Let’s do a little thought experiment to find out why.

Take four typical coins and flip them.  Count the number of them that land heads-up and write that down for the contents of Pixel 1. Gather up the coins and flip them again, writing the new number of heads as the contents of Pixel 2. Do this nine more times, adding the new numbers of heads to either Pixel 1 or 2 as appropriate. Knowing that the chance of a coin landing head-up is 50% it’s reasonable to assume that you should have 20 heads in each tally when you’re done. Chances are you don’t, though. In fact, it’s quite likely that the two sums aren’t equal. Why? Because a collection of four coins has other possible outcomes than landing with two heads and two tails showing. The effect of these other possibilities is to change the “perfect” outcome of exactly 20 heads into a distribution peaked near 20 heads, but also having other values.

Light entering a pixel resembles this example. During a given time interval we expect a certain number to enter and produce electrons. But during each interval of time a number of different counts can possibly occur, and by the end we don’t always have the exact amounts suggested by chance.

Now imagine a field of pixels, illuminated by light coming from a uniform source (perhaps an electroluminescent flat panel). We allow light to enter the pixels until they’re about half full and then close the shutter. Do all the pixels have the same exact number of electrons in them, providing an image of uniform intensity? No, they don’t. Some have more electrons, some less, in a very random way that results in intensity that is not uniform.  So the source of uniform illumination is not imaged as uniform; instead it appears a little gritty. This grittiness is called shot noise.

Another process that introduces shot noise is the spontaneous addition of electrons to pixels by dark current. Dark current results from thermal activity in your sensor that occasionally kicks an electron into a pixel bucket. The warmer your sensor is, the faster this process works. Because dark current has nothing to do with the object you’re imaging, it’s something we want to minimize.  The obvious way to do this is to keep the sensor as cool as possible.

There is another way. If we could take an image in which the electrons come only from the dark current, that image would represent a sort of dark image that could be subtracted from our image of the target object. This is what shooting dark frames is all about.  Dark frames are images made with the shutter closed and are essentially images of dark current. Subtracting dark frames from images made with the shutter open (light frames) goes a long way toward removing the noise present. In order to match the amount of dark current present in light frames, the dark and light frames must be made with the sensor at the same temperature and have the same exposure time.
But wait, there’s more! Noise can be generated by random processes in the sensor and its electronics, and more noise can be created during the reading and reporting of pixel counts. These can be lumped together as read noise. Read noise doesn’t depend on exposure time, and is probably not very sensitive to temperature. As for dark current noise, we can image the read noise by making a very short exposure with the shutter closed. We keep it short to minimize the contribution of dark current. These images of read noise are called bias frames.

Conveniently, every dark frame image also contains the bias image, so when dark images are subtracted from light images, the bias image gets removed, too.  When you can rely on the light and dark frame temperatures being the same, bias frames are not needed. Many people apply bias frames regardless.

One more bit of terminology: The application of dark and bias frames to light frames is called calibration. Calibration can also involve flat frames and flat dark frames. We can leave discussion of those to another time.

Ding-dong! The Noisy Witch is dead? Sorry, but it’s impossible to remove her from the picture completely. Using multiple dark and bias frames to better generate the dark and bias images does help to keep her down, though. And she definitely resents increases in total exposure time.

Coming up...
Part II, In which we see that the road to the land of imaging Ahs is a Grayish-Brick Histrogram
Part III, In which we learn that even without a brain we can use Levels
Part IV, In which we find that that the heart of the matter is Curves


Other news... Our astronomy club has decided to go ahead with an Imaging Messier Marathon on April 5. Should be fun!