Come join the friendliest, most engaging and inclusive astronomy forum geared for beginners and advanced telescope users, astrophotography devotees, plus check out our "Astro" goods vendors.
Come join the friendliest, most engaging and inclusive astronomy forum geared for beginners and advanced telescope users, astrophotography devotees, plus check out our "Astro" goods vendors.
I am clinging to Gimp for my AP processing just because it's a general tool and I don't like to learn hundreds of scripts to get a few simple things done. While Gimp has gradient removal, it is a bit limited in that the gradient is built up of parallel lines according to a linear or circular profile, with some ways to refine it through the GUI. As a result it also introduces gradients if those gradients are not compatible with Gimp's model.
So I ended up doing a lot of work each time and got tired of it. But Gimp has a plugin capability for Python so I decided to try Python to fix it. Unfortunately Gimp's Python does not have numpy and scipy, and if it did it bothers the programmer with more detail about data types and function calls than is reasonable. So I tried Scilab using the IPCV toolbox to load and save images.
Here's the original image from a 2 hour session with the Astrocat51, stretched in DSS and size reduced in Paint.
In Gimp I wanted to mask out the nebulosity and most of the bright stars. For this I created a mask. I won't go into detail, just learn how to do this in Gimp. The mask shows some lines in the starry area where I did this in two steps but don't worry I average over the non-black areas later on so it won't affect the estimated gradient intensity. Here's the mask:
Then I multiplied the original image with the mask in Gimp, resulting in the base for the gradient estimation:
My Scilab script imported this. It ran a least squares estimate using Chebyshev polynomials up to 5th order. The data is based on dividing the image in cells. The number of cells is based on the number of data points per parameter that I wanted (10), also accounting fot the blacked-out areas. The estimated gradient is this:
Subtracting the gradient from the original image here is the result:
This is not bad for a first try! The Scilab script is honestly just a few lines. It handles multidimensional matrix manipulation with ease so the code is very understandable. I'm going to check how I can use this as a Gimp plugin (rather than writing Python).
... Henk. Telescopes: GSO 12" Astrograph, "Comet Hunter" MN152, ES ED127CF, ES ED80, WO Redcat51, Z12, AT6RC, Celestron Skymaster 20x80, Mounts and tripod: Losmandy G11S with OnStep, AVX, Tiltall, Cameras: ASI2600MC, ASI2600MM, ASI120 mini, Fuji X-a1, Canon XSi, T6, ELPH 100HS, DIY: OnStep controller, Pi4b/power rig, Afocal adapter, Foldable Dob base, Az/Alt Dob setting circles, Accessories: ZWO 36 mm filter wheel, TV Paracorr 2, Baader MPCC Mk III, ES FF, SSAG, QHY OAG-M, EAF electronic focuser, Plossls, Barlows, Telrad, Laser collimators (Seben LK1, Z12, Howie Glatter), Cheshire, 2 Orion RACIs 8x50, Software: KStars-Ekos, DSS, PHD2, Nebulosity, Photo Gallery, Gimp, CHDK, Computers:Pi4b, 2x running KStars/Ekos, Toshiba Satellite 17", Website:Henk's astro images
That is a very nice result, Henk! It keeps the extended galaxy disk in the upper left corner of the images despite that area having the highest gradient. It looks like you have a tool worthy of the work needed to fit into your process.
bobharmony wrote: ↑Mon Nov 01, 2021 6:31 pm
That is a very nice result, Henk! It keeps the extended galaxy disk in the upper left corner of the images despite that area having the highest gradient. It looks like you have a tool worthy of the work needed to fit into your process.
Bob
Thanks Bob. Yes it worked out quite well. I have some ideas for a few tweaks to improve the result.
One is (this was implemented by mistake during the implementation process) to weight the blacked-out area in the least squares estimation as well. Doing that will make the gradient dive down in those areas, which benefits the nebulosity near the edges. The reason why I say that is that the purple nebulosity near the lower right of M31 has beeen reduced more than I like. So I can offer that as an option.
Another thing is that the stars are noticeably less bright in the parts where the highest gradients were. The reason of course is that I subtracted it so the remaining signal becomes less. I can correct for that afterwards multiplicatively using the value of the estimated gradient, I think.
And the over all result has a sightly unnaturally black backgorund. Not bad at all though! I could offer the option to subtract a factor times the estimated gradient, like 0.8 or so. The problem is that the selected gradient area may still have a bit too much light from small stars that escaped the Threshold mask in Gimp. So it's value may be slightly on the high side and it can be corrected as suggested.
... Henk. Telescopes: GSO 12" Astrograph, "Comet Hunter" MN152, ES ED127CF, ES ED80, WO Redcat51, Z12, AT6RC, Celestron Skymaster 20x80, Mounts and tripod: Losmandy G11S with OnStep, AVX, Tiltall, Cameras: ASI2600MC, ASI2600MM, ASI120 mini, Fuji X-a1, Canon XSi, T6, ELPH 100HS, DIY: OnStep controller, Pi4b/power rig, Afocal adapter, Foldable Dob base, Az/Alt Dob setting circles, Accessories: ZWO 36 mm filter wheel, TV Paracorr 2, Baader MPCC Mk III, ES FF, SSAG, QHY OAG-M, EAF electronic focuser, Plossls, Barlows, Telrad, Laser collimators (Seben LK1, Z12, Howie Glatter), Cheshire, 2 Orion RACIs 8x50, Software: KStars-Ekos, DSS, PHD2, Nebulosity, Photo Gallery, Gimp, CHDK, Computers:Pi4b, 2x running KStars/Ekos, Toshiba Satellite 17", Website:Henk's astro images
That is pretty cool Henk! Looks like the script really works well!
Jim
Scopes: Explore Scientific ED102 APO, Sharpstar 61 EDPH II APO, Samyang 135 F2 (still on the Nikon).
Mount: Skywatcher HEQ5 Pro with Rowan Belt Mod
Stuff: ASI EAF Focus Motor (x2), Orion 50mm Guide Scope, ZWO 30 mm Guide Scope, ASI 220mm min, ASI 120mm mini, Stellarview 0.8 FR/FF, Sharpstar 0.8 FR/FF, Mele Overloock 3C.
Camera/Filters/Software: ASI 533 mc pro, ASI 120mm mini, Orion SSAG, IDAS LPS D-1, Optolong L-Enhance, ZWO UV/IR Cut, N.I.N.A., Green Swamp Server, PHD2, Adobe Photoshop CC, Pixinsight.
Dog and best bud: Jack
Sky: Bortle 6-7
My Astrobin: https://www.astrobin.com/users/Juno16/