Repairing Elongated Stars

STEVE333

Well-known member
Elongated stars can be caused by:
a) Lens/Mirror aberrations which usually cause larger elongations for stars near the edges and corners of the FOV. Elongation direction is radially outward.
b) Camera tilted relative to optical axis. Stars become more elongated as stars are further away from the tilt axis. Elongation is away from tilt axis.
c) Tracking/Guiding errors. All stars in image are elongated the same amount and in the same direction with this type of error.

This technique will apply the same correction to all stars in the image. So, it is best suited to correct Tracking/Guiding errors. However, a mask is used in this technique, so, the mask could be tailored to correct only a portion of an image if desired.

The image below is the one that will be repaired in this tutorial. There is a minor elongation of all stars in an approximately horizontal direction. The green box shows the Preview area that will be used to show an expanded view of the stars.

Orig w Preview.jpg


CORRECTION PROCEEDURE:
  • Create a star mask of the original image. Use HistogramTransformation to stretch the star-mask to brighten all the stars.
  • Create two clones of the original image. Name one Repaired and the other Shifted.
  • Use Resample to expand all three images by 3x in both X and Y directions (star_mask, Repaired and Shifted).
  • The corrections to the elongated stars are defined by two parameters; n and Angle.
    • n is the number of pixels that the long dimension of the elongated stars will be contracted. The image below shows a typical star expanded so that individual pixels can be seen. The brighter star is the typical star.
      • Expanded Single Star.jpg

      • I estimated that contracting the long dimension by 3 pixels would make the star look round, so, n=3. This is just a guess, and, this value will be changed later if necessary.
    • Angle is the second parameter required to define the correction. It is the angle at which the stars are elongated. The picture below shows the coordinate system used to measure angle. 0 degrees is horizontal right on the image and 90 degrees is straight up.
      • ANGLE Coordinate System.jpg
        • I estimated that Angle = 5 degrees for the typical star two pictures above.
        • Open PixelMath and select the Symbols tab. Enter the values for n and Angle as shown in the picture below (of course you would use your values for n and Angle).
        • Expand Symbols Tab.jpg

        • Select the RGB/K tab and enter the expression shown below.
        • Expand RGBK Tab.jpg
    • Once all the information is entered into PixelMath drag and drop the blue triangle in the lower left corner onto the opened Shifted image. This will shift the entire image.
    • With Repaired open apply star-mask as a mask.
    • Open PixelMath again and clear all information with the reset button (lower right corner). Enter the expression as shown in the picture below.
    • REPAIR Expression.jpg

    • Drag and drop the blue triangle onto Repaired. This will make a correction to all the stars in the image.
      • If the corrections to the stars are acceptable, then, use Resample to reduce the image size by 3X (returning it to the original size) and you are done. star_mask and Shifted can be deleted.
      • If the corrections to the stars are not acceptable (stars still elongated or stars overcorrected) then use Undo to remove corrections from Repaired and use Undo to remove any shifting from Shifted. If stars were undercorrected increase n and try process again. If stars were overcorrected then reduce n and try process again. Repeat until satisfactory result is achieved.
  • The two images below show the original image (Preview window) first and the repaired image (Preview window) second. Notice how all the stars look nice and round in the repaired image.
  • Elongated.jpg

  • Corrected.jpg

Another Example:
The correction is not limited to only slightly elongated stars. Below are the original and corrected versions of a target with stars that were significantly more elongated. The image on the left is the original and the image on the right is the corrected version.


Original.jpg
Repaired.jpg



The link below is to a set of process icons to perform these tasks.

https://www.dropbox.com/s/zp3hw8j0hbbmkdt/Repair Elongated Stars.xpsm?dl=0

FINAL NOTE: The corrections can be limited to a chosen area by tailoring the star_mask. For example, if it was desired to only correct the stars in the upper right corner of the image, then, the star_mask could be adjusted to look like the image below. Then only the stars in the upper right corner of the image would be corrected.

StarMask Corner.jpg


Hope this is useful for you.

Steve
 
Last edited:
Many thanks Steve, I was frustrated because my longest image integration was ruined by elongated starts, I was in trouble fixing them and your method worked perfectly!

I mentioned your method when I posted the image on astrobin.
 
