Author Topic: Dark Pixels introduced by StarAlignment during Calibration  (Read 8911 times)

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
    I found that StarAlignment's default Interpolation method is AUTO which became Lanzos-3 interpolation on my subs.  I don't know if that is something new in PI 1.7 but I never previously had problems with the interpolation used by StarAlignment.  However, processing my latest image with PI 1.7, it worked fine to register my unbinned calibrated luminosity subs, but when the same settings operated on my 2x2 binned R,G and B subs, StarAlignment put 1 or 2 dark pixels into 2 to 3 of the cardinal points (top, bottom, left and right) of the outside of all the brighter stars (maybe 30% of the stars in the image).   This artifact made further processing impossible.  The original 2x2 subs as well as the calibrated versions going into StarAlignment were fine.
     I found by change the Interpolation method from AUTO to BILINEAR, the problem went away completely and StarAlignment made fine-looking registered subs, that stacked nicely in ImageIntegration with no surrounding dark pixels.
     Now that I'm aware that this could happen, I have a workaround.  But a) I wonder if BILINEAR is the best choice method here and b) whether some protection shouldn't be introduced to the StarAlignment to prevent it's introducing artifacts like this in the aligned images.
     Thanks very much.
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #1 on: 2012 February 22 20:35:47 »
Hi Jeff,

it would be a great help if you could post some screenshots that illustrate the problem.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #2 on: 2012 February 23 01:37:06 »
Hi Jeff,

Quote
I found that StarAlignment's default Interpolation method is AUTO which became Lanzos-3 interpolation on my subs.  I don't know if that is something new in PI 1.7

Lanczos interpolation has been introduced in the latest update to all geometry tools in PixInsight:

http://pixinsight.com/forum/index.php?topic=3875.0
http://pixinsight.com/doc/docs/InterpolationAlgorithms/InterpolationAlgorithms.html

The default 'auto' interpolation mode selects now the Lanczos-3 interpolation algorithm when the image isn't being scaled down.

Quote
when the same settings operated on my 2x2 binned R,G and B subs, StarAlignment put 1 or 2 dark pixels into 2 to 3 of the cardinal points (top, bottom, left and right) of the outside of all the brighter stars (maybe 30% of the stars in the image).

These are undershooting artifacts (aka ringing). They are a drawback of Lanczos and bicubic spline interpolation; just a price to pay for the superior performance of these algorithms. Undershooting occurs when interpolating images with very strong variations between neighbor pixels (jump discontinuities). Since binned data are less disperse, transitions from dark to bright pixels tend to be stronger, and hence they are more prone to undershooting. When this happens you have two options:

- If you are registering three or more frames that will be integrated later, then those dark pixels will be rejected during integration (provided you use a pixel rejection algorithm). In this case, just don't care. Keep an eye on the integrated image, however.

- If the frames won't be integrated, then the ringing artifacts should be avoided. Just decrease the clamping threshold parameter from its default 0.3 value to 0.2 or 0.1, or, in really extreme cases, to zero. The smaller the clamping threshold, the more aggressive deringing effect.

In the latest version of StarAlignment I have decided to increase the default clamping threshold from 0.1 to 0.3. The problem with clamping is that it degrades interpolation performance, giving raise to more aliasing artifacts. So we have to choose between a bit more ringing or more aliasing and hence degraded detail preservation. With the new default clamping threshold value we have tried to find a good compromise, after making lots of tests with many different images. However, when one tries to squeeze the last bit of data (which is one of PixInsight's leitmotifs) no fixed parameter can work in all cases; one can always find a new case where a 'good compromise setting' doesn't work at all.

Quote
I found by change the Interpolation method from AUTO to BILINEAR, the problem went away completely and StarAlignment made fine-looking registered subs
Quote
a) I wonder if BILINEAR is the best choice method here

Not at all. Bilinear should *always* be avoided for production work due to its poor performance. Lanczos provides the best results for non-resampled or upsampled data in terms of subpixel accuracy, detail preservation and minimal aliasing. Bicubic spline is a good alternative, which has been the standard in PixInsight until the latest updates.

Quote
b) whether some protection shouldn't be introduced to the StarAlignment to prevent it's introducing artifacts like this in the aligned images.

As I've said above, some ringing is the price to pay for superior interpolation performance. In the cases where this is a problem, we have the clamping feature which can be controlled with the clamping threshold parameter.
« Last Edit: 2012 February 23 02:00:06 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #3 on: 2012 February 23 08:12:18 »
Thanks, Juan-
  My subs are very consistent, as were the ringing dark cells in the registered subs.  They stacked up just fine through Windsorized 3sigma ImageIntegration so integration didn't help.  But I will go back and decrease the clamping threshold. I wasn't too happy with the results I got with Bilinear interpolation as stars had some slightly offset red mostly in one direction suggesting something didn't quite register (but I may have other unrelated problems since the image of ngc2359 came out with very little color compared to what I expected from postings). 
Clear skies,
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #4 on: 2012 February 28 21:39:39 »
UPDATE-
  I went back finally to rerun StarAlignment on the same calibrated R,G,B 2x2 frames with the Auto Interpolation = Lazlos-3.  I found the default clamping threshold was now 0.15 instead of 0.30, but I found that the ringing was improved but still there at an unacceptable level.   Moving that down to 0.10 and finally 0.07 did not eliminate the ringing.   In order to finally eliminate the ringing in the registered subs, I had to switch to Bicubic Spline interpolation and set the clamping threshold at 0.07.   
  I haven't gone back to try to redo some old RGB 2x2 frames but, to my knowledge, I never had this problem before PI v1.7, but if Bicubic Spline was the old Auto method with a low clamping threshold maybe I've managed to approximate the way it was working in earlier versions.
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #5 on: 2012 March 01 09:00:10 »
Hi Jeff,

