command not found: solve-field

172 views
Skip to first unread message

Jerry Zhang

unread,
May 23, 2022, 3:33:09 PM5/23/22
to astrometry
Hello, I am new to astrometry.

I tried many ways to install it on my Mac but it doesn't work.  I first tried brew install astrometry-net, but it did't work properly and then I downloaded the latest tar file, ran the standard 
 "$ sudo make
  $ sudo make py
  $ sudo make extra
  $ sudo make install"
under the unzipped /astrometry.net-0.89 folder, which worked fine after install some extra packages. I downloaded all the index-4203-YY.fits index files and put them all in the folder usr/local/astrometry/data/, and ran 
"$ sudo make install-indexes
under /astrometry.net-0.89 folder, which gave me "mkdir -p '/usr/local/astrometry/data'". Then I did "solve-field demo/sdss.png", it worked once, produced some files like sdss.axy, with some error
"Reading input file 1 of 1: "demo/sdss.jpg"...
jpegtopnm: WRITING PPM FILE
Read file stdin: 496 x 340 pixels x 1 color(s); maxval 255
Using 8-bit output
Extracting sources...
simplexy: found 801 sources.
Solving...
system: No such file or directory
engine.c:82:engine_autoindex_search_paths: Warning: failed to open index directory: "/usr/local/Cellar/astrometry-net/0.89_1/data"
---------------------------------------------------------------------
You must list at least one index in the config file (/usr/local/bin/../etc/astrometry.cfg)
See http://astrometry.net/use.html about how to get some index files.
---------------------------------------------------------------------
solve-field.c:519:run_engine engine failed.  Command that failed was:
/usr/local/bin/astrometry-engine demo/sdss.axy
 ioutils.c:568:run_command_get_outputs Command failed: return value 255


I thought it is because the execution went to the previous directory created by home-brew, so I reinstalled the astrometry under the unzipped folder with 
"$ sudo make install INSTALL_DIR=/usr/local/astrometry" (which is the default setting) HOWEVER it then turned out to be failed with
"zch: command not found: solve-field".

 I deleted this folder/usr/local/Cellar/astrometry-net/ and  brew uninstall astrometry-net, and reinstalled it from the unzipped folder with exactly the same code as before, but it kept failing with the same problem
"zch: command not found: solve-field".

I reinstalled with former version 0.88, but it didn't work either.

Can anyone help me? Thank you very much!

Dustin Lang

unread,
May 24, 2022, 9:44:04 AM5/24/22
to astrometry
Hi,

Please try to use *either* the homebrew version, or download and build the code yourself.  I suspect what you are seeing right now is a mix of the two in a way that is not working for you.

It sounds like you had solve-field installed and working, but it was either reading the wrong config file, or you had index files in the wrong place.

The config file tells solve-field where to look for index files.  If you installed in /usr/local/astrometry (default), then the config file would be in /usr/local/astrometry/etc/astrometry.cfg .

You can see which config file it's reading by running solve-field with the "-v" flag -- it will print LOTS of stuff, but eventually something like

Solving...
Running:
  /usr/local/bin/astrometry-engine --verbose /Users/dstn/astrometry/demo/apod4.axy
Using config file "/usr/local/bin/../etc/astrometry.cfg"

That config file will contain lines like

add_path /usr/local/Cellar/astrometry-net/0.88/data

-- but it looks like the Homebrew installer doesn't create that directory.  So I would suggest that you should either change that path to wherever you have your index files installed, or create that directory and move your index files there.

Hope that helps,
dustin

Jerry Zhang

unread,
May 24, 2022, 3:05:07 PM5/24/22
to astrometry
Thanks very much! It works.

I delete the /usr/local/astrometry folder and again used $ brew install astrometry-net  it created /usr/local/Cellar/astrometry-net  folder, and one line of the configuration file /usr/local/Cellar/astrometry-net/0.89_1/etc/astrometry.cfg  says:
 "# In which directories should we search for indices?
add_path /usr/local/Cellar/astrometry-net/0.89_1/data" 

but in the folder there is no /data folder. I created /data manually and put all the index files inside, the command $ solve-field can work perfectly now.  


Appreciated.

Dustin Lang

unread,
May 24, 2022, 3:59:44 PM5/24/22
to Jerry Zhang, astrometry
Great -- we should probably fix the astrometry-net homebrew formula to change that directory path in the config file...


--
You received this message because you are subscribed to a topic in the Google Groups "astrometry" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/astrometry/uy2-lZiQ9Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/69d1aabc-179d-4026-85ed-863b4e5d12bcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages