Bayer drizzle

Questions and answers about processing in StarTools and how to accomplish certain tasks.
dx_ron
Posts: 288
Joined: Fri Apr 16, 2021 3:55 pm

Bayer drizzle

Post by dx_ron »

Rather than continue to derail the dss blackpoint thread, I'll continue my quest to Bayer drizzle here.

Here's what I got out of dss:
1st_dss.jpg
1st_dss.jpg (489.96 KiB) Viewed 22793 times
Yes, that's just an initial optidev before cropping. After cropping, at some zoom levels the check pattern is less apparent. But in Wipe each of those checks has a distinctly different color :( So I stopped there and went back to make a Siril stack.

The stack is 149x90s, dithered ~10 main camera pixels every sub. That still might not be enough for good Bayer drizzle results, I don't know. I guess I need to shoot darks, too (having discovered through the warning messages that I needed to use average - and there I was with only bias).

I'm going to continue the project, though. The siril stack is good enough for 3.5 hours to convince me that I should eventually get a passable image of the Deer Lick group + Stephan's Quintet from my back yard. (the SQM meter read 18.86 that night). It is supposed to be clear Friday and Saturday.
Siril_stack.jpg
Siril_stack.jpg (381.81 KiB) Viewed 22793 times
Mike in Rancho
Posts: 1166
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: Bayer drizzle

Post by Mike in Rancho »

Cool, we really should port those Bayer Drizzle posts over here from the SBPTZ topic. Probably takes mod powers though.

So here's my old one try at CFA Drizzle as discussed, newly opened in 1.9.560b and showing the Wipe screen. At 38% scale, you can see quite a bit of grid-type artifacting. At other scales, it gets even weirder. At 100% though, things look clean. Edge artifacts are already cropped off, but no binning done yet. Makes me wonder if the CFA Drizzle results are somehow messing with ST's "sub 100% scale noise emulation." :confusion-shrug:

DSS CFAD 4h Rose duo Wipe 38pct.jpg
DSS CFAD 4h Rose duo Wipe 38pct.jpg (436.64 KiB) Viewed 22761 times

Oh and this was a bias-only stack as well with the D5300, which has internal processing discovered by Mark Shelley that renders darks pretty ineffective for hot pixel use anyway.


But here's a quick but full ST process of the file continuing on from above, and things came out fair enough. Compose bicolor duoband mode. I suppose it would need to be compared to a couple different debayer algorithms or even superpixel.

DSS CFAD 4h Rose quickie ST9 1A 1600.jpg
DSS CFAD 4h Rose quickie ST9 1A 1600.jpg (536.08 KiB) Viewed 22761 times

Not the prettiest thing in the world, but perhaps not bad for 4h and lousy flats (think I was having illumination centering problems with the Newt at this early stage, before figuring out how to fix that, and thus the left side had a horrible OIII gradient).
dx_ron
Posts: 288
Joined: Fri Apr 16, 2021 3:55 pm

Re: Bayer drizzle

Post by dx_ron »

Interesting, Mike. Hopefully collecting more Deer Lick data tonight (and maybe even a couple more nights this week), so I'll wait and have another go at it after that.

I wonder if PI's bayer drizzle is better? $250 better? Hmm
dx_ron
Posts: 288
Joined: Fri Apr 16, 2021 3:55 pm

Re: Bayer drizzle

Post by dx_ron »

Rather than continue to derail my own M81 thread - back to the appropriate thread.

I was able to get dss to Bayer drizzle and stack ~500 90s subs of the Deer Lick Group, using the master flat and master dark that had been stacked in Siril.

Unfortunately, it didn't work so good:
dss_w-master-flat-dark.jpg
dss_w-master-flat-dark.jpg (643.91 KiB) Viewed 21097 times
Having nothing better to do with my time, I went ahead in ST. I cropped in to the central part of the frame and then let uncal 1 do its thing. Obviously destroying the whole point of the Bayer drizzle (increased detail), but what the heck.

Couple of notes. 1) using a pre-stacked master dark was a poor choice when using average stacking (unless I just missed the right check box to allow cosmetic correction); 2) there is a definite scaling effect on the coloration. It affects the Max RGB view in the color module, as well.

50% scale:
ST-color_50pct.jpg
ST-color_50pct.jpg (408.16 KiB) Viewed 21097 times
100% scale:
ST-color_100pct.jpg
ST-color_100pct.jpg (584.25 KiB) Viewed 21097 times
Mike in Rancho
Posts: 1166
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: Bayer drizzle

Post by Mike in Rancho »

Bayer Drizzle is a strange bird. :?

Or at least, the DSS implementation. Maybe I'll try to dig out some OSC data and do a comparo between DSS and PI's version of it.

Setting aside the oddities popping up when scaled, there appear to be issues with both the flats and darks. Big overcorrection on the vignette, and little colored patches of dancing hot pixels.

So, why would that be? Something could be incompatible, either via bias subtraction somehow not matching up, or perhaps the reconversion from 32 to 16 bit isn't as it would be from scratch and the way DSS looks at things.

All may not be lost; trickeration can always be devised. ;)

There's no need for DSS to calibrate, it's only needed for the Bayer Drizzle and will readily stack pre-calibrated files (it just may give a warning on the summary window). Thus, calibrate in Siril, using these Siril masters, which should work just fine within Siril. Either as an option or by default, can not Siril then fill a folder up with these interim, calibrated lights, still in the debayered state?

I don't know if DSS will permit loading of 32-bit lights, or even if it does, can perform Bayer Drizzle on that bit depth. But if not, Siril should have a 16-bit FITS setting for the storage-space-impaired?
dx_ron
Posts: 288
Joined: Fri Apr 16, 2021 3:55 pm

Re: Bayer drizzle

Post by dx_ron »

Well, you're a genius. Pre-processing (16-bits) without debayering in Siril allowed dss to do its thing. Weirdly, ST would not open the tiff from dss, until I first opened it in Siril and re-saved it.

Soooo - was it worth all the effort? Not that I can see (not yet, anyway). Trying to color balance it is weird. I finally left it a bit too green with the intent to try tweaking in gimp.

