-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
astrometry.net address hardcoded, impossible to use a local running nova server #80
Comments
Hi there, we can definitely change that to support this. But I must ask, why do you need that? If it is on Mac, you can directly access astrometry.net's solve-field binary. If it is windows, you can directly access the Cygwin or ANSVR solve-field binary. Are you hosting another astrometry server on your local network on a different machine? |
I think I found a post relating to that on the INDI forum just now. But I can't seem to log in. From that forum it looks like I found that you are hosting a local astrometry server for multiple imagers imaging nearby. That makes sense. Do you have any details about how you are hosting your astrometry server? Is this an ANSVR server or does it work exactly like nova.astrometry.net? If it is the second is that easy to set up? If I was going to make such a change I would need to be able to test it. |
Hi,
thanks for taking the time to look into this.
What I'm running on https://nova.papaf.org is essentially what you said, a
server, based on ansvr, that mimics the API part only of nova.
I used ANSVR cause I only needed the API part and also all the other pieces
of software I found around have drifted back from an undocumented (!!!) set
of changes into astrometry.net and it wasn't easy for me to implement that
change in other softwares.
Feel free to test it whenever you want, it's active.
And thanks again for your time!
Il giorno mer 18 ago 2021 alle ore 06:03 rlancasteAstro <
***@***.***> ha scritto:
… I think I found a post relating to that on the INDI forum just now. But I
can't seem to log in. From that forum it looks like I found that you are
hosting a local astrometry server for multiple imagers imaging nearby. That
makes sense. Do you have any details about how you are hosting your
astrometry server? Is this an ANSVR server or does it work exactly like
nova.astrometry.net? If it is the second is that easy to set up? If I was
going to make such a change I would need to be able to test it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEK7CDXFRUVF4FLWZ6IUDLT5MWJLANCNFSM5CKVL4NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
BTW, I had to make a change to my ANSVR server just now, as I discovered the configuration panel from Ekos has an enormous issue: clicking or not on use position and/or use scale does nothing if you're not using the internal solver. Actually, I'm not able to check if it does something with the internal solver, as that doesn't log anything despite me having the verbose option on on the alignment log. |
Hi @rlancaste I have my own custom Cygwin build of astrometry.net on Windows. I also have KSTARS for Windows installed. Can U please show me (when possible via a screenshot), how to access my solve-field binary from KSTARS? Another question is, whether is it possible also specify custom cmdline arguments to the solve-field (again from KSTARS/EKOS on Windows)? Thanks and regards, Ladislav |
So one thing that I discovered when I was doing all this work on astrometry.net last year was that I could directly control ANSVR and Cygwin based astrometry.net on windows just like astrometry.net on Macs and Linux. This function is built into StellarSolver and also Ekos as a result. This method of access proved to be way way faster than using ANSVR the traditional way. This is why I made the change to just use online for the actual astrometry.net server and to use "local" for ANSVR, since it worked so much better. |
I had not considered the use case of having ANSVR set up on one computer and a bunch of other machines accessing it in the field. I have always put either astrometry, ANSVR, or cygwin ANSVR on the same machine I was using to run Ekos since it is orders of magnitude faster than ANSVR. But I could see if you are using a bunch of older raspberry pi's or you were short on space, it might be good to have a local astrometry server. I will look into supporting this use case then later today. |
Ladislav to answer your question, cygwin astrometry is supported just like ANSVR and local astrometry on Macs and Linux. As long as cygwin or ANSVR is running on the same windows machine you are using for Ekos, KStars will send it all appropriate command line arguments you would like to send it using the Ekos options. I believe it now supports every command line option that astrometry.net offers (at least the ones that matter). |
I will see if I can get a screenshot for you |
It might take a little bit because while I had a nice virtual machine all set up when I was doing this work last year, I don't think I have that machine anymore. It wouldn't help as much to show you a Mac or Linux screenshot. |
For the source extraction method, you have two options available to you, you can use internal SEP, or astrometry.net's built in Star extraction. For the command line options, that is what the "Options profile" is for. There are so so many options. I found it best to try to develop profiles of options for specific tasks. If you don't like them though, you can customize the options or you can make your own set. |
@rlancaste |
papaf76, as I said a couple of minutes ago, I will run some tests today/this weekend to verify how well StellarSolver is playing with ANSVR when used in place of astrometry. I can easily fix the problem you found, but my concern right now is whether some features I am relying on from astrometry.net (such as downloading logs) will be supported the same way on an ANSVR server. |
Ladislav, so the "scale and position" options are separated from the rest. They are the settings that get changed all the time, they are in another tab. The rest of the settings can be accessed in the profile editor if you need to. But note that the profile that gets used is the one selected in the other screenshot at the far right. You shouldn't need to change these much, my goal is to figure out what the best settings should be for certain situations and make a profile that the user can select. You can make a profile of the "best" settings as well and save it or send it others as a file. It is exportable. |
papaf76, I think I have fixed the problem you brought up. I believe the hard coded nova.astrometry.net was just an oversight on my part because just a few lines above where I hard coded nova.astrometry.net, it was using the custom astrometry server path. So probably just an accident. I also made a couple of edits to make the tester work with alternate astrometry servers and made the log output display what server is being accessed in its statements. I was able to solve an image with your remote ansvr server that you posted above after making these changes. Note that this change was made in master on GIT, so if you are using a stellarsolver that is packaged with windows KStars or if you are using a stellarsolver that is installed from a package manager, then there will be a delay before these changes show up there. Let me know if there are more issues. |
papaf76, as for the other thing you brought up, that the online solver is not using the scale or position settings. It definitely should be using them since those options are passed by stellarsolver to the online server along with the image and other info. However, I could certainly check that they correctly get passed on, since there are several steps in the process and there could be a bug somewhere. |
Hi,
I made a few tests, and I'm pretty sure if the image has the coordinates in
its header the info gets passed to the solver, no matter what's been set
with the Use Position and Use Scale toggles.
Maybe do a test yourself, I'd hate to have been wrong on that and it's
certainly a possibility..
Il ven 20 ago 2021, 17:19 rlancasteAstro ***@***.***> ha
scritto:
… papaf76, as for the other thing you brought up, that the online solver is
not using the scale or position settings. It definitely should be using
them since those options are passed by stellarsolver to the online server
along with the image and other info. However, I could certainly check that
they correctly get passed on, since there are several steps in the process
and there could be a bug somewhere.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEK7CEJ3HOW4J4AL4EJKK3T5ZXBRANCNFSM5CKVL4NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Ok, did you try this with ekos's load and slew feature, or is this with plate solving? If you are plate solving in the align tab, you can select to have it upload the whole image, or do SEP on it and just upload the star list. You can set that with star extraction method. Also are you saying that Ekos is passing the position and scale on to the solver separately or that the image is uploaded with position and scale in the headers and then astrometry on the server is using what is in the headers? |
I always tried with SEP, wasn't aware you can change that.. I can try
tomorrow setting it differently.
What I saw was the ra parameter and the scale one on the command line when
I was using ASTAP, and in the json object that reached my server when I was
testing it, both tests were without checking use scale and use position.
Il ven 20 ago 2021, 17:46 rlancasteAstro ***@***.***> ha
scritto:
… Ok, did you try this with ekos's load and slew feature, or is this with
plate solving? If you are plate solving in the align tab, you can select to
have it upload the whole image, or do SEP on it and just upload the star
list. You can set that with star extraction method.
Also are you saying that Ekos is passing the position and scale on to the
solver separately or that the image is uploaded with position and scale in
the headers and then astrometry on the server is using what is in the
headers?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEK7CCLENW4QGR74PUDRZLT5Z2FVANCNFSM5CKVL4NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Oh they were all load and slew.
Il ven 20 ago 2021, 17:46 rlancasteAstro ***@***.***> ha
scritto:
… Ok, did you try this with ekos's load and slew feature, or is this with
plate solving? If you are plate solving in the align tab, you can select to
have it upload the whole image, or do SEP on it and just upload the star
list. You can set that with star extraction method.
Also are you saying that Ekos is passing the position and scale on to the
solver separately or that the image is uploaded with position and scale in
the headers and then astrometry on the server is using what is in the
headers?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEK7CCLENW4QGR74PUDRZLT5Z2FVANCNFSM5CKVL4NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Load and slew is different. When I first made my updates to integrate StellarSolver, I made Load and Slew use the "use position" and "use scale" checkboxes in Ekos (actually I think that I first made it blind solve every time, but that was short lived). I think someone might have changed it more recently so that load and slew ignores the boxes, but we can check that. |
I have KSTARS v3.5.4, this version: Found the settings you had on your screenshots. Here are the settings I used: As you can see in the first screenshot I am using custom profile called "Lacko". Also on the fourth screenshot there are settings for the "Lacko" profile. Unfortunately I can set only the solving parameters provided by this editor. Here is the log output from the EKOS Alignment window:
From the log it is clear that it uses the "Lacko" profile during solving but it seems to ignore ScaleLow and ScaleHigh parameters. A typical WORKING solver command line in my custom astrometry.net build is following: I guess it is not possible to call solve-field like the above example, from EKOS, right? BR, Ladislav |
To be honest, it's not the first time I'm told it's different. In my
opinion, the behavior should be as consistent as possible.. What do you
think? Or at least make it really obvious the options don't work with load
and slew..
Il ven 20 ago 2021, 17:55 rlancasteAstro ***@***.***> ha
scritto:
… Load and slew is different. When I first made my updates to integrate
StellarSolver, I made Load and Slew use the "use position" and "use scale"
checkboxes in Ekos (actually I think that I first made it blind solve every
time, but that was short lived). I think someone might have changed it more
recently so that load and slew ignores the boxes, but we can check that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEK7CGN3FCN25JT4EJU5TDT5Z3HRANCNFSM5CKVL4NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I agree, I made it that way, it wasn't my decision to change it. I think it was changed though because the load and slew is using totally a different position and scale than the current ekos position and scale which is shown next to the "Use Position" and "use scale" checkboxes. I think it was causing some confusion on the part of users, which is why it was changed. |
That does make sense. Still, I think making it abundantly clear would be
better.
I saw your question on the indi forum, I'll reply there tomorrow as it's
not very phone friendly.
Il ven 20 ago 2021, 18:25 rlancasteAstro ***@***.***> ha
scritto:
… I agree, I made it that way, it wasn't my decision to change it. I think
it was changed though because the load and slew is using totally a
different position and scale than the current ekos position and scale which
is shown next to the "Use Position" and "use scale" checkboxes. I think it
was causing some confusion on the part of users, which is why it was
changed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEK7CF76RNG6UQ36O6WZ73T5Z6V7ANCNFSM5CKVL4NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Yeah, there is always room for improvement. I will see what Jasem thinks about it. |
@rlancaste @papaf76 |
Ladislav, Sorry I missed that comment. I spent hundreds of hours going through all the details of parameters and code in astrometry.net last year, and working with people over the last 5 years who had no end of problems with plate solving. This project was intended to get on top of all the issues and get rid of most of them. I can help you with these details. The options in astrometry.net can get a little crazy. I studied all of them, exposed the ones you need in an interface, and hard coded the ones that shouldn't be turned off or it will fail. There are also some options that I added that make other features work. The custom box was nice, but it caused many many problems. When users entered one too many spaces for instance, or accidentally deleted something that needed to be there. It was bad. If it failed immediately, please make sure first that all the paths you entered are correct for your application. You told me that your solver was here: But you entered this: Please check to make sure that all 3 paths exist and are entered correctly. You can probably not worry too much about the config file, since StellarSolver should make its own and you should use that, but still check all the paths. To answer your questions about the parameters, I will try to explain here: Here was the option set you listed: The -O and --no-plots options match what was passed exactly. I think that addresses everything that was in your options list. Please let me know if you have more questions. Thanks, Rob |
Just tried the combination of InternalSolver & BuiltInMethodForSolver and it WORKED for both Capture&Solve and Load&Slew !!! So I am 99% happy and thank you for this StellarSolver stuff, it's really a good tool! However I stil can't believe that it fails for my local custom build of astrometry.net. BR, Ladislav |
Ok so then you didn’t decide to try ANSVR? Yes, for the Cygwin build it should work as well unless there is a configuration issue or I guess if astrometry made some big changes and they changed some parameters on us since last year. Did you just install Cygwin and build astrometry with the latest sources following their instructions? I could try that again and see. Yesterday I only tested ansvr since that is much easier to set up. |
Did not tried yet with ANSVR, since the internal solver works. Anyway, if you want to check it with my custom build of Cygwin/astrometry.net, you can download it from: If you decide to try it, just simple extract the downloaded file (and also the TAR inside) using 7-zip utility to any folder at the root drive. BR, Ladislav |
Ok, so I tried your custom astrometry.net build. I unzipped it as instructed, I changed the paths to match the correct programs: Then I tested it using my INDIServer simulator as I did yesterday on ANSVR. I set it to use the following options: It captured and solved successfully. But then I tried these options: and it failed. This can be seen in the following output: To investigate why it failed, I went to the cygwin terminal and I tried to plate solve an image using a terminal command and it said the following: /bin/sh: C:/astrometry.net/bin/image2pnm: /usr/bin/python3: bad interpreter: No such file or directory Which leads me to think that the reason it failed for you might be because python3 is not properly installed in your cygwin build. As an interesting aside, a very similar issue is the very reason that I started to embark to create StellarSolver in the first place. A bunch of people were having all kinds of python issues with astrometry.net (mainly on Macs) and it was driving me crazy. So I made StellarSolver to combine SEP source extraction with astrometry.net solving. Then it evolved from there to become the StellarSolver internal solver and the library. |
Let me know if there is something I can do with the python3 issue in your cygwin build and I can try again |
Wait, it just got weirder. I think python3 does exist, but maybe it's a broken link. |
Just tested that theory, it is even weirder still. its a rabbit hole of links. The link "/usr/bin/python3" links to: |
Ok so I changed your python3 link by doing a And then I opened KStars again and tried the built in star extraction again, and it solved: So yes, I think the main problem with your custom astrometry setup was the broken link to python3. |
Nice! I'll check that once I am back from work. BR, Ladislav |
Just out of curiosity, might SEP be the reason why the behaviour in communication with nova changed? I mean specifically the need to pass the image size to the solver. That could explain a thing or two... Thanks again, for everything! You've been nothing short of awesome! |
For the first item, you will find that if you use internal SEP or external Sextractor for star extraction then a number of parameters that StellarSolver sends will change. Yes image height and width are required by astrometry to solve an xy list of sources. If you switch to the built in method and just send an image, width and height will not be sent. For the second item, do you mean the final scale result sent back by nova? Did you downsample or bin the image? That can affect the scale astrometry reports. Do you have an example image? |
Just askin', why the python(3) is needed for the solving of an image when there is no plotting and the input image is always converted to FITS before even the solver is started? I mean in StellarSolver. Using the ProcMon tool for Windows and documentation for astrometry.net I figured out that python is completely skipped in case, when the input to solve-field is a FITS format image and the command line has following parameters:
So to summarize there are 4 conditions to skip python. If only one is not met, python is started. But we don't need python. We need only center coordinates of the image, FOV, pixel scale, etc but nothing else. I would suggest to include these cmdline parameters hardcoded into the command line in case of Cygwin, because I think in the 100% of cases the python is not needed for plate solving. BR, Ladislav |
One of the main reasons for starting StellarSolver was originally to get rid of python. In fact those exact three parameters are passed to local astrometry and Cygwin and ANSVR most of the time. It is only when the user wants to do the traditional “built in” solver for astrometry.net that astrometry is allowed to solve it how it wants. |
According to astrometry.net documentation python is used only in two cases:
In our astrophotography scenarios none of the above is the case. We simply use FITS format and do NOT plot. So as you wrote:
If that's the main reason, then why in some cases python is allowed when it's anyway not needed? :-) BR, Ladislav |
To be honest, the main reason I left astrometry.net to its own devices in that case was so that we could have a basis for comparison. The main goal was to use Sextractor or SEP combined with astrometry.net to avoid needing any python or netpbm at all. And when I did my first experiments, that method was giving far superior results to the astrometry internal star extraction and solving. I definitely see it as the preferred method in almost all cases, including using online astrometry.net or remote ANSVR, because then you are uploading a text file instead of an image file, its WAY smaller. The only reasons I left in the ability to solve using an image and astrometry's built in methods was so that we could compare the performance to what astrometry naturally wants to do and also so that people would still be able to use astrometry.net if for some reason SEP or Sextractor didn't work for them and astrometry.net's method worked better. But so far, SEP and sextractor still work much better almost universally. Actually one of the best abilities of StellarSolver is its ability to plate solve jpeg images very very fast. To compare its performance to using astrometry.net natively, we would need to allow it to plate solve using python to do the conversion which is what it naturally does. If we are converting it to FITS first, that isn't normal astrometry behavior, so it isn't really a good comparison. Now I could see adding an option that allows the user to force all images to be converted to FITS before being sent to astrometry.net, but that is adding complexity. It is true that many times we are working with FITS images in KStars, but the "load and slew" feature often works with Jpeg images. Those Jpegs would need to be converted before being sent. |
Let me think about this, because we could either convert all images to FITS first before sending them to StellarSolver, or I could add another option to StellarSolver for always converting to FITS first. We could hard code that as turned on in KStars and then we could remove all references to Python from the Align options. That also would allow me to delete the crazy recipe's in the KStars Mac craft build that require the building of netpbm and the inclusion of python. That might be a nice idea. KStars does not need to be sending JPEGS to astrometry if we an avoid it. Good idea! |
Ok I made the python avoidance commands universal and I made an option that would only sent FITS files to astrometry. The next step will be to add the usage of this feature to Ekos. Then hopefully we can get rid of some unnecessary recipes in craft and remove clutter from KStars. Maybe this will end our astrometry python issues for good. Actually I thought I had done that, but they came back in this thread. Hopefully now. . . There will be a few steps before it will get into the windows and Mac releases. |
Just made a short test, how python affects the overall plate solving performance. Configured its filter to allow monitor only solve-field, shell processes and ProcessCreate operation: First I executed a plate-solving (in the Cygwin terminal) of a PNG image, where also python is involved at least by converting PNG to FITS via netpbm. I also let solve-field to plot annotations.
In ProcMon we can see, that solve-field creates a lot of subprocesses including among others python: As we can see in the monitor, python was 3 times called. In the second case I used again a PNG image, but this time with following command line:
From the output we can clearly see that python was called only once to do PNG->FITS conversion: Finally in the third case I used FITS input image with additional command line parameters to completely skip python:
Please note that the --fits-image parameter is also required to reach our goal! When this parameter is not specified for a FITS input file, python is still called! Just checked your already pushed commit and saw that this parameter is mising ;-) As we expected, the python was not called by solver and the overall plate-solving was much faster: Performance and the fact that we don't (really) need python are the only reason why I suggest to improve StellarSolve by addig the above command line parameters! BR, Ladislav |
if you think the --fits-image parameter is really needed when a user wants to use the "built in" star extraction in order to avoid python. I am not sure why it would need that when its being given a FITS file already? maybe it isn't sure it is a FITS file till it tries? |
For your experiments, I don't think you want the "large-scale solving" profile, which I see selected in your screenshot. I designed that one to work best for DSLR lens scale images. You probably want "Parallel small scale" |
When I checked your cygwin build it had a broken link as I said, when I fixed that it worked fine. |
@rlancaste
Any other combination of input format and command line parameters involved python. BR, Ladislav |
@rlancaste BR, Ladislav |
@rlancaste
BR, Ladislav |
Ok I added the --fits-image parameter |
Ok I think I should close this issue here now since we pretty much resolved both issues in the thread. |
The next release of KStars should get these changes in it. |
OK for me.
Great! |
Hi,
looking here: https://github.com/rlancaste/stellarsolver/blob/master/stellarsolver/onlinesolver.cpp#L325
It seems the software is using a hardcoded value of nova.astrometry.net in place of the specified server (eg. from ekos config).
This makes it impossible to use a local copy of nova.
The text was updated successfully, but these errors were encountered: