×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

[SOLVED] Using the plate solver from the command line on OS X?

  • Posts: 460
  • Thank you received: 69
This has been addressed when KStars on OS X was being developed, but I haven't found a solution that works for me now.

I have issued the following export before running the command
export PATH=/Applications/kstars.app/Contents/MacOS/netpbm/bin:/Applications/kstars.app/Contents/MacOS/python/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
This attempt to solve a fits file fails... [all of these command line parameters were naively pasted from another post except for the target file]
/Applications/kstars.app/Contents/MacOS/astrometry/bin/solve-field -O --no-plots --no-verify --resort --downsample 2 -L 124.493 -H 206.158 -u aw -3 91.1501 -4 90 -5 30 --config /Applications/kstars.app/Contents/MacOS/astrometry/bin/astrometry.cfg  /Volumes/Photo/Andromeda_2018-10-14/integration_DBE.fits
 
Reading input file 1 of 1: "/Volumes/Photo1/Andromeda_2018-10-14/integration_DBE.fits"...
Extracting sources...
This looks like a multi-color image: processing the first image plane only.  (NAXIS=3)
Downsampling by 2...
simplexy: found 2380 sources.
Traceback (most recent call last):
  File "/Applications/kstars.app/Contents/MacOS/astrometry/bin/removelines", line 15, in <module>
    sys.exit(main())
  File "/Applications/kstars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/removelines.py", line 76, in main
    cut=opt.cut, ext=opt.ext)
  File "/Applications/kstars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/removelines.py", line 38, in removelines
    T = fits_table(infile, lower=False)
  File "/Applications/kstars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/fits.py", line 672, in fits_table
    pf = pyfits.open(dataorfn, memmap=mmap)
AttributeError: 'NoPyfits' object has no attribute 'open'
augment-xylist.c:589:backtick Failed to run command: /Applications/kstars.app/Contents/MacOS/astrometry/bin/removelines /tmp/tmp.xyls.PrJxbZ /tmp/tmp.removelines.5Nh6rU
 ioutils.c:567:run_command_get_outputs Command failed: return value 1
Last edit: 5 years 5 months ago by Jerry Black.
5 years 5 months ago #30476

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

  • Posts: 1957
  • Thank you received: 420
If you search for NoPyfits in the forum then you’ll find this post about how to set PYTHONPATH

indilib.org/forum/ekos/2779-os-x-kstars-....html?start=24#21487
5 years 5 months ago #30478

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

  • Posts: 460
  • Thank you received: 69
Thanks. I had missed the Python path in the previous post.
Last edit: 5 years 5 months ago by Jerry Black.
5 years 5 months ago #30480

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

  • Posts: 460
  • Thank you received: 69
Hi,
So I'm still obviously doing something wrong, after exporting both paths?
export PATH=/Applications/kstars.app/Contents/MacOS/netpbm/bin:/Applications/kstars.app/Contents/MacOS/python/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
 
export PYTHONPATH=/Applications/kstars.app/Contents/MacOS/python/bin
 
/Applications/kstars.app/Contents/MacOS/astrometry/bin/solve-field -O --no-plots --no-verify --resort --downsample 2 -L 124.493 -H 206.158 -u aw -3 91.1501 -4 90 -5 30 --config /Applications/kstars.app/Contents/MacOS/astrometry/bin/astrometry.cfg /Volumes/Photo1/Andromeda_2018-10-14/integration_DBE.fits
 
Reading input file 1 of 1: "/Volumes/Photo1/Andromeda_2018-10-14/integration_DBE.fits"...
Extracting sources...
This looks like a multi-color image: processing the first image plane only.  (NAXIS=3)
Downsampling by 2...
simplexy: found 2380 sources.
Traceback (most recent call last):
  File "/Applications/kstars.app/Contents/MacOS/astrometry/bin/removelines", line 15, in <module>
    sys.exit(main())
  File "/Applications/kstars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/removelines.py", line 76, in main
    cut=opt.cut, ext=opt.ext)
  File "/Applications/kstars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/removelines.py", line 38, in removelines
    T = fits_table(infile, lower=False)
  File "/Applications/kstars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/fits.py", line 672, in fits_table
    pf = pyfits.open(dataorfn, memmap=mmap)
AttributeError: 'NoPyfits' object has no attribute 'open'
augment-xylist.c:589:backtick Failed to run command: /Applications/kstars.app/Contents/MacOS/astrometry/bin/removelines /tmp/tmp.xyls.pQjIF1 /tmp/tmp.removelines.HtBLJD
 ioutils.c:567:run_command_get_outputs Command failed: return value 1
5 years 5 months ago #30482

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

  • Posts: 460
  • Thank you received: 69
Solved this by installing pyfits
sudo easy_install pyfits

When run, I get this warning.
/Library/Python/2.7/site-packages/pyfits-3.5-py2.7-macosx-10.14-intel.egg/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits

Did not solve, but that's probably a problem with my invocation/data.
5 years 5 months ago #30488

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

Time to create page: 0.900 seconds