Unable to plate solve with Astro-Physics APPM

I’ve been unable to get SGP to work as the image capture and plate solve software for the Astro-Physics APPM point mapper. The symptom is that, when I attempt to solve from APPM, SGP appears to take an exposure, but says “downloading image” for a very long time. Eventually, SGP says “API call complete”, but the camera image never appears in the SGP window, and APPM waits indefinitely and needs to be aborted manually.

This has always been an issue for me, going back a couple of years. I’ve been using MaxIm/DL as my capture software when I build a point model as a workaround. I’ve recently switched from an ASI1600MM-cool camera to a QSI690-wsg8, and I wanted to finally investigate the issue.

To reproduce the problem, I did the following steps:

  • Started SGP and connected to all equipment
  • Slewed to a target in the sky and took a sample image, which worked fine
  • Did a “solve & sync” in SGP to ensure that plate solving works, which it did
  • Connected APPM to SGP and the mount
  • Attempted a plate solve from APPM and encountered the problem above

In looking at the SGP log, it appears that the problem happened here:

[03/09/20 03:53:42.415][DEBUG] [Camera Thread] ASCOM Camera Error : NumX set - '6776' is an invalid value. The valid range is: 1 to 3388. (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: NumX set - '6776' is an invalid value. The valid range is: 1 to 3388.
   --- End of inner exception stack trace ---
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
   at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 443)
   at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 483
   at ASCOM.DriverAccess.Camera.StartExposure(Double Duration, Boolean Light) in C:\ASCOM Build\Export\ASCOM.DriverAccess\Camera.cs:line 593
   at sc.hy(ql A_0, sm& A_1, sm[] A_2)
[03/09/20 03:53:42.416][DEBUG] [Camera Thread] ASCOM Camera: Attempting to abort exposure...
[03/09/20 03:53:42.426][DEBUG] [Camera Thread] ASCOM Camera AbortImage: Camera state is 0
[03/09/20 03:53:42.426][DEBUG] [Camera Thread] ASCOM Camera: Camera state is idle, abort not needed...

I cross referenced the APPM log and here is the relevant log entry:

0000007 2020-03-09 03:53:17.545:      Debug,        SgProCam, Sending: http://localhost:59590/json/reply/SgGetCameraProps, Params: {}
0000008 2020-03-09 03:53:17.797:      Debug,        SgProCam, Response: {"Success":true,"Message":"Success","NumPixelsX":3388,"NumPixelsY":2712,"SupportsSubframe":true,"GainValues":["Not Set","High Gain","Low Gain"]}
0000009 2020-03-09 03:53:41.873:      Debug,        SgProCam, Sending: http://localhost:59590/json/reply/SgGetCameraProps, Params: {}
0000010 2020-03-09 03:53:41.914:      Debug,        SgProCam, Response: {"Success":true,"Message":"Success","NumPixelsX":3388,"NumPixelsY":2712,"SupportsSubframe":true,"GainValues":["Not Set","High Gain","Low Gain"]}
0000011 2020-03-09 03:53:42.089:       Info,   State Machine, Entering State=StartPlateSolveNow
0000012 2020-03-09 03:53:42.136:       Info,   State Machine, StartPlateSolveNow via SGPro PlateSolver: Starting Exposure=5
0000013 2020-03-09 03:53:42.171:       Info,  StartTakeImage, Sequence Generator Pro: Binning=2, Duration=5, IsDarkFrame=False

It appears that APPM never send anything to SGP that included an X parameter of 6776. The suspicious thing is that I have APPM configured to bin 2x2, and 6776 is exactly double the camera’s native horizontal size of 3388.

I have the full logs available. I don’t see how to attach them here, but I’ll see if I can do so after posting the topic…

I am using the following versions:

  • SGP version (although I had the same problem in 2.x)
  • .NET framework version 4.7.2
  • APPM version

Thanks for any suggestions,

I am unsure. It is clearly a binning issue, but I am not sure if the issue is with how APPM is requesting the image (which is not logged) or if it is with how SGPro interprets it. I have tested the API here at 2x2 and there are no problems. Do you know if APPM is attempting to use and define a subframe?@rgralak

I do not have it configured to use subframes, and I see nothing in the APPM log to that effect, either).

At this point, I’m not sure if it’s an SGP issue or an APPM issue. Since the runtime symptom appears in SGP (sitting at “downloading” for a long time), I figured that I’d start here.

I posted snippets of both logs, and I am happy to contact the APPM developer with the same information. I also have the complete logs available.

I added Ray… he may reply here and save you some time. You seem like you are pretty tech adept… if you want, you can use Fiddler2 to inspect all traffic on localhost and snatch up the POST request that requests image capture.

Hi Wade and Ken,

I’ll have to look into this, but Wayne is there a particular reason you are using 2x2 binning?


Yes. I’m binning 2x2 because of the download times.

PS: It’s Wade :slight_smile:

This 2x binning problem sounds familiar. Are you using the camera’s ASCOM driver or its native driver in SGPro?


Wade, sorry but it looks like APPM only supports 1x binning with SGPro. I put the enhancement to support alternative binning values at the top of my “todo” list. If you want faster download times you can use 1/2x1/2 subframe at 1x binning, or just use 1x binning full frame.


Thanks for the confirmation and putting it on your “todo” list!

Wade, in case you didn’t see it, I sent you a private email with a link to a beta version to try.


Thanks. I did get your mail, and I’ll give it a try.

Right now, I’m in a holding pattern due to weather. The soonest opportunity might be Monday (if the weather forecast holds).

Also, make sure you have the correct image scale set in APPM or Plate Solve will fail in APPM…found that out the hard way :slight_smile:

Hi Ray,

I just wanted to let you know that I had a chance to try the version that you sent me and it worked great. It solves correctly now when binned 2x2.


Hi Wade,

Okay great! I’ll prepare a new build to make this fix more widely available.