1 | % ----------------------------------------------------------------------- |
---|
2 | % outputs.tex: Section detailing the different forms of text- and |
---|
3 | % plot-based output. |
---|
4 | % ----------------------------------------------------------------------- |
---|
5 | % Copyright (C) 2006, Matthew Whiting, ATNF |
---|
6 | % |
---|
7 | % This program is free software; you can redistribute it and/or modify it |
---|
8 | % under the terms of the GNU General Public License as published by the |
---|
9 | % Free Software Foundation; either version 2 of the License, or (at your |
---|
10 | % option) any later version. |
---|
11 | % |
---|
12 | % Duchamp is distributed in the hope that it will be useful, but WITHOUT |
---|
13 | % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
14 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
15 | % for more details. |
---|
16 | % |
---|
17 | % You should have received a copy of the GNU General Public License |
---|
18 | % along with Duchamp; if not, write to the Free Software Foundation, |
---|
19 | % Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
---|
20 | % |
---|
21 | % Correspondence concerning Duchamp may be directed to: |
---|
22 | % Internet email: Matthew.Whiting [at] atnf.csiro.au |
---|
23 | % Postal address: Dr. Matthew Whiting |
---|
24 | % Australia Telescope National Facility, CSIRO |
---|
25 | % PO Box 76 |
---|
26 | % Epping NSW 1710 |
---|
27 | % AUSTRALIA |
---|
28 | % ----------------------------------------------------------------------- |
---|
29 | \secA{Outputs} |
---|
30 | \label{sec-output} |
---|
31 | |
---|
32 | \secB{During execution} |
---|
33 | |
---|
34 | \duchamp provides the user with feedback whilst it is running, to |
---|
35 | keep the user informed on the progress of the analysis. Most of this |
---|
36 | consists of self-explanatory messages about the particular stage the |
---|
37 | program is up to. The relevant parameters are printed to the screen at |
---|
38 | the start (once the file has been successfully read in), so the user |
---|
39 | is able to make a quick check that the setup is correct (see |
---|
40 | Appendix~\ref{app-input} for an example). |
---|
41 | |
---|
42 | The extent of memory allocation made at the start is indicated. This |
---|
43 | will include the arrays needed for the pixel array, the reconstruction |
---|
44 | or smoothed array, and the 2D detection map, but \emph{not} additional |
---|
45 | space needed for working within individual algorithms, nor storage |
---|
46 | needed for the detected objects. |
---|
47 | |
---|
48 | \duchamp will report the amount of memory that is allocated when the |
---|
49 | image is read in. This includes the storage for the array as well as |
---|
50 | additional storage for the reconstructed/smoothed array and/or the |
---|
51 | baseline arrays (if these are needed). |
---|
52 | |
---|
53 | If the cube is being trimmed (\S\ref{sec-modify}), the resulting |
---|
54 | dimensions are printed to indicate how much has been trimmed. If a |
---|
55 | reconstruction is being done, a continually updating message shows |
---|
56 | either the current iteration and scale, compared to the maximum scale |
---|
57 | (when \texttt{reconDim = 3}), or a progress bar showing the amount of |
---|
58 | the cube that has been reconstructed (for smaller values of |
---|
59 | \texttt{reconDim}). |
---|
60 | |
---|
61 | During the searching algorithms, the progress through the search is |
---|
62 | shown. When completed, the number of objects found is reported (this |
---|
63 | is the total number found, before any merging is done). |
---|
64 | |
---|
65 | In the merging process (where multiple detections of the same object |
---|
66 | are combined -- see \S\ref{sec-merger}), two stages of output |
---|
67 | occur. The first is when each object in the list is compared with all |
---|
68 | others. The output shows two numbers: the first being how far through |
---|
69 | the list the current object is, and the second being the length of the |
---|
70 | list. As the algorithm proceeds, the first number should increase and |
---|
71 | the second should decrease (as objects are combined). When the numbers |
---|
72 | meet, the whole list has been compared. If the objects are being |
---|
73 | grown, a similar output is shown, indicating the progress through the |
---|
74 | list. In the rejection stage, in which objects not meeting the minimum |
---|
75 | pixels/channels requirements are removed, the total number of objects |
---|
76 | remaining in the list is shown, which should steadily decrease with |
---|
77 | each rejection until all have been examined. Note that these steps can |
---|
78 | be very quick for small numbers of detections. |
---|
79 | |
---|
80 | Since this continual printing to screen has some overhead of time and |
---|
81 | CPU involved, the user can elect to not print this information by |
---|
82 | setting the parameter \texttt{verbose = false}. In this case, the user |
---|
83 | is still informed as to the steps being undertaken, but the details of |
---|
84 | the progress are not shown. |
---|
85 | |
---|
86 | There may also be Warning or Error messages printed to screen. The |
---|
87 | Warning messages occur when something happens that is unexpected (for |
---|
88 | instance, a desired keyword is not present in the FITS header), but |
---|
89 | not detrimental to the execution. An Error message is something more |
---|
90 | serious, and indicates some part of the program was not able to |
---|
91 | complete its task. This is not necessary fatal, but it may mean the |
---|
92 | full functionality requested will not be achieved. The message will |
---|
93 | also indicate which function or subroutine generated it -- this is |
---|
94 | primarily a tool for debugging, but can be useful in determining what |
---|
95 | went wrong. |
---|
96 | |
---|
97 | \secB{Text-based output files} |
---|
98 | |
---|
99 | \secC{Table of results} |
---|
100 | \label{sec-results} |
---|
101 | |
---|
102 | Finally, we get to the results -- the reason for running \duchamp in |
---|
103 | the first place. Once the detection list is finalised, it is sorted |
---|
104 | according to the value of the \texttt{sortingParam}. This can take the |
---|
105 | value ``xvalue'', ``yvalue'', ``zvalue'', ``ra'', ``dec'', ``vel'', |
---|
106 | ``w50'', ``iflux'' (for integrated flux), or ``pflux'' (for peak |
---|
107 | flux), or ``snr''. The default value is ``vel'' (which means the |
---|
108 | spectral WCS value -- this could be frequency or wavelength depending |
---|
109 | on the nature of the FITS file). If no good WCS exists, the mean pixel |
---|
110 | position equivalent is used (``ra'' is replaced by ``xvalue'', ``dec'' |
---|
111 | by ``yvalue'', ``vel'' and ``w50'' by ``zvalue''). The sense of the |
---|
112 | sorting will be increasing value with position in the list. To sort in |
---|
113 | the opposite sense, prepend the parameter name with a '-' (\eg |
---|
114 | ``-vel'' instead of ``vel''). The results are then printed to the |
---|
115 | screen and to the output file, given by the \texttt{OutFile} |
---|
116 | parameter. |
---|
117 | |
---|
118 | The output consists of two sections. First, a list of the parameters |
---|
119 | are printed to the output file, for future reference. Next, the |
---|
120 | detection threshold that was used is given, so comparison can be made |
---|
121 | with other searches. The statistics estimating the noise parameters |
---|
122 | are given (see \S\ref{sec-stats}). Thirdly, the number of detections |
---|
123 | are reported. |
---|
124 | |
---|
125 | All this information, known as the ``header'', can either be written |
---|
126 | to the start of the output file (denoted by the parameter |
---|
127 | \texttt{OutFile}), or written to a separate file from the list of |
---|
128 | detections. This second option is activated by the parameter |
---|
129 | \texttt{flagSeparateHeader}, and the information is written to the |
---|
130 | file given by \texttt{HeaderFile}. |
---|
131 | |
---|
132 | The most interesting part, however, is the list of detected |
---|
133 | objects. This list, an example of which can be seen in |
---|
134 | Appendix~\ref{app-output}, contains the following columns (note that |
---|
135 | the title of the columns depending on WCS information will depend on |
---|
136 | the details of the WCS projection: they are shown below for the |
---|
137 | Equatorial and Galactic projection cases). |
---|
138 | |
---|
139 | \begin{Lentry} |
---|
140 | \item[{Obj\#}] The ID number of the detection (simply the |
---|
141 | sequential count for the list, which is ordered by increasing |
---|
142 | velocity, or channel number, if the WCS is not good enough to find |
---|
143 | the velocity). |
---|
144 | \item[{Name}] The ``IAU''-format name of the detection (derived from the |
---|
145 | WCS position -- see below for a description of the format). |
---|
146 | \item[{X,Y,Z}] The ``centre'' pixel position, determined by the input |
---|
147 | parameter \texttt{pixelCentre}. |
---|
148 | \item[{RA/GLON}] The Right Ascension or Galactic Longitude of the centre |
---|
149 | of the object. |
---|
150 | \item[{DEC/GLAT}] The Declination or Galactic Latitude of the centre of |
---|
151 | the object. |
---|
152 | \item[{VEL}] The mean spectral coordinate of the object [units given by the |
---|
153 | \texttt{spectralUnits} parameter]. The actual values here will |
---|
154 | depend on the WCS of the FITS file, and the name of the column will |
---|
155 | come from the CTYPE of the spectral axis (specifically, the |
---|
156 | 4-character S-type code). |
---|
157 | \item[{w\_RA/w\_GLON}] The width of the object in Right Ascension or |
---|
158 | Galactic Longitude (depending on FITS coordinates) [arcmin]. |
---|
159 | \item[{w\_DEC/w\_GLAT}] The width of the object in Declination Galactic |
---|
160 | Latitude [arcmin]. |
---|
161 | \item[{w\_50}] The spectral width of the detection at 50\% of the peak |
---|
162 | flux (the measured full-width at half-maximum, FWHM), in the |
---|
163 | appropriate spectral units [see note below]. |
---|
164 | \item[{F\_int}] The integrated flux over the object, in the units of |
---|
165 | flux times velocity, corrected for the beam if necessary. See below |
---|
166 | for a discussion on this correction. |
---|
167 | \item[{F\_peak}] The peak flux over the object, in the units of flux. |
---|
168 | \item[{S/Nmax}] The signal-to-noise ratio at the peak pixel. |
---|
169 | \item[{X1, X2}] The minimum and maximum X-pixel coordinates. |
---|
170 | \item[{Y1, Y2}] The minimum and maximum Y-pixel coordinates. |
---|
171 | \item[{Z1, Z2}] The minimum and maximum Z-pixel coordinates. |
---|
172 | \item[{Npix}] The number of voxels (\ie distinct $(x,y,z)$ coordinates) |
---|
173 | in the detection. |
---|
174 | \item[{Flag}] Whether the detection has any warning flags (see below). |
---|
175 | \end{Lentry} |
---|
176 | |
---|
177 | These parameters are written to the screen during execution. There are |
---|
178 | alternative ways of calculating the total flux, the position and |
---|
179 | velocity width, however, and so additional parameters are written to |
---|
180 | the output file: |
---|
181 | \begin{Lentry} |
---|
182 | \item[{w\_20}] The spectral width of the detection at 20\% of the peak |
---|
183 | flux, in spectral units [see note below]. |
---|
184 | \item[{w\_VEL}] The full spectral width of the detection (max channel |
---|
185 | $-$ min channel, in the appropriate spectral units). |
---|
186 | \item[{F\_tot}] The sum of the flux values of all detected voxels. |
---|
187 | \item[{X\_av, Y\_av, Z\_av}] The average pixel value in each |
---|
188 | axis direction \ie X\_av is the average of the $x$-values of all |
---|
189 | pixels in the detection. |
---|
190 | \item[{X\_cent, Y\_cent, Z\_cent}] The centroid position, being |
---|
191 | the flux-weighted average of the pixels. |
---|
192 | \item[{X\_peak, Y\_peak, Z\_peak}] The location of the pixel |
---|
193 | containing the peak flux value. |
---|
194 | \end{Lentry} |
---|
195 | |
---|
196 | The velocity width of the detection is calculated at 50\% and 20\% of |
---|
197 | the peak flux, as well as the full detected width (if the detection |
---|
198 | threshold is greater than 20\% or 50\% of the peak, then these values |
---|
199 | will be the same as \texttt{w\_VEL}. The type of position value given |
---|
200 | in the \texttt{X, Y, Z} columns in the screen output is determined by |
---|
201 | the \texttt{pixelCentre} parameter. All three alternatives are shown |
---|
202 | in the output file. |
---|
203 | |
---|
204 | The user can specify the precision used to display the flux, velocity |
---|
205 | and S/Nmax values, by using the input parameters \texttt{precFlux}, |
---|
206 | \texttt{precVel} and \texttt{precSNR} respectively. These values apply |
---|
207 | to the tables written to the screen and to the output file, as well as |
---|
208 | for the VOTable (see below). |
---|
209 | |
---|
210 | The \texttt{Name} is derived from the WCS position. For instance, a |
---|
211 | source that is centred on the RA,Dec position 12$^h$53$^m$45$^s$, |
---|
212 | -36$^\circ$24$'$12$''$ will be given the name J125345$-$362412, if the |
---|
213 | epoch is J2000, or the name B125345$-$362412 if it is B1950. The |
---|
214 | precision of the RA and Dec values is determined by the pixel size, |
---|
215 | such that sufficient precision is used to uniquely define a |
---|
216 | position. The RA value will have one figure greater precision than |
---|
217 | Dec. An alternative form is used for Galactic coordinates: a source |
---|
218 | centred on the position ($l$,$b$) = (323.1245, 5.4567) will be called |
---|
219 | G323.124$+$05.457. If the WCS is not valid (\ie is not present or does |
---|
220 | not have all the necessary information), the \texttt{Name, RA, DEC, |
---|
221 | VEL} and related columns are not printed, but the pixel coordinates |
---|
222 | are still provided. |
---|
223 | |
---|
224 | The velocity units can be specified by the user, using the input |
---|
225 | parameter \texttt{spectralUnits} (enter it as a single string with no |
---|
226 | spaces). The default value comes from the FITS header. These units are |
---|
227 | also used to give the units of integrated flux. |
---|
228 | |
---|
229 | When the cube brightness units are quoted per beam (\eg Jy/beam), then |
---|
230 | the integrated flux \texttt{F\_int} includes a correction for |
---|
231 | this. This involves dividing by the integral over the beam. This is |
---|
232 | calculated using the BMAJ, BMIN \& BPA header keywords from the FITS |
---|
233 | file. BMAJ and BMIN are assumed to be the full-width at half maximum |
---|
234 | (FWHM) in the major and minor axis directions of a Gaussian beam. The |
---|
235 | integral is calculated as follows: the functional form of a 2D |
---|
236 | elliptical Gaussian can be written as |
---|
237 | $\exp(-((x^2/2\sigma_x^2)+(y^2/2\sigma_y^2)))$, and the FWHM in a |
---|
238 | given direction is then $f=2\sqrt{2\ln2}\sigma$. Then, |
---|
239 | \[ |
---|
240 | \int |
---|
241 | \exp\left(-\left(\frac{x^2}{2\sigma_x^2}+\frac{y^2}{2\sigma_y^2}\right)\right) |
---|
242 | = 2\pi\sigma_x\sigma_y |
---|
243 | =\frac{\pi f_x f_y}{4\ln2} |
---|
244 | \] |
---|
245 | provides the correction factor to go from units of Jy/beam to Jy. |
---|
246 | |
---|
247 | If the FITS file does not have the beam information, the user can |
---|
248 | either: |
---|
249 | \begin{enumerate} |
---|
250 | \item Specify the FWHM of the beam in pixels (assuming a circular |
---|
251 | beam) via the parameter \texttt{beamFWHM}. |
---|
252 | \item Specify the area of the beam, again in pixels, via the parameter |
---|
253 | \texttt{beamArea}\footnote{Note that this is equivalent to the old |
---|
254 | parameter \texttt{beamSize}, which was highlighted as being |
---|
255 | ambiguous.}. This should be the value given by the equation above. |
---|
256 | \end{enumerate} |
---|
257 | If both are given, \texttt{beamFWHM} takes precendence. If neither are |
---|
258 | given, and there is no beam information in the header, then no |
---|
259 | correction to the integrated flux is made (and so it will stay in |
---|
260 | units of Jy/beam or equivalent). |
---|
261 | |
---|
262 | If the WCS is absent or not sufficiently specified, then all columns |
---|
263 | from \texttt{RA/GLON} to \texttt{w\_VEL} will be left blank. Also, |
---|
264 | \texttt{F\_int} will be replaced with the more simple \texttt{F\_tot}. |
---|
265 | |
---|
266 | The \texttt{Flag} column contains any warning flags, such as: |
---|
267 | \begin{itemize} |
---|
268 | \item \textbf{E} -- The detection is next to the spatial edge of the image, |
---|
269 | meaning either the limit of the pixels, or the limit of the non-BLANK |
---|
270 | pixel region. |
---|
271 | \item \textbf{S} -- The detection lies at the edge of the spectral region. |
---|
272 | \item \textbf{M} -- The detection is adjacent to, or overlaps the |
---|
273 | ``Milky Way'' range of channels (see Sec.~\ref{sec-MW}). |
---|
274 | \item \textbf{N} -- The total flux, summed over all the (non-BLANK) |
---|
275 | pixels in the smallest box that completely encloses the detection, is |
---|
276 | negative. Note that this sum is likely to include non-detected |
---|
277 | pixels. It is of use in pointing out detections that lie next to |
---|
278 | strongly negative pixels, such as might arise due to interference -- |
---|
279 | the detected pixels might then also be due to the interference, so |
---|
280 | caution is advised. |
---|
281 | \end{itemize} |
---|
282 | In the absence of any of these flags, a \textbf{-} will be recorded in |
---|
283 | this column. |
---|
284 | |
---|
285 | \secC{Other results lists} |
---|
286 | |
---|
287 | Three additional results files can also be requested. One option is a |
---|
288 | VOTable-format XML file, containing just the RA, Dec, Velocity and the |
---|
289 | corresponding widths of the detections, as well as the fluxes. The |
---|
290 | user should set \texttt{flagVOT = true}, and put the desired filename |
---|
291 | in the parameter \texttt{votFile} -- note that the default is for it |
---|
292 | not to be produced. This file should be compatible with all Virtual |
---|
293 | Observatory tools (such as Aladin% |
---|
294 | \footnote{%Aladin can be found on the web at |
---|
295 | \href{http://aladin.u-strasbg.fr/}{http://aladin.u-strasbg.fr/}} |
---|
296 | or TOPCAT\footnote{%Tool for OPerations on Catalogues And Tables: |
---|
297 | \href{http://www.star.bristol.ac.uk/~mbt/topcat/}% |
---|
298 | {http://www.star.bristol.ac.uk/~mbt/topcat/}}). |
---|
299 | |
---|
300 | A second option is an annotation file for use with the Karma toolkit |
---|
301 | of visualisation tools (in particular, with \texttt{kvis}). There are |
---|
302 | two options on how objects are represented, governed by the |
---|
303 | \texttt{annotationType} parameter. Setting this to \texttt{borders} |
---|
304 | results in a border being drawn around the spatial pixels of the |
---|
305 | object, in a manner similar to that seen in Fig.~\ref{fig-spect}. Note |
---|
306 | that Karma/\texttt{kvis} does not always do this perfectly, so the |
---|
307 | lines may not be directly lined up with pixel borders. The other |
---|
308 | option is \texttt{annotationType = circles}. This will draw a circle |
---|
309 | at the position of each detection, scaled by the spatial size of the |
---|
310 | detection, and number it according to the Obj\# given above. To make |
---|
311 | use of this option, the user should set \texttt{flagKarma = true}, and |
---|
312 | put the desired filename in the parameter \texttt{karmaFile} -- again, |
---|
313 | the default is for it not to be produced. |
---|
314 | |
---|
315 | The final optional results file produced is a simple text file that |
---|
316 | contains the spectra for each detected object. The format of the file |
---|
317 | is as follows: the first column has the spectral coordinate, over the |
---|
318 | full range of values; the remaining columns represent the flux values |
---|
319 | for each object at the corresponding spectral position. The flux value |
---|
320 | used is the same as that plotted in the spectral plot detailed below, |
---|
321 | and governed by the \texttt{spectralMethod} parameter. An example of |
---|
322 | what a spectral text file might look like is given below: |
---|
323 | |
---|
324 | \begin{quote} |
---|
325 | {\footnotesize |
---|
326 | \begin{tabular}{lllll} |
---|
327 | 1405.00219727 &0.01323344 &0.23648241 &0.04202826 &-0.00506790 \\ |
---|
328 | 1405.06469727 &0.01302835 &0.27393046 &0.04686056 &-0.00471084 \\ |
---|
329 | 1405.12719727 &0.01583361 &0.27760920 &0.04114933 &-0.01168737 \\ |
---|
330 | 1405.18969727 &0.01271889 &0.31489247 &0.03307962 &-0.00300790 \\ |
---|
331 | 1405.25219727 &0.01597644 &0.30401203 &0.05356426 &-0.00551653 \\ |
---|
332 | 1405.31469727 &0.00773827 &0.30031312 &0.04074831 &-0.00570147 \\ |
---|
333 | 1405.37719727 &0.00738304 &0.27921870 &0.05272378 &-0.00504959 \\ |
---|
334 | 1405.43969727 &0.01353923 &0.26132512 &0.03667958 &-0.00151006 \\ |
---|
335 | 1405.50219727 &0.01119724 &0.28987029 &0.03497849 &-0.00645589 \\ |
---|
336 | 1405.56469727 &0.00813379 &0.29839963 &0.04711142 &0.00536576 \\ |
---|
337 | 1405.62719727 &0.00774377 &0.26530230 &0.04620502 &0.00724631 \\ |
---|
338 | 1405.68969727 &0.00576067 &0.23215000 &0.04995513 &0.00290841 \\ |
---|
339 | 1405.75219727 &0.00452834 &0.16484940 &0.04261605 &-0.00612812 \\ |
---|
340 | 1405.81469727 &0.01406293 &0.15989439 &0.03817926 &-0.00758385 \\ |
---|
341 | 1405.87719727 &0.01116611 &0.11890682 &0.05499069 &-0.00626362 \\ |
---|
342 | 1405.93969727 &0.00687582 &0.10620256 &0.04743370 &0.00055177 \\ |
---|
343 | $\vdots$ &$\vdots$ &$\vdots$ &$\vdots$ &$\vdots$ \\ |
---|
344 | \end{tabular} |
---|
345 | } |
---|
346 | \end{quote} |
---|
347 | |
---|
348 | In addition to these three files, a log file can also be produced. As |
---|
349 | the program is running, it also (optionally) records the detections |
---|
350 | made in each individual spectrum or channel (see \S\ref{sec-detection} |
---|
351 | for details on this process). This is recorded in the file given by |
---|
352 | the parameter \texttt{LogFile}. This file does not include the columns |
---|
353 | \texttt{Name, RA, DEC, w\_RA, w\_DEC, VEL, w\_VEL}. This file is |
---|
354 | designed primarily for diagnostic purposes: \eg to see if a given set |
---|
355 | of pixels is detected in, say, one channel image, but does not survive |
---|
356 | the merging process. The list of pixels (and their fluxes) in the |
---|
357 | final detection list are also printed to this file, again for |
---|
358 | diagnostic purposes. The file also records the execution time, as well |
---|
359 | as the command-line statement used to run \duchamp. The creation of |
---|
360 | this log file can be prevented by setting \texttt{flagLog = false} |
---|
361 | (which is the default). |
---|
362 | |
---|
363 | \secB{Graphical output} |
---|
364 | |
---|
365 | \begin{figure}[t] |
---|
366 | \begin{center} |
---|
367 | \includegraphics[width=\textwidth]{example_spectrum} |
---|
368 | \end{center} |
---|
369 | \caption{\footnotesize An example of the spectral output. Note several |
---|
370 | of the features discussed in the text: the red lines indicating the |
---|
371 | reconstructed spectrum; the blue dashed lines indicating the |
---|
372 | spectral extent of the detection; the green hashed area indicating |
---|
373 | the Milky Way channels that are ignored by the searching algorithm; |
---|
374 | the blue border showing its spatial extent on the 0th moment map; |
---|
375 | and the 15~arcmin-long scale bar.} |
---|
376 | \label{fig-spect} |
---|
377 | \end{figure} |
---|
378 | |
---|
379 | \begin{figure}[!t] |
---|
380 | \begin{center} |
---|
381 | \includegraphics[width=\textwidth]{example_moment_map} |
---|
382 | \end{center} |
---|
383 | \caption{\footnotesize An example of the moment map created by |
---|
384 | \duchamp. The full extent of the cube is covered, and the 0th moment |
---|
385 | of each object is shown (integrated individually over all the |
---|
386 | detected channels). The purple line indicates the limit of the |
---|
387 | non-BLANK pixels.} |
---|
388 | \label{fig-moment} |
---|
389 | \end{figure} |
---|
390 | |
---|
391 | \secC{Mask image} |
---|
392 | \label{sec-maskOut} |
---|
393 | |
---|
394 | It is possible to create a FITS file containing a mask array. This |
---|
395 | array is designed to indicate the location of detected objects. The |
---|
396 | value of the detected pixels is determined by the |
---|
397 | \texttt{flagMaskWithObjectNum} parameter: if \texttt{true}, the value |
---|
398 | of the pixels is given by the corresponding object ID number; if |
---|
399 | \texttt{false}, they take the value 1 for all objects. Pixels not in a |
---|
400 | detected object have the value 0. To create this FITS file, set the |
---|
401 | input parameter \texttt{flagOutputMask=true}. The file will be named |
---|
402 | according to the \texttt{fileOutputMask} parameter, or, if this is not |
---|
403 | given, \texttt{image.MASK.fits} (where the input image is called |
---|
404 | \texttt{image.fits}). |
---|
405 | |
---|
406 | \secC{Spectral plots} |
---|
407 | |
---|
408 | As well as the output data file, a postscript file (with the filename |
---|
409 | given by the \texttt{spectralFile} parameter) is created that shows |
---|
410 | the spectrum for each detection, together with a small cutout image |
---|
411 | (the 0th moment) and basic information about the detection (note that |
---|
412 | any flags are printed after the name of the detection, in the format |
---|
413 | \texttt{[E]}). If the cube was reconstructed, the spectrum from the |
---|
414 | reconstruction is shown in red, over the top of the original |
---|
415 | spectrum. The spectral extent of the detected object is indicated by |
---|
416 | two dashed blue lines, and the region covered by the ``Milky Way'' |
---|
417 | channels is shown by a green hashed box. An example detection can be |
---|
418 | seen in Fig.~\ref{fig-spect}. |
---|
419 | |
---|
420 | The spectrum that is plotted is governed by the |
---|
421 | \texttt{spectralMethod} parameter. It can be either \texttt{peak} (the |
---|
422 | default), where the spectrum is from the spatial pixel containing the |
---|
423 | detection's peak flux; or \texttt{sum}, where the spectrum is summed |
---|
424 | over all spatial pixels, and then corrected for the beam size. The |
---|
425 | spectral extent of the detection is indicated with blue lines, and a |
---|
426 | zoom is shown in a separate window. |
---|
427 | |
---|
428 | The cutout image can optionally include a border around the spatial |
---|
429 | pixels that are in the detection (turned on and off by the |
---|
430 | \texttt{drawBorders} parameter -- the default is \texttt{true}). It |
---|
431 | includes a scale bar in the bottom left corner to indicate size -- its |
---|
432 | length is indicated next to it (the choice of length depends on the |
---|
433 | size of the image). |
---|
434 | |
---|
435 | There may also be one or two extra lines on the image. A yellow line |
---|
436 | shows the limits of the cube's spatial region: when this is shown, the |
---|
437 | detected object will lie close to the edge, and the image box will |
---|
438 | extend outside the region covered by the data. A purple line, however, |
---|
439 | shows the dividing line between BLANK and non-BLANK pixels. The BLANK |
---|
440 | pixels will always be shown in black. The first type of line is always |
---|
441 | drawn, while the second is governed by the parameter |
---|
442 | \texttt{drawBlankEdges} (whose default is \texttt{true}), and |
---|
443 | obviously whether there are any BLANK pixel present. |
---|
444 | |
---|
445 | Note that the creation of the spectral plots can be prevented by |
---|
446 | setting \texttt{flagPlotSpectra = false}. |
---|
447 | |
---|
448 | \secC{Output for 2-dimensional images} |
---|
449 | |
---|
450 | When the input image is two-dimensional, with no spectral dimension, |
---|
451 | this spectral plot would not make much sense. Instead, \duchamp |
---|
452 | creates a similar postscript file that simply includes the text |
---|
453 | headers as well as the 0th-moment map of the detection. As for the |
---|
454 | normal spectral case, this file will be written to the filename given |
---|
455 | by the \texttt{spectralFile} parameter. |
---|
456 | |
---|
457 | \secC{Spatial maps} |
---|
458 | |
---|
459 | Finally, a couple of images are optionally produced: a 0th moment map |
---|
460 | of the cube, combining just the detected channels in each object, |
---|
461 | showing the integrated flux in grey-scale; and a ``detection image'', |
---|
462 | a grey-scale image where the pixel values are the number of channels |
---|
463 | that spatial pixel is detected in. In both cases, if |
---|
464 | \texttt{drawBorders = true}, a border is drawn around the spatial |
---|
465 | extent of each detection, and if \texttt{drawBlankEdges = true}, the |
---|
466 | purple line dividing BLANK and non-BLANK pixels (as described above) |
---|
467 | is drawn. An example moment map is shown in Fig.~\ref{fig-moment}. |
---|
468 | The production or otherwise of these images is governed by the |
---|
469 | \texttt{flagMaps} parameter. |
---|
470 | |
---|
471 | The moment map is also displayed in a PGPlot XWindow (with the |
---|
472 | \texttt{/xs} display option). This feature can be turned off by |
---|
473 | setting \texttt{flagXOutput = false} -- this might be useful if |
---|
474 | running \duchamp on a terminal with no window display capability, or |
---|
475 | if you have set up a script to run it in a batch mode. |
---|
476 | |
---|
477 | The moment map can also be written to a FITS file, so that it can be |
---|
478 | examined more closely, and have annotation files overlaid. This works |
---|
479 | in the same way as for the mask image. To create the FITS file, set the |
---|
480 | input parameter \texttt{flagOutputMomentMap=true}. The file will be named |
---|
481 | according to the \texttt{fileOutputMomentMap} parameter, or, if this is not |
---|
482 | given, \texttt{image.MOM0.fits} (where the input image is called |
---|
483 | \texttt{image.fits}). |
---|
484 | |
---|
485 | The purpose of these images are to provide a visual guide to where the |
---|
486 | detections have been made, and, particularly in the case of the moment |
---|
487 | map, to provide an indication of the strength of the source. In both |
---|
488 | cases, the detections are numbered (in the same sense as the output |
---|
489 | list and as the spectral plots), and the spatial borders are marked |
---|
490 | out as for the cutout images in the spectra file. Both these images |
---|
491 | are saved as postscript files (given by the parameters |
---|
492 | \texttt{momentMap} and \texttt{detectionMap} respectively), with the |
---|
493 | latter also displayed in a \textsc{pgplot} window (regardless of the |
---|
494 | state of \texttt{flagMaps}). |
---|
495 | |
---|
496 | |
---|
497 | |
---|
498 | \secB{Re-using previous detections} |
---|
499 | \label{sec-reuse} |
---|
500 | |
---|
501 | It may be the case that, once you have run \duchamp with a set of |
---|
502 | parameters, you are unsatisfied with the output spectra -- perhaps you |
---|
503 | would have preferred integrated rather than peak flux to be |
---|
504 | plotted. However, the searching might have taken a while to run, and |
---|
505 | the thought of doing it again just for different plots may be a bit |
---|
506 | off-putting. |
---|
507 | |
---|
508 | Well, provided you have made a log file when running \duchamp (with |
---|
509 | the \texttt{flagLog=true} setting), it is possible to do this easily |
---|
510 | without having to go through the process of detecting your sources a |
---|
511 | second time. By using the same input file, with the additional |
---|
512 | parameter \texttt{usePrevious=true}, the log file that was created |
---|
513 | with a previous \duchamp run can be read to extract each of the |
---|
514 | individual detections. The output stage is then run again, with the |
---|
515 | parameters (in particular \texttt{pixelCentre} and |
---|
516 | \texttt{spectralMethod}) as given in the input file. |
---|
517 | |
---|
518 | Perhaps you would also like to extract a single source's |
---|
519 | spectral plot (\eg for use in a journal paper). The use-previous |
---|
520 | method allows you to specify particular sources to re-plot. Only these |
---|
521 | sources will be plotted in the \texttt{SpectraFile} file, and |
---|
522 | individual files will be created for each of the listed sources. Their |
---|
523 | filenames will follow the format of \texttt{SpectraFile}: if, |
---|
524 | \texttt{SpectraFile=file.ps}, source \#3 will appear in |
---|
525 | \texttt{file-03.ps}. To give a list of sources, use the |
---|
526 | \texttt{objectList} parameter, and provide a string with individual |
---|
527 | object numbers or object ranges: \eg 1,2,4-7,8,11. |
---|
528 | |
---|
529 | |
---|
530 | %%% Local Variables: |
---|
531 | %%% mode: latex |
---|
532 | %%% TeX-master: "Guide" |
---|
533 | %%% End: |
---|