Bug in passing coordinates to PlateSolve 3.80

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Bug in passing coordinates to PlateSolve 3.80

#1

Post by zerolatitude »

Hi,

When I set PS3 as my platesolver, on starting platesolve the PS3 window opens as usual, but the initial coordinates and the FOV size are blank.

It therefore moves to a blind solve which obviously takes time.

The mount is connected and the correct RA/DEC coordinates are visible in SC. But they dont seem to get passed onto PS3.

Could you take a look? This doesnt happen if I use PS3 standalone or with NINA. Also, the coordinates get passed fine to PS2.

I'm using Sc 4.1, latest version.

Thanks
Last edited by zerolatitude on Sat Nov 18, 2023 10:49 am, edited 1 time in total.
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Re: Bug in passing coordinates rto PlateSolve 3.80

#2

Post by zerolatitude »

Heres the log from the "Test Platesolver" action in File>Sharpcap Settings>Platesolving

At 13:01:07.042856, the FOV etc is calculated.

But at 13:01:07.064850 it seems to go immediately to a blind solve?

Info 13:01:07.035004 #1 Plate solver detection : Astap (auto-detect) - Found at c:\Program Files\Astap\Astap.exe in bool SharpCap.ImageProcessing.CombinedPlateSolveFactory.CheckInstalledImpl()
Info 13:01:07.035279 #1 PlateSolve2 found at C:\SoftwareExe\PlateSolve2.28\PlateSolve2.exe in bool SharpCap.ImageProcessing.PlateSolve2Factory.CheckInstalledImpl()
Info 13:01:07.035545 #1 PlateSolve3 found at C:\SoftwareExe\Platesolve3.80\PlateSolve3.80.exe in bool SharpCap.ImageProcessing.PlateSolve3Factory.CheckInstalledImpl()
Debug 13:01:07.041250 #1 Started async Task<RADecPosition> SharpCap.Models.PlateSolveOnly.SolveAsync(PlateSolvePurpose frt, CancellationToken cancellationToken, double radius, RADecPosition hintPosition, bool setPixelPositionData) in async Task<RADecPosition> SharpCap.Models.PlateSolveOnly.SolveAsync(PlateSolvePurpose frt, CancellationToken cancellationToken, double radius, RADecPosition hintPosition, bool setPixelPositionData)
Info 13:01:07.042856 #1 Field of view calculated as 1.38x1.03 degrees based on FL of 200.0mm and sensor size of 4.80x3.60mm in SizeF? SharpCap.Models.FrameToSolveProviderBase.GetFieldOfView()
Debug 13:01:07.050244 #1 Notification (Status=Warning): Solving frame... Please wait... in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Info 13:01:07.064850 #1 Starting blind plate solve in async Task<RADecPosition> SharpCap.Models.PlateSolveOnly.SolveImplAsync(CancellationTokenSource tokenSource, string tmpFile, DateTime time, SizeF? fieldOfView, double radius, bool setPixelPositionData)
Debug 13:01:07.066110 #1 Started async Task<SolveResults> SharpCap.ImageProcessing.PS23PlateSolver.SolveFrameAsync(string imageFile, RADecPosition approxPosition, SizeF? fieldOfView, CancellationToken cancellationToken, double searchRadius, double minScale, double maxScale) in async Task<SolveResults> SharpCap.ImageProcessing.PS23PlateSolver.SolveFrameAsync(string imageFile, RADecPosition approxPosition, SizeF? fieldOfView, CancellationToken cancellationToken, double searchRadius, double minScale, double maxScale)
Info 13:01:07.068668 #1 PlateSolve temp folder set to C:\Users\Paradigm\AppData\Local\Temp\b2f90e76-1852-47ca-8f26-af6ebba1b2f1 in async Task<SolveResults> SharpCap.ImageProcessing.PS23PlateSolver.DoSolveImpl(PlateSolverRunner psr, RADecPosition approxPosition, SizeF? fieldOfView, CancellationToken cancellationToken, double searchRadius)
Info 13:01:07.083494 #1 Paged memory check based on total memory of 8045Mb, available of 4707Mb in (int pooled, int unpooled) SharpCap.Base.Memory.Allocator.NumberOfMegabytesToMap()
Info 13:01:07.083860 #1 Paged memory enabled at 2048Mb for Frame Cache and 2048Mb for LiveStack/Misc on 64 bit system. in (int pooled, int unpooled) SharpCap.Base.Memory.Allocator.NumberOfMegabytesToMap()
Info 13:01:07.084224 #1 Assigning 2048Mb to non-pool memory and 2048Mb to the frame pool. in static SharpCap.Base.Memory.Allocator()
Info 13:01:07.084458 #1 Paged memory check based on total memory of 8045Mb, available of 4707Mb in (int pooled, int unpooled) SharpCap.Base.Memory.Allocator.NumberOfMegabytesToMap()
Info 13:01:07.084667 #1 Paged memory enabled at 2048Mb for Frame Cache and 2048Mb for LiveStack/Misc on 64 bit system. in (int pooled, int unpooled) SharpCap.Base.Memory.Allocator.NumberOfMegabytesToMap()
Info 13:01:07.107021 #1 Initializing FitsFileWriter at 1280x960x1x8bits, Mono, 1 bytes per PEL for in void SharpCap.Base.FileWriters.FileWriterBase.Initialize(IFileNameProvider fnp, ColourSpaceId colourSpaceId, int width, int height, int bytesPerPixelElement, int significantBitDepth, int colourPlanes, string DeviceName)
Info 13:01:07.146615 #1 About to run external command : C:\SoftwareExe\Platesolve3.80\PlateSolve3.80.exe C:\Users\Paradigm\AppData\Local\Temp\b2f90e76-1852-47ca-8f26-af6ebba1b2f1\frame.fits 0.0000 1.5533 0.0240, 0.0180, in void SharpCap.ImageProcessing.AsyncProcessRunner.Start(string cpath, CancellationToken cancellationToken, params string[] args)
Info 13:01:27.626367 #1 Plate solver completed with no error code. in async Task<bool> SharpCap.ImageProcessing.PS23PlateSolver.TrySolveAsync(RADecPosition approxPosition, double searchRadius, PlateSolverRunner psr, List<string> lines, SizeF? frameFov, CancellationToken cancellationToken)
Info 13:01:27.628014 #1 Plate solving log: in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.628166 #1 True in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.628314 #1 2.76073852099423,1.56709883842659 in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.628455 #1 55245.1382622988,54.3626698340933 in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.628602 #1 UC4 All Sky in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.628742 #1 0.00843734131808347,0.0117689460607481,-0.0117789935988695,0.00844068443297897,1.81011403257259E-05,1.00069841753301,-0.948807578779527,-0.00021649285389802 in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.628884 #1 -8.98267154388055E-07,-5.27690088366786E-07 in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Info 13:01:27.629025 #1 17.9708536814357,1.2312971514469,17.4472601798999,212,211 in SolveResults SharpCap.ImageProcessing.PlateSolve3PlateSolver.ReadResults(string framefile, Size sz, PlateSolverRunner psr)
Debug 13:01:27.633127 #1 Notification (Status=OK): Plate solve succeeded, currently pointing at RA=10:32:42,Dec=+89:47:17 (J2000), field of view is 1.3275x0.9956 degrees, up is 305.6 degrees E of N. in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Info 13:01:27.633690 #1 Field solved to RA=10:32:42,Dec=+89:47:17, field Size {Width=1.3275123, Height=0.9956342} in async Task<RADecPosition> SharpCap.Models.PlateSolveOnly.SolveImplAsync(CancellationTokenSource tokenSource, string tmpFile, DateTime time, SizeF? fieldOfView, double radius, bool setPixelPositionData)
Info 13:01:27.634831 #1 Test result : RA=10:32:42,Dec=+89:47:17 in async Task SharpCap.ViewModels.PlateSolveSettingsViewModel.TestSolverAsync(object obj)
Info 13:01:29.894846 #1 MessageBox : 'SharpCap Pro (v4.1.11079, 64 bit)' Plate solving test successful. => user choice OK in DialogResult SharpCap.Base.Utilities.MessageBoxHub.ShowImpl(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
Warning 13:01:29.895226 #1 MessageBox: Plate solving test successful.
User avatar
admin
Site Admin
Posts: 12424
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Bug in passing coordinates to PlateSolve 3.80

#3

Post by admin »

Hi,

I think that's OK. The bit about blind solve in the log is internal to SharpCap, which distinguishes between a blind solve (find position across possibly the whole sky, do nothing with the information except display it) and a plate solve and resync (solve in a limited area around GOTO mount co-ordinates and recenter target). For the testing, we don't want to be moving the mount around, so the blind solve code gets used. SharpCap gives the plate solving engine the approximate co-ordinates even in a blind solve (if it has some to use). In the test, it uses RA=0, Dec=~+89 as the starting point, since the image used is of an area near the north celestial pole.

Lower down the log you see this

Code: Select all

Info 13:01:07.146615 #1 About to run external command : C:\SoftwareExe\Platesolve3.80\PlateSolve3.80.exe C:\Users\Paradigm\AppData\Local\Temp\b2f90e76-1852-47ca-8f26-af6ebba1b2f1\frame.fits 0.0000 1.5533 0.0240, 0.0180,
The first two numbers after the 'frame.fits' filename are the seach starting point in RA and Declination, but PlateSolve3 wants them in radians, so you have zero and roughly pi/2. PlateSolve3 has no option on the command line to restrict the search to a specific radius around the start point (at least none that I know of), so it will always do a full sky search.

cheers,

Robin
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Re: Bug in passing coordinates to PlateSolve 3.80

#4

Post by zerolatitude »

Hi Robin,

I did a couple more tests.

First, I ran PS3 from command line on a test image and it worked as expected. The blanks (RA/Dec/FOV) were filled in with the starting values and solving was very fast.

Then, I tried platesolving on already captured images of M33 via livestack in SC.

The log says
Info 17:10:54.966205 #1 About to run external command : E:\SoftwareExe\Platesolve3.80\PlateSolve3.80.exe C:\Users\Astro\AppData\Local\Temp\c265863f-b590-4d8a-a393-113a083bd3ea\frame.fits 0.4095 0.5351 0.0000, 0.0000, in void

The actual solve is
Debug 17:11:18.877757 #1 Notification (Status=OK): Plate solve succeeded, currently pointing at RA=01:33:52,Dec=+30:38:44 (J2000), field of view is 1.3435x1.3435 degrees, up is 1.0 degrees E of N.

But the initial parameters passed are 0 for field size. Maybe thats why its taking a blind solve?

Similarly, in the earlier log, it passed RA=0 (not correct), and Dec 1.55 radians (89 degrees), also not correct.
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Re: Bug in passing coordinates to PlateSolve 3.80

#5

Post by zerolatitude »

Herer are 2 screenshots.

The first is PS3 in native UI, from command line, NINA etc. It solves within 1-2 sec. Never shows "all sky solve" in the PS3 UI.

PS3_Normal.png
PS3_Normal.png (13.71 KiB) Viewed 281 times


Second is PS3 from Sharpcap. You can see what I mean by the blanks. This takes 15-20 sec to solve.Solves only after showing "all sky solve" in PS3 UI.

PS3_SC.png
PS3_SC.png (15.69 KiB) Viewed 281 times
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Re: Bug in passing coordinates to PlateSolve 3.80

#6

Post by zerolatitude »

Not to bombard you :-)

But just noticed the SC command to PS3 has commas between parameters. As per the PS3 readme, there should not be any commas between the parameters passed.

Could that be it?

Log from SC:
Info 17:10:54.966205 #1 About to run external command : E:\SoftwareExe\Platesolve3.80\PlateSolve3.80.exe C:\Users\Astro\AppData\Local\Temp\c265863f-b590-4d8a-a393-113a083bd3ea\frame.fits 0.4095 0.5351 0.0000, 0.0000, in void

From PS3 readme:
Here's an example of a call:
platesolve3.80 "C:\Users\13108\Documents\PlateSolve3\Platesolve3.80\M45-0004B.fit" 0.9905 0.423 0.214 0.214
User avatar
admin
Site Admin
Posts: 12424
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Bug in passing coordinates to PlateSolve 3.80

#7

Post by admin »

Hi,

as far as I understand it, putting zero for the field size makes PS3 try all possible field sizes (different image scales), but has no effect on how much of the sky is searched.

SharpCap will pass a starting position on to PS3 if a set of current co-ordinates is available. The places this can come from include

* A connected ASCOM mount
* The FITS header metadata of a loaded image in the test camera
* The point that is directly overhead for the current location if lat/long are available (on the basis that it's best to search the visible half of the sky first)
* A default set of co-ordinates (RA=0, Dec=0) if none of the above are available.

Do you have a reference for all the command line parameters that PS3 accepts? I have never discovered one to limit the search area, but maybe I have missed something.

cheers,

Robin
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Re: Bug in passing coordinates to PlateSolve 3.80

#8

Post by zerolatitude »

Hi Robin,

The reference is in my earlier post. There is no parameter for search radius, but if the starting RA/Dec/X/Y parameters are given reasonably, the search is very fast, as in Native UI, command line, NINA etc.

When they are blank, it is very slow, as in Sharpcap.

There seems to be some issue with the way SC passes the parameters to PS3.

1. In the previous to last logI gave, the FITS file has RA and Dec in header, still SC passes 0 and 90 for RA/Dec. This should be the last option as per the flow mentioned by you, and should not be happening when the FITS header has the coordinates.

2. And in the last log I sent, it really should not be passing 0,0 as FOV, as the Settings>Platesolving option is to use 480mm (the focal length in this case).
SC_PlateSolveSettings.png
SC_PlateSolveSettings.png (14.17 KiB) Viewed 236 times


3. If in the sequencer, I have a step s below it again runs flawlessly and solves within 1-2 sec.

RUN "E:\SoftwareExe\Platesolve3.80\PlateSolve3.80.exe WITH PARAMS "\"E:\SoftwareExe\Platesolve3.80\Test.fits\" 0.9905 0.423 0.214 0.214" WAIT True
User avatar
admin
Site Admin
Posts: 12424
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Bug in passing coordinates to PlateSolve 3.80

#9

Post by admin »

Hi,

I've just been testing this by running PS3 from the command line, and as far as I can tell it is completely ignoring the values of the position and frame size that are passed on the command line. You *have* to put some values there, otherwise it just loads the file, but it takes no notice of them, and never fills in the 'blanks' on the plate solve progress window with the values from the command line.

I think that what is happening with your test is that the FITS file you are feeding to PS3 has the object location in the FITS headers, and it *is* paying attention to that. I deliberately created a FITS image with no location headers to allow me to test the command line parameters with no chance of the information being picked up from the image file (save an existing image to PNG, then reload and save again to FITS).

Based on this, I think I should probably just put dummy parameters on the command line and embed the information on the hint position (and maybe the FOV) into the FITS headers of the file being sent to PS3. The extra commas on the command line were therefore wrong but probably unimportant.

The only other thing that might make sense is if there is more than one version of Platesolve 3.80 available, meaning that perhaps my copy works differently to yours. I think that's unlikely though.

very odd...

cheers,

Robin
zerolatitude
Posts: 156
Joined: Mon Mar 01, 2021 5:24 am

Re: Bug in passing coordinates to PlateSolve 3.80

#10

Post by zerolatitude »

It is indeed odd. If the FITS file has the header (which it should when connected to the ASCOM mount), it should pass like it does in the commandline.

My version of PS3.8 is from the NINA website. Don't know if that's any different from the version in the Planewave software.

https://www.dropbox.com/sh/rn4uzqbs9q91 ... bm4xa?dl=1

Thanks for checking this out.
Post Reply