Before the latest releases, the default interpolation scheme was bicubic spline with clamping=0.1. Now it is Lanczos-3 and clamping=0.3. It is true that this configuration is more prone to ringing, but it significantly improves the PSF of integrated images (take a look at the examples I've put in StarAlignment's documentation, section on interpolations). If you can't stop ringing with Lanczos, then switching to bicubic spline and clamping around 0.1 is probably your best option.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #6 on: 2012 March 01 09:08:53 »
Thanks, Juan-
  That does seem to be the case for these 2x2 binned images (tested again on some new data of the same scene).
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #7 on: 2012 March 01 10:01:49 »
If the binning affects scaling operation maybe this is an indication that unbinned would be better at your focal length? Not to make the scaling work of course but just as a warning sign that your angular resolution is too low and the data is getting 'choppy'.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #8 on: 2012 March 01 12:39:19 »
Good point, Sander.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #9 on: 2012 March 01 20:06:05 »
Sander-
 Thanks, that's a good suggestion.  However, as a field imager traveling and setting up each session, I'm always very short on total exposure time and have always thought it was more efficient timewise to fully exploit that trick of human visual perception that lets you combine coarse chrominance with high resolution luminance to save something like one half of the total time to make a comparable quality and SNR LRGB image to RGB unbinned (HAIP).   So, unless that last bit of interpolation noise reduction from Laslos-3 is crucial, I'm content to retreat to Bicubic Spline with 0.1 clamping threshold (former PI standard) for my binned subs to avoid ringing artifacts. The new standard works great on my unbinned luminosity.
Clear skies,
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #10 on: 2012 March 01 20:49:05 »

Hi Jeff,

we all must weigh the various factors and try to optimize our results given the means at our disposal. It sounds like you have your situation well under control. I don't understand these scaling algorithms very well but I did not expect them to introduce artifacts like that. This is certainly a thread to read by others should they run into this situation. I am currently oversampling by a significant degree so I suspect Lanczos-3 will work for me.

I am aware of the color bin + full resolution L technique but I thought perhaps these artifacts were an indication that your resulting angular resolution was too low, even if bicubic was all that was available. In your shoes I'd try an image without binning, use the same bicubic scaling and see how the results compare.

Interesting discussion, thanks for driving it!
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #11 on: 2012 March 01 21:26:43 »
Sander-
  I agree that the undersampling in the 2x2 binning is probably driving the different amounts of ringing from these different interpolators but my feeling remains that I would rather just use a less aggressive interpolator than require ~2x more imaging time to cure the undersampling, (consciously violating, hopefully not stupidly, the rule of more/better data is always best). 
  I did have 1 R sub of the same exposure time that was accidentally taken 1x1 and, sure enough, Laslos-3 with 0.30, works fine on that, but I'm still sticking to my story.  But one day, maybe on this same image, I'll come back and try a full RGB image at 1x1 for comparison.
-Jeff
« Last Edit: 2012 March 01 21:47:35 by jeffweiss9 »
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline jubeis

  • Newcomer
  • Posts: 8
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #12 on: 2012 April 05 03:14:44 »
Dear all,

I am quite new to Pixinsight but recently I made exactly the same  ringing experience with 2x2 binned subs as Jeff. Before I found the solution with bicubic spline and 0.1 clamping, too, I tried the nearest neighbor algorithm which was war from optimum but still acceptable. I am considering, however to reprocess the whole RGB set.

Regarding 2x2 binned vs unbinned RGB subs, I also think that it can be of advantage to go for more depth in the individual subs. I accidentally took a 10 min unbinned B sub along with my L subs and compared the S/N ratio with a set of 2x2 binned 5 min B subs of the same field. The unbinned shot had an S/N of 23, whereas the binned shots showed S/N numbers of 47 each. This clearly shows that I would have to invest much more total exposure time in case of taking unbinned RGB subs. Considering the maritime climate of NW Germany, there would always be a high risk of clouding or fogging in during a session.

- Juergen

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #13 on: 2012 April 27 08:04:22 »
I continue to have artifacts show up using the default Auto=Lanczlos-3 with 0.30 clamping threshold, even on 1x1 binned images, not just 2x2 RGB now.  It seems to happen particularly on missed hot pixels but also on small stars.
   Perhaps the choice of the default interpolation method could be made a global parameter so I can shift it back to Bicubic Spline with 0.10 threshold since that never gives me any trouble on anything and, frankly, even where Lanczlos-3 works, I can't detect any improvement over bicubic spline for my images.  Yet, DynamicCrop and other processes all now use the Lanczlos-3 default so it keeps rearing up and biting.  (Lowering the clamping threshold to 0.10 doesn't tame the problem).   I guess this is a request to Juan, assuming I've run out of things to try to avoid these ringing problems even on well-sampled images with good SNR.
  Thanks,
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Dark Pixels introduced by StarAlignment during Calibration
« Reply #14 on: 2012 April 28 04:02:16 »
Hi Jeff,

We can modify some tools to remember the last interpolation algorithm selected. However, these problems shouldn't happen so severely with Lanczos interpolation. Could you please upload two of these images where you're having problems, so I can make some tests?

Quote
frankly, even where Lanczlos-3 works, I can't detect any improvement over bicubic spline

Lanczos has two main advantages:

- Considerably smaller PSF size after integration of registered images. Bear in mind that the PSF size is the 'atomic' element that defines the actual resolution of the image.

- Much less interpolation aliasing artifacts. Aliasing acts like a variable (and unpredictable) low pass filter that damages image detail.

Take a look at StarAlignment's documentation, interpolation section, and browse to the example that compares several algorithms for the integration of 27 M51 images.

Also see the documentation on interpolation algorithms, were we have included interesting examples and comparisons.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/