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

Post by fercapa » Fri Mar 16, 2018 11:35 am

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 157 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

Post by fercapa » Fri Mar 16, 2018 12:44 pm

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: 1668
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

Post by admin » Fri Mar 16, 2018 5:13 pm

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

cheers,

Robin

User avatar
admin
Site Admin
Posts: 1668
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

Post by admin » Fri Mar 16, 2018 7:48 pm

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

Post by fercapa » Fri Mar 16, 2018 9:30 pm

Fantastic! I'm glad to read that.

Thanks for your fast response.

--
Fernando Cabrerizo

User avatar
admin
Site Admin
Posts: 1668
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

Post by admin » Fri Mar 16, 2018 9:34 pm

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

Post by fercapa » Fri Mar 16, 2018 10:37 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest