1**************************
2Astrometry.net code README
3**************************
4
5
6| Copyright 2006-2010 Michael Blanton, David W. Hogg, Dustin Lang, Keir Mierle and Sam Roweis.
7| Copyright 2011-2013 Dustin Lang and David W. Hogg.
8
9This code is accompanied by the paper:
10
11Lang, D., Hogg, D. W.; Mierle, K., Blanton, M., & Roweis, S., 2010,
12Astrometry.net: Blind astrometric calibration of arbitrary
13astronomical images, Astronomical Journal 137, 1782–1800.
14http://arxiv.org/abs/0910.2233
15
16The original purpose of this code release was to back up the claims in
17the paper in the interest of scientific repeatability. Over the
18years, it has become more robust and usable for a wider audience, but
19it's still neither totally easy nor bug-free.
20
21This release includes a snapshot of all of the components of our
22current research code, including routines to:
23
24* Convert raw USNO-B and Tycho2 into FITS format for easier use
25* Uniformize, deduplicate, and cut the FITSified catalogs
26* Build index files from these cuts
27* Solve the astrometry of images using these index files
28
29The code includes:
30
31* A simple but powerful HEALPIX implementation
32* The QFITS library with several modifications
33* libkd, a compact and high-performance kdtree library
34
35The code requires *index* files, processed from an astrometric
36reference catalog such as USNO-B1 or 2MASS. We have released several
37of these; see :ref:`getting-index-files`.
38
39Installing
40==========
41
42See :ref:`build`.
43
44.. _getting-index-files:
45
46Getting Index Files
47===================
48
49Get pre-cooked index files from: <http://data.astrometry.net/4200>_
50(these are built from the 2MASS catalog).
51
52Or, for wide-angle images, <http://data.astrometry.net/4100>_
53(these are built from the Tycho-2 catalog).
54
55We used to have the "4000-series" files, but these suffer from a bug
56where parts of the sky do are not covered by the reference catalog.
57
58Each index file is designed to solve images within a narrow range of
59scales. The index files designed to solve small (angular size) images
60are rather large files, so you probably only want to grab the index
61files required for the images you wish to solve. If you grab extra
62index files, the solver will run more slowly, but the results should
63be the same.
64
65The files are named like *index-42XX.fits* or *index-42XX-YY.fits*.
66*XX* is the "scale", *YY* is the "healpix" number. These are called
67the "4200-series" index files.
68
69Each index file contains a large number of "skymarks" (landmarks for
70the sky) that allow our solver to identify your images. The skymarks
71contained in each index file have sizes (diameters) within a narrow
72range. You probably want to download index files whose quads are,
73say, 10% to 100% of the sizes of the images you want to solve.
74
75For example, let's say you have some 1-degree square images. You
76should grab index files that contain skymarks of size 0.1 to 1 degree,
77or 6 to 60 arcminutes. Referring to the table below, you should grab
78index files 4203 through 4209. You might find that the same number of
79fields solve, and faster, using just one or two of the index files in
80the middle of that range - in our example you might try 4205, 4206 and
814207.
82
83For reference, we used index files 202 alone for our SDSS tests (13x9
84arcmin fields); these are the same scale is the new 4202 files.
85
86The medium-sized index files are split into 12 "healpix" tiles; each
87one covers 1/12th of the sky. The small-sized ones are split into 48
88healpixes. See the maps here; you might not need all of them.
89https://github.com/dstndstn/astrometry.net/blob/master/util/hp.png
90https://github.com/dstndstn/astrometry.net/blob/master/util/hp2.png
91
92+-----------------------+-----------------------------------------+
93| Index Filename | Range of skymark diameters (arcminutes) |
94+=======================+=========================================+
95| ``index-4219.fits`` | 1400--2000 |
96+-----------------------+-----------------------------------------+
97| ``index-4218.fits`` | 1000--1400 |
98+-----------------------+-----------------------------------------+
99| ``index-4217.fits`` | 680--1000 |
100+-----------------------+-----------------------------------------+
101| ``index-4216.fits`` | 480--680 |
102+-----------------------+-----------------------------------------+
103| ``index-4215.fits`` | 340--480 |
104+-----------------------+-----------------------------------------+
105| ``index-4214.fits`` | 240--340 |
106+-----------------------+-----------------------------------------+
107| ``index-4213.fits`` | 170--240 |
108+-----------------------+-----------------------------------------+
109| ``index-4212.fits`` | 120--170 |
110+-----------------------+-----------------------------------------+
111| ``index-4211.fits`` | 85--120 |
112+-----------------------+-----------------------------------------+
113| ``index-4210.fits`` | 60---85 |
114+-----------------------+-----------------------------------------+
115| ``index-4209.fits`` | 42--60 |
116+-----------------------+-----------------------------------------+
117| ``index-4208.fits`` | 30--42 |
118+-----------------------+-----------------------------------------+
119| ``index-4207-*.fits`` | 22--30 |
120+-----------------------+-----------------------------------------+
121| ``index-4206-*.fits`` | 16--22 |
122+-----------------------+-----------------------------------------+
123| ``index-4205-*.fits`` | 11--16 |
124+-----------------------+-----------------------------------------+
125| ``index-4204-*.fits`` | 8--11 |
126+-----------------------+-----------------------------------------+
127| ``index-4203-*.fits`` | 5.6--8.0 |
128+-----------------------+-----------------------------------------+
129| ``index-4202-*.fits`` | 4.0--5.6 |
130+-----------------------+-----------------------------------------+
131| ``index-4201-*.fits`` | 2.8--4.0 |
132+-----------------------+-----------------------------------------+
133| ``index-4200-*.fits`` | 2.0--2.8 |
134+-----------------------+-----------------------------------------+
135
136Download the index files you need and then either:
137
138* Copy the files to the ``data`` directory wherever you installed the
139 Astrometry.net code (``INSTALL_DIR/data``, perhaps
140 ``/usr/local/astrometry/data``); OR
141
142* Copy the files to the top-level (astrometry-$VERSION) source
143 directory, and run::
144
145 $ make install-indexes
146
147Next, you can (optionally) configure the solver by editing the file::
148
149 INSTALL_DIR/etc/astrometry.cfg
150
151
152
153Big-Endian Machines
154-------------------
155
156Most CPUs these days are little-endian. If you have an Intel or AMD
157chip, you can skip this section. The most common big-endian CPU in
158recent times is the PowerPC used in Macs. If you have one of these,
159read on.
160
161The index files we are distributing are for little-endian machines.
162For big-endian machines, you must do the following::
163
164 cd /usr/local/astrometry/data
165 for f in index-*.fits; do
166 fits-flip-endian -i $f -o flip-$f -e 1 -s 4 -e 3 -s 4 -e 4 -s 2 -e 5 -s 8 -e 6 -s 2 -e 8 -s 4 -e 9 -s 4 -e 10 -s 8 -e 11 -s 4
167 for e in 0 2 7; do
168 modhead flip-$f"[$e]" ENDIAN 01:02:03:04
169 done
170 done
171
172assuming ``fits-flip-endian`` and ``modhead`` are in your path. The files
173``flip-index-*.fits`` will contain the flipped index files.
174
175If that worked, you can swap the flipped ones into place (while
176saving the originals) with::
177
178 cd /usr/local/astrometry/data
179 mkdir -p orig
180 for f in index-*.fits; do
181 echo "backing up $f"
182 mv -n $f orig/$f
183 echo "moving $f into place"
184 mv -n flip-$f $f
185 done
186
187Solving
188=======
189
190Finally, solve some fields.
191
192(If you didn't build the plotting commands, add "--no-plots" to the
193command lines below.)
194
195(These lists of index files have not been updated; usually replacing
196"2xx" by "42xx" should work; for some of them the exact set that will
197solve has changed.)
198
199If you have any of index files 4112 to 4118 (213 to 218)::
200
201 $ solve-field --scale-low 10 demo/apod4.jpg
202
203If you have any of index files 4115 to 4119 (219)::
204
205 $ solve-field --scale-low 45 demo/apod5.jpg
206
207If you have any of index files 210 to 214::
208
209 $ solve-field --scale-low 1 demo/apod3.jpg
210
211If you have any of index files 206 to 211::
212
213 $ solve-field --scale-low 1 demo/apod2.jpg
214
215If you have any of index files 203 to 205::
216
217 $ solve-field apod1.jpg
218
219If you have any of index files 200 to 203::
220
221 $ solve-field demo/sdss.jpg
222
223
224Copyrights and credits for the demo images are listed in the file
225``demo/CREDITS`` .
226
227Note that you can also give solve-field a URL rather than a file as input::
228
229 $ solve-field --out apod1b http://antwrp.gsfc.nasa.gov/apod/image/0302/ngc2264_croman_c3.jpg
230
231
232If you don't have the netpbm tools (eg jpegtopnm), do this instead:
233
234If you have any of index files 213 to 218::
235
236 $ solve-field --scale-low 10 demo/apod4.xyls
237
238If you have index 219::
239
240 $ solve-field --scale-low 30 demo/apod5.xyls
241
242If you have any of index files 210 to 214::
243
244 $ solve-field --scale-low 1 demo/apod3.xyls
245
246If you have any of index files 206 to 211::
247
248 $ solve-field --scale-low 1 demo/apod2.xyls
249
250If you have any of index files 203 to 205::
251
252 $ solve-field demo/apod1.xyls
253
254If you have any of index files 200 to 203::
255
256 $ solve-field demo/sdss.xyls
257
258
259Output files
260------------
261
262+--------------------+-------------------------------------------------------------+
263| <base>-ngc.png | an annotation of the image. |
264+--------------------+-------------------------------------------------------------+
265| <base>.wcs | a FITS WCS header for the solution. |
266+--------------------+-------------------------------------------------------------+
267| <base>.new | a new FITS file containing the WCS header. |
268+--------------------+-------------------------------------------------------------+
269| <base>-objs.png | a plot of the sources (stars) we extracted from |
270| | the image. |
271+--------------------+-------------------------------------------------------------+
272| <base>-indx.png | sources (red), plus stars from the index (green), |
273| | plus the skymark ("quad") used to solve the |
274| | image. |
275+--------------------+-------------------------------------------------------------+
276| <base>-indx.xyls | a FITS BINTABLE with the pixel locations of |
277| | stars from the index. |
278+--------------------+-------------------------------------------------------------+
279| <base>.rdls | a FITS BINTABLE with the RA,Dec of sources we |
280| | extracted from the image. |
281+--------------------+-------------------------------------------------------------+
282| <base>.axy | a FITS BINTABLE of the sources we extracted, plus |
283| | headers that describe the job (how the image is |
284| | going to be solved). |
285+--------------------+-------------------------------------------------------------+
286| <base>.solved | exists and contains (binary) 1 if the field solved. |
287+--------------------+-------------------------------------------------------------+
288| <base>.match | a FITS BINTABLE describing the quad match that |
289| | solved the image. |
290+--------------------+-------------------------------------------------------------+
291| <base>.kmz | (optional) KMZ file for Google Sky-in-Earth. You need |
292| | to have "wcs2kml" in your PATH. See |
293| | http://code.google.com/p/wcs2kml/downloads/list |
294| | http://code.google.com/p/google-gflags/downloads/list |
295+--------------------+-------------------------------------------------------------+
296
297
298Tricks and Tips
299===============
300
301* To lower the CPU time limit before giving up::
302
303 $ solve-field --cpulimit 30 ...
304
305 will make it give up after 30 seconds.
306
307 (Note, however, that the "backend" configuration file (astrometry.cfg)
308 puts a limit on the CPU time that is spent on an image; solve-field
309 can reduce this but not increase it.)
310
311* Scale of the image: if you provide bounds (lower and upper limits)
312 on the size of the image you are trying to solve, solving can be much
313 faster. In the last examples above, for example, we specified that
314 the field is at least 30 degrees wide: this means that we don't need
315 to search for matches in the index files that contain only tiny
316 skymarks.
317
318 Eg, to specify that the image is between 1 and 2 degrees wide::
319
320 $ solve-field --scale-units degwidth --scale-low 1 --scale-high 2 ...
321
322 If you know the pixel scale instead::
323
324 $ solve-field --scale-units arcsecperpix \
325 --scale-low 0.386 --scale-high 0.406 ...
326
327 When you tell solve-field the scale of your image, it uses this to
328 decide which index files to try to use to solve your image; each index
329 file contains quads whose scale is within a certain range, so if these
330 quads are too big or too small to be in your image, there is no need
331 to look in that index file. It is also used while matching quads: a
332 small quad in your image is not allowed to match a large quad in the
333 index file if such a match would cause the image scale to be outside
334 the bounds you specified. However, all these checks are done before
335 computing a best-fit WCS solution and polynomial distortion terms, so
336 it is possible (though rare) for the final solution to fall outside
337 the limits you specified. This should only happen when the solution
338 is correct, but you gave incorrect inputs, so you shouldn't be
339 complaining! :)
340
341
342* Guess the scale: solve-field can try to guess your image's scale
343 from a number of different FITS header values. When it's right, this
344 often speeds up solving a lot, and when it's wrong it doesn't cost
345 much. Enable this with::
346
347 $ solve-field --guess-scale ...
348
349* If you've got big images: you might want to downsample them before
350 doing source extraction::
351
352 $ solve-field --downsample 2 ...
353 $ solve-field --downsample 4 ...
354
355* Depth. The solver works by looking at sources in your image,
356 starting with the brightest. It searches for all "skymarks" that can
357 be built from the N brightest stars before considering star N+1. When
358 using several index files, it can be much faster to search for many
359 skymarks in one index file before switching to the next one. This
360 flag lets you control when the solver switches between index files.
361 It also lets you control how much effort the solver puts in before
362 giving up - by default it looks at all the sources in your image, and
363 usually times out before this finishes.
364
365 Eg, to first look at sources 1-20 in all index files, then sources
366 21-30 in all index files, then 31-40::
367
368 $ solve-field --depth 20,30,40 ...
369
370 or::
371
372 $ solve-field --depth 1-20 --depth 21-30 --depth 31-40 ...
373
374 Sources are numbered starting at one, and ranges are inclusive. If
375 you don't give a lower limit, it will take 1 + the previous upper
376 limit. To look at a single source, do::
377
378 $ solve-field --depth 42-42 ...
379
380
381* Our source extractor sometimes estimates the background badly, so
382 by default we sort the stars by brightness using a compromise between
383 the raw and background-subtracted flux estimates. For images without
384 much nebulosity, you might find that using the background-subtracted
385 fluxes yields faster results. Enable this by::
386
387 $ solve-field --resort ...
388
389
390* If you've got big images: you might want to downsample them before
391 doing source extraction::
392
393 $ solve-field --downsample 2 ...
394
395 or::
396
397 $ solve-field --downsample 4 ...
398
399
400* When solve-field processes FITS images, it looks for an existing
401 WCS header. If one is found, it tries to verify that header before
402 trying to solve the image all-sky. You can prevent this with::
403
404 $ solve-field --no-verify ...
405
406 Note that currently solve-field only understands a small subset of
407 valid WCS headers: essentially just the TAN projection with a CD
408 matrix (not CROT).
409
410
411* If you don't want the plots to be produced::
412
413 $ solve-field --no-plots ...
414
415
416* "I know where my image is to within 1 arcminute, how can I tell
417 solve-field to only look there?"
418
419 ::
420
421 $ solve-field --ra, --dec, --radius
422
423 Tells it to look within "radius" degrees of the given RA,Dec position.
424
425* To convert a list of pixel coordinates to RA,Dec coordinates::
426
427 $ wcs-xy2rd -w wcs-file -i xy-list -o radec-list
428
429 Where xy-list is a FITS BINTABLE of the pixel locations of sources;
430 recall that FITS specifies that the center of the first pixel is pixel
431 coordinate (1,1).
432
433
434* To convert from RA,Dec to pixels::
435
436 $ wcs-rd2xy -w wcs-file -i radec-list -o xy-list
437
438
439* To make cool overlay plots: see ``plotxy``, ``plot-constellations``.
440
441
442* To change the output filenames when processing multiple input
443 files: each of the output filename options listed below can include
444 "%s", which will be replaced by the base output filename. (Eg, the
445 default for --wcs is "%s.wcs"). If you really want a "%" character in
446 your output filename, you have to put "%%".
447
448 Outputs include:
449
450 * --new-fits
451 * --kmz
452 * --solved
453 * --cancel
454 * --match
455 * --rdls
456 * --corr
457 * --wcs
458 * --keep-xylist
459 * --pnm
460
461 also included:
462
463 * --solved-in
464 * --verify
465
466* Reusing files between runs:
467
468 The first time you run solve-field, save the source extraction
469 results::
470
471 $ solve-field --keep-xylist %s.xy input.fits ...
472
473 On subsequent runs, instead of using the original input file, use the
474 saved xylist instead. Also add ``--continue`` to overwrite any output
475 file that already exists.
476
477 ::
478
479 $ solve-field input.xy --continue ...
480
481 To skip previously solved inputs (note that this assumes single-HDU
482 inputs)::
483
484 $ solve-field --skip-solved ...
485
486
487Optimizing the code
488-------------------
489
490Here are some things you can do to make the code run faster:
491
492 * we try to guess "-mtune" settings that will work for you; if we're
493 wrong, you can set the environment variable ARCH_FLAGS before
494 compiling:
495
496 $ ARCH_FLAGS="-mtune=nocona" make
497
498 You can find details in the gcc manual:
499 http://gcc.gnu.org/onlinedocs/
500
501 You probably want to look in the section:
502 "GCC Command Options"
503 -> "Hardware Models and Configurations"
504 -> "Intel 386 and AMD x86-64 Options"
505
506 http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options
507
508
509What are all these programs?
510----------------------------
511
512When you "make install", you'll get a bunch of programs in
513/usr/local/astrometry/bin. Here's a brief synopsis of what each one
514does. For more details, run the program without arguments (most of
515them give at least a brief summary of what they do).
516
517Image-solving programs:
518^^^^^^^^^^^^^^^^^^^^^^^
519
520 * solve-field: main high-level command-line user interface.
521 * astrometry-engine: higher-level solver that reads "augmented xylists";
522 called by solve-field.
523 * augment-xylist: creates "augmented xylists" from images, which
524 include star positions and hints and instructions for solving.
525 * image2xy: source extractor.
526
527Plotting programs:
528^^^^^^^^^^^^^^^^^^
529
530 * plotxy: plots circles, crosses, etc over images.
531 * plotquad: draws polygons over images.
532 * plot-constellations: annotates images with constellations, bright
533 stars, Messier/NGC objects, Henry Draper catalog stars, etc.
534 * plotcat: produces density plots given lists of stars.
535
536WCS utilities:
537^^^^^^^^^^^^^^
538
539 * new-wcs: merge a WCS solution with existing FITS header cards; can
540 be used to create a new image file containing the WCS headers.
541 * fits-guess-scale: try to guess the scale of an image based on FITS
542 headers.
543 * wcsinfo: print simple properties of WCS headers (scale, rotation, etc)
544 * wcs-xy2rd, wcs-rd2xy: convert between lists of pixel (x,y) and
545 (RA,Dec) positions.
546 * wcs-resample: projects one FITS image onto another image.
547 * wcs-grab/get-wcs: try to interpret an existing WCS header.
548
549Miscellany:
550^^^^^^^^^^^
551
552 * an-fitstopnm: converts FITS images into ugly PNM images.
553 * get-healpix: which healpix covers a given RA,Dec?
554 * hpowned: which small healpixels are inside a big healpixel?
555 * control-program: sample code for how you might use the
556 Astrometry.net code in your own software.
557 * xylist2fits: converts a text list of x,y positions to a FITS
558 binary table.
559 * rdlsinfo: print stats about a list of RA,Dec positions (rdlist).
560 * xylsinfo: print stats about a list of x,y positions (xylist).
561
562FITS utilities
563^^^^^^^^^^^^^^
564
565 * tablist: list values in a FITS binary table.
566 * modhead: print or modify FITS header cards.
567 * fitscopy: general FITS image / table copier.
568 * tabmerge: combines rows in two FITS tables.
569 * fitstomatlab: prints out FITS binary tables in a silly format.
570 * liststruc: shows the structure of a FITS file.
571 * listhead: prints FITS header cards.
572 * imcopy: copies FITS images.
573 * imarith: does (very) simple arithmetic on FITS images.
574 * imstat: computes statistics on FITS images.
575 * fitsgetext: pull out individual header or data blocks from
576 multi-HDU FITS files.
577 * subtable: pull out a set of columns from a many-column FITS binary
578 table.
579 * tabsort: sort a FITS binary table based on values in one column.
580 * column-merge: create a FITS binary table that includes columns
581 from two input tables.
582 * add-healpix-column: given a FITS binary table containing RA and
583 DEC columns, compute the HEALPIX and add it as a column.
584 * resort-xylist: used by solve-field to sort a list of stars using a
585 compromise between background-subtracted and non-background-subtracted
586 flux (because our source extractor sometimes messes up the background
587 subtraction).
588 * fits-flip-endian: does endian-swapping of FITS binary tables.
589 * fits-dedup: removes duplicate header cards.
590
591Index-building programs
592^^^^^^^^^^^^^^^^^^^^^^^
593
594* build-index: given a FITS binary table with RA,Dec, build an index
595 file. This is the "easy", recent way. The old way uses the rest
596 of these programs:
597
598 * usnobtofits, tycho2tofits, nomadtofits, 2masstofits: convert
599 catalogs into FITS binary tables.
600 * build-an-catalog: convert input catalogs into a standard FITS
601 binary table format.
602 * cut-an: grab a bright, uniform subset of stars from a catalog.
603 * startree: build a star kdtree from a catalog.
604 * hpquads: find a bright, uniform set of N-star features.
605 * codetree: build a kdtree from N-star shape descriptors.
606 * unpermute-quads, unpermute-stars: reorder index files for
607 efficiency.
608
609* hpsplit: splits a list of FITS tables into healpix tiles
610
611
612Source lists ("xylists")
613------------------------
614
615The solve-field program accepts either images or "xylists" (xyls),
616which are just FITS BINTABLE files which contain two columns (float or
617double (E or D) format) which list the pixel coordinates of sources
618(stars, etc) in the image.
619
620To specify the column names (eg, "XIMAGE" and "YIMAGE")::
621
622 $ solve-field --x-column XIMAGE --y-column YIMAGE ...
623
624Our solver assumes that the sources are listed in order of brightness,
625with the brightest sources first. If your files aren't sorted, you
626can specify a column by which the file should be sorted.
627
628::
629
630 $ solve-field --sort-column FLUX ...
631
632By default it sorts with the largest value first (so it works
633correctly if the column contains FLUX values), but you can reverse
634that by::
635
636 $ solve-field --sort-ascending --sort-column MAG ...
637
638When using xylists, you should also specify the original width and
639height of the image, in pixels::
640
641 $ solve-field --width 2000 --height 1500 ...
642
643Alternatively, if the FITS header contains "IMAGEW" and "IMAGEH" keys,
644these will be used.
645
646The solver can deal with multi-extension xylists; indeed, this is a
647convenient way to solve a large number of fields at once. You can
648tell it which extensions it should solve by::
649
650 $ solve-field --fields 1-100,120,130-200
651
652(Ranges of fields are inclusive, and the first FITS extension is 1, as
653per the FITS standard.)
654
655Unfortunately, the plotting code isn't smart about handling multiple
656fields, so if you're using multi-extension xylists you probably want
657to turn off plotting::
658
659 $ solve-field --no-plots ...
660
661
662Backend config
663--------------
664
665Because we also operate a web service using most of the same software,
666the local version of the solver is a bit more complicated than it
667really needs to be. The "solve-field" program takes your input files,
668does source extraction on them to produce an "xylist" -- a FITS
669BINTABLE of source positions -- then takes the information you
670supplied about your fields on the command-line and adds FITS headers
671encoding this information. We call this file an "augmented xylist";
672we use the filename suffix ".axy". "solve-field" then calls the
673"backend" program, passing it your axy file. "backend" reads a config
674file (by default /usr/local/astrometry/etc/astrometry.cfg) that describes
675things like where to find index files, whether to load all the index
676files at once or run them one at a time, how long to spend on each
677field, and so on. If you want to force only a certain set of index
678files to load, you can copy the astrometry.cfg file to a local version
679and change the list of index files that are loaded, and then tell
680solve-field to use this config file::
681
682 $ solve-field --config myastrometry.cfg ...
683
684
685Source Extractor
686----------------
687http://www.astromatic.net/software/sextractor
688
689The "Source Extractor" program by Emmanuel Bertin can
690be used to do source extraction if you don't want to use our own
691bundled "image2xy" program.
692
693NOTE: users have reported that Source Extractor 2.4.4 (available in some
694Ubuntu distributions) DOES NOT WORK -- it prints out correct source
695positions as it runs, but the "xyls" output file it produces contains
696all (0,0). We haven't looked into why this is or how to work around
697it. Later versions of Source Extractor such as 2.8.6 work fine.
698
699You can tell solve-field to use Source Extractor like this::
700
701 $ solve-field --use-source-extractor ...
702
703By default we use almost all Source Extractor's default settings. The
704exceptions are:
705
706 1) We write a PARAMETERS_NAME file containing:
707 X_IMAGE
708 Y_IMAGE
709 MAG_AUTO
710
711 2) We write a FILTER_NAME file containing a Gaussian PSF with FWHM
712 of 2 pixels. (See solver/augment-xylist.c "filterstr" for the
713 exact string.)
714
715 3) We set CATALOG_TYPE FITS_1.0
716
717 4) We set CATALOG_NAME to a temp filename.
718
719
720If you want to override any of the settings we use, you can use::
721
722 $ solve-field --use-source-extractor --source-extractor-config <se.conf>
723
724In order to reproduce the default behavior, you must::
725
726 1) Create a parameters file like the one we make, and set
727 PARAMETERS_NAME to its filename
728
729 2) Set::
730
731 $ solve-field --x-column X_IMAGE --y-column Y_IMAGE \
732 --sort-column MAG_AUTO --sort-ascending
733
734 3) Create a filter file like the one we make, and set FILTER_NAME to
735 its filename
736
737
738Note that you can tell solve-field where to find Source Extractor with::
739
740 $ solve-field --use-source-extractor --source-extractor-path <path-to-se-executable>
741
742
743
744Workarounds
745-----------
746* No python
747
748 There are two places we use python: handling images, and filtering FITS files.
749
750 You can avoid the image-handling code by doing source extraction
751 yourself; see the "No netpbm" section below.
752
753 You can avoid filtering FITS files by using the "--no-fits2fits"
754 option to solve-field.
755
756* No netpbm
757
758 We use the netpbm tools (jpegtopnm, pnmtofits, etc) to convert from
759 all sorts of image formats to PNM and FITS.
760
761 If you don't have these programs installed, you must do source
762 extraction yourself and use "xylists" rather than images as the input
763 to solve-field. See SOURCE EXTRACTOR and XYLIST sections above.
764
765ERROR MESSAGES during compiling
766-------------------------------
767
7681. ``/bin/sh: line 1: /dev/null: No such file or directory``
769
770 We've seen this happen on Macs a couple of times. Reboot and it goes
771 away...
772
7732. ``makefile.deps:40: deps: No such file or directory``
774
775 Not a problem. We use automatic dependency tracking: "make" keeps
776 track of which source files depend on which other source files. These
777 dependencies get stored in a file named "deps"; when it doesn't exist,
778 "make" tries to rebuild it, but not before printing this message.
779
7803. ::
781
782 os-features-test.c: In function 'main':
783 os-features-test.c:23: warning: implicit declaration of function 'canonicalize_file_name'
784 os-features-test.c:23: warning: initialization makes pointer from integer without a cast
785 /usr/bin/ld: Undefined symbols:
786 _canonicalize_file_name
787 collect2: ld returned 1 exit status
788
789 Not a problem. We provide replacements for a couple of OS-specific
790 functions, but we need to decide whether to use them or not. We do
791 that by trying to build a test program and checking whether it works.
792 This failure tells us your OS doesn't provide the
793 canonicalize_file_name() function, so we plug in a replacement.
794
7954. ::
796
797 configure: WARNING: cfitsio: == No acceptable f77 found in $PATH
798 configure: WARNING: cfitsio: == Cfitsio will be built without Fortran wrapper support
799 drvrfile.c: In function 'file_truncate':
800 drvrfile.c:360: warning: implicit declaration of function 'ftruncate'
801 drvrnet.c: In function 'http_open':
802 drvrnet.c:300: warning: implicit declaration of function 'alarm'
803 drvrnet.c: In function 'http_open_network':
804 drvrnet.c:810: warning: implicit declaration of function 'close'
805 drvrsmem.c: In function 'shared_cleanup':
806 drvrsmem.c:154: warning: implicit declaration of function 'close'
807 group.c: In function 'fits_get_cwd':
808 group.c:5439: warning: implicit declaration of function 'getcwd'
809 ar: creating archive libcfitsio.a
810
811 Not a problem; these errors come from cfitsio and we just haven't fixed them.
812
813
814License
815=======
816
817The Astrometry.net code suite is free software licensed under the GNU
818GPL, version 2. See the file LICENSE for the full terms of the GNU
819GPL.
820
821The index files come with their own license conditions. See the file
822GETTING-INDEXES for details.
823
824Contact
825=======
826
827You can post questions (or maybe even find the answer to your
828questions) at http://forum.astrometry.net . However, please also send
829an email to "code2 at astrometry dot net" pointing out your post to
830the forum -- we never remember to check the forum! We would also be
831happy to hear via email any bug reports, comments, critiques, feature
832requests, and in general any reports on your experiences, good or bad.
833
834
835