Steve,

This is a good option for star repair. PixelMath continues to amaze me!

However, I get similar results by using the Motion Blur PSF tab within the Deconvolution process. You can set the correction length and angle; and use a preview to test them out... then apply it to the whole image or use a mask to limit its impact.

Thanks!

Ron
 
Steve, we are launching our website soon. May we link this page as well as provided a printed PDF of the entire post? All credit will of course go to you. If you have a website, we can promote as well. Thank you!

-3SistersAstronomy (family of 5 astrophotographers)
 
I have a number of really great scopes (including 2 HyperStars and two Maksutov Newtonians) and all seem to have some corner-star distortions in every corner. I'm using the 2600 aps-c sensor so it's fairly large. My problem is, after careful collimation and back focus of course, a symmetrically aimed distortion toward the center of the image where each corner is different.

So to repair this I need to treat each corner differently and it varies from the extreme corner is a ways.

I know about the Deconvolution 'motion blur' etc but would need to do at least 4 treatments with masking.

PLEASE someone come up with a simple and intelligent corner-star repair from within Pixinsight? Many many folks would be eternally grateful...

I think our dear friend the brilliant Russel Croman is working on a solution. I assume it would work best acting on the stars-only star-mask after star removal.

Hoping and waiting...
 
I have a number of really great scopes (including 2 HyperStars and two Maksutov Newtonians) and all seem to have some corner-star distortions in every corner. I'm using the 2600 aps-c sensor so it's fairly large. My problem is, after careful collimation and back focus of course, a symmetrically aimed distortion toward the center of the image where each corner is different.

So to repair this I need to treat each corner differently and it varies from the extreme corner is a ways.

I know about the Deconvolution 'motion blur' etc but would need to do at least 4 treatments with masking.

PLEASE someone come up with a simple and intelligent corner-star repair from within Pixinsight? Many many folks would be eternally grateful...

I think our dear friend the brilliant Russel Croman is working on a solution. I assume it would work best acting on the stars-only star-mask after star removal.

Hoping and waiting...

I'm on board with this one. AI seems to be the best direction to do this but how hard is it to actually create the script I really don't know. I do know one thing, this will be an absolute game changer.
 
The only way to treat this problem would be locally adaptive deconvolution, i.e. deconvolution where the PSF varies as a function of pixel coordinates. This is perfectly doable with our current code base, but right now we have other priorities.

That said, no software solution can really solve a hardware problem. Hardware problems require hardware solutions. Algorithmic solutions such as deconvolution can help when no other ways are feasible, with a cost in terms of data loss that depends on how invasive the applied action is. Other cosmetic methods based on inventing data to fix elongated stars and similar defects are contrary to our concept of astrophotography.
 
The only way to treat this problem would be locally adaptive deconvolution, i.e. deconvolution where the PSF varies as a function of pixel coordinates. This is perfectly doable with our current code base, but right now we have other priorities.

Interesting proposition.

That said, no software solution can really solve a hardware problem. Hardware problems require hardware solutions. Algorithmic solutions such as deconvolution can help when no other ways are feasible, with a cost in terms of data loss that depends on how invasive the applied action is. Other cosmetic methods based on inventing data to fix elongated stars and similar defects are contrary to our concept of astrophotography.

I absolutely agree but also the real concept of astrophotography has shifted a bit over the years and we are fixing hardware problems more often then we like to admit.
 
I absolutely agree but also the real concept of astrophotography has shifted a bit over the years and we are fixing hardware problems more often then we like to admit.

I agree that's the current situation and it is extremely unfortunate. Following that path, astrophotography will have little to do with science in a few years. Nobody should admit that in this discipline. Of course we won't.
 
Oh my! Thank you Juan (you are my hero btw) for addressing my request for a software corner-star distortion repair. I can only imagine how adverse it would be to your philosophy of preserving accuracy in the data. I seriously do want to absolutely minimize collimation and poor hardware adjustments. I have gone to great lengths to have all the collimation tools to dial in and perfect my two Edge HD scopes with HyperStars lenses and my two Mak-newts and yet perfection is very elusive indeed. Close but not perfect... I'll probably be micro-adjusting on those till I die haha.

My issue is that I am a bit of a perfectionist and a pixel peeper and would like corner-stars to be perfectly round and without chromatic aberration.

I sincerely apologize if I'm much more of an artist than an astro physicist. I absolutely want accuracy too but just a bit of intelligent tightening of those pesky corner-star distortions without destroying truth.

I assume there are a bunch more folks like me using Pixinsight that feel the same way...? I truly want to do most my processing within Pixinsight although sometimes I do few small tweaks in Photoshop.

Russell Croman you are our best hope! Russ's StarX and NoiseX are unbelievably helpful to me.

Thanks for all the incredible things you do for the astro photo community.
 
The only way to treat this problem would be locally adaptive deconvolution, i.e. deconvolution where the PSF varies as a function of pixel coordinates. This is perfectly doable with our current code base, but right now we have other priorities.
Did you have a specific method in mind? An interesting paper was posted today, that appears to use a fairly simple approach:

The algorithm trades some of the on-axis resolution for a more uniform PSF across the image.
 
Did you have a specific method in mind? An interesting paper was posted today, that appears to use a fairly simple approach:

The algorithm trades some of the on-axis resolution for a more uniform PSF across the image.
Hey thanks for continuing this thread.

I'm not correcting most of the field because my guiding is very good. It's just in the four corners (of APS-C ASI2600) of my 8" Edge HD HyperStar setup my, 11" Edge + HS is not too bad. After being spoiled by the f1.8 speed I really want to have a simple software 'fix'. I have some elongation and CA smearing of stars in the extreme four corners aimed toward the center of the image almost like I'm short on the backspacing but I don't think so. The issue is pretty well balanced in all 4 corners so my collimation, corrector-centering and sensor-tilt are close to perfect. Steve at Starizona sent me a second HS lens to try but it wasn't better unfortunately and ruled out the HS lens I believe.
Anyway thanks for the link. I'm hoping Russell Croman can come up with a 'ai' star-fix solution. I just spent a good deal of time with the clone stamp in PhotoShop (using small donut shaped brushes of various sizes) on one of my 8" HS images. It takes time with a wide star field but carefully done it's a stunning image so worth saving/fixing.
Juan is correct about a locally adaptive deconvolution solution but it still needs to be written and it's still not smart ai...

Merry Christmas all
 
EDITED BY THE FORUM ADMINISTRATOR
Do not advertise competing applications. Please follow forum rules.


Oh for those who want to print their astro images large, I am very impressed with ***
 
Last edited by a moderator:
... come up with a 'ai' star-fix solution.
I suspect this may be developed at some point, given the succes of other AI applications.
Juan is correct about a locally adaptive deconvolution solution but it still needs to be written and it's still not smart ai...
AI / Machine Learning solutions are not really smart. They are designed to learn and replicate patterns.

If I'm not mistaken, the advantage of using adaptive PSF for correcting star shapes, is that it can also recover real detail (resolution) in the distorted non-stellar background objects.
 
Last edited:
Steve, we are launching our website soon. May we link this page as well as provided a printed PDF of the entire post? All credit will of course go to you. If you have a website, we can promote as well. Thank you!

-3SistersAstronomy (family of 5 astrophotographers)
I apologize for not responding sooner. It has been some time since I have visited this forum. Yes you can certainly link to this page. I hope it will be useful to others also.

Steve
 
It's interesting how timely this thread is. I'd asked for something similar in this thread and received a similar response from Juan. I dropped out of astrophotography for a while, but am getting back into it and still fighting the same sort of problems. I'm still really surprised that this isn't already a regular feature of PixInsight. It doesn't make a lot of sense to have to go through another tool in order to add this processing. I look forward to trying this out.

Thanks,

Beo
 
It's interesting how timely this thread is. I'd asked for something similar in this thread and received a similar response from Juan. I dropped out of astrophotography for a while, but am getting back into it and still fighting the same sort of problems. I'm still really surprised that this isn't already a regular feature of PixInsight. It doesn't make a lot of sense to have to go through another tool in order to add this processing. I look forward to trying this out.

Thanks,

Beo

although it costs $$$, blurXterminator does a really good job of correcting these kinds of aberrations. there's a free trial available on rc-astro.com

rob
 
Back
Top