1funmerge(1) SAORD Documentation funmerge(1)
2
3
4
6 funmerge - merge one or more Funtools table files
7
9 funmerge [-w⎪-x] -f [colname] <iname1> <iname2> ... <oname>
10
12 -f # output a column specifying file from which this event came
13 -w # adjust position values using WCS info
14 -x # adjust position values using WCS info and save old values
15
17 funmerge merges FITS data from one or more FITS Binary Table files or
18 raw event files.
19
20 The first argument to the program specifies the first input FITS table
21 or raw event file. If "stdin" is specified, data are read from the
22 standard input. Use Funtools Bracket Notation to specify FITS exten‐
23 sions and row filters. Subsequent arguments specify additional event
24 files and tables to merge. (NB: Stdin cannot not be used for any of
25 these additional input file arguments.) The last argument is the out‐
26 put FITS file. The columns in each input table must be identical.
27
28 If an input file begins with the '@' character, it is processed as an
29 include file, i.e., as a text file containing event file names (as well
30 as blank lines and/or comment lines starting with the '#' sign). If
31 standard input is specified as an include file ('@stdin'), then file
32 names are read from the standard input until EOF (^D). Event files and
33 include files can be mixed on a command line.
34
35 Rows from each table are written sequentially to the output file. If
36 the switch -f [colname] is specified on the command line, an additional
37 column is added to each row containing the number of the file from
38 which that row was taken (starting from one). In this case, the corre‐
39 sponding file names are stored in the header parameters having the pre‐
40 fix FUNFIL, i.e., FUNFIL01, FUNFIL02, etc.
41
42 Using the -w switch (or -x switch as described below), funmerge also
43 can adjust the position column values using the WCS information in each
44 file. (By position columns, we mean the columns that the table is
45 binned on, i.e., those columns defined by the bincols= switch, or (X,Y)
46 by default.) To perform WCS alignment, the WCS of the first file is
47 taken as the base WCS. Each position in subsequent files is adjusted
48 by first converting it to the sky coordinate in its own WCS coordinate
49 system, then by converting this sky position to the sky position of the
50 base WCS, and finally converting back to a pixel position in the base
51 system. Note that in order to perform WCS alignment, the appropriate
52 WCS and TLMIN/TLMAX keywords must already exist in each FITS file.
53
54 When performing WCS alignment, you can save the original positions in
55 the output file by using the -x (for "xtra") switch instead of the -w
56 switch (i.e., using this switch also implies using -w) The old posi‐
57 tions are saved in columns having the same name as the original posi‐
58 tional columns, with the added prefix "OLD_".
59
60 Examples:
61
62 Merge two tables, and preserve the originating file number for each row
63 in the column called "FILE" (along with the corresponding file name in
64 the header):
65
66 [sh] funmerge -f "FILE" test.ev test2.ev merge.ev
67
68 Merge two tables with WCS alignment, saving the old position values in
69 2 additional columns:
70
71 [sh] funmerge -x test.ev test2.ev merge.ev
72
73 This program only works on raw event files and binary tables. We have
74 not yet implemented image and array merging.
75
77 See funtools(n) for a list of Funtools help pages
78
79
80
81version 1.4.0 August 15, 2007 funmerge(1)