0806.0560/ms.tex
1: 
2: %% Manuscript for the Journal P.A.S.P.  (Publications of the Astronomical
3: %% Society of the Pacific), using AASTeX v5.2 macros.
4: 
5: % Use emulateapj class to write draft in double-column ApJ format, then
6: % simply replace with \documentclass{aastex} before submission.
7: 
8: \documentclass{emulateapj}
9: %\documentclass[12pt,preprint]{aastex}
10: %% Note that manuscript produces a one-column, double-spaced document:
11: 
12: %% Sometimes a paper's abstract is too long to fit on the
13: %% title page in preprint2 mode. When that is the case,
14: %% use the longabstract style option.
15: 
16: %% \documentclass[preprint2,longabstract]{aastex}
17: 
18: %% If you want to create your own macros, you can do so
19: %% using \newcommand. Your macros should appear before
20: %% the \begin{document} command.
21: %%
22: %% If you are submitting to a journal that translates manuscripts
23: %% into SGML, you need to follow certain guidelines when preparing
24: %% your macros. See the AASTeX v5.x Author Guide
25: %% for information.
26: 
27: \newcommand{\xs}{XSPEC{}}
28: \newcommand{\xstw}{XSPEC {\tt 12.x}{}}
29: \newcommand{\isis}{ISIS{}}
30: \newcommand{\slirp}{SLIRP{}}
31: \newcommand{\slang}{S-Lang{}}
32: \newcommand{\tcl}{TCL{}}
33: \newcommand{\fort}{{Fortran}{}}
34: \newcommand{\initp}{{\tt initpackage}{}}
35: \newcommand{\bbp}{{Black Box Problem}{}}
36: \newcommand{\pgplot}{{\tt PGPLOT}{}}
37: \newcommand{\swig}{{\tt SWIG}{}}
38: \newcommand{\volview}{{\tt volview}{}}
39: \newcommand{\evtimg}{{\tt evt2img}{}}
40: \newcommand{\ftf}{{\em file $\rightarrow$ tool $\rightarrow$ file}{}}
41: \newcommand{\vwhere}{{\tt VWhere}{}}
42: \newcommand{\fcalc}{{\tt fcalc}{}}
43: \newcommand{\fv}{{\tt fv}{}}
44: %\newcommand{\bfi}[1]{{\bf \em #1}}
45: \newcommand{\bfi}[1]{{#1}}
46: 
47: %% You can insert a short comment on the title page using the command below.
48: 
49: %\slugcomment{}
50: 
51: %% If you wish, you may supply running head information, although
52: %% this information may be modified by the editorial offices.
53: %% The left head contains a list of authors,
54: %% usually a maximum of three (otherwise use et al.).  The right
55: %% head is a modified title of up to roughly 44 characters.
56: %% Running heads will not print in the manuscript style.
57: 
58: \shortauthors{Noble et al.}
59: 
60: %% This is the end of the preamble.  Indicate the beginning of the
61: %% paper itself with \begin{document}.
62: 
63: \begin{document}
64: 
65: %% LaTeX will automatically break titles if they run longer than
66: %% one line. However, you may use \\ to force a line break if
67: %% you desire.
68: 
69: \title{Beyond \xs: Towards Highly Configurable Astrophysical Analysis}
70: \shorttitle{Beyond \xs: Towards Highly Configurable Astrophysical Analysis}
71: 
72: %% Use \author, \affil, and the \and command to format
73: %% author and affiliation information.
74: %% Note that \email has replaced the old \authoremail command
75: %% from AASTeX v4.0. You can use \email to mark an email address
76: %% anywhere in the paper, not just in the front matter.
77: %% As in the title, use \\ to force line breaks.
78: 
79: \author{M. S. Noble, M. A. Nowak}
80: \affil{Kavli Institute for Astrophysics and Space Research\\
81: 	Massachusetts Institute of Technology\\
82: 	Cambridge, MA 02139}
83: \email{mnoble@space.mit.edu}
84: 
85: %% Mark off your abstract in the ``abstract'' environment. In the manuscript
86: %% style, abstract will output a Received/Accepted line after the
87: %% title and affiliation information. No date will appear since the author
88: %% does not have this information. The dates will be filled in by the
89: %% editorial office after submission.
90: 
91: \begin{abstract}
92: 
93: We present a quantitative comparison between software features of the
94: defacto standard X-ray spectral analysis tool, \xs\, and \isis\, the
95: Interactive Spectral Interpretation System. Our emphasis is on
96: customized analysis, with \isis\ offered as a strong example of
97: configurable software.  While noting that
98: \xs\ has been of immense value to astronomers, and that its
99: scientific core is moderately extensible---most commonly via the
100: inclusion of user contributed ``local models"---we identify a series of
101: limitations with its use beyond conventional spectral modeling.  We
102: argue that from the viewpoint of the astronomical user, the \xs\
103: internal structure presents a \bbp, with many of its important
104: features \bfi{hidden} from the top-level interface, thus \bfi{discouraging}
105: user customization. Drawing from examples in custom modeling, numerical
106: analysis, parallel computation, visualization, data management, and
107: automated code generation, we show how a \bfi{numerically} scriptable,
108: modular, and extensible analysis platform such as \isis\ facilitates
109: many forms of advanced astrophysical inquiry.
110: 
111: \end{abstract}
112: 
113: %% Keywords should appear after the \end{abstract} command. The uncommented
114: %% example has been keyed in ApJ style. See the instructions to authors
115: %% for the journal to which you are submitting your paper to determine
116: %% what keyword punctuation is appropriate.
117: 
118: %\keywords{methods: data analysis --- methods: statistical --- X-rays: general}
119: \keywords{Data Analysis and Techniques}
120: 
121: %% From the front matter, we move on to the body of the paper.
122: %% In the first two sections, notice the use of the natbib \citep
123: %% and \citet commands to identify citations.  The citations are
124: %% tied to the reference list via symbolic KEYs. The KEY corresponds
125: %% to the KEY in the \bibitem in the reference list below. We have
126: %% chosen the first three characters of the first author's name plus
127: %% the last two numeral of the year of publication as our KEY for
128: %% each reference.
129: 
130: 
131: %% Authors who wish to have the most important objects in their paper
132: %% linked in the electronic edition to a data center may do so by tagging
133: %% their objects with \objectname{} or \object{}.  Each macro takes the
134: %% object name as its required argument. The optional, square-bracket 
135: %% argument should be used in cases where the data center identification
136: %% differs from what is to be printed in the paper.  The text appearing 
137: %% in curly braces is what will appear in print in the published paper. 
138: %% If the object name is recognized by the data centers, it will be linked
139: %% in the electronic edition to the object data available at the data centers  
140: %%
141: %% Note that for sources with brackets in their names, e.g. [WEG2004] 14h-090,
142: %% the brackets must be escaped with backslashes when used in the first
143: %% square-bracket argument, for instance, \object[\[WEG2004\] 14h-090]{90}).
144: %%  Otherwise, LaTeX will issue an error. 
145: 
146: \section{Introduction}
147: \label{intro}
148: The pursuit of science pushes not only the boundaries of knowledge, but
149: also the limits of technology used to acquire and analyze data from which
150: new knowledge can be distilled.  In this sense software systems for
151: scientific analysis are never truly complete, so it is crucial that they
152: be extensible.  This enables scientists to incorporate custom, experimental
153: codes into
154: the system and drive it in directions not yet supported, or perhaps even
155: envisioned, by its creators.  A corollary is that the mechanisms for
156: and results of the customization should be made as simple, powerful,
157: and general as possible, freeing the practitioner to concentrate more
158: on algorithmic or scientific concerns and less on the plumbing details
159: of a given computational platform.
160: 
161: This paper compares the extent to which two open-source spectral analysis
162: applications actively used in astronomy,  \xs\ \citep{1996ASPC..101...17A}
163: and \isis\ \citep{2002hrxs.confE..17H}, meet these general criteria.
164: The features of both systems are broadly surveyed, with contrasts
165: drawn from a series of examples representative of \bfi{astronomy in
166: practice}.  A heavy emphasis is placed upon the roles of interpreted arrays,
167: and the capability to quickly generate and numerically manipulate them
168: as powerful enablers of analysis.
169: The emergent theme is that numerical and architectural discontinuities
170: between the internals of \xs\ and its controlling \tcl\ interpreter,
171: referred to in the large as the \bbp, limit its full exploitation for
172: scientific tasks that are \bfi{within the reach of more configurable}
173: interactive analysis systems.  We demonstrate the strong modularity
174: and extensible scriptability of \isis\, and suggest that such open and
175: highly configurable systems offer deeper and wider promise for meeting
176: the needs of exploratory scientific analysis.
177: 
178: The latest major versions of \isis\ and \xs, {\tt 1.4.x} and {\tt 12.x}
179: respectively, were used in our study.  While \xs\ 11 remains in wide
180: use (the first public, non-beta release of \xs\ 12 was
181: circa 2005), it is more difficult to extend with a variety of custom
182: models\footnote{For example, \xs\ 11 supports only local models coded
183: in single precision \fort 77.}
184: and so in terms of extensibility would compare less favorably than does
185: \xs\ 12.
186: 
187: Guiding our endeavor will be the sense of what a typically motivated
188: scientist can achieve in each system with reasonable effort.  
189: On the premise that a strong programmer can eventually replicate
190: virtually any result using nearly any combination of languages or tools,
191: we are not concerned with what might in principle be achieved {\em from}
192: either \xs\ or \isis\, but rather what can be demonstrated {\em within}
193: each.  By avoiding hypotheticals we aim to transform a potentially
194: open-ended debate into a tractable, concrete discussion.
195: Towards this end we define {\em working within an application} to mean
196: the execution of commands, or portions thereof, which only access
197: or modify the code or data within the applications addressable memory.
198: In this scheme, for example, issuing an operating system call from \isis\ to
199: spawn an external visualization tool would not be ``working in \isis,"
200: however enlarging its address space by importing a shared object module,
201: say to smooth an image in memory, would be.
202: 
203: We recognize the utility of integrating complementary but distinct
204: programs into a single logical entity.  Building on trust
205: in known tools, it is a sensible scheme for managing complexity, fostering
206: reuse, and balancing deadlines with goals.  Cooperating applications can,
207: with sufficient effort, be made to appear as seamless as a single
208: program.  \bfi{One} should not, however, equate the act of
209: \begin{itemize}
210: \item dumping internal state to disk files, spawning a series
211: of tools to read this state and create temporary data products
212: along the way, then loading these new data back into the parent
213: application
214: \end{itemize}
215: with the ability to
216: \begin{itemize}
217: \item invoke a function to operate upon a data structure, with both
218: resident in memory.
219: \end{itemize}
220: \bfi{In this paper we will argue that the latter offers greater immediacy
221: of use, as well as significantly more algorithmic, data, and visualization
222: flexibility.  It also addresses
223: real scalability concerns \label{scalability}} as datasets increase in
224: size or tasks increase in time complexity.  A stark example of this
225: is given in \cite{2005ASPC..347..444D}, which discusses the methods
226: employed to analyze the megasecond observation of Cassiopeia A
227: \citep{2004ApJ...615L.117H} by the Chandra X-Ray Observatory in 2004,
228: which yielded the first ever map of electron acceleration in a supernova
229: remnant \citep{2006NatPh...2..614S}.  Over 9 million PHA spectra
230: were extracted from over 300 million events, with hundreds of thousands
231: of spectral fits performed in \isis\, to yield arc-second resolution spatial
232: maps of plasma temperatures, line emission, and Doppler velocities.  Custom
233: modules were developed to manage the multi-gigabyte files involved and
234: distribute the spectral extractions
235: and fits across a network of workstations using the Parallel Virtual
236: Machine \citep{Geist:1994:PPV}.  Based upon the time
237: required to extract a single spectrum from these enormous datasets, with
238: the standard Chandra {\tt dmextract} tool in CIAO (ca. version 3.2), the
239: authors extrapolated that the spectral extractions alone would have
240: required nearly 10 years had a tool-based approach been taken.  In
241: contrast, each run through the entire PVM-based analysis sequence
242: required less than 12 days to complete.
243: 
244: \section{Feature Survey}
245: \label{feature_survey}
246: \xs\ and \isis\ have been primarily concerned with fitting models to 1D
247: spectra:
248: a theoretical model of photon counts is calculated, convolved with an
249: instrument response, and compared to the actual photon counts observed by
250: the detector, using a given fit statistic (typically $\chi^2$).  Each
251: provides mechanisms for indexed loading and management of data
252: (observed counts, instrument responses, et cetera), as well as the
253: capacity to visually inspect, using \pgplot\ to construct a variety
254: of 2D plots, the data, models, residuals, fit statistics, and so
255: forth.  While initially targeted for X-ray analysis, both \xs\ and \isis\
256: have been utilized in multiple wavebands.
257: The primary authors of \xs\ and \isis\ are practicing astronomers with
258: active publication records in the domains served by their applications.
259: Both applications are thus subject to continuous, rapid, and
260: rigorous scientific vetting. \isis\ and \xs\ update cycles are measured
261: in terms of days and weeks, which can be beneficial for users under time
262: constraints before their proprietary data go public.
263: 
264: \xs\ is the tool most widely used in X-ray astronomy for spectral fitting;
265: with a legacy spanning more than two decades and hundreds of citations,
266: its value to the scientific community is beyond question.  \xs\ bundles
267: more than 50 theoretical models, each of which
268: may also be used by external programs simply by linking to
269: its libraries.  The core set of models may be extended with either
270: precomputed file-based table models or compiled codes.  The bulk
271: of compiled \xs\ models are coded in \fort, however as part of a significant
272: redesign effort support for custom C and C++ models was recently added
273: (ca. 2005).
274: \xs\ was also one of the earliest astronomical applications to adopt a
275: widely-used, general-purpose scripting language for interactive use
276: and batch control; the incorporation of \tcl, introduced in version 10
277: and stabilized in version 11, provided programmability and a clear path
278: to graphical interfaces with the Tk widget set.
279: 
280: \isis\ was conceived to support analysis of high-resolution Chandra X-Ray
281: gratings spectra, then quickly grew into a general-purpose analysis system. 
282: \isis\ is essentially a superset of \xs, combining all of its models (though
283: they are not required for \isis\ operation) and more with the \slang\
284: scripting language \bfi{\citep{SLangRef}, whose mathematical performance rivals
285: both commercial packages such as MatLab \citep{Gilat.2004.MATLAB} or
286: IDL \citep{Kling.1999.IDL} as well as the numerical extensions for
287: popular open source languages \citep[\S \ref{numerics}]{Noble.2007.OpenMP}.}
288: 
289: As with \xs, users may define custom models in compiled code, external
290: tables, or as a string specifying simple arithmetic combinations of
291: existing models, but \isis\ takes
292: it further by also allowing models to be interpreted \slang\ functions;
293: this supports rapid prototyping and, because of the high-performance of
294: \slang\ numerics (\S \ref{numerics}), need not sacrifice speed for the
295: convenience of using an interpreter.  \xs\ does not support the use of
296: \tcl\ procedures as models.
297: % NB: mdefine command provides a crude approximation, but is not in XS 12
298: %and given that \tcl\ is poorly suited for numerical work (\S \ref{numerics})
299: %such may not even be advisable.
300: 
301: The chief means of controlling \xs\ and \isis\ interactively is by
302: textual prompt, with both providing VI and EMACS key bindings through
303: GNU readline, as well as filename completion and persistent command
304: history.  \xs\ accepts commands entered in abbreviated form, such as
305: {\tt mo} for {\tt model}, but does not auto-complete \tcl\ command or
306: variable names from partial input.  \isis\ provides strong auto-completion
307: facilities, allowing any \slang\ function or variable name to be
308: % NB: submit an ISIS patch to auto-complete . commands, too!
309: identified from minimal partial input.
310: In addition to the command prompt, optional packages providing
311: graphical interfaces, such as the
312: Gtk-based \vwhere\ (\S \ref{vwhere}) or the SAOds9 \citep{2003ASPC..295..489J}
313: image display module (\S \ref{ds9}), have been publicly available and
314: utilized within \isis\ for several years.
315: Graphical extensions for \xs\ have been discussed in the literature
316: \citep{1994ASPC...61...71J} and online, but, other than wholly external
317: tools like \fv\ \citep{1997ASPC..125..261P}, none seem publicly
318: available for use within \xs\ proper.
319: 
320: The \xs\ prompt presents an appealingly simple,
321: {\em everything-is-a-command} interface, and fosters ease of use by
322: offering brief, germane command names, assuming sensible defaults, and
323: in some cases transparently combining multiple operations into one: e.g.
324: loading both data and background files with a single command.  A typical
325: command is shorter and requires less punctuation in \xs, although the
326: auto-completion capability of \isis\ can compensate for its relative
327: verbosity.  In short, \xs\ makes it easy to perform many common spectral
328: analysis tasks.
329: 
330: \begin{figure}
331:   \begin{centering}
332:   \includegraphics[angle=-90,scale=0.3]{f1.eps}
333:   \caption{Ionization fractions for Fe XVII through XXI.}
334:   \label{ionfrac}
335:   \end{centering}
336: \end{figure}
337: 
338: The \isis\ prompt was designed to be a proxy \slang\ interpreter
339: (Fig. \ref{arch}), making \isis\ programmable and extensible since
340: inception.
341: Its {\em everything-is-a-function} philosophy permeates the implementation
342: and user experience, providing, at the cost of a steeper initial learning
343: curve, considerable flexibility and power.
344: Consider for illustration the Astrophysical Plasma Emission Database
345: (APED) of \cite{2001ApJ...556L..91S}.   Because \isis\ provides
346: programmatic access to virtually all of APED, curves like those of
347: Fig. \ref{ionfrac}, showing
348: the ionization fractions at 25 temperatures for Fe XVII through XXI,
349: can be created with just a few statements
350: { \small
351:   \begin{verbatim}
352:      temperature = 10.0^[6.0:7.2:0.05];
353:      foreach ion ( [17, 18, 19, 20, 21] ) {
354:         fraction = ion_frac(Fe, ion, temperature);
355:         oplot (temperature, fraction);
356:      }
357: \end{verbatim}
358: }
359: \noindent
360: either directly from the \isis\ prompt or within analysis scripts.
361: The importance to X-ray analysis of this sort of facile manipulation of
362: atomic data is heavily underscored in
363: \cite{kallman-2007-79}.
364: 
365: \subsection{The Black Box Problem}
366: \bfi{
367: It is not clear how a similar ad-hoc query of APED could be formulated
368: in \xs, nor how the results of such might be used within it for further
369: analysis.  One problem is that the use of APED in \xs\ is highly constrained,
370: due to it being hidden, e.g., within the internals of the {\tt apec} model
371: and {\tt identify} commands.
372: Another obstacle is that high-level plotting in \xs\ is not generic: the
373: {\tt plot} and {\tt iplot} commands are also opaque, in that they take}
374: their vectors from internal state representing the current data or
375: model under inspection.  Intimately
376: tied to the semantics of 1D spectral analysis, these commands may not
377: be used until after a dataset has been loaded.
378: 
379: While \isis\ contains
380: similar visualization commands specifically tailored to spectral analysis,
381: the {\tt oplot} function shown above is part of a family of routines which
382: \bfi{allows one} to create arbitrary image, scatter, histogram,
383: and contour [over]plots from arbitrary data, independently of the current
384: spectra being analyzed.  This makes exploratory coding and visualization like
385: {\small
386: \begin{verbatim}
387:           isis>  x = [PI/2: 2*PI: PI/100]
388:           isis>  plot(x, cos(x))
389:           isis>  oplot(x, sin(x))
390: \end{verbatim}
391: }
392: \noindent
393: \bfi{as natural in \isis} as it is in other interactive analysis
394: systems such as IDL or PyRAF \citep{2001ASPC..238...59D}.  In \xs\ such
395: dynamic creation of interpreted arrays and direct mathematical manipulation
396: and visualization of them is more difficult, involving a melange of
397: \tcl\ code, \xs\ commands, intermediate files, and low-level QDP/PLT
398: directives.\footnote{Or going outside of \xs\ to use tools like \fv\
399: or XIMAGE.}
400: \begin{figure}[t]
401:   \begin{centering}
402:   \includegraphics[angle=-90,scale=0.30]{f3.eps}
403:   \caption{Performance of IDL 6.1 (binary distribution) and
404:         \slang\ (statically linked), on $\sqrt{b^2 - 4ac}$
405:         for arrays of various sizes.}
406:   \label{idl-plot}
407:   \end{centering}
408: \end{figure}
409: The issue is not that interpreted numeric arrays cannot be utilized in
410: \xs, because the \tcl\ extensions BLT and NAP (see next section) make
411: this possible; nor does the problem lie with \pgplot, since it provides
412: more capabilities than \xs\ currently exploits.  Rather, it is the \xs\
413: architecture which does not connect the two in a \bfi{straightforward manner,
414: leaving the user little choice but to look elsewhere for open-ended
415: numerics and visualization.  This opacity and disconnectedness is evident
416: in other functional areas of \xs, notably the manner in which data are
417: input \& managed (\S \ref{input}) and how custom models are specified
418: (\S \ref{custom-models}).
419: \begin{figure*}[t]
420:   \begin{centering}
421:     \includegraphics[scale=0.50]{f2.eps}
422:     \caption{ The \isis\ { \tt main()} program is a thin ANSI C layer above
423: 	the \slang\ interpreter, used primarily to establish hooks to
424: 	modules and gather user input.  Taking modularity
425: 	to this extreme, where carefully orthogonalized components provide
426: 	the bulk of capability, provides a clean and flexible implementation.
427: 	Most modules may also be
428: 	used outside of \isis.}
429:   \label{arch}
430:   \end{centering}
431: \end{figure*}
432: 
433: Echoing similar criticisms levied upon graphical interfaces when compared
434: to command lines \citep{NextUIBrkThru,OscarCLI}, we collectively refer
435: to these issues as the \bbp: by hiding complexity to make common tasks
436: easy, uncommon or novel tasks can be made difficult or impossible.}
437: 
438: The ease of use that has been a hallmark of \xs\---written by astronomers
439: to do things astronomers need, in a way natural to them---has served the
440: community well.  A challenge, though, is that as instruments and the
441: data collected from them
442: grow in size and complexity, causing us to consider new questions and
443: possibly develop new techniques to answer them, the \bbp\ can engender
444: {\em You May Only!} patterns of analysis,
445: rather than foster rapid, ad hoc explorations of {\em What If?} scenarios.
446: More modular, configurable, and open implementations \citep{BeyondBlackBox}
447: can help resolve this tension, allowing applications to rapidly evolve to
448: suit specific user needs while freeing their primary authors of the
449: burden of coding and maintaining such enhancements themselves.
450: 
451: \section{High Performance Numerics}
452: \label{numerics}
453: Compact multidimensional numerics are a \bfi{major basis
454: for the popularity} of commercial toolsets such as IDL or MatLab.  The
455: innate capability of \slang\ in this regard was a primary motivator for its
456: adoption in \isis,\footnote{Another motivator was wide availability:
457: \slang\ is utilized in numerous open source projects and, in part by
458: virtue of being bundled as a core component of every major Linux 
459: distribution, is available on millions of machines worldwide.}
460: \bfi{and endows it with analytic expressiveness and
461: scripting performance not equaled in \xs}.
462: 
463: As indicated in the earlier code fragments, 
464: complex mathematical abstractions may be stated concisely in \slang,
465: without regard to whether they will operate upon scalars, vectors,
466: multidimensional arrays, or some combination of each, and are computed with
467: performance on par with commercial software (e.g., as in Fig. \ref{idl-plot}).
468: \bfi{In this section we discuss the more involved example of Fig.
469: \ref{orbmodel}, consisting of an orbital model implemented in pure \slang\
470: and taken ``as is" from an MIT research effort
471: The model was fit to a coarsely binned lightcurve (providing an example of
472: how \isis\ can model non-spectroscopic data directly from in-memory \slang\
473: arrays, as discussed in \S \ref{input}), and represents a steady amplitude
474: curve interrupted by an eclipse with a quadratic ingress and egress, with
475: low-level emission during the eclipse also modeled by a quadratic function.}
476: \citep{TrowbridgeNowakWilms2007}.
477: 
478: As a means of assessing
479: the numerics and extensibility of \xs\ we attempted to translate this
480: model into \tcl; for completeness we also made Perl and Python translations,
481: since these languages are actively employed by astronomers in systems like
482: PDL and PyRAF and so are useful contrasts for gauging the numerical
483: capabilities of \slang.  Because neither \tcl\ , Perl, nor Python are
484: intrinsically vectorized we used numerical extension modules for each
485: conversion: BLT \& NAP for \tcl, PDL for Perl, and Numeric, NumArray,
486: \& NumPy for Python.
487: \noindent The Python and Perl conversions were straightforward, with
488: Python being the somewhat easier of the two; we did not complete the
489: conversion to \tcl, however, largely because neither BLT nor NAP provided
490: a clear equivalent to the {\tt where} command or a means of using the
491: results of such for array slicing.  This model would therefore need to be
492: recoded in a compiled language before it could be used in \xs.
493: A plot of the performance of Perl 5.8.4 and Python 2.4 implementations
494: of this model, divided by the corresponding \slang\ 2.0.7 performance,
495: is given in Fig. \ref{orbmodel-plot}.
496: 
497: The testing 
498: methodology behind Figs. \ref{idl-plot} and \ref{orbmodel-plot} is
499: described in \cite{Noble.2007.OpenMP}, along with memory statistics
500: and additional tests showing similar performance trends.
501: Briefly, the datapoints in each curve are the mean times of 1000
502: invocations of the model on a given grid size (31 in all, from 1 to 1e6
503: bins); all codes were compiled using GCC 3.3 with -O3 optimization, and
504: executed on a dual Athlon (1.8Ghz) machine running Debian 3.1.
505: Although not a comprehensive series of benchmarks, these results
506: \bfi{hint that the numerical engine of \isis\ is among the strongest
507: available.  High
508: performance scripting means that rapid development techniques---irrespective
509: of language---can be applied to a broad} scope of analysis problems,
510: \bfi{allowing the writing of compiled code to gradually become a last
511: resort instead of the primary avenue of attack}.
512: \slang\ bears a strong resemblance to C and IDL, arguably the most popular
513: \begin{figure}[h]
514:   \begin{centering}
515:   \includegraphics[scale=0.80]{f4.eps}
516:   \caption{Pure \slang\ orbital model, fit
517:   by \isis\ directly to in-memory data arrays.
518: As described in \cite{TrowbridgeNowakWilms2007}, the model
519: represents a lightcurve of constant amplitude {\tt a}, with an eclipse
520: centered at {\tt c}, with a width {\tt w2} from the start of ingress
521: to the end of egress.  The ingress and egress have a quadratic form
522: ({\tt m} and {\tt b} parameters), and there is a quadratic
523: ``bounceback" ({\tt s} parameter) with width {\tt w1}.}
524:   \label{orbmodel}
525:   \end{centering}
526: \end{figure}
527: scripting language used by astronomers, and in fact we and colleagues
528: have converted numerous IDL and MatLab scripts to \slang\ for use in 
529: \isis\, with \bfi{relative} ease.
530: \begin{figure}[t]
531:   \begin{centering}
532:   \includegraphics[angle=-90,scale=0.3]{f5.eps}
533:   \caption{Performance of orbital models implemented in Perl 5.8.4
534:    and Python 2.4, relative to \slang\ 2.0.7.
535:    \tcl\ is not represented here because neither of its numerical 
536:    extensions, BLT and NAP, offered a clear equivalent to
537:    the {\tt where()} function.}
538:   \label{orbmodel-plot}
539:   \end{centering}
540: \end{figure}
541: 
542: \section{Array-Based Input}
543: \label{input}
544: As we found with the orbital model, converting such scripts to \tcl\ for
545: use in \xs\ would pose a \bfi{considerable challenge}: although
546: the primary interface of
547: \xs\ is a scriptable interpreter in which multidimensional arrays may
548: be created and mathematically manipulated---with the aid of the BLT or
549: NAP---the results of such cannot be straightforwardly utilized for
550: spectroscopy.  The fact that the internal data tables of \xs\ are not exposed
551: for direct population from the \tcl\ interpreter is another instance of
552: the \bbp; data may only be read from FITS files, and only via
553: the {\tt data} command or its INTEGRAL mission-specific variant
554: {\tt SPIdata}.  There is no documented provision by which interpreted
555: arrays may be used, for instance, to specify observed counts or
556: responses.
557: 
558: Reflecting a fundamental difference in \bfi{approach}, \xs\ is
559: more static than \isis, taking the position that extensive data
560: preparation happens outside the application.  An advantage of this
561: approach is self-documentation: well-written tools record the
562: path along which a FITS file travels as history keywords in its header.
563: A drawback is the underlying implication that input data need
564: little massaging during interactive analysis; when the need for such
565: data manipulation arises, the solution typically involves dumping
566: \xs\ state to disk files, and/or running FTOOLS or other programs
567: to generate new file products, then reloading these data back into \xs.
568: 
569: \bfi{This {\em files-only} data management paradigm can lead to slower
570: performance and more cumbersome analytics (\S \ref{scalability},
571: \S \ref{vwhere}).
572: It can also be an evolutionary disadvantage, i.e. by potentially limiting
573: the pool of individuals able or willing to contribute new I/O codes to \xs.}
574: As exemplified by the implementation of the {\tt SPIdata} command,
575: endowing \xs\ with the ability to directly read additional file or
576: mission formats requires detailed mastery of its internals.
577: This means general-purpose code generators like \swig\ \citep{1996SWIG}
578: or \slirp\ \citep{Noble.2007.OpenMP} cannot be leveraged to automate the
579: wrapping of I/O libraries and simplify the use of new formats in \xs. To
580: foster the widest possible use, by design such wrapper generators know
581: nothing about the applications in which the bindings they create will
582: be used.  They emit code targeted to the scope of a scripting language,
583: rather than application-specific C++ methods like
584: {\tt SPI\_Data::read()} which is suitable only for internal \xs\ use.
585: 
586: \subsection{Towards Dynamic Data Management}
587: 
588: \bfi{
589: \isis\ aims for a more dynamic and configurable approach to data management.
590: In addition to supporting file-based input in the manner of \xs, but with
591: ASCII in addition to FITS, \isis\ also permits most facets of the modeling
592: process to be specified directly from interpreted \slang\ arrays in memory,
593: including the theoretical and observed counts, ARF, RMF, and background.
594: 
595: The problem of augmenting spectroscopy with data in foreign formats
596: is thus reduced from having to master \xs\ internals to merely being
597: able to create \slang\ arrays from such files.  This is within the reach
598: of end users, not just application authors, particularly because automatic
599: code generators can then be employed to simplify the creation of scriptable
600: wrappers for the relevant I/O libraries.}
601: 
602: \bfi{As an example of how these considerations can matter in practical use,}
603: consider the HDF5 file format and I/O library \citep{1999IEEE...99...273F}.
604: While FITS is the standard format for archiving and distributing
605: astrophysical observations, HDF5 has become the defacto standard 
606: for storing astrophysical simulations such as those generated by
607: FLASH \citep{2001NuPhA.688..172F}.  Having the ability to easily
608: compare and contrast \bfi{observations with simulations, e.g., using
609: simulation output as source model input, could foster more sophisticated
610: analyses.  We have explored such questions in ISIS as part of the
611: HYDRA\footnote{http://space.mit.edu/hydra} project, using \slirp\ 
612: to generate the SLh5
613: module\footnote{http://space.mit.edu/cxc/software/slang/modules/slh5}
614: for reading and writing HDF5 data directly to and from in-memory \slang\
615: arrays.  The resulting objects may be sliced with \slang\ array manipulators
616: or mathematically transformed in arbitrary ways (\S \ref{numerics}) before
617: further analysis, such as being treated as fit data or model data, or
618: passed to 2D plotting or 3D volumetric routines for visualization.
619: }
620: This module also obviates
621: the need for a conversion tool to migrate data from HDF5 to FITS for
622: spectroscopy\footnote{http://www.hdfgroup.org/RFC/fits2h5/fits2h5.htm
623: describes preliminary efforts to go in the other direction.}.
624: 
625: This spirit of imposing fewer constraints on how its internal tables may
626: be populated or manipulated \bfi{leads to more flexible and mathematically
627: diverse analysis.  For example,}
628: consider the problem of grouping data to ensure an
629: adequate signal to noise ratio is obtained for each detector channel.
630: With \xs\ data are grouped prior to input, usually with the {\tt grppha}
631: tool. The assigned grouping persists for the life of the loaded dataset,
632: and may only be changed by re-running {\tt grppha} outside of \xs,
633: deleting the original dataset in \xs, and reloading it with the new
634: grouping.  With \isis\ spectra may be dynamically rebinned in memory---
635: using the functions {\tt rebin\_data()}, {\tt group\_data()}, or
636: variants---with the associated dataset remaining intact.  \isis\ also
637: provides options not available in the \xs\ {\tt grppha} paradigm, such
638: as grouping by signal to
639: noise ratio, or allowing datasets to be combined directly in memory,
640: bringing to bear the full numerical power discussed in \S \ref{numerics}
641: and \S \ref{beyond1D}, instead of shelling out to run tools such as
642: {\tt mathpha}, {\tt marfrmf}, or {\tt addrmf}---an approach of
643: more limited mathematical generality.
644: \isis\ also supports combining non-linear (e.g. piled-up) data, which
645: in general cannot be done with tools because of the model evaluation
646: involved.
647: 
648: 
649: \section{Custom Models}
650: 
651: \label{custom-models}
652: In \S \ref{numerics} we detailed how the performance of \slang\ couples
653: with the ability of \isis\ to use purely interpreted models to provide
654: an alternative to the traditional method of using compiled
655: codes as custom spectral models.  This significant feature, not
656: available to \xs\ users since it does not permit \tcl\ procedures to be
657: used as models, \bfi{can encourage rapid experimentation with short,
658: highly analytic codes.  These brief, self-contained scripts are
659: easily exchanged among users, as they may be loaded immediately into
660: \isis\, from any directory.   This is in contrast to code that
661: must be compiled into a shareable object then accessed from fixed
662: locations and in conjunction with external description files, such
663: as \$LOCAL\_MODEL\_DIRECTORY and lmodel.dat are respectively used in \xs.}
664: 
665: Moving to the realm of compiled models, while version 12 of \xs\ provides
666: many improvements over version 11---notably support for C and C++,
667: double precision numerics, and the \initp\ automated model wrapping
668: command---a number of limitations persist.
669: To begin, using local models at all means one must first build \xs\ from
670: source.  Although HEASOFT generally builds well, this can still be
671: daunting, and is unnecessary with \isis\ as both interpreted and compiled
672: user models may be used from a binary installation.
673: Next, model components in \xs\ must be designated as having a specific
674: form, e.g. additive, multiplicative, convolution, etc.  This too is 
675: unnecessary in \isis, as it places no restriction upon the computational
676: form of a model---any conceivable mathematical function may be used.
677: 
678: As \xs\ has been the defacto standard for so long, it is also easy
679: for spectral model developers to code expressly for \xs, by relying too
680: heavily upon its internal functions (such as {\tt udmget} for memory
681: allocation or {\tt xwrite} for message output) when crafting models.
682: When \xs\ was the only X-ray spectral modeling tool available this was
683: not a concern, but today it makes reusing models in other environments
684: more difficult.  For example, pulling the {\tt pexriv} model out of
685: \xs\ 11, which remains widely used, required
686: {\small
687: \begin{verbatim}
688:           -lxspec -lxspec_lfn -lxspec -lwcs
689:           -lxanlib -lreadline -lcfitsio -lpgplot
690:           -lcurses -ltermcap
691: \end{verbatim}
692: }
693: \noindent on the link line, plus the introduction of a ``dummy" function
694: to resolve an unused symbol name \citep{2004ApJ...609..972M}.
695: Standing out here is the recursive use of {\tt-lxspec},
696: and the need for auxiliary terminal management and plotting libraries
697: that provide no numerical or physics contribution to the model.
698: Although this situation is improved in \xs\ 12, these show that it is
699: not enough to simply make source code available
700: to the public: {\em orthogonality} is an important aspect of open and
701: flexible software.  To promote external reusability, code must also be
702: {\em separable} into logically distinct units free of unwanted
703: dependencies.  These are core implementation principles of \isis\
704: (Fig. \ref{arch}).
705: 
706: \subsection{Automated Model Wrapping}
707: While \initp\ does help automate the use of custom models in
708: \xs\ 12, it is not a generic, application-neutral wrapper generator in
709: the style of \slirp\ or \swig.  The result is that custom modeling cannot
710: be scripted in \xs\ with the same level of flexibility as in \isis.  For
711: example, \initp\ does not expose the routines it wraps to the top-level
712: \tcl\ interpreter, but rather makes them accessible only through the
713: the \xs\\ {\tt model} command.  Not being able to call
714: models directly from \tcl\ means the convenience of an interpreter
715: cannot be leveraged when testing and using the models.
716: 
717: This can be easy to overlook, because many model writers 
718: devise their own nominal tests in whatever compiled language they
719: used to write the model.  However, it would be valuable for both
720: writers and users of models if they could craft \tcl\ commands or
721: scripts to exercise them (in a more powerful and streamlined manner
722: than the multiplexing {\tt tclout} command, or faking a dataset) or
723: pass their output to other features in the application for further
724: numerical processing.  Consider Fortran common blocks, for instance,
725: and the \xs\ {\tt warmabs} model in particular:  after evaluation
726: the {\tt ewout} block in this model contains a list of the strongest
727: lines, sorted by element and ion.  Wrapping {\tt warmabs} with \slirp\
728: makes the content of this and every other common block in the model
729: accessible to \isis\ as \slang\ variables.\footnote{Common block values
730: may also be modified using regular \slang\ assignment
731: expressions.}  This provides scientists another means of accessing
732: the internals of a code, without needing to master the internals
733: of the application for which that code was initially written.
734: 
735: In addition, \initp\ wraps only the outermost interface routine of a
736: model: if the spectrum returned by a model is actually computed in
737: several steps by calling additional routines, those lower level routines
738: are not exposed by \initp\ for use in \xs\ outside the model evaluation.
739: As an example of how exposing the low level routines could be useful,
740: we consider
741: the {\tt pshock} and {\tt vpshock} models.  Internally, both rely upon
742: the lower-level {\tt ionseqs()} routine to calculate nonequilibrium
743: ionization ionic concentrations.  In response to a collaborator
744: (Ji 2007, priv. comm.) who wished to obtain these ionic
745: concentrations independently, we used \slirp\ to wrap {\tt ionseq.f}
746: in a matter of only minutes, which allowed {\tt ionseqs()} to be called
747: directly from a \slang\ script in \isis.
748: 
749: The jet model of \cite{2005ApJ...635.1203M} provides another good
750: example.  The output spectrum is summed from 4 individual components
751: (disk, comptonization, synchrotron, and synchrotron self-comptonization
752: spectra), each computed by distinct routines within a single Fortran
753: source file.  To analyze or visualize the independent contribution
754: of each component it is necessary to isolate each from the total flux.
755: To achieve this the model can be executed in different modes, one of
756: which will execute {\tt write} statements to output component contributions
757: to disk files as they are computed.  Because our \slirp\ wrapper
758: for this jet model makes every routine within the Fortran file visible
759: to the top-level \slang\ interpreter, not just the outermost model
760: routine, the component fluxes can in principle now be accessed by making
761: the relevant routine calls, or accessing the associated common blocks,
762: directly from \isis.  To our knowledge the only way to achieve a similar
763: result in \xs\ would be to wrap the code twice, once with \initp\ to make
764: the custom model routine visible to the {\tt model} command, and again as
765: a \tcl\ extension module to expose the remaining routines to the
766: \tcl\ interpreter.  Tools like {\tt ftcl} or
767: {\tt critcl}\footnote{http://ftcl.sourceforge.net, http://wiki.tcl.tk/2523}
768: can simplify bindings generation in the latter case, but not automate it
769: to the level that \slirp\ does; it is also unclear whether they support
770: a range of features seen in general scientific codes, such as common blocks,
771: string and multidimensional arrays, or complex datatypes.
772: 
773: Using \initp\ for models which call external libraries can also be
774: problematic.  For example, collaborators are extending the above
775: jet model with codes that call GNU Scientific Library routines, but
776: \initp\ documents no mechanism by which the GSL can be linked in at build time.
777: Following compiler convention, this is achieved with \slirp\ by specifying
778: {\tt -lgsl} on the command line.
779: 
780: Finally, functions wrapped by \slirp\ can be automatically vectorized,
781: allowing them to operate over entire arrays in a single call, and at
782: the speed of compiled C code instead of using slower, interpreted looping
783: constructs.  Vectorized wrappers can also be tuned for
784: parallelization with OpenMP \citep{Noble.2007.OpenMP}, allowing scientists
785: to take better advantage of their multicore machines during \isis\ analysis.
786: To our knowledge autogenerated vector parallel wrappers are currently
787: unique to \slirp, and therefore inaccessible in \xs.
788: 
789: \section{Parallel and Distributed Computation}
790: 
791: Parallel computing is not new, but to this day few astronomers employ
792: parallelism for standard problems in data analysis.  To provide a 
793: quantitative sense of this assertion relative to X-ray spectroscopy
794: \citep{2006ASPC..351..481N},
795: we performed the following full text searches on all published papers
796: indexed in the ADS \citep{1993ASPC...52..132K} by September of 2005.
797: \begin{table}[h]
798:  \footnotesize
799:  \begin{center}
800:   \begin{tabular}{cc}
801:   Keywords & Number of Hits \\
802:   \hline
803:   parallel AND pvm & 38  \\
804:   message AND passing AND mpi & 21 \\
805:   xspec & 832 \\
806:   xspec AND parallel AND pvm & 0 \\
807:   xspec AND message AND passing AND mpi & 0 \\
808:   \end{tabular}
809:  \caption{Published references to parallelism and \xs, as indexed in ADS
810:     through 2005.}
811:  \end{center}
812: \end{table}
813: Extra keywords were included with PVM and MPI (the Message Passing
814: Interface, \citealt{330577}) so as to cull false matches (e.g. with
815: the Max Planck Institute).  Queries in ADS on other modeling tools,
816: or with other search engines such as Google,
817: all yielded similar trends: astronomers and
818: astrophysicists have employed parallel computing, but mainly for highly
819: customized, large-scale problems in simulation, image processing, or
820: data reduction.
821: Even though a majority of papers published in observational astronomy
822: over recent decades
823: result from fitting models within established software systems, virtually
824: no one is employing parallelism to do so, especially in the interactive
825: context.
826: 
827: As discussed in \cite{2006ASPC..351..481N} and earlier
828: in \S \ref{scalability}, for several years PVM has been used in
829: ISIS\footnote{PVM was used due its
830: longstanding tolerance of faults on heterogeneous clusters
831: of workstations, but in principle an MPI module could be used just as
832: easily within \isis.} to apply
833: pools of machines to coarse-grained calculations that do not fit
834: within the compute space of one workstation.
835: Consider relativistic Kerr disk models, for example.  Historically,
836: implementors have opted to use precomputed tables to gain speed at
837: the expense of limiting flexibility in searching parameter space.
838: However, by recognizing that contributions from individual radii may
839: be computed independently the model has been parallelized in \isis\ to
840: avoid this tradeoff \citep[A. Young, priv.  comm.,][]{2006ApJ...652.1028B}.
841: Likewise, the aforementioned jet model can be
842: expensive to compute, particularly when calculating error bars: generating
843: 90\% confidence limits for 12 free parameters, at the
844: very coarse tolerance of 0.5, required 4 days on a single 2.66 GHz
845: Intel Core 2 Duo processor.
846: To increase performance we assigned the confidence limit search to 12
847: Intel Xeon 3.4GHz processors\footnote{Using new versions of the
848: {\tt cl\_master} and {\tt cl\_slave} scripts described on the \isis\
849: website.} within
850: a PVM.  This reduced the runtime at 0.5 tolerance to under 24 hours, a
851: greater than 75\% speedup; it also allowed us to discern finer features
852: in parameter space by increasing the tolerance resolution by a factor
853: of 500, to 0.001, while keeping the overall runtime to 50 hours, or
854: approximately half of the serial runtime at 0.5 resolution.
855: 
856: Temperature mapping is another problem that was straightforward to
857: parallelize with \isis. For instance, \cite{2004cosp...35.3997W}
858: provides a
859: map of heating in the intracluster medium of Perseus, computed from
860: 10,000 spectral extractions and fits on 20+ CPUs in just several hours.
861: Additional efforts have also led to improvements in related areas of
862: research, such as {\tt pvm\_xstar}, a
863: parallelizing wrapper for XSTAR which has made it feasible for us
864: to probe thousands of photoionized gas physical scenarios in the time
865: it has previously taken to compute only a handful of such models
866: (Noble \& Ji, in prep.).
867: 
868: At the other end of the architectural scale, we have also shown
869: that \isis\ can make transparent use of OpenMP to exploit shared
870: memory multiprocessors \citep{Noble.2007.OpenMP}.  This is especially
871: relevant in light of the emergence of multicore architectures: soon
872: most astronomers will have parallel computers on their desktops, but
873: few astronomy applications are poised to take advantage of them.
874: Analysis systems which do not embrace parallelism
875: can process at most the workload of only 1 CPU, resulting in a
876: dramatic $1/n$ underutilization of resources as more CPU cores are
877: added.  However, astronomers are well versed in scripting, particularly
878: with very high-level, array-oriented numerical packages like IDL, PDL,
879: and \slang, to name a few.  They combine easy manipulation of mathematical
880: structures of arbitrary dimension with most of the performance of compiled
881: code, with the latter due largely to moving array traversals from the
882: interpreted layer into lower-level code like this C fragment
883: {\small
884: \begin{verbatim}
885:         case SLANG_TIMES:
886:              for (n = 0; n < na; n++)
887:                  c[n] = a[n] * b[n];
888: \end{verbatim}
889: }
890: \noindent
891: which provides vectorized multiplication in \slang.
892: This suggests that much of the strength and appeal of numerical scripting
893: stems from relatively simple loops over regular structures, making
894: them ripe for automatic parallelization.  This pattern was exploited
895: in \slirp\ and \slang\ to effect the OpenMP parallelizations
896: described in \citep{Noble.2007.OpenMP}.
897: 
898: 
899: We believe that \isis\ is the only general purpose spectroscopy system
900: in which such a range of parallelism---from single processors on
901: multiple machines to multiple processors on single machines---has
902: been demonstrated.  In both cases speedups were obtained without
903: exposing parallelism at the \isis\ application level.  For instance,
904: the same serial implementations of spectroscopic models have been used
905: for both single- and multi-processor execution.  This minimizes two
906: traditional barriers to the use of parallelism by non-specialists:
907: learning how to program for concurrency and recasting sequential
908: algorithms in parallel form.  We believe these considerations are
909: important because the emerging ubiquity of multicore architectures,
910: combined with the ever-growing size of datasets and analysis complexity,
911: makes the regular use of parallelism in astronomy not a question of
912: {\em if} it will occur, but rather one of merely {\em when}.
913: 
914: \section{Beyond 1D Spectroscopy}
915: \label{beyond1D}
916: 
917: Data from modern telescopes are getting larger and more detailed,
918: with the use of multiple datasets from multiple missions becoming
919: commonplace.  Making sense of it all often requires techniques
920: more sophisticated than traditional plots or images.  Canned data
921: reduction threads, while an important piece of the puzzle, can only
922: go so far.  Data openness and architectural modularity
923: (Fig. \ref{arch}) make it easy to push
924: \isis\ beyond its original mission of 1D spectroscopy to address
925: this broader set of analysis problems.  As we illustrate here,
926: it has become unnecessary to use entirely separate applications
927: (as XImage, XSelect, or Xronos are used alongside \xs) or be constrained
928: by a strictly \ftf\ model, in order to
929: supplement spectral modeling with, for example, advanced
930: filtering, imaging, or timing analysis.  For each of the examples
931: shown here it is not clear how a similar result might be
932: obtained so directly within \xs.
933: \subsection{Timing Analysis}
934: The optional SITAR module\footnote{http://space.mit.edu/CXC/analysis/SITAR}
935: endows ISIS with timing analysis capability, obviating the need
936: to use a separate timing application such as XRONOS. The
937: power spectrum in Fig. \ref{timing} was generated entirely in ISIS:
938: the data were read, the FFTs were performed and averaged,
939: the Power Spectrum was logarithmically binned over Fourier frequency, the
940: constant + two Lorentzians model was fit, and the results plotted, 
941: operating directly upon arrays in memory, all without ever leaving
942: the program.
943: \subsection{Modular Imaging with \slang\ Numerics}
944: \label{ds9}
945: Many excellent imaging tools are available to astronomers, but it is
946: \begin{figure}[t]
947:   \begin{centering}
948:   \includegraphics[scale=0.35]{f6.eps}
949:   \caption{Power Spectrum of X1820-303, generated from the PCA in RXTE
950:   observation P10075 (data set 10075-01-01-02).}
951:   \label{timing}
952:   \end{centering}
953: \end{figure}
954: impossible for any one of them to do everything.  Here again, the
955: extensibility and modularity of the \isis\ paradigm helps avoid the
956: fate of ``doing nothing" while waiting for the implementation of new
957: features desired in one's work.  In such cases it can be expedient
958: to craft new modules which add missing features, or make certain
959: functionality more easy to incorporate into modeling and analysis.
960: 
961: For example, consider Fig. \ref{ngc7714}, drawn from Chandra observation
962: 4800 of interacting galaxy pair NGC7714,
963: and the following series of commands:
964: {\small
965: \begin{verbatim}
966:     isis> require("ds9")
967:     isis> require("gsl")
968:     isis> image = ds9_get_array()
969:     isis> hist = sum(image, 0)
970:     isis> range = [440:680]
971:     isis> hplot(range-1, range, hist[range])
972:     isis> xa = [440:680:4]; ya = hist[xa]
973:     isis> smoothed = interp_cspline(range, xa, ya)
974:     isis> oplot(range, smoothed)
975: \end{verbatim}
976: }
977: First the SAOds9 and GNU Scientific Library extension modules
978: \citep{2005ASPC..347...17P} are loaded; we
979: show this explicitly for didactic purposes, but \isis\ can be configured
980: to load either module automatically when the given functions are invoked.
981: The 1024$\times$1024 image is then retrieved directly into a
982: properly byteswapped
983: 2D \slang\ pixel array, using an XPA \citep{1995xpa.v1M} binary transfer 
984: instead of intermediate file I/O.  This image
985: is collapsed along its X axis using the native \slang\ { \tt sum} function,
986: to create an intensity histogram plot. The GSL cubic spline function
987: is then called to smooth the brightest portion
988: of the intensity histogram, interpolating over every fourth point therein,
989: and finally we overplot the result (dotted red line).
990: Although the task here is relatively straightforward, it again shows how
991: open-ended
992: analysis objectives can be achieved by weaving existing tools together 
993: in new ways, using an array-based interpreter as the thread.  DS9 is
994: extended beyond its essential role as a qualitative display tool and
995: into the realm of quantitative analysis, while the \isis\ user is able
996: to exploit the imaging capabilities of DS9 within interactive or
997: scripted analysis.
998: \begin{figure*}
999:   \begin{centering}
1000:   \hspace*{3.5mm}
1001:   \includegraphics[angle=-90,scale=0.35]{f7a.eps}
1002:   \includegraphics[angle=-90,scale=0.35]{f7b.eps}
1003:   \caption{ACIS image from 2004 Chandra observation of NGC7714, with
1004:      corresponding square and smoothed pixel intensity histograms.}
1005:   \label{ngc7714}
1006:   \end{centering}
1007: \end{figure*}
1008: 
1009: \begin{figure*}
1010:   \begin{centering}
1011:   \includegraphics[scale=0.4]{f8a.ps}
1012:   \hspace*{4mm}
1013:   \includegraphics[scale=0.4]{f8b.ps}\\
1014:   \vspace*{2mm}
1015:   \includegraphics[scale=0.37]{f8c.ps}
1016:   \hspace*{10mm}
1017:   \includegraphics[scale=0.37]{f8d.ps}
1018:   \caption{
1019:   Interactive 3-color image creation in \evtimg, using the level-2 event file
1020:   acisf00120N001\_evt2.fits from Chandra observation 120 of supernova
1021:   remnant E0102-72.  One may pan around (by clicking to center the image),
1022:   zoom in and out, and set various scaling properties by clicking on the
1023:   corresponding buttons. The image in the left column shows a fair amount
1024:   of high energy background noise, as evidenced by the blue
1025:   background pixels.  These were removed in realtime by adjusting the
1026:   colored energy band sliders that define the RGB levels (bottom panels),
1027:   to yield the improved image in the right column.}
1028:   \label{evt2img}
1029:   \end{centering}
1030: \end{figure*}
1031: 
1032: Another example is \evtimg,\footnote{http://space.mit.edu/cxc/software/slang/modules/hist/evt2img.html} a simple guilet\footnote{This
1033: term is used in \cite{2005ASPC..347..237N}
1034: to refer to graphical applets embedded within a primarily command-line
1035: application, and typically coded in a scripting language, allowing
1036: the use of graphical interfaces when convenient while avoiding an
1037: exclusively graphical interface.}
1038: which combines the histogram and Gtk modules to provide an interactive
1039: mechanism for creating 3-color images directly from event lists.
1040: Images are created in \evtimg\ by defining 3 energy band filters, 
1041: binning the events selected by each filter with the {\tt hist2d} function,
1042: and overlaying the resulting red, green, and blue monochrome images 
1043: within a Gtk display window.  As shown in Fig. \ref{evt2img}, a useful
1044: feature of \evtimg\ is its ability to plot the energy spectrum as a 1D
1045: histogram in order to tune the color band filters in real time, simply
1046: by adjusting
1047: the individual red, green, and blue sliders.  For interactive exploration
1048: this method is faster and
1049: more intuitive than the traditional \ftf\ approach, and produces
1050: no temporary file litter while experimenting with color assignment filters.
1051: {\tt Evt2img} may be run standalone from the operating system prompt or
1052: as a function in \isis, and in the latter case allows event data to be
1053: input directly from in-memory interpreted arrays in addition to traditional
1054: event files.
1055: The HYDRA project at MIT provides a wealth of more sophisticated
1056: examples\footnote{http://space.mit.edu/hydra/E2D\_demo/e2d\_demo.html}
1057: of how advanced imaging can be tied more directly to numerical modeling
1058: and analysis in \isis.  Under the auspices of the NASA AISRP program, a
1059: broad suite
1060: of 2D and 3D fitting, geometry, and visualization routines have been
1061: developed, e.g. to do forward folding and comparison of models with 2D
1062: event-based data sets.  These are described in detail online,
1063:  but are briefly illustrated
1064: here in the context of an analysis of cavities in Hydra A, using the
1065: Chandra observation 4969.  A model is defined by combining traditional
1066: spectral components (e.g.  mekal and powerlaw) with 3D geometric components
1067: (e.g. an AGN modeled as a sphere).  The fitting is performed directly in
1068: \isis, as is the generation of the residual, data, and model images, and
1069: 2D and 3D model component projections (Fig. \ref{e2d}).
1070: \begin{figure*}[h]
1071:   \begin{centering}
1072:   \includegraphics[scale=0.5]{f9a.ps}\\
1073:   \vspace*{10mm}
1074:   \includegraphics[scale=1.05]{f9b.eps}
1075:   \hspace*{10mm}
1076:   \includegraphics[scale=0.47]{f9c.eps}
1077:   \caption{Images created in \isis\ by HYDRA {\tt Event-2D} and {\tt Source-3D}
1078:   routines, while analyzing cavities within the Chandra observation 4969
1079:   of Hydra A.  Top: residuals, data, and model.  Bottom: 2D and 3D
1080:   projections.}
1081:   \label{e2d}
1082:   \end{centering}
1083: \end{figure*}
1084: \begin{figure*}
1085:   \begin{centering}
1086:   \includegraphics[scale=0.70]{f10a.ps}
1087:   \hspace*{0.2in}
1088:   \includegraphics[scale=0.70]{f10b.ps}
1089:   \caption{Entire datacube from Spitzer observation 3310; the two clumpy
1090: 	   areas are instantly recognizable as regions of strong emission.}
1091:   \label{spitzer-volume}
1092:   \end{centering}
1093: \end{figure*}
1094: \subsection{Volume Visualization}
1095: Astrophysical observation and simulation are in the midst of a transition
1096: beyond 1D spectra and 2D images, and into the realm of three-dimensional
1097: phenomena. A number of astronomy software tools exist which enable
1098: visualization of so-called 3D data cubes, but a problem shared by many of
1099: them is that they are limited to displaying one 2D slice at a time,
1100: optionally in series as an animation.
1101: Here we consider a 99 spectra data cube generated by
1102: CUBISM\footnote{http://ssc.spitzer.caltech.edu/archanaly/contributed/cubism}
1103: from Spitzer observation 3310 of Cassiopeia A, with dimensions RA,
1104: DEC, and $\lambda$.  To identify where emission is strongest in
1105: the spatial and wavelength domains, the entire FITS datacube
1106: can be passed directly to \volview\ (Fig. \ref{spitzer-volume})
1107: {\small
1108: \begin{verbatim}
1109:   isis> require("volview")
1110:   isis> cube = fits_read_image("casa_ll1_s12.fits")
1111:   isis> volview(cube)
1112: \end{verbatim}
1113: }
1114: \noindent
1115: This visualization makes it instantly clear that the clumpy regions
1116: correspond to bright emission at fairly specific wavelengths.
1117: The \volview\ guilet
1118: is our
1119: interface to the Volpack
1120: rendering library \citep{192283}, which, although somewhat dated,
1121: is small, has no external dependencies, requires no special
1122: hardware, and is very fast.  The shear-warp factorization algorithm
1123: in Volpack has been generally recognized as the fastest rendering
1124: technique available \citep{353903}, a crucial factor for interactive
1125: analysis.  In contrast to high-end tools like ParaView and
1126: VISIT\footnote{http://www.paraview.org,\hspace*{2mm}http://www.llnl.gov/visit},
1127: volview provides a simple, low buy-in path to volume rendering and
1128: is actively used in the HYDRA project.\footnote{http://space.mit.edu/hydra/v3d.html}.
1129: 
1130: \subsection{Visual Correlation and Multidimensional Filtering}
1131: Having the ability to cut, visualize, and correlate data, in complex
1132: ways and from multiple missions, is invaluable to analysis.  This
1133: exploratory process ultimately seeks to derive sets of constraints
1134: {\em \bfseries C} = \{$C_{0}, ..., C_{n}$\} upon input data
1135: {\em \bfseries D} by iterating through a series of models, comparisons
1136: to data, and refinements of assumptions and model parameters.
1137: Because its analytic process does not encompass whole-array
1138: numerics (\S \ref{numerics}, \S \ref{input}), an iteration of this cycle
1139: in \xs\ can involve dumping application state to disk, followed
1140: by the execution of multiple tools such as {\tt fselect} or \fcalc\
1141: to transform or cut file data, possibly \fv\ or XIMAGE to visualize
1142: % NB: fv cannot filter table columns by laying regions down upon plots,
1143: % nor can data "shrunk" by the table calculator [e.g. where(x > a) is
1144: % not possible, b/c where() doesn't exist and b/c the fv calculator is
1145: % table-based, and so operates upon whole columns with #rows kept constant
1146: filtered data subsets, and \xs\ to incorporate the results back into analysis.
1147: This process creates temporary file litter products which can quickly
1148: become difficult to manage, and requires slow disk I/O passes over files
1149: when applying each unique set of filter constraints.  Other limiting
1150: factors are that it restricts the scope of exploration to data expressed
1151: in the FITS file format, and that \tcl-based I/O in tools like \fv\ does
1152: not scale well to datasets containing millions of events.
1153: 
1154: \label{vwhere}
1155: In contrast, \vwhere\ \citep{2005ASPC..347..237N}, a graphical extension
1156: of the \slang\ { \tt where} array slicing function, unifies the constraint
1157: cycle by enabling each phase to be performed within a single
1158: application.  The result can be an intuitive, faster, and
1159: more powerful alternative to file-based data mining. 
1160: By supporting the use of interpreted \slang\ arrays \isis\ \& \vwhere\ make
1161: it easy to combine data from multiple sources and formats, not just
1162: FITS files, and examine them in natural ways, as well as foster
1163: scalability.  \vwhere\ has been used to
1164: simultaneously mine hundreds of observations from multiple telescopes,
1165: e.g. for evidence of transitions between the soft and hard states of
1166: Cygnus X-1 \citep{2005ApJ...626.1006N}, correlate model parameters with
1167: fit results---directly in memory from dozens of fits---for scores of
1168: observations \citep{2006A&A...447..245W, MarkoffM81InPrep, NowakCygX1InPrep},
1169: and quickly corroborate colleague results \citep{2007ApJ...663L..93H}.
1170: 
1171: Filtering in \vwhere\ amounts to manipulating regions of interest
1172: on plots generated from \slang\ arrays (Fig. \ref{vwhere1}), with
1173: no syntax required and the effects upon any combination of vectors
1174: automatically visualized for inspection (Fig. \ref{vwhere2}).
1175: This approach reveals data correlations that can be difficult and
1176: time-consuming to ferret out with tool-based techniques.  New data
1177: vectors may be created on the fly and with no additional I/O overhead,
1178: using anything from simple arithmetic combinations of existing vectors
1179: to any mathematical transformation that can be specified in \slang\
1180: or imported from external C, C++, or \fort\ codes.
1181: 
1182: In contrast, file-based filtering tools require the use of syntax which
1183: may conflict in subtle ways from package to package.  Specifying
1184: mathematical operations to such tools, e.g., in the form of
1185: quoted Unix shell syntax, can be tedious and cumbersome, and does not
1186: approach the expressive power (consider recursion, for example) or
1187: performance of \isis\ numerics.
1188: As an illustration, consider the use of calculator tools for
1189: the discriminant computation in \S \ref{numerics}: the 1-million
1190: element \slang\ array datapoint in Fig. \ref{idl-plot} corresponds
1191: to a runtime of ca. 0.15 seconds:
1192: {\small
1193: \begin{verbatim}
1194:    isis>  a = [1:1e6+1];  b = 3*a; c = 2*a
1195:    isis> tic; d = sqrt(b^2 - 4*a*c); toc
1196:    0.151172
1197: \end{verbatim}
1198: }
1199: \noindent
1200: Using tools to perform similar operations upon files
1201: {\small
1202: \begin{verbatim}
1203:    fcalc in out d "sqrt(b^2 - 4*a*c)"
1204:    ftcalc in out d "sqrt(b^2 - 4*a*c)"
1205:    dmtcalc in out expression="d=sqrt(b^2 - 4*a*c)"
1206: \end{verbatim}
1207: }
1208: \noindent (from a locally compiled -O2 distribution of HEASOFT 6.1 and
1209: a CIAO3.3 binary distribution, respectively) was consistently 1 to 2
1210: orders of magnitude slower: roughly 1.8 sec for \fcalc, 2.3 sec for
1211: {\tt ftcalc} and 70 sec for {\tt dmtcalc}.  If we include the time to write
1212: {\small
1213: \begin{verbatim}
1214:    isis>  s = struct{a,b,c}; s.a=a; s.b=b; s.c=c
1215:    isis>  fits_write_binary_table("in","arrays",s)
1216: \end{verbatim}
1217: }
1218: \noindent the arrays to disk and then read them back in
1219: {\small
1220: \begin{verbatim}
1221:    isis>  d = fits_read_table("out").d
1222: \end{verbatim}
1223: }
1224: \noindent the performance penalty of the tool approach is even greater.
1225: Moreover, the output product of each tool is not directly useful:  to
1226: be visually inspected or used in
1227: further analysis, for instance, it first needs to be loaded into another
1228: program (e.g. \fv, or \xs), incurring additional I/O and
1229: application overheads that are not seen in \isis\ because its
1230: result arrays may be immediately manipulated or passed to subsequent
1231: computations.
1232: 
1233: % time ftcalc in shmem://h1 d "sqrt(b^2 - 4*a*c)"
1234: % real    2m45.378s	user    1m40.602s	sys     1m4.659s
1235: % Fri Aug 31 14:49:22 EDT 2007
1236: % time ftcalc in shmem://h1 d "sqrt(b^2 - 4*a*c)"
1237: % real    2m45.787s	user    1m40.132s	sys     1m5.536s
1238: Shared memory can, in principle, mitigate the disk I/O cost,
1239: but in this case it did not help:  instructing {\tt ftcalc}
1240: to write to {\tt shmem://h1} consistently resulted in runtimes of
1241: nearly 3 minutes, while the CIAO dmtcalc tool would not permit the
1242: creation of a shared memory FITS table.  Even if shared memory
1243: were faster than files in this case, the point raised earlier in
1244: \S \ref{input} still remains, namely that \xs\ documents no
1245: clear provision though which such generic data arrays may be utilized
1246: in analysis.
1247: It must also be noted that few, if any, file-based transformation
1248: tools are extensible.  If we wished to use a hypergeometric function in
1249: \vwhere\ it is as simple as loading the GSL module with \verb+require("gsl")+
1250: and calling the relevant function.
1251: If the mathematical operations required for their research are not
1252: supported, tool users would have to either make an enhancement request
1253: and wait or create their own solution.
1254: 
1255: \bfi{
1256: \subsection{Aside On Reproducibility}
1257: 
1258: We have been refining the approach to analysis espoused in this paper for
1259: much of the past decade.  During that time, one of the more persistent
1260: concerns we have privately encountered is
1261: that it can lead to diminished reproducibility, particularly in contrast
1262: to the \ftf\
1263: model.\footnote{This is relevant to the overall paper because it is
1264: the dominant means through which data are prepared for analysis in \xs,
1265: but applies to other analysis packages as well.}
1266: Reproducibility is a cornerstone of science, and remains a
1267: topic of debate in wider circles \citep{HCollins.1992, 2006Natur.442..344G},
1268: but is not treated in depth within the astronomy literature.  We
1269: do not attempt to fill that gap here.  Rather, we aim only to address the
1270: perception that configurable, interpreter-based methods compromise
1271: reproducibility relative to file-based tool methods, and hope that
1272: this may contribute to a more
1273: complete treatment of reproducibility elsewhere.
1274: 
1275: Central to reproducibility is the recording of history.  Many tools
1276: assist that process by annotating modified files with FITS history
1277: keywords.  This is of clear utility, especially when tracing pipelines
1278: and other well-defined data reduction procedures.  For open-ended
1279: analysis, however, we do not believe it is superior to the forms of
1280: history recorded by full-fledged analysis applications.
1281: Consider what is being captured in history records written by tools: each
1282: keystroke of the command used to invoke the tool.  This capability is
1283: not unique to tools.  \xs\ and \isis\ record keystroke history by virtue
1284: of their GNU readline command recall, editing, and logging capabilities,
1285: as do many other systems.  Focusing on
1286: keystrokes alone, though, obscures a larger point:  regardless of whether
1287: one prefers logs or header keywords, indiscriminately long lists of
1288: commands typed are of little value without some sense of their
1289: relevance to publishable results.
1290: 
1291: In the end what matters most is that results may be regenerated so that
1292: conclusions may be plausibly confirmed by others, rather than having
1293: every bump or wrong turn along the way reproduced in high fidelity.
1294: Scripts, the
1295: logical endpoint of our interpreter-based approach to analysis, confer
1296: this conceptual prioritization by making explicit the data and algorithms
1297: of greatest significance.  Such scripts arise in tool-based analysis as 
1298: well, only they tend to be expressed in system-oriented languages like
1299: Bourne shell or Perl, rather than intrinsically whole-array numeric
1300: languages like \slang\ or IDL.  It can be argued, then, that scripts lead
1301: to higher forms of duplicability than FITS history records alone.  They
1302: are also easier to annotate with additional commentary.  We therefore
1303: conclude that that tool- and interpreter-based approaches to analysis
1304: are approximately equivalent in the degree to which they facilitate
1305: reproducibility.
1306: Care must be still taken when ``feature creep" introduces incompatibilities
1307: that make the use of older scripts problematic with newer software
1308: versions, so it is important that version information be recorded and
1309: that older software remains accessible on the internet.
1310: }
1311: \begin{figure*}[p]
1312:   \begin{centering}
1313:   \includegraphics[scale=0.6]{f11a.eps}
1314:   \hspace*{0.51in}
1315:   \includegraphics[scale=0.4]{f11b.ps}
1316:   \caption{\vwhere\ in \isis\, using SITAR and the AGLC package to
1317:      generate a lightcurve for Chandra observation 3814 of Cygnus X-1.
1318:      Configurable plots are generated from an axis expression window
1319:      containing several text fields.  Each X/Y expression may contain
1320:      any valid \slang\ statement, including calls to C, C++ or \fort\ 
1321:      functions within external modules.  The chief constraint upon an
1322:      expression is that, when evaluated, it generate a numeric vector
1323:      equal in length to the existing data vectors.
1324:      Here we show \vwhere\ launched with a struct
1325:      containing 3 input vectors, as well as how easily new vectors (e.g.
1326: 	{\tt lchan + mchan}) can be fabricated from them on the fly.
1327:      Each vector expression is saved in the {\tt Choose} dropdown menu,
1328: 	for easy reuse with no retyping.
1329:      Vectors of arbitrary size may also be overplotted, while the 
1330:      {\tt S-Lang>} prompt may be used as an interactive command line,
1331: 	e.g., to issue \isis\ commands or execute arbitrary \slang\ code.}
1332:   \label{vwhere1}
1333:   \end{centering}
1334: \end{figure*}
1335: 
1336: \begin{figure*}
1337:   \begin{centering}
1338:   \includegraphics[scale=0.4]{f12a.ps}
1339:   \hspace*{0.1in}
1340:   \includegraphics[scale=0.4]{f12b.ps}
1341:   \caption{A polygon filter applied to the color intensity diagram, and
1342:   its effect upon the lightcurve  (Hanke et al, in prep.).}
1343:   \label{vwhere2}
1344:   \end{centering}
1345: \end{figure*}
1346: 
1347: \section{Conclusion}
1348: 
1349: Progress in science can be measured by our ability to pose increasingly
1350: advanced, open-ended questions and address them with flexible techniques
1351: of commensurate sophistication.  Since the age of Newton, one implication
1352: of this is that scientists must also practice mathematics, and since the
1353: age of Turing it has also meant they must practice programming.
1354: 
1355: In this paper we have compared two open-source spectral analysis applications,
1356: \xs\ and \isis, in an attempt to gauge how their scientific and mathematical
1357: reach may be extended with custom programming.  Contrasts between the two
1358: have been drawn from the context of current research efforts utilizing high
1359: performance computation, numerical modeling, atomic physics, visualization,
1360: automated code generation, and data management.  We have
1361: demonstrated how these have led to the incorporation of new analytic
1362: techniques in \isis, in ways that are either unexplored or problematic
1363: for the current \xs\ architecture and its associated \ftf\ model of
1364: analysis.
1365: 
1366: \xs\ has been of tremendous value to the X-ray community, continues
1367: to be actively developed, and has a strong history of community enhancement
1368: via local models (and to some extent, \tcl/TK scripts).  However, we have
1369: argued that the top-level simplicity of
1370: the \xs\ interface, long and rightfully one of the pillars of its appeal,
1371: can shroud much of its internal computational and data handling mechanisms.
1372: This in turn can render \xs\ less adaptable---by the typical user---for
1373: evolving research needs.  Commands which operate as black-boxed common
1374: denominators of analysis, and permitting only file-based data input, may
1375: not be enough to probe some of the more computationally challenging
1376: problems facing astronomers.
1377: 
1378: We conclude that analysis applications such as \isis, endowed with
1379: interpreted whole-array numerical capabilities and an open, modular,
1380: and scriptable architecture designed expressly for high configurability,
1381: are more favorably equipped to support ad-hoc research needs while not
1382: appreciably compromising reproducibility.  Originally envisioned as a
1383: tool for Chandra gratings spectroscopy, \isis\ has heavily influenced
1384: the development of additional Chandra analysis software, while also
1385: receiving NASA AISRP funding to continue its evolution within the
1386: aforementioned HYDRA project.
1387: Although some of the \isis\ capabilities we've emphasized do exist in
1388: other astronomy software, we are unaware of any publications demonstrating
1389: how similar breadths of flexibility and computational power have been
1390: collected under the umbrella of a single open-source analysis application
1391: and brought to bear on published research in spectral analysis and
1392: X-ray astronomy in the manner discussed here.
1393: 
1394: \acknowledgments
1395: We would like to thank Daniel Dewey, J\"{o}rn Wilms, and our MIT
1396: colleagues for reviewing drafts of the paper, as well as Tracey DeLaney
1397: for supplying the Spitzer 3D spectral cubes of CasA.  We are grateful
1398: to our anonymous referee for constructive criticism, and to NASA for
1399: funding this work through the AISRP grant NNG06GE58G.
1400: 
1401: %% To help institutions obtain information on the effectiveness of their
1402: %% telescopes, the AAS Journals has created a group of keywords for telescope
1403: %% facilities. A common set of keywords will make these types of searches
1404: %% significantly easier and more accurate. In addition, they will also be
1405: %% useful in linking papers together which utilize the same telescopes
1406: %% within the framework of the National Virtual Observatory.
1407: %% See the AASTeX Web site at http://www.journals.uchicago.edu/AAS/AASTeX
1408: %% for information on obtaining the facility keywords.
1409: 
1410: %% After the acknowledgments section, use the following syntax and the
1411: %% \facility{} macro to list the keywords of facilities used in the research
1412: %% for the paper.  Each keyword will be checked against the master list during
1413: %% copy editing.  Individual instruments or configurations can be provided 
1414: %% in parentheses, after the keyword, but they will not be verified.
1415: 
1416: %{\it Facilities:} \facility{Nickel}, \facility{HST (STIS)}, \facility{CXO (ASIS)}.
1417: 
1418: %% Appendix material should be preceded with a single \appendix command.
1419: %% There should be a \section command for each appendix. Mark appendix
1420: %% subsections with the same markup you use in the main body of the paper.
1421: 
1422: %% Each Appendix (indicated with \section) will be lettered A, B, C, etc.
1423: %% The equation counter will reset when it encounters the \appendix
1424: %% command and will number appendix equations (A1), (A2), etc.
1425: 
1426: %\appendix
1427: 
1428: %% The reference list follows the main body and any appendices.
1429: %% Use LaTeX's thebibliography environment to mark up your reference list.
1430: %% Note \begin{thebibliography} is followed by an empty set of
1431: %% curly braces.  If you forget this, LaTeX will generate the error
1432: %% "Perhaps a missing \item?".
1433: %%
1434: %% thebibliography produces citations in the text using \bibitem-\cite
1435: %% cross-referencing. Each reference is preceded by a
1436: %% \bibitem command that defines in curly braces the KEY that corresponds
1437: %% to the KEY in the \cite commands (see the first section above).
1438: %% Make sure that you provide a unique KEY for every \bibitem or else the
1439: %% paper will not LaTeX. The square brackets should contain
1440: %% the citation text that LaTeX will insert in
1441: %% place of the \cite commands.
1442: 
1443: %% We have used macros to produce journal name abbreviations.
1444: %% AASTeX provides a number of these for the more frequently-cited journals.
1445: %% See the Author Guide for a list of them.
1446: 
1447: %% Note that the style of the \bibitem labels (in []) is slightly
1448: %% different from previous examples.  The natbib system solves a host
1449: %% of citation expression problems, but it is necessary to clearly
1450: %% delimit the year from the author name used in the citation.
1451: %% See the natbib documentation for more details and options.
1452: 
1453: \bibliographystyle{apalike}
1454: \begin{thebibliography}{}
1455: 
1456: \bibitem[{Arnaud}, 1996]{1996ASPC..101...17A}
1457: {Arnaud}, K.~A. (1996).
1458: \newblock {XSPEC: The First Ten Years}.
1459: \newblock In {Jacoby}, G.~H. and {Barnes}, J., editors, {\em ASP Conf. Ser.
1460:   101: Astronomical Data Analysis Software and Systems V}, pages 17--+.
1461: 
1462: \bibitem[{Ayers}, 1996]{SLangRef}
1463: {Ayers}, L. (1996).
1464: \newblock {S-Lang Applications for Linux}.
1465: \newblock {\em The Linux Gazette}, 12.
1466: \newblock {http://linuxgazette.net/issue12/slang.html}.
1467: 
1468: \bibitem[{Beazley}, 1996]{1996SWIG}
1469: {Beazley}, D. (1996).
1470: \newblock {SWIG : An Easy to Use Tool for Integrating Scripting Languages with
1471:   C and C++.}
1472: \newblock In {\em 4th Tcl/Tk Workshop Proceedings}.
1473: 
1474: \bibitem[Bland et~al., 2007]{OscarCLI}
1475: Bland, W., Naughton, T., Vallee, G., and Scott, S.~L. (May 2007).
1476: \newblock Design and implementation of a menu based oscar command line
1477:   interface.
1478: \newblock {\em High Performance Computing Systems and Applications, 2007. HPCS
1479:   2007. 21st International Symposium on}, pages 25--25.
1480: 
1481: \bibitem[{Brenneman} and {Reynolds}, 2006]{2006ApJ...652.1028B}
1482: {Brenneman}, L.~W. and {Reynolds}, C.~S. (2006).
1483: \newblock {Constraining Black Hole Spin via X-Ray Spectroscopy}.
1484: \newblock {\em \apj}, 652:1028--1043.
1485: 
1486: \bibitem[Collins, 1992]{HCollins.1992}
1487: Collins, H.~M. (1992).
1488: \newblock {\em Changing Order: Replication and Induction in Scientific
1489:   Practice}.
1490: \newblock University of Chicago Press.
1491: 
1492: \bibitem[{Davis} et~al., 2005]{2005ASPC..347..444D}
1493: {Davis}, J.~E., {Houck}, J.~C., {Allen}, G.~E., and {Stage}, M.~D. (2005).
1494: \newblock {Analyzing the Cas A Megasecond in Less than a Megasecond}.
1495: \newblock In {Shopbell}, P., {Britton}, M., and {Ebert}, R., editors, {\em
1496:   Astronomical Society of the Pacific Conference Series}, pages 444--+.
1497: 
1498: \bibitem[{de La Pe{\~n}a} et~al., 2001]{2001ASPC..238...59D}
1499: {de La Pe{\~n}a}, M.~D., {White}, R.~L., and {Greenfield}, P. (2001).
1500: \newblock {The PyRAF Graphics System}.
1501: \newblock In {Harnden}, Jr., F.~R., {Primini}, F.~A., and {Payne}, H.~E.,
1502:   editors, {\em Astronomical Data Analysis Software and Systems X}, volume 238
1503:   of {\em Astronomical Society of the Pacific Conference Series}, pages 59--+.
1504: 
1505: \bibitem[{Folk} et~al., 1999]{1999IEEE...99...273F}
1506: {Folk}, M., {McGrath}, R., and Yeager, N. (1999).
1507: \newblock {HDF: an update and future directions}.
1508: \newblock In {\em IEEE Geoscience and Remote Sensing Symposium, 1999, Vol. 1},
1509:   pages 273--275.
1510: 
1511: \bibitem[{Fryxell} et~al., 2001]{2001NuPhA.688..172F}
1512: {Fryxell}, B., {Zingale}, M., {Timmes}, F.~X., {Lamb}, D.~Q., {Olson}, K.,
1513:   {Calder}, A.~C., {Dursi}, L.~J., {Ricker}, P., {Rosner}, R., {Truran}, J.~W.,
1514:   {MacNeice}, P., and {Tufo}, H. (2001).
1515: \newblock {Numerical simulations of thermonuclear flashes on neutron stars}.
1516: \newblock {\em Nuclear Physics A}, 688:172--176.
1517: 
1518: \bibitem[Geist et~al., 1994]{Geist:1994:PPV}
1519: Geist, A., Beguelin, A., Dongarra, J., Jiang, W., Manchek, R., and Sunderam,
1520:   V.~S. (1994).
1521: \newblock {\em {PVM}: Parallel Virtual Machine: {A} Users' Guide and Tutorial
1522:   for Networked Parallel Computing}.
1523: 
1524: \bibitem[Gilat, 2004]{Gilat.2004.MATLAB}
1525: Gilat, A. (2004).
1526: \newblock {\em {MATLAB: An Introduction with Applications, 2nd Ed.}}
1527: \newblock John Wiley \& Sons.
1528: 
1529: \bibitem[{Giles}, 2006]{2006Natur.442..344G}
1530: {Giles}, J. (2006).
1531: \newblock {The trouble with replication}.
1532: \newblock {\em \nat}, 442:344--+.
1533: 
1534: \bibitem[Gropp et~al., 1999]{330577}
1535: Gropp, W., Lusk, E., and Skjellum, A. (1999).
1536: \newblock {\em Using MPI (2nd ed.): portable parallel programming with the
1537:   message-passing interface}.
1538: \newblock MIT Press, Cambridge, MA, USA.
1539: 
1540: \bibitem[{Heinz} et~al., 2007]{2007ApJ...663L..93H}
1541: {Heinz}, S., {Schulz}, N.~S., {Brandt}, W.~N., and {Galloway}, D.~K. (2007).
1542: \newblock {Evidence of a Parsec-Scale X-Ray Jet from the Accreting Neutron Star
1543:   Circinus X-1}.
1544: \newblock {\em \apjl}, 663:L93--L96.
1545: 
1546: \bibitem[{Houck}, 2002]{2002hrxs.confE..17H}
1547: {Houck}, J.~C. (2002).
1548: \newblock {ISIS: The Interactive Spectral Interpretation System}.
1549: \newblock In {Branduardi-Raymont}, G., editor, {\em High Resolution X-ray
1550:   Spectroscopy with XMM-Newton and Chandra, Mullard Space Science Laboratory of
1551:   University College, London}.
1552: 
1553: \bibitem[{Hwang} et~al., 2004]{2004ApJ...615L.117H}
1554: {Hwang}, U., {Laming}, J.~M., {Badenes}, C., {Berendse}, F., {Blondin}, J.,
1555:   {Cioffi}, D., {DeLaney}, T., {Dewey}, D., {Fesen}, R., {Flanagan}, K.~A.,
1556:   {Fryer}, C.~L., {Ghavamian}, P., {Hughes}, J.~P., {Morse}, J.~A.,
1557:   {Plucinsky}, P.~P., {Petre}, R., {Pohl}, M., {Rudnick}, L., {Sankrit}, R.,
1558:   {Slane}, P.~O., {Smith}, R.~K., {Vink}, J., and {Warren}, J.~S. (2004).
1559: \newblock {A Million Second Chandra View of Cassiopeia A}.
1560: \newblock {\em \apjl}, 615:L117--L120.
1561: 
1562: \bibitem[{Jordan} et~al., 1994]{1994ASPC...61...71J}
1563: {Jordan}, J.~M., {Jennings}, D.~G., {McGlynn}, T.~A., {Bonnell}, J.~T.,
1564:   {Gliba}, G.~W., {Ruggiero}, N.~G., and {Serlemitsos}, T.~A. (1994).
1565: \newblock {An Xwindows/Motif Graphical User Interface for Xspec}.
1566: \newblock In {Crabtree}, D.~R., {Hanisch}, R.~J., and {Barnes}, J., editors,
1567:   {\em ASP Conf. Ser. 61: Astronomical Data Analysis Software and Systems III},
1568:   pages 71--+.
1569: 
1570: \bibitem[{Joye} and {Mandel}, 2003]{2003ASPC..295..489J}
1571: {Joye}, W.~A. and {Mandel}, E. (2003).
1572: \newblock {New Features of SAOImage DS9}.
1573: \newblock In {Payne}, H.~E., {Jedrzejewski}, R.~I., and {Hook}, R.~N., editors,
1574:   {\em ASP Conf. Ser. 295: Astronomical Data Analysis Software and Systems
1575:   XII}, pages 489--+.
1576: 
1577: \bibitem[Kallman and Palmeri, 2007]{kallman-2007-79}
1578: Kallman, T.~R. and Palmeri, P. (2007).
1579: \newblock Atomic data for x-ray astrophysics.
1580: \newblock {\em Reviews of Modern Physics}, 79:79--133.
1581: 
1582: \bibitem[Kiczales, 1996]{BeyondBlackBox}
1583: Kiczales, G. (Jan 1996).
1584: \newblock Beyond the black box: open implementation.
1585: \newblock {\em Software, IEEE}, 13(1):8, 10--11.
1586: 
1587: \bibitem[Kling, 1999]{Kling.1999.IDL}
1588: Kling, R. (1999).
1589: \newblock {\em {Application Development with IDL}}.
1590: \newblock Ronn Kling Consulting.
1591: 
1592: \bibitem[{Kurtz} et~al., 1993]{1993ASPC...52..132K}
1593: {Kurtz}, M.~J., {Karakashian}, T., {Grant}, C.~S., {Eichhorn}, G., {Murray},
1594:   S.~S., {Watson}, J.~M., {Ossorio}, P.~G., and {Stoner}, J.~L. (1993).
1595: \newblock {Intelligent Text Retrieval in the NASA Astrophysics Data System}.
1596: \newblock In {Hanisch}, R.~J., {Brissenden}, R.~J.~V., and {Barnes}, J.,
1597:   editors, {\em Astronomical Data Analysis Software and Systems II}, volume~52
1598:   of {\em Astronomical Society of the Pacific Conference Series}, pages 132--+.
1599: 
1600: \bibitem[Lacroute and Levoy, 1994]{192283}
1601: Lacroute, P. and Levoy, M. (1994).
1602: \newblock Fast volume rendering using a shear-warp factorization of the viewing
1603:   transformation.
1604: \newblock In {\em SIGGRAPH '94: Proceedings of the 21st annual conference on
1605:   Computer graphics and interactive techniques}, pages 451--458, New York, NY,
1606:   USA. ACM Press.
1607: 
1608: \bibitem[{Mandel} et~al., 1995]{1995xpa.v1M}
1609: {Mandel}, E., {Swick}, R., and D., T. (1995).
1610: \newblock {The X Public Access Mechanism: Software Cooperation for Space
1611:   Science and Beyond}.
1612: \newblock {\em Proceedings of the 9th Annual X Technical Conference, Boston,
1613:   MA}.
1614: 
1615: \bibitem[{Markoff} and {Nowak}, 2004]{2004ApJ...609..972M}
1616: {Markoff}, S. and {Nowak}, M.~A. (2004).
1617: \newblock {Constraining X-Ray Binary Jet Models via Reflection}.
1618: \newblock {\em \apj}, 609:972--976.
1619: 
1620: \bibitem[{Markoff} et~al., 2005]{2005ApJ...635.1203M}
1621: {Markoff}, S., {Nowak}, M.~A., and {Wilms}, J. (2005).
1622: \newblock {Going with the Flow: Can the Base of Jets Subsume the Role of
1623:   Compact Accretion Disk Coronae?}
1624: \newblock {\em \apj}, 635:1203--1216.
1625: 
1626: \bibitem[{Markoff} et~al., 2007]{MarkoffM81InPrep}
1627: {Markoff}, S., {Young}, A., and {Nowak}, M.~A. (2007).
1628: \newblock In preparation.
1629: 
1630: \bibitem[Mei{\ss}ner et~al., 2000]{353903}
1631: Mei{\ss}ner, M., Huang, J., Bartz, D., Mueller, K., and Crawfis, R. (2000).
1632: \newblock A practical evaluation of popular volume rendering algorithms.
1633: \newblock In {\em VVS '00: Proceedings of the 2000 IEEE symposium on Volume
1634:   visualization}, pages 81--90, New York, NY, USA. ACM Press.
1635: 
1636: \bibitem[{Noble}, 2005]{2005ASPC..347..237N}
1637: {Noble}, M.~S. (2005).
1638: \newblock {VWhere: A Visual, Extensible `where' Command}.
1639: \newblock In {Shopbell}, P., {Britton}, M., and {Ebert}, R., editors, {\em ASP
1640:   Conf. Ser. 347: Astronomical Data Analysis Software and Systems XIV}, pages
1641:   237--+.
1642: 
1643: \bibitem[Noble, 2007]{Noble.2007.OpenMP}
1644: Noble, M.~S. (2007).
1645: \newblock {Getting More From Your Multicore: Exploiting OpenMP From An Open
1646:   Source Numerical Scripting Language}.
1647: \newblock {\em Computation and Concurrency: Practice and Experience}.
1648: \newblock {In press. arXiv e-print at
1649:   http://adsabs.harvard.edu/abs/2007arXiv0706.4048N}.
1650: 
1651: \bibitem[{Noble} et~al., 2006]{2006ASPC..351..481N}
1652: {Noble}, M.~S., {Houck}, J.~C., {Davis}, J.~E., {Young}, A., and {Nowak}, M.
1653:   (2006).
1654: \newblock {Using the Parallel Virtual Machine for Everyday Analysis}.
1655: \newblock In {Gabriel}, C., {Arviset}, C., {Ponz}, D., and {Enrique}, S.,
1656:   editors, {\em ASP Conf. Ser. 351: Astronomical Data Analysis Software and
1657:   Systems XV}, pages 481--+.
1658: 
1659: \bibitem[Norman, 2007]{NextUIBrkThru}
1660: Norman, D. (2007).
1661: \newblock The next ui breakthrough: command lines.
1662: \newblock {\em interactions}, 14(3):44--45.
1663: 
1664: \bibitem[{Nowak} et~al., 2005]{2005ApJ...626.1006N}
1665: {Nowak}, M.~A., {Wilms}, J., {Heinz}, S., {Pooley}, G., {Pottschmidt}, K., and
1666:   {Corbel}, S. (2005).
1667: \newblock {Is the ``IR Coincidence'' Just That?}
1668: \newblock {\em \apj}, 626:1006--1014.
1669: 
1670: \bibitem[{Nowak} et~al., 2008]{NowakCygX1InPrep}
1671: {Nowak}, M.~A., {Wilms}, J., and {Pottschmidt}, K. (2008).
1672: \newblock In preparation.
1673: 
1674: \bibitem[{Pence} et~al., 1997]{1997ASPC..125..261P}
1675: {Pence}, W., {Xu}, J., and {Brown}, L. (1997).
1676: \newblock {FV: A New FITS File Visualization Tool}.
1677: \newblock In {Hunt}, G. and {Payne}, H., editors, {\em ASP Conf. Ser. 125:
1678:   Astronomical Data Analysis Software and Systems VI}, pages 261--+.
1679: 
1680: \bibitem[{Primini} et~al., 2005]{2005ASPC..347...17P}
1681: {Primini}, F., {Noble}, M., and {The CXC Science Data Systems Group} (2005).
1682: \newblock {Extending the Capabilities of CIAO with S-Lang-based Tools}.
1683: \newblock In {Shopbell}, P., {Britton}, M., and {Ebert}, R., editors, {\em ASP
1684:   Conf. Ser. 347: Astronomical Data Analysis Software and Systems XIV}, pages
1685:   17--+.
1686: 
1687: \bibitem[{Smith} et~al., 2001]{2001ApJ...556L..91S}
1688: {Smith}, R.~K., {Brickhouse}, N.~S., {Liedahl}, D.~A., and {Raymond}, J.~C.
1689:   (2001).
1690: \newblock {Collisional Plasma Models with APEC/APED: Emission-Line Diagnostics
1691:   of Hydrogen-like and Helium-like Ions}.
1692: \newblock {\em \apjl}, 556:L91--L95.
1693: 
1694: \bibitem[{Stage} et~al., 2006]{2006NatPh...2..614S}
1695: {Stage}, M.~D., {Allen}, G.~E., {Houck}, J.~C., and {Davis}, J.~E. (2006).
1696: \newblock {Cosmic-ray diffusion near the Bohm limit in the Cassiopeia A
1697:   supernova remnant}.
1698: \newblock {\em Nature Physics}, 2:614--619.
1699: 
1700: \bibitem[Trowbridge et~al., 2007]{TrowbridgeNowakWilms2007}
1701: Trowbridge, S.~R., Nowak, M.~A., and Wilms, J. (2007).
1702: \newblock {Tracking the Orbital and Super-orbital Periodicities of SMC X-1}.
1703: \newblock {In press}.
1704: 
1705: \bibitem[{Wilms} et~al., 2006]{2006A&A...447..245W}
1706: {Wilms}, J., {Nowak}, M.~A., {Pottschmidt}, K., {Pooley}, G.~G., and {Fritz},
1707:   S. (2006).
1708: \newblock {Long term variability of Cygnus X-1. IV. Spectral evolution
1709:   1999-2004}.
1710: \newblock {\em \aap}, 447:245--261.
1711: 
1712: \bibitem[{Wise} and {Houck}, 2004]{2004cosp...35.3997W}
1713: {Wise}, M. and {Houck}, J. (2004).
1714: \newblock {Mapping Heating in Clusters of Galaxies}.
1715: \newblock In {\em 35th COSPAR Scientific Assembly}, volume~35 of {\em COSPAR,
1716: Plenary Meeting}, pages 3997--+.
1717: 
1718: \end{thebibliography}
1719: 
1720: \clearpage
1721: 
1722: %% Use the figure environment and \plotone or \plottwo to include
1723: 
1724: %\begin{figure}
1725: %  \begin{centering}
1726: %  \includegraphics[angle=-90,scale=0.3]{f1.eps}
1727: %  \caption{Ionization fractions for Fe XVII through XXI.}
1728: %  \label{ionfrac}
1729: %  \end{centering}
1730: %\end{figure}
1731: 
1732: %\begin{figure}
1733: %  \begin{centering}
1734: %    \includegraphics[scale=0.50]{f2.eps}
1735: %    \caption{ The \isis\ { \tt main()} program is a thin ANSI C layer above
1736: %	the \slang\ interpreter, used primarily to establish hooks to
1737: %	modules and gather user input.  Taking modularity
1738: %	to this extreme, where carefully orthogonalized components provide
1739: %	the bulk of capability, provides a clean and flexible implementation.
1740: %	Most modules may also be
1741: %	used outside of \isis.}
1742: %  \label{arch}
1743: %  \end{centering}
1744: %\end{figure}
1745: 
1746: %\begin{figure}
1747: %  \begin{centering}
1748: %  \includegraphics[angle=-90,scale=0.30]{f3.eps}
1749: %  \caption{Performance of IDL 6.1 (binary distribution) and
1750: %        \slang\ (statically linked), on $\sqrt{b^2 - 4ac}$
1751: %        for arrays of various sizes.}
1752: %  \label{idl-plot}
1753: %  \end{centering}
1754: %\end{figure}
1755: %\begin{figure}
1756: %  \begin{centering}
1757: %  \includegraphics[scale=0.92]{f4.eps}
1758: %  \caption{Pure \slang\ orbital model, fit
1759: %  by \isis\ directly to in-memory data arrays.
1760: %As described in \cite{TrowbridgeNowakWilms2007}, the model
1761: %represents a lightcurve of constant amplitude {\tt a}, with an eclipse
1762: %centered at {\tt c}, with a width {\tt w2} from the start of ingress
1763: %to the end of egress.  The ingress and egress have a quadratic form
1764: %({\tt m} and {\tt b} parameters), and there is a quadratic
1765: %``bounceback" ({\tt s} parameter) with width {\tt w1}.}
1766: %  \label{orbmodel}
1767: %  \end{centering}
1768: %\end{figure}
1769: 
1770: %\begin{figure}[t]
1771: %  \begin{centering}
1772: %  \includegraphics[angle=-90,scale=0.3]{f5.eps}
1773: %  \caption{Performance of orbital models implemented in Perl 5.8.4
1774: %   and Python 2.4, relative to \slang\ 2.0.7.
1775: %   \tcl\ is not represented here because neither of its numerical 
1776: %   extensions, BLT and NAP, offered a clear equivalent to
1777: %   the {\tt where()} function.}
1778: %  \label{orbmodel-plot}
1779: %  \end{centering}
1780: %\end{figure}
1781: 
1782: %\begin{figure}
1783: %  \begin{centering}
1784: %  \includegraphics[scale=0.35]{f6.eps}
1785: %  \caption{Power Spectrum of X1820-303, generated from the PCA in RXTE
1786: %  observation P10075 (data set 10075-01-01-02).}
1787: %  \label{timing}
1788: %  \end{centering}
1789: %\end{figure}
1790: 
1791: %\begin{figure}
1792: %  \begin{centering}
1793: %  \hspace*{3.5mm}
1794: %  \includegraphics[angle=-90,scale=0.35]{f7a.eps}
1795: %  \includegraphics[angle=-90,scale=0.35]{f7b.eps}
1796: %  \caption{ACIS image from 2004 Chandra observation of NGC7714, with
1797: %     corresponding square and smoothed pixel intensity histograms.}
1798: %  \label{ngc7714}
1799: %  \end{centering}
1800: %\end{figure}
1801: 
1802: %% figures and captions in your electronic submission.
1803: %% To embed the sample graphics in
1804: %% the file, uncomment the \plotone, \plottwo, and
1805: %% \includegraphics commands
1806: %%
1807: %% If you need a layout that cannot be achieved with \plotone or
1808: %% \plottwo, you can invoke the graphicx package directly with the
1809: %% \includegraphics command or use \plotfiddle. For more information,
1810: %% please see the tutorial on "Using Electronic Art with AASTeX" in the
1811: %% documentation section at the AASTeX Web site,
1812: %% http://www.journals.uchicago.edu/AAS/AASTeX.
1813: %%
1814: %% The examples below also include sample markup for submission of
1815: %% supplemental electronic materials. As always, be sure to check
1816: %% the instructions to authors for the journal you are submitting to
1817: %% for specific submissions guidelines as they vary from
1818: %% journal to journal.
1819: 
1820: %% This example uses \plotone to include an EPS file scaled to
1821: %% 80% of its natural size with \epsscale. Its caption
1822: %% has been written to indicate that additional figure parts will be
1823: %% available in the electronic journal.
1824: 
1825: %\begin{figure}
1826: %\epsscale{.80}
1827: %\plotone{f1.eps}
1828: %\caption{Derived spectra for 3C138 \citep[see][]{heiles03}. Plots for all sources are available
1829: %in the electronic edition of {\it The Astrophysical Journal}.\label{fig1}}
1830: %\end{figure}
1831: 
1832: \clearpage
1833: 
1834: %% Here we use \plottwo to present two versions of the same figure,
1835: %% one in black and white for print the other in RGB color
1836: %% for online presentation. Note that the caption indicates
1837: %% that a color version of the figure will be available online.
1838: %%
1839: 
1840: %\begin{figure}
1841: %\plottwo{f2.eps}{f2_color.eps}
1842: %\caption{A panel taken from Figure 2 of \citet{rudnick03}. 
1843: %See the electronic edition of the Journal for a color version 
1844: %of this figure.\label{fig2}}
1845: %\end{figure}
1846: 
1847: %% This figure uses \includegraphics to scale and rotate the still frame
1848: %% for an mpeg animation.
1849: 
1850: %\begin{figure}
1851: %\includegraphics[angle=90,scale=.50]{f3.eps}
1852: %\caption{Animation still frame taken from \citet{kim03}.
1853: %This figure is also available as an mpeg
1854: %animation in the electronic edition of the
1855: %{\it Astrophysical Journal}.}
1856: %\end{figure}
1857: 
1858: %% If you are not including electronic art with your submission, you may
1859: %% mark up your captions using the \figcaption command. See the
1860: %% User Guide for details.
1861: %%
1862: %% No more than seven \figcaption commands are allowed per page,
1863: %% so if you have more than seven captions, insert a \clearpage
1864: %% after every seventh one.
1865: 
1866: %% Tables should be submitted one per page, so put a \clearpage before
1867: %% each one.
1868: 
1869: %% Two options are available to the author for producing tables:  the
1870: %% deluxetable environment provided by the AASTeX package or the LaTeX
1871: %% table environment.  Use of deluxetable is preferred.
1872: %%
1873: 
1874: %% Three table samples follow, two marked up in the deluxetable environment,
1875: %% one marked up as a LaTeX table.
1876: 
1877: %% In this first example, note that the \tabletypesize{}
1878: %% command has been used to reduce the font size of the table.
1879: %% We also use the \rotate command to rotate the table to
1880: %% landscape orientation since it is very wide even at the
1881: %% reduced font size.
1882: %%
1883: %% Note also that the \label command needs to be placed
1884: %% inside the \tablecaption.
1885: 
1886: %% This table also includes a table comment indicating that the full
1887: %% version will be available in machine-readable format in the electronic
1888: %% edition.
1889: 
1890: \clearpage
1891: 
1892: %% If the table is more than one page long, the width of the table can vary
1893: %% from page to page when the default \tablewidth is used, as below.  The
1894: %% individual table widths for each page will be written to the log file; a
1895: %% maximum tablewidth for the table can be computed from these values.
1896: %% The \tablewidth argument can then be reset and the file reprocessed, so
1897: %% that the table is of uniform width throughout. Try getting the widths
1898: %% from the log file and changing the \tablewidth parameter to see how
1899: %% adjusting this value affects table formatting.
1900: 
1901: %% The \dataset{} macro has also been applied to a few of the objects to
1902: %% show how many observations can be tagged in a table.
1903: 
1904: \end{document}
1905: