Solving a small field with my own indices

291 views
Skip to first unread message

Adam Ginsburg

unread,
Nov 26, 2014, 7:21:36 AM11/26/14
to astro...@googlegroups.com
I'm trying to solve a small field (~1') that contains ~30 stars.

I've built an index based on the NOMAD catalog, which includes most of those stars:

build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0001.index -v -E -P -5 -I 0001
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0002.index -v -E -P -4 -I 0002
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0003.index -v -E -P -3 -I 0003
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0004.index -v -E -P -2 -I 0004
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0005.index -v -E -P -1 -I 0005
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0006.index -v -E -P 0 -I 0006
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0007.index -v -E -P 1 -I 0007
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0008.index -v -E -N 9957 -l 0.1 -u 3 -I 0008

The xy extractor got a few too many stars out, so I limited to the brightest and have confirmed that they are the right stars (give or take).  

Solve-field still doesn't work, though:
solve-field  --backend-config backend.cfg red_cont_collapse.fits --objs 30 --overwrite --verbose --guess-scale

Reading input file 1 of 1: "red_cont_collapse.fits"...
Header has 21 cards
Found an existing WCS header, will try to verify it.
Extracting sources...
simplexy: found 311 sources.
Couldn't find "plotxy" executable - maybe you didn't build the plotting programs?
Disabling plots.
Solving...
Reading file "./red_cont_collapse.axy"...
Verifying WCS using indices with quads of size [2610, 26340] arcmin
Got 0 solutions.

followed by a lot of these:
.... Field 1 did not solve. ....

Field: red_cont_collapse.fits
Did not solve (or no WCS file was written).

I get the same result trying a few other parameter tweaks:
solve-field  --backend-config backend.cfg red_cont_collapse.fits --objs 30 --overwrite  -L 0.1 -H 10 -u aw
solve-field  --backend-config backend.cfg red_cont_collapse.fits --objs 30 --overwrite  --guess-scale

Can you offer any tips on what I might try differently?  I can send on the file & catalog, or an ipynb detailing the whole process, if that's helpful.

Thanks,
Adam

Dustin Lang

unread,
Nov 26, 2014, 7:54:41 AM11/26/14
to astro...@googlegroups.com
Hi,

I am quite surprised that NOMAD contains a significant number of stars in 1'x1'.  The lack of stars in USNO-B1 is the main thing that limits us to fields bigger than about 4'x4'.

It would also be worth checking that the NOMAD stars are correct -- all-sky astrometric reference catalogs can get a bit confused in strange regions like M16 (if that's where you're working; just guessing from your filenames!).  Should be able to get images + source overlays at http://www.nofs.navy.mil/data/fchpix/

You could check this page to see how to plot up the index files, to give a sense of what they look like.
https://groups.google.com/forum/#!searchin/astrometry/plotindex.py/astrometry/inh6Q10PA2g/lfnkNbWRs4IJ

How many quadrangles and stars do these index files contain?  (And how many stars in your NOMAD-1_m16.fits file?)  Is the NOMAD-1_m16.fits sorted by brightness?  If not, you should specify a sort column (build-astrometry-index -S mag).

You'll definitely need to specify "-L" for solve-field -- the default assumes a lower bound of 6' in width.  And it doesn't hurt to specify "-H" as you're doing.

If you're working in M16, you might be able to find HST images, which would provide plenty of stars to use for astrometry.

cheers,
--dustin


Adam Ginsburg

unread,
Nov 26, 2014, 3:51:10 PM11/26/14
to astro...@googlegroups.com
Hi Dustin,
     There are ~30 stars in field, which I thought was enough.  Yes, this is M16, but the HST images aren't particularly deep.  If nothing else, there are enough 2MASS stars.

The NOMAD stars look correct.  You can see in this ipynb:

(see output cell 171 for NOMAD overlaid on the input image)

It seems to be saying there are 11160 quads?  Seems like plenty for such a small area.  The output is all in that ipynb.

Unfortunately I can't load the plotting code; it looks like I did not successfully install the python modules.  The install complained with errors like:

swig -python -I../util -o plotstuff_wrap.c plotstuff.i
../util/util.i:109: Error: Unable to find 'coadd.h'
....
plotstuff.i:162: Error: Unable to find 'anwcs.h'
error: command 'swig' failed with exit status 1

which I suppose means I need to point it to cfitsio or some similar library... that's a task for tomorrow (late here), but please let me know if I have the wrong missing library.  I was not able to install cairo because I couldn't install its dependency pixman, so that could also be it.

Thanks,
Adam

Dustin Lang

unread,
Nov 26, 2014, 5:12:36 PM11/26/14
to astro...@googlegroups.com
Very interesting.  You're right, I am surprised that the NOMAD catalog does indeed seem to have plenty of stars there.

In what band is your image?

Would you mind posting FITS tables of the NOMAD subset and your image?

One thought: it looks like your astrometry is about right, just with a small RA,Dec shift.  You might consider matching up nearby pairs of stars (with a large enough search radius to catch all reasonable shifts) and then histogram the RA,Dec differences.  There should be a peak at the correct offset.  Not pretty, but it should work pretty well.

Okay, one more thought: the index-building step has an arg (-j) for the assumed positional error in the reference catalog.  I believe it's 1" by default, so you could try reducing that to something more accurate, maybe 0.3" or 0.2" or whatever.

Cairo is required for the plotting code, so I guess that's not going to work for you.

cheers,
--dustin


Adam Ginsburg

unread,
Nov 27, 2014, 6:41:44 AM11/27/14
to astro...@googlegroups.com
> In what band is your image?

Approximately, but not exactly, V-band: it's from an IFU

> Would you mind posting FITS tables of the NOMAD subset and your image?

Attached.   The NOMAD subset can also be easily regenerated using astroquery.

> One thought: it looks like your astrometry is about right, just with a small RA,Dec shift.  You might consider matching up nearby pairs of stars (with a large enough search radius to catch all reasonable shifts) and then histogram the RA,Dec differences.  There should be a peak at the correct offset.  Not pretty, but it should work pretty well.

True, but I'm using astrometry.net because I have many different images that need solving.  Manual source association is too tedious.

> Okay, one more thought: the index-building step has an arg (-j) for the assumed positional error in the reference catalog.  I believe it's 1" by default, so you could try reducing that to something more accurate, maybe 0.3" or 0.2" or whatever.

I can try this, but I don't really understand - will reducing the positional error make it more likely for astrometry.net to find matches?

Thanks,
Adam
NOMAD-1_m16.fits
red_cont_collapse.fits

Dustin Lang

unread,
Nov 27, 2014, 8:46:11 AM11/27/14
to astro...@googlegroups.com

Actually, I'm not sure that the index "-j" value is actually used :)

Do you have a version of your image that is not resampled?  (your image fills a diamond within the square image -- when verifying potential matches, Astrometry.net will expect to find stars in the corners of the image.)

--dustin

Adam Ginsburg

unread,
Nov 27, 2014, 8:48:36 AM11/27/14
to astro...@googlegroups.com
No, I don't have an unresampled version of the image, at least not in hand.... but resampling it to match the square region is simple enough.  I didn't realize astrometry.net required image corners; I suppose that makes sense for most use cases.  Can that requirement be turned off, by any chance?

...resampled forthcoming...

Adam Ginsburg

unread,
Nov 27, 2014, 9:15:07 AM11/27/14
to astro...@googlegroups.com
OK, that was not as easy as I had originally imagined, but this is close enough... right?

Unfortunately, I can't test now because trying to install the plotting component broke something else....
solve-field  --backend-config backend.cfg blah.fits --objs 50 --overwrite  -L 0.1 -H 10 -u aw
Reading input file 1 of 1: "blah.fits"...
Traceback (most recent call last):
  File "/usr/local/astrometry/bin/image2pnm.py", line 16, in <module>
    from astrometry.util.shell import shell_escape
