Issue in frames calibration? [Deep Sky] Processing techniques · Carlo Paschetto · ... · 13 · 328 · 21

AstroHabu 0.00
...
· 
·  1 like
·  Share link
Hi everyone,

this is a long post, but it’s needed to provide proper context. Thanks in advance to anyone willing to read through it and help me figure things out!

I’ve been struggling for days with what seems to be a calibration issue (or possibly a registration, or yet a dithering one) that I just can’t figure out.


Context:

I captured data over six consecutive nights from the Antares region — a difficult area to shoot from my location: it always stays below 18° in altitude, deep into the light pollution band (I’m shooting from a Bortle 7 zone), and I can only frame it for a couple of hours each night. That said, the images were taken under ideal conditions, though: perfectly clear skies and new moon. Only a couple of degrees higher, I successfully captured the Lagoon Nebula with just a couple of hours of data under much worse conditions, and I even got IC4592.

The sessions were shot with a modded Canon 90D, Askar FMA135, and L-PRO filter. I went with short 60s subs to avoid blowing out the background due to light pollution, which resulted in a very large dataset, collecting around 12 hours of total exposure. Standard ASIAIR dithering (2px every two frames, I believe — I’ve never changed it, though I’ve also never worked with such a wide FOV and I’m not sure how that factors in).

For each night, I took a specific flat frames set, while bias and darks were only captured during the first session.

However, unlike usual, for a variety of reasons, this time I only have the light and dark frames saved as FITS by the ASIAIR, while flats and biases are in Canon CR3 raw format. (Yes, I messed up and accidentally deleted the original CR3 light and dark frames.)

My usual processing workflow is in PixInsight. I don’t use WBPP — I go step by step: generate masters, calibrate lights, run SubframeSelector, then CC, debayering, alignment, integration, etc.

This time I’m losing my mind and can’t figure out what’s causing the issue I'm fighting with— or which dataset is to blame.

The first three below attached images show the result of the latest of dozens of attempts I’ve made over the past days: it’s one of many integrations, after a quick DynamicBackgroundExtraction and BackgroundNormalization pass. Every result, regardless of calibration strategy, ends up showing the same issue. This particular result used ~75% of the best subs selected via SubframeSelector, to ensure a clean and consistent dataset in terms of SNR, FWHM, altitude, etc. Around 9hrs integration with data as homogeneous as possible — yet the final outcome didn’t change. And it's terrible: I’ve never had a result like this — not even under a full Moon or with passing haze.


What I’m seeing:
  • A kind of walking noise, drifting diagonally, along with dust-mote patterns that seem to follow the same motion, and some vertical banding typical of sensor noise.
  • Some kind of mirrored artifacts in the dust-mote patterns: for instance, the large smudge I’ve cropped out appears mirrored and symmetrical — dark at the top, light at the bottom — as if it’s a classic flat frame artifact that’s drifting diagonally.


To me — unless I’m wrong? — this looks like a calibration issue, or possibly registration (but the stars look fine; the problem is only in the background).

Every attempt I’ve made results in only slight differences.


What I’ve already tested and verified:
  • I tried generating master flats and biases directly from CR3 files, and also converting them to FITS via Siril before feeding them to PixInsight to generate XISF masters — just to rule out any orientation mismatch between flat/bias and the FITS dark/light data. I wanted to make sure all datasets had matching FIT headers and formats.

  • (I didn’t convert CR3 to FITS directly in PixInsight, because PI doesn’t preserve Bayer pattern info in FIT headers — Siril does, and matches ASIAIR’s Darks and Lights FIT headers.) This way, I gave PI 4 datasets, all in FITS format from the start, so there’d be no mismatches during conversion to XISF.

  • I checked all flat frames and master flats from each session: the main dust mote — the one that matches the large artifact in the final integration — is consistently in the same position in all flats, regardless of framing shifts or meridian flips. As expected, it does not drift, and of course, flats themselves don’t rotate with a meridian flip.

  • In the final image, the original mote location corresponds to the dark pattern in the top-left, not the light one in the bottom-left.

  • Assuming the mirrored pattern was caused by incorrect flat orientation, I tried flipping the flats — the issue persisted. The mirrored smudges were still there.

  • I also tested the possibility of bias frame orientation being the culprit for the walking noise: flipping the bias caused strong vertical banding, confirming the original bias orientation was correct.

  • I tried running a session without flats or bias, calibrating only with darks — the result is in the fourth image I attached. The dust motes were clearly visible, but the mirrored pattern was gone. So yes, the problem does appear related to flats, but flipping them doesn’t solve it. Also, the walking noise turned into a sort of rain-like noise.

  • That awful blotchy gray haze still remained, even though skies were clean — and if it were light pollution, I’d expect it to be uniform, and removable via background modeling in PI (as in other cases).

  • For good measure, I even ran the whole thing in Siril — obviously, no difference.


