Not enough stars with Altair Astro 294C

Discussions, Bug Reports and Issues related to Beta versions of SharpCap
Xio1996
Posts: 42
Joined: Fri Feb 21, 2020 10:15 am
Location: Isle of Wight, UK

Not enough stars with Altair Astro 294C

#1

Post by Xio1996 »

Hi Robin,

I was using the RC3 release for the first time last night with an Altair Astro 294C camera. Every time I went into Live Stacking, SharpCap reported not enough stars to stack. If I pressed Clear in Live Stacking, the stack would re-start and the problem was gone. This happened consistently on each object observed.

Not sure if it was just a glitch for that session, an RC3 problem or perhaps something to do with the Altair Astro SDK update? I will give it another go, weather permitting.

Many thanks

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

Re: Not enough stars with Altair Astro 294C

#2

Post by admin »

Hi Pete,

if you were saving the raw frames for each stack then have a look to see what the first saved raw frame looks like. It's possible that the first frame is bad (maybe the mount is still settling), leading to poor star detection or even star trails. That would stop subsequent frames stacking until you clear and get a new first frame.

cheers,

Robin
Xio1996
Posts: 42
Joined: Fri Feb 21, 2020 10:15 am
Location: Isle of Wight, UK

Re: Not enough stars with Altair Astro 294C

#3

Post by Xio1996 »

Hi Robin,

Sorry, I don't save the raw frames. But I do have a video showing the problem, though you might need to give up an hour of your life to watch it :-)

https://youtu.be/x1qjKWxV-8w

I don't believe the mount was settling, as I did wait a few frames initially as I wasn't sure what was going on. After that, I realised how to solve the problem and just pressed 'Clear' and all was well on the next frame.

I really want to try again as RC1 and RC2 did not exhibit the problem. Unfortunately, as per usual the weather is not cooperating.

If nobody else sees the same problem then it must have been user/session specific.

Many thanks.

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

Re: Not enough stars with Altair Astro 294C

#4

Post by admin »

Hi Pete,

interesting - I had a quick zip through the video and found that when you started stacking at about 23 minutes, if you watch the live stack histogram carefully, the histogram for the first try when it *doesn't* work has a peak that is a bit further left than the one you see when you reset it a few frames later. Almost like the first frame was darker, which would explain the 'no stars found' if it was dark enough.

Of course, that only opens another question - why would the first frame be darker? We could see that target on screen in individual frames before you started stacking...

I haven't made any significant changes to live stacking since June, so I don't think anything there has changed since RC1 or 2. I have made some changes to the Altair camera code in July, but most of those were to do with error handling, so will not affect you as your camera isn't showing any errors.

I don't have a 294C here, but I have the mono equivalent Altair camera, so if we get a clear evening I may give that a try to see if I see the same.

cheers,

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

Re: Not enough stars with Altair Astro 294C

#5

Post by admin »

Hi Pete,

what's the little program you are using to switch modes? Difficult to read the title in the video...
Untitled.png
Untitled.png (39.19 KiB) Viewed 3838 times
It looks like one button press on this changes the exposure from 0.5s to 4s, maybe makes other setting changes and starts live stacking. I'm thinking that there should be a delay before starting live stacking as you are probably getting a 0.5s frame added to the stack sometimes causing the problem with no stars in the first frame.

cheers

Robin
Xio1996
Posts: 42
Joined: Fri Feb 21, 2020 10:15 am
Location: Isle of Wight, UK

Re: Not enough stars with Altair Astro 294C

#6

Post by Xio1996 »

Hi Robin,