ImportError: No module named shell
augment-xylist.c:590:backtick Failed to run command: /usr/local/astrometry/bin/image2pnm.py --sanitized-fits-outfile /tmp/tmp.sanitized.aWxQCA --fix-sdss --infile blah.fits --uncompressed-outfile /tmp/tmp.uncompressed.KZxMVE --outfile /tmp/tmp.ppm.Rs62ne --ppm
 ioutils.c:569:run_command_get_outputs Command failed: return value 1

so now I'll be working on reinstalling again.
test.fits

Dustin Lang

unread,
Nov 27, 2014, 9:19:23 AM11/27/14
to astro...@googlegroups.com
So, another thing to possibly try would be to use triangles rather than quadrangles in the indexes -- means you don't need as many stars in common between the image and index, but produces many more matches so often isn't as fast.  build-astrometry-index -d 3 [...]

cheers,
--dstn

Adam Ginsburg

unread,
Nov 27, 2014, 9:22:46 AM11/27/14
to astro...@googlegroups.com
Cropping the image solved it:

$ solve-field  --backend-config backend.cfg blah.fits --objs 50 --overwrite  -L 0.1 -H 10 -u aw --no-fits2fits
Reading input file 1 of 1: "blah.fits"...
Found an existing WCS header, will try to verify it.
Extracting sources...
simplexy: found 66 sources.
Couldn't find "plotxy" executable - maybe you didn't build the plotting programs?
Disabling plots.
Solving...
Reading file "./blah.axy"...
Verifying WCS using indices with quads of size [1866, 18660] arcmin
Got 0 solutions.
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 31-40).
  log-odds ratio 25.7209 (1.48068e+11), 19 match, 0 conflict, 12 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.200452 arcsec/pix.
  Hit/miss:   Hit/miss: +-++-+++++-++-+-++--+--++---+++(best)------++-------++++
Field 1: solved with index NOMAD-1_astrometry0008.index.
Field 1 solved: writing to file ./blah.solved to indicate this.
Field: blah.fits
Field center: (RA,Dec) = (274.7, -13.82) deg.
Field center: (RA H:M:S, Dec D:M:S) = (18:18:48.816, -13:49:24.631).
Field size: 1.03671 x 1.04096 arcminutes
Field rotation angle: up is 45.1351 degrees E of N
Creating new FITS file "./blah.new"...


FYI, for anyone who gets an error like the one I did involving the python scripts, that comes about if you've partially installed astrometry.net into your system python distribution but not completely.  I've fixed that by removing the `astrometry` directory completely from my python lib/site-packages directory.


Dustin, any tips on better ways to treat the zero-filled corners?  e.g., can I change them to NaNs or something?  Or perhaps disable some of the double-checking?  Cropping the files to their rotated frames works, but is nontrivial to automate.

Adam Ginsburg

unread,
Nov 27, 2014, 9:42:27 AM11/27/14
to astro...@googlegroups.com
I tried adding the triangle index, and the original image still doesn't solve.  Since cropping worked, is there any way to tell solve-field to ignore those image corners?  I imaging that must be of some general use, since you might get photos taken through a skylight window or similar irregular apertures.

Dustin Lang

unread,
Nov 27, 2014, 9:48:33 AM11/27/14
to astro...@googlegroups.com
Cool!  Hmm, what did you do to make blah.fits?  I'm not getting a match using your rotated test.fits file.  And what was the build-astrometry-index command-line for the index that produced the eventual solution?


Field 1: solved with index NOMAD-1_astrometry0008.index.

It looks like it didn't find a solution until object 40+, which is surprising.  Maybe try "solve-field --uniformize 0"?

cheers,
--dustin


Dustin Lang

unread,
Nov 27, 2014, 9:49:38 AM11/27/14
to astro...@googlegroups.com
Usually it doesn't matter because there are still plenty of stars to verify a solution, but your image seems to be right on the edge of solving.




Adam Ginsburg

unread,
Nov 27, 2014, 9:54:21 AM11/27/14
to astro...@googlegroups.com
Ah, beautiful!  --uniformize 0 worked:

solve-field  --backend-config backend.cfg red_cont_collapse.fits --objs 30 --overwrite  -L 0.1 -H 10 -u aw --uniformize 0
Reading input file 1 of 1: "red_cont_collapse.fits"...
Header has 21 cards
Found an existing WCS header, will try to verify it.
Extracting sources...
simplexy: found 311 sources.
Couldn't find "plotxy" executable - maybe you didn't build the plotting programs?
Disabling plots.
Solving...
Reading file "./red_cont_collapse.axy"...
Verifying WCS using indices with quads of size [2610, 26340] arcmin
Got 0 solutions.
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 1-10).
  log-odds ratio 26.8706 (4.6747e+11), 17 match, 0 conflict, 4 distractors, 84 index.
  RA,Dec = (274.703,-13.8236), pixel scale 0.200222 arcsec/pix.
  Hit/miss:   Hit/miss: ++++-+-++-++-++++++++(best)-c+c--+++
Field 1: solved with index NOMAD-1_astrometry0009.index.
Field 1 solved: writing to file ./red_cont_collapse.solved to indicate this.
Field: red_cont_collapse.fits
Field center: (RA,Dec) = (274.7, -13.82) deg.
Field center: (RA H:M:S, Dec D:M:S) = (18:18:48.825, -13:49:24.963).
Field size: 1.46175 x 1.4563 arcminutes
Field rotation angle: up is 0.0122628 degrees E of N
Creating new FITS file "./red_cont_collapse.new"...


I think blah.fits was the same as temp.fits, I just renamed it... but I *did* get a solution.  Hrm.

Index 8 was made with this command:
build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0008.index -v -E -N 9957 -l 0.1 -u 3 -I 0008  -S MAG

blah.fits

Dustin Lang

unread,
Nov 27, 2014, 10:07:46 AM11/27/14
to astro...@googlegroups.com
Great that that worked... but weirdly, I am not getting a solution.  Could you humor me and also send the build-astrometry-index command for #9?  And what version of the code are you using?  If there is a regression I want to know about it! :)


Field 1: solved with index NOMAD-1_astrometry0009.index.

thanks,
--dustin


Adam Ginsburg

unread,
Nov 27, 2014, 10:10:09 AM11/27/14
to astro...@googlegroups.com
!build-astrometry-index -i NOMAD-1_m16.fits -o muse/indices/NOMAD-1_astrometry0009.index -d 3 -v -E -N 9957 -l 0.1 -u 3 -I 0009  -S MAG

I'm using 0.50.  Unfortunately, I can no longer reproduce anything because in the process of trying to install cairo, I broke everything....
solve-field  --backend-config backend.cfg red_cont_collapse.fits --objs 30 --overwrite  -L 0.1 -H 10 -u aw --uniformize 0
Reading input file 1 of 1: "red_cont_collapse.fits"...
Header has 21 cards
Found an existing WCS header, will try to verify it.
Extracting sources...

ERROR: Mismatch in the CFITSIO_SONAME value in the fitsio.h include file
that was used to build the CFITSIO library, and the value in the include file
that was used when compiling the application program:
   Version used to build the CFITSIO library   = 2
   Version included by the application program = 1557480496

Fix this by recompiling and then relinking this application program
with the CFITSIO library.
Segmentation fault: 11

Dustin Lang

unread,
Nov 27, 2014, 10:14:42 AM11/27/14
to astro...@googlegroups.com
make clean; make
in the astrometry source directory?


Adam Ginsburg

unread,
Nov 27, 2014, 11:41:11 AM11/27/14
to astro...@googlegroups.com
OK, I recovered a functional solve-field by installing without cairo:
ARCH_FLAGS="" make -j 8 all install

when I install with cairo:

ARCH_FLAGS="" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make -j 8 all install

everything now works... strange.

Except, now the field doesn't solve any more:

 solve-field  --backend-config backend.cfg red_cont_collapse.fits --objs 30 --overwrite  -L 0.1 -H 10 -u aw --uniformize 0
Reading input file 1 of 1: "red_cont_collapse.fits"...
Header has 21 cards
Found an existing WCS header, will try to verify it.
Extracting sources...
simplexy: found 311 sources.
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
libpng warning: Image width is zero in IHDR
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data
sh: line 1: 79277 Done                    /usr/local/astrometry/bin/plotxy -I /tmp/tmp.ppm.AA4BkL -i ./red_cont_collapse.axy -C red -w 2 -N 50 -x 1 -y 1 -P
     79278 Abort trap: 6           | /usr/local/astrometry/bin/plotxy -i ./red_cont_collapse.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./red_cont_collapse-objs.png
solve-field.c:341:plot_source_overlay Plotting command failed
 solve-field.c:147:run_command Command was: "/usr/local/astrometry/bin/plotxy -I /tmp/tmp.ppm.AA4BkL -i ./red_cont_collapse.axy -C red -w 2 -N 50 -x 1 -y 1 -P | /usr/local/astrometry/bin/plotxy -i ./red_cont_collapse.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./red_cont_collapse-objs.png"

 solve-field.c:146:run_command Command exited with exit status 134
Solving...
Reading file "./red_cont_collapse.axy"...
Verifying WCS using indices with quads of size [2610, 26340] arcmin
Got 0 solutions.

*snip*

Field 1 did not solve.
Field: red_cont_collapse.fits
Field center: (RA,Dec) = (274.7, -13.83) deg.
Field center: (RA H:M:S, Dec D:M:S) = (18:18:49.096, -13:50:04.100).
Field size: 6.08695 x 6.04909 arcminutes
Field rotation angle: up is 4.96473 degrees E of N
Creating new FITS file "./red_cont_collapse.new"...



so, somehow reinstalling broke it.  I'm quite confused now.  Even the test fields (blah.fits, test.fits) don't solve any more.  Perhaps this *is* a regression, and somehow I had an old version of some library installed previously (I had tried installing astrometry.net 0.42 before successfully installing 0.50), but I have no idea how to determine that.  

Adam Ginsburg

unread,
Nov 27, 2014, 11:56:47 AM11/27/14
to astro...@googlegroups.com
One more update on the installation process. 

If I do:
make clean
ARCH_FLAGS="" make -j 8 all install

then solve-fields "works" but does not solve my field any more.  Also, cairo doesn't work.

If I do:
make clean
ARCH_FLAGS="" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make -j 8 all install

solve-fields does *not* work at all; it complains with a CFITSIO problem.

However, if I do:
make clean
ARCH_FLAGS="" make -j 8 all install
ARCH_FLAGS="" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make -j 8 all install

cairo installs but does not work, giving errors like:
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images



(I'm installing everything from source)

Dustin Lang

unread,
Nov 27, 2014, 12:17:00 PM11/27/14
to astro...@googlegroups.com
Something is wrong with your cfitsio setup, it seems.  Probably conflicting versions, like you said.  We use pkg-config to get the cfitsio compile and link flags:

pkg-config --cflags cfitsio
pkg-config --libs cfitsio

but if you have a version installed in some "standard" place like /usr/include, it make take precedence.  Use ldd or "otool -L" on mac to see which libs the solve-field executable is linked against.


> However, if I do:
make clean
ARCH_FLAGS="" make -j 8 all install
ARCH_FLAGS="" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make -j 8 all install

cairo installs but does not work, giving errors like:
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images


We do a "config" step during making where it detects whether netpbm is available ("make reconfig" to re-run that); if it's not detected then it won't be compiled or linked against and you'll get that kind of error.

cheers,
--dustin

Adam Ginsburg

unread,
Dec 1, 2014, 11:25:42 AM12/1/14
to astro...@googlegroups.com
My problem with cfitsio seems to be this:

cyg ~$ pkg-config --cflags cfitsio
-I/opt/local/include
cyg ~$ pkg-config --libs cfitsio
-L/opt/local/lib -lcfitsio
cyg ~$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --cflags cfitsio
-I/usr/local/include
cyg ~$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --libs cfitsio
-L/usr/local/lib -lcfitsio

I have installed netpbm into /usr/local, which is why I'm using the PKG_CONFIG_PATH variable.  I have also installed cfitsio in /usr/local.  That... seems to be working now.  I swear it wasn't this morning.  Oh well.

The solve still fails, but it seems to get really close to working partway through.  The plotting utilities still aren't working even though that stage of the build no longer complains.  I think there are two failed solves that should have worked:

Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 31-40).
  log-odds ratio 25.7209 (1.48068e+11), 19 match, 0 conflict, 12 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.200452 arcsec/pix.
  Hit/miss:   Hit/miss: +-++-+++++-++-+-++--+--++---+++(best)-------++-+----c---------------++++

Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 1-10).
  log-odds ratio 26.1159 (2.19776e+11), 22 match, 0 conflict, 18 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.20024 arcsec/pix.
  Hit/miss:   Hit/miss: +-++-+++++-++-+-++--+--++---+++---+---++(best)------c----------------+++


since these both recovered the correct pixel scale.



$ solve-field --backend-config backend.cfg blah.fits --overwrite  -L 0.5 -H 2 -u aw --uniformize 0
Reading input file 1 of 1: "blah.fits"...
Header has 26 cards
Found an existing WCS header, will try to verify it.
Extracting sources...
simplexy: found 66 sources.
cairoutils.c:729:cairoutils_read_ppm_stream: cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM imagesNetpbm is not available; can't read PPM images

cairoutils.c:729:cairoutils_read_ppm_stream: cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM imagesNetpbm is not available; can't read PPM images

libpng warning: Image width is zero in IHDR
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data
sh: line 1: 79248 Done                    /usr/local/astrometry/bin/plotxy -I /tmp/tmp.ppm.BUM1UC -i ./blah.axy -C red -w 2 -N 50 -x 1 -y 1 -P
     79249 Abort trap: 6           | /usr/local/astrometry/bin/plotxy -i ./blah.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./blah-objs.png
solve-field.c:341:plot_source_overlay Plotting command failed
 solve-field.c:147:run_command Command was: "/usr/local/astrometry/bin/plotxy -I /tmp/tmp.ppm.BUM1UC -i ./blah.axy -C red -w 2 -N 50 -x 1 -y 1 -P | /usr/local/astrometry/bin/plotxy -i ./blah.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./blah-objs.png"

 solve-field.c:146:run_command Command exited with exit status 134
Solving...
Reading file "./blah.axy"...
Verifying WCS using indices with quads of size [1866, 18660] arcmin
Got 0 solutions.
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 1-10).
  log-odds ratio 26.1159 (2.19776e+11), 22 match, 0 conflict, 18 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.20024 arcsec/pix.
  Hit/miss:   Hit/miss: +-++-+++++-++-+-++--+--++---+++---+---++(best)------c----------------+++
fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (3 < 6)

Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 11-20).
  log-odds ratio -1.38629 (0.25), 0 match, 0 conflict, 1 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 1.6267 arcsec/pix.
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 11-20).
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 21-30).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 21-30).
After applying ROR, NR = 0!
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 31-40).
  log-odds ratio 25.7209 (1.48068e+11), 19 match, 0 conflict, 12 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.200452 arcsec/pix.
  Hit/miss:   Hit/miss: +-++-+++++-++-+-++--+--++---+++(best)-------++-+----c---------------++++
fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

fit-wcs.c:130:fit_sip_wcs: Too few correspondences for the SIP order specified (4 < 6)

Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 31-40).
  log-odds ratio -1.38629 (0.25), 0 match, 0 conflict, 1 distractors, 42 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.709755 arcsec/pix.
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 31-40).
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 41-50).
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 51-60).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 51-60).
After applying ROR, NR = 0!
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0004.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0003.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0002.index, field objects 61-70).
Field 1 did not solve (index NOMAD-1_astrometry0001.index, field objects 61-70).
Field: blah.fits
Field center: (RA,Dec) = (274.7, -13.84) deg.
Field center: (RA H:M:S, Dec D:M:S) = (18:18:49.677, -13:50:20.754).
Field size: 5.17856 x 3.17564 arcminutes
Field rotation angle: up is 38.0323 degrees E of N
Creating new FITS file "./blah.new"...



Dustin Lang

unread,
Dec 1, 2014, 11:43:00 AM12/1/14
to astro...@googlegroups.com
For what it's worth, you can specify multiple PKG_CONFIG_PATH entries as usual:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/lib/pkgconfig

To retry building the plotting utils,

make reconfig && make && make extra

I don't know why you are getting differences between different code releases -- I didn't think anything important had changed.  I want to dig into what is happening.

Those pretty-good looking matches you are getting are probably after a "tune-up" step, and after that you should see it testing them using a stronger test that they're probably failing.  You could lower the odds ratio to consider a field solved:

solve-field --odds-to-solve 1e8   [....]


And one more thing: in a previous note I said that the "-j" flag during index-building wasn't used.  Well I was wrong, it is, so it's probably worth setting it to a more truthy value (default is 1"; maybe 0.25" would be better).


cheers,
--dustin


Adam Ginsburg

unread,
Dec 1, 2014, 11:52:08 AM12/1/14
to astro...@googlegroups.com


On Monday, December 1, 2014 5:43:00 PM UTC+1, Dustin Lang wrote:
For what it's worth, you can specify multiple PKG_CONFIG_PATH entries as usual:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/lib/pkgconfig

To retry building the plotting utils,

make reconfig && make && make extra


Latest build results:

I'm downloading wcslib now so I can install that too.
 
I don't know why you are getting differences between different code releases -- I didn't think anything important had changed.  I want to dig into what is happening.


I suspect something screwy on my system, but I'm happy to help dig.
 
Those pretty-good looking matches you are getting are probably after a "tune-up" step, and after that you should see it testing them using a stronger test that they're probably failing.  You could lower the odds ratio to consider a field solved:

solve-field --odds-to-solve 1e8   [....]


And one more thing: in a previous note I said that the "-j" flag during index-building wasn't used.  Well I was wrong, it is, so it's probably worth setting it to a more truthy value (default is 1"; maybe 0.25" would be better).

I rebuilt the indices with -j 0.25 and rebuilt, and now:

$ solve-field --backend-config backend.cfg blah.fits --overwrite  -L 0.5 -H 2 -u aw --uniformize 0
Reading input file 1 of 1: "blah.fits"...
Header has 26 cards
Found an existing WCS header, will try to verify it.
Extracting sources...
simplexy: found 66 sources.
cairoutils.c:729:cairoutils_read_ppm_stream: cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM imagesNetpbm is not available; can't read PPM images

cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:729:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
libpng warning: Image width is zero in IHDR
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data
sh: line 1: 87217 Done                    /usr/local/astrometry/bin/plotxy -I /tmp/tmp.ppm.Us0dBd -i ./blah.axy -C red -w 2 -N 50 -x 1 -y 1 -P
     87218 Abort trap: 6           | /usr/local/astrometry/bin/plotxy -i ./blah.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./blah-objs.png
solve-field.c:341:plot_source_overlay Plotting command failed
 solve-field.c:147:run_command Command was: "/usr/local/astrometry/bin/plotxy -I /tmp/tmp.ppm.Us0dBd -i ./blah.axy -C red -w 2 -N 50 -x 1 -y 1 -P | /usr/local/astrometry/bin/plotxy -i ./blah.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > ./blah-objs.png"

 solve-field.c:146:run_command Command exited with exit status 134
Solving...
Reading file "./blah.axy"...
Verifying WCS using indices with quads of size [1866, 18660] arcmin
Got 0 solutions.
Field 1 did not solve (index NOMAD-1_astrometry0009.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0008.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0007.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0006.index, field objects 1-10).
Field 1 did not solve (index NOMAD-1_astrometry0005.index, field objects 1-10).
  log-odds ratio 26.6704 (3.82663e+11), 6 match, 0 conflict, 22 distractors, 11 index.
  RA,Dec = (274.703,-13.8235), pixel scale 0.199807 arcsec/pix.
  Hit/miss:   Hit/miss: +--++-----++---------------+(best)----------------------------------++++
Field 1: solved with index NOMAD-1_astrometry0004.index.
Field 1 solved: writing to file ./blah.solved to indicate this.
Field: blah.fits
Field center: (RA,Dec) = (274.7, -13.82) deg.
Field center: (RA H:M:S, Dec D:M:S) = (18:18:48.830, -13:49:24.533).
Field size: 1.04911 x 1.0649 arcminutes
Field rotation angle: up is 45.4214 degrees E of N
Creating new FITS file "./blah.new"...


So... ok?  I still don't understand the netpbm issues, but at least I'm back to having solved the original image.

Dustin Lang

unread,
Dec 1, 2014, 12:07:43 PM12/1/14
to astro...@googlegroups.com
The plotting code errors stem from:

os-features-test.c:88:24: fatal error: netpbm/pam.h: No such file or directory

Netpbm is required, and you need to tell the makefile where to find it, via

export NETPBM_INC="-I/usr/local/include"
export NETPBM_LIB="-L/usr/local/lib -lnetpbm"


Glad to hear that it's solving again.

--dstn

Adam Ginsburg

unread,
Dec 1, 2014, 12:13:05 PM12/1/14
to astro...@googlegroups.com
OK, thanks.  I discovered that my previous attempt to install netpbm had failed due to permissions errors.  Now that I have installed it (I think), I'm getting much nastier errors in the gsl/blas installation.

http://pastebin.com/hnZMU7ZD

----

On the solving side of things, I was able to solve 5 of 9 fields, but 4 that look (by my eye) to be solvable aren't solved.  I think the graphical diagnostics are crucial, so I'll keep working on those.

Adam Ginsburg

unread,
Dec 1, 2014, 12:20:13 PM12/1/14
to astro...@googlegroups.com
My mistake was not exporting the ARCH_FLAGS="" variable (and/or not redeclaring it). This one worked, but still didn't find netpbm:

  1. /usr/local/netpbm/include/netpbm/pm.h:26:23: fatal error: pm_c_util.h: No such file or directory
  2.  #include "pm_c_util.h"

This file exists in my netpbm source directory but was apparently not installed along with the rest of netpbm.

Since the netpbm configuration/install is nonstandard (they have their own custom config, for example), can you suggest anything I should try differently with my netpbm install besides "use homebrew" or "use macports"?  

Dustin Lang

unread,
Dec 1, 2014, 12:21:45 PM12/1/14
to astro...@googlegroups.com
It's still not finding your netpbm headers: line 100,

os-features-test.c:88:24: fatal error: netpbm/pam.h: No such file or directory
 #include <netpbm/pam.h>

Since the "#include" lines look for "netpbm/pam.h", you may have to set NETPBM_INC to a directory one level higher than you might expect.

You can re-run that check with "make reconfig"

Not sure what's up with all those build errors... might want to try without the "-j8", since I think there are some lingering problems with parallel builds.

You could also try

make SYSTEM_GSL=no

to use our shipped version of GSL instead of expecting to find it on your system.

cheers,
--dstn

Dustin Lang

unread,
Dec 1, 2014, 12:25:21 PM12/1/14
to astro...@googlegroups.com
Sorry, I've never seen that before.  Assuming you followed their config & install instructions, you should probably file a bug with netpbm if that required file doesn't get installed.

Note that netpbm has "stable", "super stable", etc releases; these should be pretty much bug-free.

--dstn

Reply all
Reply to author
Forward
0 new messages