×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Internal Solver to external programs?

  • Posts: 147
  • Thank you received: 12
Is there a way to use the internal solver in external programs?  MW4 uses ASTAP/Astrometry... I find that whatever they're doing... I need 15-20s exposures to get them to solve; and that adds up when you want a 99-point model.  Is there a way to 'trick' a call to ASTAP or Astrometry but really have it force the Ekos internal solver? It's so much faster.

Thanks,
Chris

 
2 years 3 months ago #80300

Please Log in or Create an account to join the conversation.

  • Posts: 2885
  • Thank you received: 819
Hi there, if you are referring to the StellarSolver internal solver, then the answer would be that they would need to use the solver library in their code.  It is not an external program like ASTAP or astrometry.net.   One of the reasons it is fast is because it does not require external configuration files, saved files to solve, or external programs.  That was part of my goal was to create a cross platform internal library that a program like KStars could use that wouldn’t require lots of reading and writing of files, which is bad for something like a raspberry pi.   Another thing that helps the speed is the usage of SEP for star extraction.  SEP really is a good library.  Note that both ASTAP and astrometry can be used with SEP also.  Try the other solver options in StellarSolver and you will see how that can work.

 
2 years 3 months ago #80304

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 12
How can I tell an external program to use SEP?

I guess my question is why can’t I use INDI to make a call to call the internal solver like I would ask it to take a picture or run focus for me?
2 years 3 months ago #80314

Please Log in or Create an account to join the conversation.

  • Posts: 2885
  • Thank you received: 819
There is a big difference between a method call inside a program and running an executable on your computer.  For a program to call on a method, it must be built with the knowledge of all the methods it can call and be programmed to use them.  Those methods can be a part of the actual program or they can be in external libraries but it must know about them all and how to use them.  Also, if it is an internal method call, you can pass data and variables back and forth internal to the program.  On the other hand, calling on an external program works in a whole different way.  You need the system to run the process.  You can ask the system to do that from within your program, but it is ultimately a different separate program and you can’t just call methods or use data inside that other program.  Usually, programs will either save the data to files or pass them as command line arguments when calling on the other programs.  Ways do exist to send data between programs like json messages, dbus messages, indi communications, and internet connections, but these require all the programs involved to be set up to use those methods of communication.  Also note that the communications are pretty much always slower than just calling a method internally.

StellarSolver was set up to be used as an internal library since that is the fastest way and requires no external files or method calls or communication structures, the data is passed internally.  Other programs can use it, but they must be programmed to do so.  Hopefully this explanation helps.

Also to answer you question about SEP.  SEP is another library not an external program​​​​​​.  If you aren’t using it within a program, there is an external program called SExtractor which works on the command line.  With the right command line options, you can take an image, do star extraction with that program and send the results to astrometry.y
2 years 3 months ago #80315

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 12
I guess I don’t understand what the difference is between a program passing a fits file via INDI to ekos and asking it to solve it and send it back, and ekos doing it.

The pictures MW4 takes are via INDI. They show up inside Ekos as they’re taken. Why is it such a far reach to ask it to solve those pictures before it sends them back?
2 years 3 months ago #80318

Please Log in or Create an account to join the conversation.

  • Posts: 2885
  • Thank you received: 819
Ekos is part of KStars and StellarSolver is a library used by KStars.  So Ekos has access to all the functions of the library.  INDI is a protocol for transferring data between programs, from a server to a client program and back.  The INDI drivers are programs being run by an INDIServer and then the data is being sent back over the network or on the same computer.  KStars is a client for INDI so it can receive the data and images sent back from the server.  MW4 is also a client for INDI can can receive images from the server as well.  But KStars cannot send information to MW4 nor the other way around.  The plate solve solutions are also not sent back to the INDI server when KStars solves them.  KStars sends settings to the INDI server certainly, but not images.  That mainly goes from server to client.  Also, if I am understanding what you are suggesting and it was programmed into INDI and KStars, what would be needed would be for INDI to take a picture, MW4 to receive it, then it would have to send the image back to the server which would then have to send it to KStars to solve it, then the solution would have to go back to the server and then to MW4.  KStars would have to be running at the same time as MW4 and the info would have to go back and forth between the server multiple times.  I think by the time all that data transfer happened, it would take longer than just plate solving using your current method.  At least that is as best as I understand it.  Maybe somebody else like Jasem could explain that better.
2 years 3 months ago #80322

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 12
Yes. The way you describe it makes it sound convoluted. I imagine when you ask INDI to get you a picture… you could ask it to add the WCS data to it?

You haven’t really explained why it’s impossible to have a 3rd party program call on the internal solver. I can load a fits file and do it. Why can’t a program say ‘hey ekos, I have this file I’d like you to solve, lmk when you’re done.’
2 years 3 months ago #80328

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 12
Yes. The way you describe it makes it sound convoluted. I imagine when you ask INDI to get you a picture… you could ask it to add the WCS data to it?

You haven’t really explained why it’s impossible to have a 3rd party program call on the internal solver. I can load a fits file and do it. Why can’t a program say ‘hey ekos, I have this file I’d like you to solve, lmk when you’re done.’
2 years 3 months ago #80329

Please Log in or Create an account to join the conversation.

  • Posts: 2885
  • Thank you received: 819
No, INDI has drivers that can take a picture, it doesn't have the ability to plate solve so it can't add the wcs data to the picture.  INDI has no idea about that information.  Also note that INDI doesn't actually send you an image file, it sends binary data that KStars then writes to a file.  KStars is the one that knows the position and WCS data that it can then write the FITS Headers into the picture.  KStars also is the one that has the ability to plate solve as you pointed out.  That being said, there is an astrometry.net plate solving indi driver you can run on something like a raspberry pi.  I don't know how that driver is set up, other than to know that it uses astrometry.net and controls via command line commands and files as I described previously.

Both KStars and MW4 are client programs to the INDI server.  The client programs can't communicate with each other.  The better way to do what you described would be if StellarSolver was in fact an INDI driver and not a part of KStars itself.  But that would seriously slow down the solving since anything you would want to solve would have to be sent to it and it would have to come back, that communication is a bottleneck.
2 years 3 months ago #80330

Please Log in or Create an account to join the conversation.

Time to create page: 0.990 seconds