Problems with flats

A place to report problems and bugs in SharpCap
Forum rules
‍

If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
User avatar
admin
Site Admin
Posts: 17530
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Problems with flats

#21

Post by admin »

Hi Michael,

new update will hopefully be out later today that will fix the issue with the folder monitor camera - turned out that the order of some of the checks for whether the flat frame was suitable for use was wrong - for most cameras it doesn't matter, but for the folder monitor it meant throwing away perfectly good flat frames as being incompatible :(

cheers,

Robin
MikeB838
Posts: 129
Joined: Sun Jan 28, 2024 5:18 pm

Re: Problems with flats

#22

Post by MikeB838 »

Hi Robin,

thanks a lot for the info and the update !
Now there are no more donuts in the folder monitor. Great!! :D

cheers,

Michael
MikeB838
Posts: 129
Joined: Sun Jan 28, 2024 5:18 pm

Re: Problems with flats

#23

Post by MikeB838 »

Hi Robin,

I'm sorry to continue this thread again.

Now I have donuts in the live stack at the telescope. It seems to start with version 383 and is present in 393. In 314 and 319 it looked good.
But: looking into the logs I find a:

Code: Select all

Flat frame not compatible with frame
in logs from using SC in version 314 (not in all), 319 (not in all), 331, 383 and 393.

Does this mean that SC does not use the flat (that would explain the donuts)?
What do I have to change to let SC use my flats?

I shoot my darks and flats without altering the settings.

Here I have a zip-file with log, flat, dark and raw images (80MB) (captured with version 383):

www.twus.de/example.zip

I hope you have time to take a look! Thanks for your support!

cheers,
Michael
User avatar
admin
Site Admin
Posts: 17530
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Problems with flats

#24

Post by admin »

Hi Michael,

the error that you are seeing does mean that SharpCap can't use the flat frame - the only real cause of that message is if either the size of the flat frame image doesn't match the image being taken, or if the flat frame is RGB and the captured frame is RAW (or the other way around). Unfortunately the log records the size information for the captured frame, but not for the flat frame, so we can't see the exact cause of the mismatch in the log.

I do see though that the flat that you were trying to use in the log isn't the same file as the flat that you sent in the zip file

In log:

Code: Select all

C:\Users\Mike\Desktop\SharpCap Captures\2025-06-11\424482\flats\MasterFlat_23_34_36_offset=2.033%.fits
In zip:

Code: Select all

MasterFlat_23_32_49.fits
I would go and have a look for that MasterFlat_23_32_49.fits flat frame and see what resolution it is - the correct one to work would be width=2712, Height=1538, 1 colour plane (RAW or mono).

cheers,

Robin
MikeB838
Posts: 129
Joined: Sun Jan 28, 2024 5:18 pm

Re: Problems with flats

#25

Post by MikeB838 »

Hi Robin,

thanks for looking.

I experimented with flats with bias and dark and MasterFlat_23_34_36_offset=2.033%.fits was one of this. As I saw the donuts
I loaded the pure flat MasterFlat_23_32_49.fits (seen in the log some lines later).
Both are with width=2712, Height=1538 and both use RAW16.

I now made a test at my desk and I see that the stack has in the fits-header naxis = 3 and the Flat has naxis = 2.
When I start the flat capture I did not change anything. What is going on?

cheers,

Michael
User avatar
turfpit
Posts: 2264
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: Problems with flats

#26

Post by turfpit »

Mike

See https://cdn.diffractionlimited.com/help ... itions.htm

naxis, 2 = mono; naxis, 3 = colour

Dave
MikeB838
Posts: 129
Joined: Sun Jan 28, 2024 5:18 pm

Re: Problems with flats

#27

Post by MikeB838 »

Hi Dave,

thanks for the link. I'm aware of the meaning, but I was wondering if that could be the explanation, why SC does think the flat can not be used.

The flat is mono (naxis = 2), no matter if I check "Create Monochrome Flat Frame" or not.

I shoot in RAW16, so each raw frame is in mono, but the resulting live stack is in colour (something I do not understand).

I shoot the flat without changing something. What do I need to change for SC to accept my flats for my single frames?

In my beginnings I shoot in RGB24, but I switched to RAW16 after Robin gave me the hint, that in RGB24 I only have 3x8bit vs 16bit in RAW16.
But I did not quite understand how seemingly monochrome raw frames become colour stacks.

Michael
User avatar
turfpit
Posts: 2264
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: Problems with flats

#28

Post by turfpit »

Mike

One for Robin to explain I think.

Dave
User avatar
admin
Site Admin
Posts: 17530
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Problems with flats

#29

Post by admin »

Hi,

OK, so if you have a colour image then there are two possibilities

1) It's an RGB image, so you have 3 values for R/G/B per pixel
2) It's a raw image, so you have one value per pixel which could be R or G or B, depending on the bayer pattern matrix

If you set your camera to RGB mode then you get the first option, if you set it to RAW8 or RAW16 then the second. If you have previously stacked images in live stacking and saved them then the saved images are the first sort - RGB - SharpCap has to convert from the original RAW images from the camera to RGB to do the alignment and stacking.

The normal use case for flats with a colour camera is that you have RAW images coming from the camera, so that you will have images of one colour plane for all of the individual flats, the master flat and the raw images coming from the camera. This applies regardless of the choice of 'monochrome flat' - with that ticked the created master flat is truly monochrome, with it unticked it is 'RAW' (but still a single colour plance).

If you end up trying to mix an RGB flat with RAW images from the camera, or a RAW/Mono flat with RGB images from the camera then SharpCap will not be able to apply the flat. I suppose that strictly speaking you could apply a mono flat to RGB, but there just isn't any code in SharpCap to do that.

OK, so that's the background...

This means that the master flat should be naxis=2 to work correctly with the RAW images coming from the camera. If you have an naxis=3 master flat then that will not work with RAW camera images. On the other hand, if you have an naxis=2 flat, you cannot use that with RGB (naxis=3) images saved from live stacking (this is not a problem anyway - applying flats after stacking is incorrect procedure and will never work properly).

Based on what was in your log, I would have expected the master flat (C:\Users\Mike\Desktop\SharpCap Captures\2025-06-11\424482\flats\MasterFlat_23_34_36_offset=2.033%.fits) to work correctly if it was width=2712, height=1538, naxis=2. Is that something that you can check (or can you send me that master flat file?)

cheers,

Robin
MikeB838
Posts: 129
Joined: Sun Jan 28, 2024 5:18 pm

Re: Problems with flats

#30

Post by MikeB838 »

Hi Robin,

Thank you for your time, I made the mistake to compare the flats with the saved stack (naxis = 3). That is not the file, the flats are applied to. The flats are applied to the single raw frames. :idea:

I use 2) and set my PlayerOne Neptune-C II to RAW16.

And now I understand:
The single frames have one plane, the colour is encoded in it in the Bayer pattern (RGGB in my case). When I save the stack, SC decodes the
Bayer pattern to create an RGB stack file in colour.

The single raw frames all have naxis = 2, the single flat frames and the master flat have naxis = 2 too.
I do not apply the master flat to the saved stack, but I set the ticks in the "Prepocessing tab": Apply Flat and Subtract Dark when doing live stacking.

So I would suppose - as all frames have the same size - that there are no problems for SC to apply the master flat.
Has it sth. to do with Debayer Preview set to On ?

Can I add additional logging to help finding the culprit?

The flat you asked for is under: www.twus.de/flat.zip (7MB)

thank you very much and cheers,

Michael
Post Reply