Any ideas? To me this still screams a calibration issue, especially with the flats (and/or bias). I’ve never had anything like this happen, neither with Canon sessions fully acquired in CR3, nor with ZWO sessions fully in FITS.

Could it be a problem with mixing CR3-based masters with FITS-acquired lights/darks?

Thanks to anyone who’s made it to the end of this!

Carlo

Screenshot 2025-07-08 alle 10.06.30.pngScreenshot 2025-07-08 alle 10.06.11.pngScreenshot 2025-07-08 alle 10.06.20.pngScreenshot 2025-07-08 alle 15.05.11.png
Edited ...
Like
andreatax 9.89
...
· 
·  Share link
Well, a long read indeed.

Uno. Pi does preserve Bayer pattern info. I don't know why you claim otherwise. Create the Master flats and whatever else from the CR files in PI. BTW, flats and ALL the other calibration files do not need to have any Bayer info as you're operating in monochrome mode only (during calibration). 

Due. Your camera might be flipping the image in between start and end of session if it is crossing the meridian, so you have a mix of both. It happened to me and since then I disabled everything connected to that.

Tre. Check exactly how the dust motes align across the set.

Quattro. Don't shoot at less than 30 degrees, if you can.
Like
AstroHabu 0.00
Topic starter
...
· 
·  Share link
andrea tasselli:
Well, a long read indeed.

Uno. Pi does preserve Bayer pattern info. I don't know why you claim otherwise. Create the Master flats and whatever else from the CR files in PI. BTW, flats and ALL the other calibration files do not need to have any Bayer info as you're operating in monochrome mode only (during calibration). 

Due. Your camera might be flipping the image in between start and end of session if it is crossing the meridian, so you have a mix of both. It happened to me and since then I disabled everything connected to that.

Tre. Check exactly how the dust motes align across the set.

Quattro. Don't shoot at less than 30 degrees, if you can.

Thank you for your reply Andrea.

Uno -> I'm surprised as well, but if I perform a batch conversion from CR3 to FIT the bayer tag BAYERPAT is not migrated by PI script, I don't know why (and yes, I was assuming this is not an issue during calibration, but I did not want to leave anything to chance). 

Due -> This sound really new to me. Of course camera flipped during the session, but PI (and Siril as well)  always managed meridian flip without any problem while calibrating light frames, as expected. Of course after meridian flip image is rotated 180°, but calibration frames refers to sensor and lens, not the relative top of botton of images. 

Btw, the majority of my images comes from multi-night sessions that crossed the meridian, yet calibration has always gone smoothly. Calibration frames should be invariant with respect to framing, even because calibration is performed before registration rotates the images. If you have a dust mote in the top-left corner of your frame, then after the meridian flip, it will appear in the bottom-left corner of the sky image—but with reference to the sensor and optics, it remains in the top-left. If you look at the two light frames below—one taken before and one after the meridian flip—the image is obviously rotated 180°, but the main dust mote appears in exactly the same position (which also matches the flat). During calibration, then, the master flat is correctly applied to the same spot regardless of the image’s orientation—or at least, it should be in this case as well, just like it always has.

Tre -> Done. They occur exactly as I expect: fixed position with reference of physical framing, mirrored with reference to the "top" of image position after meridian.

Quattro -> This of course should be the ideal approach, but some targets does not allow it.

Anyway, it’s never been an insurmountable issue. I have several targets that, from my location, always stay well below 30°, often even under 20°—Lagoon, Trifid, Thor’s Helmet, just to name a few, but also many others I’ve tackled over the years. They require a lot of patience and really good sky conditions, but little by little they can be captured—especially when I shoot them with astro cameras. Rho Ophiuchi, though, is my nemesis for sure.

Screenshot 2025-07-08 alle 17.31.14.pngScreenshot 2025-07-08 alle 17.31.22.png
Like
andreatax 9.89
...
· 
·  Share link
When I say flipping it means reversing the position of the (1st row, 1st column) pixel with respect to the frame, which is clearly what happens in the first picture, so that at times is (last row, 1st column). I've also checked ALL my DSLR pictures and NONE of them hasn't got the BAYERNPAT keyword. That includes Nikon, Fuji and Canon DSLR/MLs. Not that matters anyway.

It seems quite difficult to understand what is going on so my suggestion is to create a Google drive/Filebin repository with an adequate sample of the offending calibration frames/light frames and we'll take from there.
Like
AstroHabu 0.00
Topic starter
...
· 
·  Share link
andrea tasselli:
It seems quite difficult to understand what is going on so my suggestion is to create a Google drive/Filebin repository with an adequate sample of the offending calibration frames/light frames and we'll take from there.


Here is a link to a repository where I stored all the bias/flats/darks frame and about 50% of the best subs taken every night. 

Rho Ophiuchi
Edited ...
Like
andreatax 9.89
...
· 
·  Share link
I did some sample processing and I can't find anything wrong with it, apart not much to show for the effort apart from Antares and M4. No matter how I cut it all calibration frames from CR2 files do produce the right Bayer pattern and keyword. I can see a lot of walking noise but this also depends on the number of frames used here although I do expect this might be potentially show up in the final stack up. Frankly, I wouldn't spend much time on this project as nothing worth of the effort is going to show up.

Obviously you got a problem with your processing pipeline but this requires you to show what you're doing. Exactly.

image.png
Like
AstroHabu 0.00
Topic starter
...
· 
·  1 like
·  Share link
andrea tasselli:
Obviously you got a problem with your processing pipeline but this requires you to show what you're doing. Exactly.

Definitely. Wow, this is exactly what I expected, cannot understand while I've been struggling with this stacking for a couple of weeks with my ordinary procedure. 

It’s probably one of those typical cases where, without realizing it, I keep repeating a mistake I’m not aware of. Tomorrow I’ll run the procedure again and post here all the steps I usually follow — they should be the standard ones I'm used to follow.
Like
AstroHabu 0.00
Topic starter
...
· 
·  Share link
andrea tasselli:
I did some sample processing and I can't find anything wrong with it, apart not much to show for the effort apart from Antares and M4. No matter how I cut it all calibration frames from CR2 files do produce the right Bayer pattern and keyword. I can see a lot of walking noise but this also depends on the number of frames used here although I do expect this might be potentially show up in the final stack up. Frankly, I wouldn't spend much time on this project as nothing worth of the effort is going to show up.

Obviously you got a problem with your processing pipeline but this requires you to show what you're doing. Exactly.



Well, this is my usual workflow — same one I used for 90% of the images in my gallery. Yet the result is still light-years away from yours… 

1) Bias and Darks integration
2) Flats calibration
3) Flats integration (one for each night to get different master flats for each session)
4) Lights calibration
5, 6, 7 and 8) Subframe selection. Apart from out-of-scale SNR and FWHM values, in this specific case I also discarded all the lights taken at extremely low altitude on the horizon. Also, I calculate weights with Juan Conejer algorithm.
9) Cosmetic correcction
10) Debayering
11) Star alignment referred to one of the light with the highest weight.
12) Integration using Linear Fit algorithm and weights calculated by Subframe selection.

13) I applied an STF to the cropped result after a simple multiscale gradient correction. Basically same result applying a simple BDE.

Screenshot 2025-07-10 alle 15.34.04.pngScreenshot 2025-07-10 alle 16.03.43.pngScreenshot 2025-07-10 alle 18.14.54.pngScreenshot 2025-07-10 alle 18.58.16.pngScreenshot 2025-07-10 alle 19.12.20.pngScreenshot 2025-07-10 alle 20.14.57.pngScreenshot 2025-07-10 alle 20.15.10.pngScreenshot 2025-07-10 alle 20.17.09.pngScreenshot 2025-07-10 alle 20.23.46.pngScreenshot 2025-07-10 alle 20.28.42.pngScreenshot 2025-07-10 alle 21.08.00.pngScreenshot 2025-07-10 alle 21.58.54.pngScreenshot 2025-07-10 alle 23.24.33.png
Like
andreatax 9.89
...
· 
·  Share link
Well, another long read there Carlo. I'm kind on leaning on an issue with the calibration frame integration and since I don't quite know which one refers to which. here is how is should go:

1. Master Bias Integration: This should go as shown in the first picture
2. Master Dark Integration: Same as above, straight off the camera as for the bias frame
3. Flat Processing: As shown by the second picture BUT WITHOUT the dark frame subtraction AND NEVER select optimize when calibrating images. MAI e poi mai.
4. Master Flat Integration: As shown by the 3rd picture
5. Light Frame Calibration: REMOVE BIAS SUBTRACTION AND UNSELECT OPTIMIZE. You're double counting here!
6. Cosmetic Correction: Set sigma to 3 for hot pixel and none (unselect) for dark pixels. Also you really should run CC before SubFrame Selection as you want the cleanest light frame to be used there.
7. After StarAlignment you should run LocalNormalization and in both case use the cleanest frame with the best weight. This MUST be one without satellite trails and with the least amount of LP. Use default settings.
8. ImageIntegration: See below
image.png
Edited ...
Like
AstroHabu 0.00
Topic starter
...
· 
·  Share link
andrea tasselli:
1. Master Bias Integration: This should go as shown in the first picture
2. Master Dark Integration: Same as above, straight off the camera as for the bias frame
3. Flat Processing: As shown by the second picture BUT WITHOUT the dark frame subtraction AND NEVER select optimize when calibrating images. MAI e poi mai.
4. Master Flat Integration: As shown by the 3rd picture
5. Light Frame Calibration: REMOVE BIAS SUBTRACTION AND UNSELECT OPTIMIZE. You're double counting here!
6. Cosmetic Correction: Set sigma to 3 for hot pixel and none (unselect) for dark pixels. Also you really should run CC before SubFrame Selection as you want the cleanest light frame to be used there.
7. After StarAlignment you should run LocalNormalization and in both case use the cleanest frame with the best weight. This MUST be one without satellite trails and with the least amount of LP. Use default settings.
8. ImageIntegration: See below



Thanks a lot, Andrea, for the corrections and suggestions. I’ll redo the whole workflow following your guidance. 

Btw, you’re absolutely right: when I start writing about something I’m passionate about, I really get carried away. Writing is kind of my thing, so of course, only feel free to follow back if you have the time and feel like it.

***********

I have to admit I never really dug deep into most of the settings I’ve always used—aside from a few specific parameters. I basically copied them from a bunch of tutorials and articles back when I first started using PixInsight, just making sure they were consistent across sources. So I’m taking advantage of your patience to clarify a few things and get your POV on them.

Point 3. I remember reading somewhere that subtracting darks is always recommended when your flat exposures are very short—which is always my case, since I shoot them at dawn against the sky using a special paper cap my daughter made for me (she's my custom-solutions and hacks engineer). That's the reason behind, no evidence on my side.

As for dark optimization, I read that it should be applied especially when the darks were taken under different temperature conditions than the lights—which, again, is often my case. I usually let the whole light session run unattended overnight and shoot my darks the next day, during daylight.

Point 5. This surprised me—twice, actually. First, because I realize your reasoning aligns perfectly with what I’ve seen in the Siril workflow I’m used to adopt. Second, because on the contrary it directly contradicts the different PixInsight tutorials/publications where I originally picked up this method. Logically, I see your point: if I already subtracted the master bias from the flats, it doesn’t make sense to subtract it again from the lights when I’m also using the master flat for calibration—since that would effectively subtract the bias twice. Is that correct?

Point 6. Interesting too. It’s something I’ve wondered about for a while but never got a clear answer on. Logically, I’d do what you suggest: run SubframeSelector after CC and just before Debayer. But I’ve seen around two conflicting recommendations: a PixInsight book actually suggests to run it before everything, directly on the raw lights; and, funny enough, ChatGPT gave me the same answer when I asked.

The reasoning behind both answers is that SubframeSelector should be applied on the most “sensor-true” signal possible. That’s why I’ve always ended up applying it after calibration and before CC—a kind of “politically correct” compromise 😄

Finally, a note on LocalNormalization (which I previously tried in this case, though it didn’t really change anything): I actually don’t use it that often, mainly for two reasons. One, it’s a huge time sink—it takes forever with large datasets. But also, I’m never quite sure how to set the parameters correctly.

Every single source I read about seems to give a different recipe, and the outcome is often tiling artifacts or odd gradients.

Since it’s such a time-consuming step, it’s incredibly frustrating to spend hours on it only to discover it made things worse. So yeah, I’d definitely appreciate some concrete advice or best practices on how to set it up properly, if you feel like it and have time.
Edited ...
Like
andreatax 9.89
...
· 
·  Share link
Ciao Carlo,

Let's start from the basics; the procedure should be as follows (and as far as I am concernd, no ifs no buts):

1. Calibration
2. Cosmetic correction
3. De-Bayer
4. Subframe Selector
5. Alignment
6. Local Normalization
7. Stacking

To get back on your points:

a. The Optimize option only works for well controlled thermal responses (meaning that there is a temperature controlling device operating underneath) of CCDs, not CMOS which are a completely different game. On top of that your Canon already carries out a somewhat similar task by using the dark reference pixels in the sensor.  In other words, it is already taking care of that, so why messing things up? And they do, rest assured.

b. Shoot one set of darks at different times in the year AT NIGHT and use those closest to the mean sensor temperature. And that is it. There is very little going on there, as per my point a.) above. And for your typical times (60s or less) you might just as well as use one set only for good. You are relaying on Cosmetic Correction to do the hard work for you. 

c. Nonsense. Subframe Selector carries out an estimate of the quality of the IMAGE, not an assessment of the sensor response, as per very well defined parameters which are best evaluated  when all the sources of noise are removed and the BG is as flat as possible.

d. LocalNormalization is a real pain in the backside but is there for a reason and the more LP and trail-infested are your skies the more it works its magic. If it is slow is because your sensor is far too big (in pixels) for what it does and for what it needs doing. You'll be much better served with larger pixels and lower pixel count.
Like
AstroHabu 0.00
Topic starter
...
· 
·  Share link
Thanks again for your patience, Andrea. Everything’s clear now — you’ve completely revolutionized my approach to workflow! :-)

This case is definitely becoming more of an edge one for me, actually. Over the past year I’ve been using the ASI533MC PRO much more often and preferably, typically shooting 180s or 300s depending on the target, but I still rely on my trusty Canon (whose sensor I had UV-IR cut modified a couple of years ago) when it gives me a better FOV with certain lenses.

Anyway Rho Ophiuchi, because of its seasonality, location, and my latitude, really is my nemesis. Maybe I’d stand a chance only with a serious cooled mono camera.
Like
andreatax 9.89
...
· 
·  Share link
I had modest success shooting for Rho Ophiuchi from S.Antioco in Sardinia. Sicily would also be good. Exitincion is far too high for Northern Italy. Mono or OSC, it won't really matter. Unless you go really up in the Alps, that is.
Edited ...
Like
 
Register or login to create to post a reply.