×

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

Bi-monthly release with minor bug fixes and improvements

Test on KStars 3.2.3 on MAC -> missing astrometry.net binaries

  • Posts: 124
  • Thank you received: 28
Hi Rob,
tested the latest version you mentioned. Still get the same error message from image2xy:

(mw4) JUPITER:image mw$ /Applications/kstars.app/Contents/MacOS/astrometry/bin/image2xy m51.fit
Illegal instruction: 4

in comparison to kstars 3.0.0:
(mw4) JUPITER:image mw$ /Applications/kstars300.app/Contents/MacOS/astrometry/bin/image2xy m51.fits
simplexy: found 1408 sources.

So nothing changed. I only call that binary, no python nothing else to be used.

Michel
4 years 10 months ago #39816

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

  • Posts: 2877
  • Thank you received: 812
So I have some good news and some bad news. My attempt to create a new wrapped up version of python using virtual environments failed. There are several problems, getting the python built for older OS X systems, getting it to look in the right place for its site-packages, and making sure it can be moved and has no absolute paths. Unfortunately, when I change one of these things it breaks the others. Making the virtualenv python relocatable, means that it won't use the embedded directory for its site packages.

The reason it worked before using Homebrew was that I was building on a 10.11 computer and just copying the files into the app bundle. Also, I didn't copy everything, just the files it needed. That worked fairly well. But we need to build on newer computers for older ones. Homebrew and python just don't support that well.

The good news is that today I came up with a different idea. Astrometry.net doesn't have to rely on netpbm and python in order to work. It can also use a program called sextractor, which we already use in kstars to extract the star positions. Then astrometry.net can work with the coordinates of the stars. It would be far simpler than what I have been trying to hack together with embedded python and netpbm. I tried an initial test of it today and it is promising.
4 years 10 months ago #39840

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

  • Posts: 2877
  • Thank you received: 812
Nope, I spoke too soon. When I removed all my system python packages, it stopped working. So apparently either pyfits or Astropy.io.fits is required to use astrometry.net.

So I guess there are a couple of options.

1. Go back to telling the users/providing instructions on how to install homebrew, python, and all requirements to run astrometry in homebrew.

2. Try to build a similar setup to what I did before on an older system, zip it up, and copy it in when building on a newer computer.
4 years 10 months ago #39842

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

  • Posts: 2877
  • Thank you received: 812
For now if you want to get it working, since this is proving to be more difficult than I first thought.
The following commands will install homebrew, python3, Astropy, and numpy to your system.
The final command will delete my broken internal python.
Just type the commands into a terminal.
Plate solving in Kstars should work as expected.
I would still like to resolve this. I don't want users to have to do all this if possible.

/usr/bin/ruby -e "$(curl -fsSL raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python3
ln -s /usr/local/bin/python3 /usr/local/bin/python
ln -s /usr/local/bin/pip3 /usr/local/bin/pip
pip install astropy
rm -r /Applications/kstars.app/Contents/MacOS/python/*

Thanks,

Rob
4 years 10 months ago #39844

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

  • Posts: 124
  • Thank you received: 28
Hi Rob,

I think your are right to be able to use astrometry.net without python. I use image2xy to extract the star positions to XY coordinates and then using solve-field with a limited set of options. With that you should be able to walk from a FITS file to a WCS header with solved coordinates. I will be able telling you the options this evening.

Michel
4 years 10 months ago #39845

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

  • Posts: 2877
  • Thank you received: 812
Well astrometry is written for python. It’s programs use python to call other routines and other programs and it uses python modules to complete its tasks. I tried a variety of things that should have worked. But even tasks that you think should not involve python, throw up python errors when you remove it.
4 years 10 months ago #39846

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

  • Posts: 124
  • Thank you received: 28
Rob,

had a look on the source of astrometry.net and agree. There is a mix of c and python and I have no clue how to separate this. So I'm with you and waiting the topics to be solved.
Many thanks for your work !

Michel
4 years 10 months ago #39874

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

  • Posts: 2877
  • Thank you received: 812
So I think I have a good idea now. I mightl go back to the way I had done this originally, with a series of buttons on a page in the startup wizard. The user can click them and install what is needed. I eventually abandoned this and embedded the minimal python installation that you saw previously because of issues and conflicts with different versions of python on different people's systems. It made it very hard to get the install scripts right. It proved for awhile to be easier to embed a python installation where I set everything up properly. But now that is broken since I cannot build an older version of python and embed it well without issues.But based on the work I was doing this weekend, I think I have some ideas on how to do a better job this time around.
The following user(s) said Thank You: Wouter van Reeven, Jerry Black
4 years 10 months ago #39878

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

  • Posts: 2877
  • Thank you received: 812
Ok, I worked for many hours during the last couple of days on a better solution. I think I have it. I have set up an installer button and put it into the Astrometry configuration options for now. (I will see what others think about it, they might end up being moved somewhere else. But for right now, I would like to see if this new configuration and installer works. Please test this to make sure plate solving works correctly. Before you can use it, you MUST run the installer. There is no more embedded python. Please see my screenshot for details.



drive.google.com/open?id=1K3anbNAcsLC3ddy4UVYpMbcjYC60v8xl

Please test plate solving with your system, to be even more helpful, you might want to try removing astropy, pyfits, numpy, python, and/or homebrew to see how the installers work. Let me know how it goes.

Thanks,

Rob
The following user(s) said Thank You: Robert Lucas
4 years 10 months ago #39917
Attachments:

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

  • Posts: 1957
  • Thank you received: 420
Thanks very much for all the hard work Rob. Unfortunately, as a software developer working with Python, installing Python3 via Homebrew is not a workable solution for me since it conflicts with Anaconda. However, I'll try to solve this myself. I guess it means fiddling around with the PYTHON_PATH and PATH variables and installing the required python dependencies via Anaconda.


Thanks, Wouter
4 years 10 months ago #39933

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

  • Posts: 2877
  • Thank you received: 812
That’s not a problem, it just means you can’t run the installers. You can configure another version of python to work with this. Just make sure that there is a python or a python link in /usr/local/bin or /usr/bin and that either pyfits or astropy modules are installed for that python.
4 years 10 months ago #39949

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

  • Posts: 2877
  • Thank you received: 812
The installers that I made are meant for the typical user who just has the system python installed and no packages.
4 years 10 months ago #39950

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

Time to create page: 0.407 seconds