The little program controls (.NET c# app) my EAA session by orchestrating the three main apps I use (SharpCap, AstroPlanner and Stellarium/TheSky).

When I press the capture button it causes SharpCap to load the named capture profile and then switch to live stacking. I will include the code below. As you see in the code, I do put in a delay of 1 second before activating live stacking. I can't remember why I did this but it might be for the reason you are suggesting.

I still haven't managed to fit in another observing session. :( To see if the problem still exists.

However, when the problem started I let several frames through, all of which failed. If the first frame is 500ms then that might fail but the other frames were all 4 seconds. Hence should of stacked? After a couple of objects, I realised just restarting the stack after the first frame failure solved the problem. I really need to try the process again and if it fails increase that Sleep.Time as you suggest.

Code: Select all

def selectSetupObserveMode(CaptureMode):
	sTargetName=""

	# Make sure live stacking is off and reset from last object
	if SharpCap.IsLiveStacking or SharpCap.LiveStacking.IsPaused:
			SharpCap.LiveStacking.Reset()
			SharpCap.Transforms.SelectedTransform = None

	# Check that the camera is connected
	if not SharpCap.IsCameraSelected:
		# If not then attempt to connect to the camera
		SharpCap.SelectedCamera = SharpCap.Cameras.Find( lambda x:x.DeviceName == sCameraName)
		
		if not SharpCap.IsCameraSelected:
			SharpCap.ShowNotification("Find Mode - Cannot find specified camera.") 
			return
			
	
	# Reset the Zoom to Auto. So we can see the whole image
	if SharpCap.ZoomPercent != 0:
		SharpCap.ZoomPercent=0
		
	# Turn off reticule if one is already selected
	if SharpCap.Reticules.IsVisible:
		SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[0]			
	
	#Fetch target name from Shared file.
	TargetFileName=SharpCap.CaptureFolder + "\\ObjectInfo.txt"
	
	if File.Exists(TargetFileName):
		sTargetName = File.ReadAllText(TargetFileName) 
	
		#If the clipboard has text then use that as the target name
		#if Clipboard.ContainsText():
		SharpCap.TargetName=sTargetName			
	
	# Load CaptureMode profile
	sProfileName = "CaptureMode" + str(CaptureMode) + " (" + SharpCap.SelectedCamera.DeviceName + ")"
	if not SharpCap.SelectedCamera.LoadCaptureProfile(sProfileName):
		SharpCap.ShowNotification("Capture Mode - Cannot load profile: " + sProfileName)
		return
		
	time.sleep(1)

	SharpCap.LiveStacking.Activate()
Many thanks for your help. I will let you know what I find.

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

Re: Not enough stars with Altair Astro 294C

#7

Post by admin »

Hi Pete,

from the script it looks like you are resetting the live stacking *before* you change the camera profile, which would probably explain it. The Activate() for live stacking you have at the end of the script doesn't do anything if live stacking is already showing, and it doesn't reset the stack.

Putting another Reset() after the activate should do the trick as that will clear the stack *after* the exposure has changed.

cheers,

Robin
Xio1996
Posts: 42
Joined: Fri Feb 21, 2020 10:15 am
Location: Isle of Wight, UK

Re: Not enough stars with Altair Astro 294C

#8

Post by Xio1996 »

Hi Robin,

Thank you, that makes sense. I will add the Reset() after the activate.

Many thanks.

Pete
Xio1996
Posts: 42
Joined: Fri Feb 21, 2020 10:15 am
Location: Isle of Wight, UK

Re: Not enough stars with Altair Astro 294C

#9

Post by Xio1996 »

Hi Robin,

I managed to finally get in an observing session last night.

Unfortunately, the resetting of the live stack after the profile change and activate did not solve the problem. So, I did some observations with RC3 and then updated to RC4. A vast majority of the observations all resulted in the not enough stars error, until I pressed clear manually. After the clear was pressed the live stacking worked as expected. I then uninstalled and returned to RC2. RC2 and previous versions of SharpCap all work perfectly with the same script. It looks to me that something must have changed in RC3.

In the session (with no changes to the script) I returned to RC2 and SharpCap worked. I upgraded to RC3 and SharpCap failed with the not enough stars error (until clear). I upgraded to RC4 with the same results as RC3. I uninstalled and returned to RC2. Again, RC2 worked perfectly. RC3 and above have a tendency to display ??? in the FWHM tab in live stacking. I didn't see that with RC2 in this session.

Please find links to two, mercifully :D , short videos showing RC2 working and RC3 failing. There is one instance where RC3 worked (the second live stacking on the fail video). But something weird happened, almost like the stack had not reset from the previous capture and a frame remained. Even then I still saw the ??? FWHM in the next frame.

RC2 and previous betas (success)
https://youtu.be/3rM1uUbxnPo

RC3/RC4 fail
https://youtu.be/_rUnhe_8S8Q

Please find the script for the Capture and Find commands. The purpose of the find script is to load a profile and add a reticule. The capture script loads one of three profiles (based on the number passed in) and again changes to that profile, removes the reticule and starts live stacking. Both functions will check for camera connections and ensure that any previous of current stacking is terminated.

Code: Select all

#SharpCap Capture Folder
def selectSetupFindMode():

	# Check that the camera is connected
	if not SharpCap.IsCameraSelected:
		# If not then attempt to connect to the camera
		SharpCap.SelectedCamera = SharpCap.Cameras.Find( lambda x:x.DeviceName == sCameraName)
		
		if not SharpCap.IsCameraSelected:
			SharpCap.ShowNotification("Find Mode - Cannot find specified camera.") 
			return

	# If Live Stacking then stop the process
	if SharpCap.IsLiveStacking or SharpCap.LiveStacking.IsPaused:
		SharpCap.LiveStacking.Reset()
		SharpCap.Transforms.SelectedTransform = None

	# Load FindMode profile
	sProfileName = "FindMode (" + SharpCap.SelectedCamera.DeviceName + ")"
	if not SharpCap.SelectedCamera.LoadCaptureProfile(sProfileName):
		SharpCap.ShowNotification("Find Mode - Cannot load profile: " + sProfileName)
		return

	# Reset the Zoom to Auto. So we can see the whole image
	if SharpCap.ZoomPercent != 0:
		SharpCap.ZoomPercent=0
		
	# Display a reticule if one is not already selected
	if not SharpCap.Reticules.IsVisible:
		SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[1]		
 	
 	# Background subtraction Off - might cause flashing image.
 	#SharpCap.SelectedCamera.Controls[32].Value = "Off"
 	
	# Change the Find and Frame expsoure to 2000ms
	#SharpCap.SelectedCamera.Controls.Exposure.ExposureMs = 500
	 

def selectSetupObserveMode(CaptureMode):
	sTargetName=""

	# Make sure live stacking is off and reset from last object
	if SharpCap.IsLiveStacking or SharpCap.LiveStacking.IsPaused:
			SharpCap.LiveStacking.Reset()
			SharpCap.Transforms.SelectedTransform = None

	# Check that the camera is connected
	if not SharpCap.IsCameraSelected:
		# If not then attempt to connect to the camera
		SharpCap.SelectedCamera = SharpCap.Cameras.Find( lambda x:x.DeviceName == sCameraName)
		
		if not SharpCap.IsCameraSelected:
			SharpCap.ShowNotification("Find Mode - Cannot find specified camera.") 
			return
			
	# Reset the Zoom to Auto. So we can see the whole image
	if SharpCap.ZoomPercent != 0:
		SharpCap.ZoomPercent=0
		
	# Turn off reticule if one is already selected
	if SharpCap.Reticules.IsVisible:
		SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[0]			
	

	#Fetch target name from Shared file.
	TargetFileName=SharpCap.CaptureFolder + "\\ObjectInfo.txt"
	
	if File.Exists(TargetFileName):
		sTargetName = File.ReadAllText(TargetFileName) 
		SharpCap.TargetName=sTargetName			
	
	
	# Load CaptureMode profile
	sProfileName = "CaptureMode" + str(CaptureMode) + " (" + SharpCap.SelectedCamera.DeviceName + ")"
	
	if not SharpCap.SelectedCamera.LoadCaptureProfile(sProfileName):
		#SharpCap.ShowNotification("Capture Mode - Cannot load profile: " + sProfileName)
		return

	time.sleep(1)		

	SharpCap.LiveStacking.Activate()

	# Profile loaded, live stacking activated - reset so that I know I'm using the correct settings.

	#SharpCap.LiveStacking.Reset()
I will stay on RC2 for now. This feels like a niche problem, scripting/camera or maybe user :D but I hope it can be overcome.

Many thanks for your help.

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

Re: Not enough stars with Altair Astro 294C

#10

Post by admin »

Hi Pete,

I just went back over the changes between RC2 and RC3, and I noticed that although I haven't changed *my* Altair code, there was an update of the Altair SDK between those versions.

We can confirm if this is the issue by copying the 'Altaircam.dll' file from RC2 into RC3 (expecting it to make RC3 work) or copying the one from RC3 into RC2 (expecting it to break RC2). In either case, once you have altered the file, run SharpCap by double clicking 'SharpCap.exe' in the install folder, since using the shortcut on the desktop or start menu can trigger a repair of the installer and put the original AltairCam.dll back.

I am wondering if the new SDK has changed something about how frames arrive from the camera after a setting change - for instance that instead of the next frame being with the new settings, we now get one or more frames with the old settings before the change is applied.

cheers,

Robin
Post Reply