Bug in PlateSolve API

Hi all

I have a problem solving an image thru the API. As Platesolver I have selected PS2.
When I try to solve an image, I see this in the log:
[06.22.17 07:31:20.389][DEBUG] [Unknown] API Request:
[06.22.17 07:31:20.389][DEBUG] [Unknown] * Endpoint: (POST) - /solve
[06.22.17 07:31:20.389][DEBUG] [Unknown] * Operation: SgSolveImage
[06.22.17 07:31:20.391][DEBUG] [Unknown] * Body: {“ImagePath”:“C:\Users\xxxxx\Documents\Astromi\ModelCreator\Temp\ModelCreator.fit”,“RaHint”:22.61142,“DecHint”:13.27406,“ScaleHint”:1.256264,“BlindSolve”:false,“UseFitsHeadersForHints”:true}
[06.22.17 07:31:20.449][DEBUG] [Unknown] FitsFileHeaderData: Angle - 0
[06.22.17 07:31:20.450][DEBUG] [Unknown] FitsFileHeaderData: Scale - 1.2
[06.22.17 07:31:20.450][DEBUG] [Unknown] FitsFileHeaderData: RA - 22.5089303649403
[06.22.17 07:31:20.450][DEBUG] [Unknown] FitsFileHeaderData: DEC - 32.7916030653835
[06.22.17 07:31:20.456][DEBUG] [Unknown] API Response:
[06.22.17 07:31:20.456][DEBUG] [Unknown] * Endpoint: (POST) - /solve

So far so good, everything looks correct.
However, when it goes on to actually solving the image, it looks like’s taking the wrong path:
[06.22.17 07:31:20.456][DEBUG] [Unknown] * Operation: SgSolveImage
[06.22.17 07:31:20.458][DEBUG] [Unknown] * Body: {“Success”:true,“Message”:“Plate solve started successfully.”,“Receipt”:“f8f63ad9-6704-4895-b84b-bdcd37683787”}
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] ************* SOLVE HINTS ****************
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] SOLVER: PlateSolve2
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] BLIND: False
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] METHOD: Max Regions
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] RA: 22.61142
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] DEC: 13.27406
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] SCALE: 1.256264
[06.22.17 07:31:20.459][DEBUG] [API Plate Solve Thread] ******************************************
[06.22.17 07:31:20.478][DEBUG] [API Plate Solve Thread] FitsFileHeaderData: Angle - 0
[06.22.17 07:31:20.478][DEBUG] [API Plate Solve Thread] FitsFileHeaderData: Scale - 1.2
[06.22.17 07:31:20.478][DEBUG] [API Plate Solve Thread] FitsFileHeaderData: RA - 22.5089303649403
[06.22.17 07:31:20.478][DEBUG] [API Plate Solve Thread] FitsFileHeaderData: DEC - 32.7916030653835
[06.22.17 07:31:20.479][DEBUG] [API Plate Solve Thread] PlateSove2 Param: RA (RAD) - 5.91965591326944
[06.22.17 07:31:20.479][DEBUG] [API Plate Solve Thread] PlateSove2 Param: DEC (RAD) - 0.231676052107279
[06.22.17 07:31:20.479][DEBUG] [API Plate Solve Thread] PlateSove2 Param: Width - 1600
[06.22.17 07:31:20.479][DEBUG] [API Plate Solve Thread] PlateSove2 Param: Height - 1200
[06.22.17 07:31:20.480][DEBUG] [API Plate Solve Thread] PlateSolve2 Command Line:
[06.22.17 07:31:20.480][DEBUG] [API Plate Solve Thread] C:\Users\xxxxx\AppData\Local\SequenceGenerator\PlateSolve2.exe 5.91965591326944,0.23167605210728,0.00974486358857,0.00730864769142,3000,C:\Users\xxxxx\AppData\Local\SequenceGenerator\Temp\psXSolve_0.fit
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] *********** SUCCESSFUL SOLVE *************
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] SOLVER: False
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] SUCCESS: False
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] CONF: 0
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] BLIND: False
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] RA: 0
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] DEC: 0
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] SCALE: 0
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] FLIPPED: False
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] ANGLE (EON): -500
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] MSG: Invalid solve!
[06.22.17 07:31:26.066][DEBUG] [API Plate Solve Thread] ******************************************

Why does it have C:\Users\xxxxx\AppData\Local\SequenceGenerator\Temp\psXSolve_0.fit as the image to be solved? Is this just a bug in the log, or does it actually try to solve the wrong image? In the PS2 Window that opens when the solve starts, the wrong path is also displayed in the top part of PS2, so it does look like it’s a bug in SGP’s API?

Did anybody else experience this problem?

Thanks
Martin

Hi Martin,

in function I have seen no bug. From my point it’s an behaviour of SGPro to copy for PlateSolve the fits file to a defined temporary FITS file, which will be solve. Due to the architecture of SGPro (which has GUID for each picture done) my guess is, that SGPro doesn’t like to push the GUID through internal processes.
But anyway, I will have a look this evening, how MountWizzard sees the API and the results with PlateSolve2.

CS

Michel

Hi Michel

Looks like you are correct. I haven’t noticed that not only the filename is different, but the whole path points to a different location! It indeed looks like it’s copying the file over to the new folder.
That the solve fails is clear in this case as the image was taking with a sim camera, I was really only wondering about the path.
Guess it was too early in the morning to notice this small but important difference :frowning:

Thanks for pointing this out!

Please ignore my bugreport, everything seems to work as expected…

Cheers
Martin