dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
650 stars 184 forks source link

Error reading first byte of what is expected to be a Netpbm magic number #270

Closed albireox closed 11 months ago

albireox commented 1 year ago

I'm getting this error when generating the plots from any xyls file. The easiest way to reproduce is to run solve-field on any of the example files, for example apod5.xyls

solve-field apod5.xyls
Reading input file 1 of 1: "apod5.xyls"...
(null): Error reading first byte of what is expected to be a Netpbm magic number.  Most often, this means your input file is empty
(null): Error reading first byte of what is expected to be a Netpbm magic number.  Most often, this means your input file is empty
solve-field.c:327:plot_source_overlay Plotting command failed
 solve-field.c:133:run_command Command was: "/home/sdss5/software/astrometrynet/0.93/plot/plotxy -I /tmp/tmp.ppm.7nKggH -i ./apod5.axy -C red -w 2 -N 50 -x 1 -y 1 -P | /home/sdss5/software/astrometrynet/0.93/plot/plotxy -i ./apod5.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./apod5-objs.png"

 solve-field.c:132:run_command Command exited with exit status 1

Solving works fine, but no plots are generated. I think I have netpbm correctly installed and linked. I'm seeing the same error on macOS with the latest astrometry.net installed with homebrew and in CentOS 7 with a manual build.

dstndstn commented 11 months ago

Apologies for the very slow reply! I think this is expected -- for xyls files, solve-field doesn't make plots. If you have a JPEG image to use as a background for the plots, you can pass that in using solve-field --plot-bg IMAGE.JPG [....] And then I think the plots should work.

albireox commented 11 months ago

I see. Then that solves it. It wasn't clear from the docs or the error message if solve-fields would produce plots when using a list of sources. Thanks.

dstndstn commented 11 months ago

Right, that's a bug, really :) It should either print some helpful error message or just use a blank image background or something useful when an XY-list is passed in. I just filed #273 with that bug, so I'll close this one.