Save as RAW (32bit) & Sigma Clipping Stacking algorithm

Discussions of Electronically Assisted Astronomy using the Live Stacking feature.
fercapa
Posts: 15
Joined: Sun Mar 11, 2018 5:39 pm

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#11

Post by fercapa »

Another test.

I wrote a script that saves 16 & 32 bit images with increasing exposure values. This is the script:

Code: Select all

pathDestiny="E:\\Captura\\testExpo"
numFotos=6
numStack=20
for i in range(numFotos):
	exp=0.3*(i+1)
	SharpCap.SelectedCamera.Controls.Exposure.Value = exp
	if (SharpCap.LiveStacking.IsActive):
	    filename="%s\\Fot_%d.fits"%(pathDestiny,i)
	    filename16="%s\\Fot_%d_16b.fits"%(pathDestiny,i)
	    SharpCap.LiveStacking.Reset()
	    SharpCap.LiveStacking.Parameters.Paused=False
	    while (SharpCap.LiveStacking.TotalFrames < numStack):
	        time.sleep(1)
	    SharpCap.LiveStacking.Parameters.Paused=True
	    SharpCap.LiveStacking.SaveFrame(32, filename)
	    SharpCap.LiveStacking.SaveFrame(16, filename16)
And this is the result:
testExpo.jpg
testExpo.jpg (217.22 KiB) Viewed 2709 times
When exposure arrives 1.2ms the 32 bit file is ok. This was done with gain at 10. If I increase gain to 50 32 bit file works ok with an exposure value of 0.6ms.

It seems that if the image has low brightness sigma clipping algorithm fails. I will try to reproduce it with another camera.

--
Fernando
fercapa
Posts: 15
Joined: Sun Mar 11, 2018 5:39 pm

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#12

Post by fercapa »

Tested with a DFK camera from Imagingsource with similar results. Low gain, low exposure and sigma clipping fails. Well, not exactly sigma clipping, the problem is when save the image to disk as 32 bit image, if it is saved at 16 bit the image is ok, and so does the image preview, the problem only appears in 32 bit saved image.

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

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#13

Post by admin »

Ok, thanks, that gives me some things to test.

cheers,

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

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#14

Post by admin »

Hi,

ok, found the bug - turns out it was a bit depth issue, but not the one that causes it to always show as 16 in the UI. Not quite sure how it worked properly for brighter images to be honest! Will be in the next version.

cheers,

Robin
fercapa
Posts: 15
Joined: Sun Mar 11, 2018 5:39 pm

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#15

Post by fercapa »

Fantastic! I'm glad to read that.

Thanks for your fast response.

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

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#16

Post by admin »

Hi,

I put the new build online - it seems to work for me where before it didn't, but please give it a try and report any continuing problems. Not sure I would have found the issue without your detective work - thanks!

Robin
fercapa
Posts: 15
Joined: Sun Mar 11, 2018 5:39 pm

Re: Save as RAW (32bit) & Sigma Clipping Stacking algorithm

#17

Post by fercapa »

Wow! You are even faster publishing new builds... ;-)

I have just tested the new one and it worked perfect from very low exposures to very high. Tomorrow I will do a deeper test, but it seems that it's done.

Happy to have helped you.

--
Fernando
Post Reply