Here is cropped in to the major galaxies
Deer-Lick_dss_478x90s-test_v2a_cropped.jpg
Deer-Lick_dss_478x90s-test_v2a_cropped.jpg (490.29 KiB) Viewed 20811 times
But - this is what the Max RGB view looks like
ST_2-max-color_100pct.jpg
ST_2-max-color_100pct.jpg (495.24 KiB) Viewed 20811 times
The problems go back to Wipe:
wipe-color-start_100pct.jpg
wipe-color-start_100pct.jpg (476.16 KiB) Viewed 20811 times
Wipe was at 98% and DAF 4. I tried lots of different DAF values, even up around 25. I also played with Correlation filtering to no particular effect (but I've never figured out how and when to use CF).

Here's a link to the stack after running it through Siril to make ST happy: https://www.dropbox.com/s/1bfeef17ccz3v ... .tiff?dl=0
Mike in Rancho
Posts: 1166
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: Bayer drizzle

Post by Mike in Rancho »

Sorry I dragged on this...ran it a bit ago but got distracted. :?

First by finally being able to watch a game recording. :D Been a long time. Holiday Bowl is known for being a good show, glad this one was.

Then of course I had to figure out what we were getting spammed with. Google Translate is pretty impressive.

Lastly computer problems, more on that to come. :(

But I am quite impressed with the detail in that larger - yet still small - galaxy in the field. Wow. All I did during testing was crop, wipe, O/D with IDF and a galaxy ROI, lower shadows, contrast, then SVD. And SVD just revealed some great stuff in there. Color balance seemed to work okay for me, using star sampling. Still the same as before (with this scope, I believe?) where the blue and red stars just have a slightly different tint than I am used to. But otherwise colors were good. I think I backed off the default sats as they were quite strong.

50% bin seemed to be the necessary key. That may have been the issue when I used DSS CFA drizzle too. I tried 71% on a crop edit but that wasn't enough. But, does a 50% bin ruin the whole point of using CFA drizzle to get that true pixel resolution? Dunno. Still looked pretty good.

It's been so long since I've used DSS that I can't recall ST having an issue with the TIFFs. And I used FITS anyway. There are settings in the tabs to (1) use FITS instead, but also (2) not use compression for TIFFs. But FITS is almost always safe in astro SW, so why bother with TIFF unless needed for something like PS or Gimp.

If I put DAF at 25 I'd have to come back in 24h to see the results. :lol:

I tried correlation filter too on both your and my old CFA drizzle file, and it really doesn't solve this problem, only the 50bin seems to.

Anyway I figured I would run PI's CFA drizzle on the same old DSLR duo Rosette that I previously bayer drizzled in DSS, but could not figure out how. Sheesh. Guess it's yet another of those PI things where you have to watch a video. What a PITA. So I in fact found some likely candidate videos, only to realize I had lost all audio after switching to a DP cable a couple weeks ago. Well...gah!

Troubleshooting so far has failed, and I lost my motivation to watch a PI how-to vid.
dx_ron
Posts: 288
Joined: Fri Apr 16, 2021 3:55 pm

Re: Bayer drizzle

Post by dx_ron »

Not to worry - it's the holidays. We won't expect you to do things for us quickly until after the new year :obscene-drinkingcheers:

Yeah - I had stubbornly stuck to processing at 1:1 because that seemed the point. Even though I would never view the result on a 6000px-wide display anyway.

SVD does wonders on NGC7331, especially after HDR has already bumped up the details a bit. One downside of SVD is that it coalesces many of the cores of smaller galaxies into star-like points. Not sure if there's any way to avoid that (maybe a mask with just tiny spots around those cores and Layer undo?).

So, still the question "is it worth the effort?". The 'regular' stack vs the Bayer drizzled stack at 50% bin are pretty darn similar when examined at the same scale. I think I'll keep working with Bayer drizzle for a while, at least - on principle mostly. One additional matter is at least one satellite track made it into the Bayer drizzed stack - guess more attention to pulling subs with trails up front is required. I'll have to go through and see if I can find the offending sub. Hopefully it's a *really* bright satellite in the single sub.
Mike in Rancho
Posts: 1166
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: Bayer drizzle

Post by Mike in Rancho »

I saw that on the cores. I wonder what's up. The reference images I looked at were, of course, significantly longer length, perhaps thus spreading those bright galaxy cores over more pixels and better resolving. At shorter length, they may really be concentrated into just a few pixels?

Anyway I tried to teach myself PI CFAD today. :?

Ultimately I did end up with a result of sorts. He he. Boy PI sure needs a Guy to write up user notes and special techniques for them. I fear that all the number crunching my CPU did on subframe weighting and local normalization went for naught, as I don't think I properly loaded and enabled that when I got over to drizzle integration. Bonkers. I'll have to retry later.

That said, even botched up by my errors, the output is way better than DSS CFAD. In DSS of course you just check a box. PI requires jumping through all sorts of hoops. But perhaps worth it.

I had no strange color errors, and barely any background "gridding." The only time I saw even a hint of that was via ST's scaling emulation, and even then only at something odd like 48% zoom. All other scales looked great.

I still binned 50% though. SVD just did not like full resolution, and any non-apod-outlined star (there were a lot of them too) had gnarly black eye ringing that would not correct. But at 50% I had beautiful green core stars all over the place for sampling.

That was with the HOO (L-eNhance), so I went ahead and also did CFAD on my discrete SII filter data. This was all back in Feb 2022 when I was experimenting with duoband + SII acquisition with the D5300.

I don't know PI well enough to find my duoband reference and stack the SII to it, so I just star aligned afterwards. Then I extracted the R from both files to get Ha and SII, and then used the duoband G for my OIII, ditching the B.

Used ST compose and weighted the channels according to probable relative SNR after running the PI noise estimator on the files.

I think it came out okay perhaps. Especially for this way old DSLR data and that I was using the MPCC at the time which blurs up all the data in the center. I think I'm fairly impressed with PI CFAD. Imagine if I had done it correctly! :lol:

I do have hot pixels all over, since I had no darks only bias, and also didn't set up rejection parameters so I think this is straight averaging. Also got me a little sat trail due to that also.

February 2022 Rosette in "true" OSC SHO, now with PI CFA Drizzle and ST 1.9 beta: :D

Rosette Feb 2022 PI CFAD OSC-SHO ST9 1B 1600.jpg
Rosette Feb 2022 PI CFAD OSC-SHO ST9 1B 1600.jpg (615.78 KiB) Viewed 20599 times
dx_ron
Posts: 288
Joined: Fri Apr 16, 2021 3:55 pm

Re: Bayer drizzle

Post by dx_ron »

We should not be surprised that PI Bayer drizzle works better than the DSS version - neither should we be surprised that it is 25x harder to make work. I did receive a PI trial license several months ago, but never got around to installing. I wonder if the 1 month counts from when they send the key, or from when you actually fire it up. Doesn't matter right now, as work will be too busy for a while to allow that much play time.
Post Reply