A Breakthrough in Astronomical Software Development
Raymond Plante
Doug Roberts
% R.\ M.\ Crutcher\altaffilmark{1}
% Leave intact % Place the text of your abstract here The INTEGRAL satellite is an observatory-class gamma-ray telescope due for launch in early 2002. It comprises two main instruments, one optimised for imaging (IBIS) and the other for spectroscopy (SPI). The PICsIT telescope is the high energy (150 keV - 10 MeV) plane of the IBIS imager and consists of 8 individual modules of 512 detection elements. The modules are arranged in a 4 x 2 pattern, while the pixels are in a 16 x 32 array. This layout, which includes a dead area equivalent to one pixel width between each module, together with the event selection procedure, which (in standard mode) does not allow the identification of coincidences between separate modules, leads to a non-uniformity of the background which is significantly different for single-site events and for multiple energy deposits. Other sources of background variations range from the separate low energy detector, situated immediately above the PICsIT plane, to the large mass of the SPI telescope at a short distance to one side. The algorithms for performing all the imaging and spectral deconvolution for PICsIT are currently being produced for delivery to the INTEGRAL Science Data Centre. In order to maximise the information which may be extracted from the PICsIT data, we have designed a prototyping environment which consists of a GUI to a highly structured and modular set of procedures which allows the easy simulation of observations from the data collection phase through to the final image production and analysis.
P2-13.tex
%ADASS_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TEMPLATE.TEX -- ADASS VIII (98) ASP Conference Proceedings template
% Updated by N. Manset for ADASS IX (99) and F. Primini for ADASS 2000.
%
% Use this template to create your proceedings paper in LaTeX format
% by following the instructions given below.  Much of the input will
% be enclosed by braces (i.e., { }).  The percent sign, "%", denotes
% the start of a comment; text after it will be ignored by LaTeX.  
% You might also notice in some of the examples below the use of "\ "
% after a period; this prevents LaTeX from interpreting the period as
% the end of a sentence and putting extra space after it.  
% 
% You should check your paper by processing it with LaTeX.  For
% details about how to run LaTeX as well as how to print out the User
% Guide, consult the README file.  (The User Guide is also available
% on-line via http://hea-www.harvard.edu/ADASS/ in the Proceedings
% section) You should also consult the sample LaTeX papers,
% sample1.tex and sample2.tex, for examples of including figures, html
% links, special symbols, and other advanced features.
%
% If you do not have access to the LaTeX software or a laser printer
% at your site, you can still prepare your paper following the
% instructions in the User Guide.  In such cases, the editors will
% process the file and make any necessary editorial adjustments.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
\documentstyle[11pt,adassconf]{article}  % Leave intact

\begin{document}   % Leave intact

%-----------------------------------------------------------------------
%			    Paper ID Code
%-----------------------------------------------------------------------
% Enter the proper paper identification code.  The ID code for your
% paper is the session number associated with your presentation as
% published in the official ADASS 2000 conference program.  You can
% find this number locating your abstract in the printed program
% that you received at the meeting or on-line via
% http://hea-www.harvard.edu/ADASS/; the ID code is the letter-number
% sequence proceeding the title of your presentation.
%
% This will not appear in your paper; however, it allows different
% papers in the proceedings to cross-reference each other.
%
% EXAMPLE: \paperID{O1-03}
% EXAMPLE: \paperID{P2-56}
%
% Note that you should only have one \paperID, and it should not
% include a trailing period.  

\paperID{P2-13}

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------
% Enter the title of the paper.
%
% EXAMPLE: \title{A Breakthrough in Astronomical Software Development}
% 

\title{PICsIM - the INTEGRAL/IBIS/PICsIT Observation Simulation Tool for Prototype Software Evaluation}

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------
% Enter the authors followed by their affiliations.  The \author and
% \affil commands may appear multiple times as necessary (see example
% below).  List each author by giving the first name or initials first
% followed by the last name.  Authors with the same affiliations
% should grouped together. 
%
% EXAMPLE: \author{Raymond Plante, Doug Roberts, 
%                  R.\ M.\ Crutcher\altaffilmark{1}}
%          \affil{National Center for Supercomputing Applications, 
%                 University of Illinois Urbana-Champaign, Urbana, IL
%                 61801}
%          \author{Tom Troland}
%          \affil{University of Kentucky}
%
%          \altaffiltext{1}{Astronomy Department, UIUC}
%
% In this example, the first three authors, "Plante", "Roberts", and
% "Crutcher" are affiliated with "NCSA".  "Crutcher" has an alternate 
% affiliation with the "Astronomy Department".  The fourth author,
% "Troland", is affiliated with "University of Kentucky"

\author{J.\ B.\ Stephen and L.\ Foschini}
\affil{Istituto TeSRE/CNR, Via P. Gobetti 101, 40129 Bologna, Italy}

%-----------------------------------------------------------------------
%			 Contact Information
%-----------------------------------------------------------------------
% This information will not appear in the paper but will be used by
% the editors in case you need to be contacted concerning your
% submission.  Enter your name as the contact along with your email
% address.
% 
% EXAMPLE:  \contact{Dennis Crabtree}
%           \email{crabtree@cfht.hawaii.edu}
%

\contact{John B. Stephen}
\email{stephen@tesre.bo.cnr.it}

%-----------------------------------------------------------------------
%		      Author Index Specification
%-----------------------------------------------------------------------
% Specify how each author name should appear in the author index.  The 
% \paindex{ } should be used to indicate the primary author, and the
% \aindex for all other co-authors.  You MUST use the following
% syntax: 
%
% SYNTAX:  \aindex{LASTNAME, F. M.}
% 
% where F is the first initial and M is the second initial (if
% used).  This guarantees that authors that appear in multiple papers
% will appear only once in the author index.  
%
% EXAMPLE: \paindex{Crabtree, D.}
%          \aindex{Manset, N.}        
%          \aindex{Veillet, C.}        

\paindex{Stephen, J.B.}
\aindex{Foschini, L.}     % Remove this line if there is only one author

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------
% Enter up to 6 keywords describing your paper.  These will NOT be
% printed as part of your paper; however, they will be used to
% generate the subject index for the proceedings.  There is no
% standard list; however, you can consult the indices for past ADASS
% proceedings (http://iraf.noao.edu/ADASS/adass.html). 
%
% EXAMPLE:  \keywords{visualization, astronomy: radio, parallel
%                     computing, AIPS++, Galactic Center}
%
% In this example, the author noticed that "radio astronomy" appeared
% in the ADASS VII Index as "astronomy" being the major keyword and
% "radio" as the minor keyword.

\keywords{Methods: data analysis, Techniques: image processing, Astronomy: gamma-ray}

%-----------------------------------------------------------------------
%			       Abstract
%-----------------------------------------------------------------------
% Type abstract in the space below.  Consult the User Guide and Latex
% Information file (http://hea-www.harvard.edu/ADASS/ in the
% Proceedings section) for a list of supported macros (e.g. for
% typesetting special symbols). 

\begin{abstract}          % Leave intact
% Place the text of your abstract here 
The INTEGRAL satellite is an observatory-class gamma-ray telescope due for launch in early 2002. It comprises two main instruments, one optimised for imaging (IBIS) and the other for spectroscopy (SPI). The PICsIT telescope is the high energy (150 keV - 10 MeV) plane of the IBIS imager and consists of 8 individual modules of 512 detection elements. The modules are arranged in a 4 x 2 pattern, while the pixels are in a 16 x 32 array. This layout, which includes a dead area equivalent to one pixel width between each module, together with the event selection procedure, which (in standard mode) does not allow the identification of coincidences between separate modules, leads to a non-uniformity of the background which is significantly different for single-site events and for multiple energy deposits. Other sources of  background variations range from the separate low energy detector, situated immediately above the PICsIT plane, to the large mass of the SPI telescope at a short distance to one side. The algorithms for performing all the imaging and spectral deconvolution for PICsIT are currently being produced for delivery to the INTEGRAL Science Data Centre. In order to maximise the information which may be extracted from the PICsIT data, we have designed a prototyping environment which consists of a GUI to a highly structured and modular set of procedures which allows the easy simulation of observations from the data collection phase through to the final image production and analysis.
\end{abstract}

%-----------------------------------------------------------------------
%			      Main Body
%-----------------------------------------------------------------------
% Place the text for the main body of the paper here.  You should use
% the \section command to label the various sections; use of
% \subsection is optional.  Significant words in section titles should
% be capitalized.  Sections and subsections will be numbered
% automatically. 
%
% EXAMPLE:  \section{Introduction}
%           ...
%           \subsection{Our View of the World}
%           ...
%           \section{A New Approach}
%
% It is recommended that you look at the sample papers, sample1.tex
% and sample2.tex, for examples for formatting references, footnotes,
% figures, equations, html links, lists, and other special features.  

\section{Introduction}
The INTEGRAL high energy gamma-ray satellite consists of two primary instruments - a high resolution spectrometer (SPI) and a wide spectral and angular coverage imager (IBIS). IBIS achieves the goal of being able to create images of the gamma-ray sky over the energy range of $\approx$15 keV - 10 MeV with good angular resolution and large field of view by utilising two position sensitive detection planes, one solid state (ISGRI) optimised at lower energies and the other using scintillator technology (PICsIT) for high energy detection, in conjunction with a coded aperture mask. There are many possible sources of disturbance in the imaging process for the PICsIT detector, ranging from the presence of ISGRI between PICsIT and the coded aperture, through the modular form of the detection plane construction to the masses of the other instrumentation nearby.
\section{The PICsIM Environment}
The PICsIM simulation tool is written entirely using the IDL language (IDL 5.3, Research Systems Inc., Boulder, Colorado USA) and runs under both Windows NT and Linux operating systems. The tool itself provides only minimum functionality, mainly in the displaying of the images produced, however it is the interface which allows the developer straightforward and consistent control of the algorithms he is creating. This is performed by using a rigid system of data and algorithm storage which allows the operator to use the tool to identify the set of procedures available for use at any one time (e.g. for deconvolution of the image or definition of the accumulation parameters), and to select the required action. In this way it is also possible to bypass the data simulation step (which is itself a limited Monte-Carlo process which does not take into account all physical processes, and to use the results of a detailed Monte-Carlo simulation which is also being developed at the TeSRE institute (Malaguti et al. 2000) merely by placing the event files so produced into the event file directory and ensuring that a run-ID and associated statistics file is associated with them. Furthermore, although to date the various procedures used to define the imaging process are actually IDL source code, in principle they could also be pre-compiled C or FORTRAN programs called by the main IDL procedure. 

The entire PICsIM simulation, display and evaluation package is controlled through use of IDL widgets. The top level is the main control GUI which then activates one of the other second-level GUI�s on user command. The various commands currently available are detailed below:

\begin{figure}
\epsscale{0.5}
\plotone{P2-13a.eps}
\caption{The GUI to the 'SIMULATE' sub-menu}
\end{figure}

\begin{itemize}

\item{SIMULATE} This command activates the GUI which allows the simulation of an observation.
The simulation widget interface is shown in Figure 1. 
The source definition procedures (user defined) are located in the relevent directory and displayed, as are the instrument characteristic procedures which describe how the hardware is functioning and the observation strategy (e.g. hexagonal pointing, �staring� etc.) Once a valid combination is selected a script file is created and the simulation automatically launched, creating a series of event files, one for each pointing, with a run-id assigned which is unique for every observation.

\item{ACCUMULATE} The event files form the input for this GUI which is shown in Figure 2. 
\begin{figure}
\epsscale{1.0}
\plotone{P2-13b.eps}
\caption{The GUI to the 'ACCUMULATE' sub-menu}
\end{figure}
The user can select the files which he wants to accumulate by run-id (i.e. observation), and further detail may be imposed by selecting also by sub-pointing. The effective time may also be changed and the energy channels of the accumulation may be defined by means of selection of a user written procedure. Details of a particular observation may be obtained (these are held in the associated statistics file)

\item{DECONVOLVE} The deconvolution GUI allows the user to select between various methods of deconvolution (provided as IDL procedures in the appropriate directory) for the accumulated data files.

\item{CLEAN} This GUI screen shows all the options open (again in terms of IDL procedures) to the user for cleaning the resulting image, or filtering the accumulated data files before deconvolution.

\item{DISPLAY} This GUI provides a workspace within which the operator can display and perform limited analysis on any accumulated shadowgram, deconvolved and/or cleaned image or sum of images. Figure 3 shows how the operator can display the original detector image, the corrected shadowgram and the cleaned sky image of a point source.
\begin{figure}
\epsscale{1.0}
\plotone{P2-13c.eps}
\caption{The GUI to the 'DISPLAY' sub-menu}
\end{figure}
\end{itemize}

\section{Conclusions}
The PICsIM simulation environment is a useful tool within which the algorithms are being developed for use in the final data analysis data package at the ISDC. Its highly modular form and easy widget-driven interface allows a rapid evaluation and comparison of new procedures to be made.
%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------
% List your references below within the reference environment
% (i.e. between the \begin{references} and \end{references} tags).
% Each new reference should begin with a \reference command which sets
% up the proper indentation.  Observe the following order when listing
% bibliographical information for each reference:  author name(s),
% publication year, journal name, volume, and page number for
% articles.  Note that many journal names are available as macros; see
% the User Guide
% (http://hea-www.harvard.edu/ADASS/ in the Proceedings section)
% listing "macro-ized" journals.   
%
% EXAMPLE:  \reference Hagiwara, K., \& Zeppenfeld, D.\  1986, 
%                Nucl.Phys., 274, 1
%           \reference H\'enon, M.\  1961, Ann.d'Ap., 24, 369
%           \reference King, I.\ R.\  1966, \aj, 71, 276
%           \reference King, I.\ R.\  1975, in Dynamics of Stellar 
%                Systems, ed.\ A.\ Hayli (Dordrecht: Reidel), 99
%           \reference Tody, D.\  1998, \adassvii, 146
%           \reference Zacharias, N.\ \& Zacharias, M.\ 2000,
%                \adassix, \paperref{P7.6}
% 
% Note the following tricks used in the example above:
%
%   o  \& is used to format an ampersand symbol (&).
%   o  \'e puts an accent agu over the letter e.  See the User Guide
%      and the sample files for details on formatting special
%      characters.  
%   o  "\ " after a period prevents LaTeX from interpreting the period 
%      as an end of a sentence.
%   o  \aj is a macro that expands to "Astron. J."  See the User Guide
%      for a full list of journal macros
%   o  \adassvii is a macro that expands to the full title, editor,
%      and publishing information for the ADASS VII conference
%      proceedings.  Such macros are defined for ADASS conferences I
%      through X.
%   o  When referencing a paper in the current volume, use the
%      \adassix and \paperref macros.  The argument to \paperref is
%      the paper ID code for the paper you are referencing.  See the 
%      note in the "Paper ID Code" section above for details on how to 
%      determine the paper ID code for the paper you reference.  
%
\begin{references}
\reference Malaguti, G., Ciocca, C. and Di Cocco, G.  To be published in Proceedings of the 4th INTEGRAL workshop, Alicante, Spain, September 2000.
\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact