Pempro Polar Align Wizard and SGP Issue

I’m testing PEMPro v3 here as well just using the sims through SGP. I also see the same behavior but it looks like SGP is reporting that the image is complete and returning as such when requested. It then looks like PEMPro deletes the image at some point. I can’t tell what happens between those two points in PEMPro but SGP doesn’t delete images (it will just keep increment the file name) so something besides SGP is removing the image.

You can see this happening by monitoring your PEMPro folder:
C:\Users\Jared\Documents\CCDWare\PEMProV3

Looks like it’s doing something with a PaLightFrame.fit and a SGProImage.fit. I see both of these getting created and deleted but the graph doesn’t move.

Thanks,
Jared

Hi Ray.
I was watching the PEMPro screen throughout and did not notice any problems until the warning messages and fatal crash at the end.
Adrian

HI Jared,

Usually PEMPro will delete images after it has used them so that the user’s disk does not become eventually cluttered with thousands of useless images. If you don’t want PEMPro to delete the images, hold down the CTRL key as you press “Start” on the Acquire tab.

-Ray

I was just mentioning that as it seems that PEMPro would have to know the path to delete the image. I also see where PEMPro is asking for the location and SGP is returning the path with with a good status.

Thanks
Jared

Jared, in Joel’s initial post, what seemed to be happening is SGPro was returning a camera status of “Capturing” long after the image should have been completed. Is there anything else (e.g. additional debug info in PEMPro) I can do to help resolve this?

-Ray

Hi Adrian,

Which application crashed? PEMPro or SGPro? Or both?

-Ray

Hi Ray
I ran PEMPro quite a few times. In most cases (after a while) I got the warning message ‘Camera busy,’ the only option is to click ok and all the PEMPro trace information disappears off the screen, although if I remember correctly the elapsed time was still counting. On the other occasions the screen goes dim and the message ‘SGpro has stopped working and Windows will close the program’ (or words to that effect).
Regards. Adrian

Interesting, that’s not the behavior I’m seeing but the graph is still not updating. Sounds like Ken has a version of SGP for Joel to test with some additional logging which might help us track down why it kept returning “Capturing” for the camera status. Here’s my PemPro log that shows the behavior I’m seeing.

PoleAlign-2016-09-22-214854.txt (246.9 KB)

Thanks,
Jared

Hi Jared,

It takes about 5-6 images before you will start to see anything on the graph. During that time PEMPro is building a linear best fit line and/or making sure there the star is stabilized. Looking at the end of the log the star must have moved a lot, causing a huge swing in adjustment (probably off the graph):

03357:9/22/2016 10:28:33 PM: AzDirection: Adjust Counter-clockwise(West) 4081.5 Arc-mins

-Ray

@joelshort, @Jared, @rgralak

Here is a version of SGPro with much better logging around the SGPro API. It is not an installer… please replace your SGPro executable:

http://www.mainsequencesoftware.com/ken/Sequence%20Generator.exe

1 Like

Thanks Ken. I’ll test as soon as I can.

@Ken: Thanks Ken for the version with extra logging.

@joelshort: Please post back here after you’ve had a chance to try the new version.

-Ray

OK guys, I finally had a chance to create some logs with Pempro and SGP. Same issue. I get to the azimuth measurement step and tonight only 3 plots showed up on the Pempro graph. I let it go 15min. Not expecting anything, I decided to move ahead with the process and went to the adjustment step. To my surprise Pempro had me mechanically move the mount a bit for the azimuth adjustment.

Then I moved on to the elevation adjustment. This time there were no plots on the graph during the measurement. I went ahead with the adjustment step and this time, since there were no plots on the measurement, Pempro thought my elevation was spot on and didn’t have me move the mount at all. Go figure!

SGP Log
PEMPro Debug Log

I also noted that there were only 2 “SGProImage.fit” files in the Pempro folder.

Hi Joel,

So, it’s not clear from your message… .did the problem occur in your testing?

-Ray

Yes.

My point was just that Pempro allowed me to continue on with the process,
even though there was no actual error measurement completed.

1 Like

Hi Joel/Ken,

OK, I see a Capture Image request start on line 2495 on the PEMPro debug log (lines below), but the response from SGP for a long time is “CAPTURING” even though the exposure was only 1 second. Ken, do you see anything wrong in the SGP logs?

-Ray

0002495 2016-10-04 19:23:02.822: Debug, SgProCam, Sending: http://localhost:59590/json/reply/SgCaptureImage, Params: {“BinningMode”:1,“IsoMode”:0,“ExposureLength”:1,“Gain”:“”,“Speed”:“Normal”,“FrameType”:“Light”,“Path”:“E:\My Documents\CCDWare\PEMProV3\SGProImage”,“UseSubframe”:true,“X”:3468,“Y”:2347,“Width”:32,“Height”:32}
0002496 2016-10-04 19:23:02.823: Debug, SgProCam, Response: {“Success”:true,“Message”:“Image capture started successfully.”,“Receipt”:“62b654c1266c4e08867a8477a1117457”}

Hey @rgralak

So… looking through the SGPro logs and API code, I have noted a few things:

  • PEMPro looks like it is relying on camera status response to determine when to start asking for the image path on the file system. Nothing wrong with this, but our camera status was broken in 2.5.2 from a bug we fixed.
  • An alternate approach that is just as fast and immune to bad status reporting is to just ask for the image’s path about once every second. If the image is ready, you get a path, if not, you keep trying until you do (or some reasonable timeout period is reached). Additionally, if you get a path back of “abort” or “error” for your receipt, you can also quit polling then as well.
  • Despite that, the status of the camera, as given from the API, has been fixed (in 2.5.2.3). Along with this, “CAPTURING” has been removed and renamed “INTEGRATING” for general consistency within SGPro (breaking change for you and mortal sin for me).
  • Allowed camera statuses are now (most refer to the camera image): IDLE, INTEGRATING, DOWNLOADING, READY, ABORTED

I “think”, from looking at the logs that this the only problem… I will release 2.5.2.3 very soon to test this theory.

@Ken,

Ok, the changes I need to make seem easy enough. I’ll make the changes and test with your new build when it is available and I’ll post an update back here after that.

Thanks Ken,

-Ray

Thanks Ken and Ray. I look forward to testing as well.
joel

Joel/Others,

This morning I released PEMPro V3 beta (v2.99.28), which supports the changes in SGPro v2.5.2.3. Please try it and let me know if it works ok:

http://ccdware.infopop.cc/eve/forums/a/tpc/f/401101098/m/7507013876/p/1

-Ray Gralak