IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 421


Ignore:
Timestamp:
Apr 12, 2004, 6:05:15 PM (22 years ago)
Author:
Paul Price
Message:

Cosmetic changes, plus some hacking of the Pixel Server
section to simplify the description. More to be done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/design/design.tex

    r410 r421  
    1 %%% $Id: design.tex,v 1.2 2004-04-09 02:27:09 eugene Exp $
     1%%% $Id: design.tex,v 1.3 2004-04-13 04:05:15 price Exp $
    22%\documentclass[panstarrs,psreport]{panstarrs}
    33\documentclass[panstarrs]{panstarrs}
    44
    55% basic document variables
    6 \title{Pan-STARRS Image Processing Pipeline Supplementary Design Requirements}
    7 \shorttitle{IPP SSDD}
     6\title{Pan-STARRS Image Processing Pipeline}
     7\subtitle{Supplementary Design Requirements Specification}
     8\shorttitle{IPP SDRS}
    89\author{Eugene Magnier, Paul Price, Josh Hoblitt}
    9 \group{Pan-STARRS Algorithm Group}
    10 \project{Pan-STARRS Image Processing Pipeline}
     10\group{\PS{} Algorithm Group}
     11\project{\PS{} Image Processing Pipeline}
    1112\organization{Institute for Astronomy}
    1213\version{DR}
     
    3940
    4041This document establishes the design, performance, development, and
    41 verification requirements for the Pan-STARRS Image Processing Pipeline
    42 (IPP) for both the full four-telescope Pan-STARRS deployment (PS-4)
     42verification requirements for the \PS{} Image Processing Pipeline
     43(IPP) for both the full four-telescope \PS{} deployment (PS-4)
    4344and the initial single-telescope demonstration deployment (PS-1).
    4445
     
    4950\subsection{Document Overview}
    5051
    51 Open Issues and TBDs in this document are marked in bold with
    52 surrounding square brackets.
     52Open Issues and TBDs in this document are marked in bold red type,
     53with surrounding square brackets, \tbd{like this}.
    5354
    5455\section{Referenced Documents}
     
    5960\hline
    6061\multicolumn{2}{l}{\bf Internal Documents} \\
    61 xxx-xxx-xxx  &   Pan-STARRS Telescope Scheduler specification document \\
     62xxx-xxx-xxx  &   \PS{} Telescope Scheduler specification document \\
    6263xxx-xxx-xxx  &   Telescope Control System specification document \\
    6364xxx-xxx-xxx  &   Summit Pixel Server specification document \\
     
    6667xxx-xxx-xxx  &   Camera Readout specification document \\
    6768xxx-xxx-xxx  &   PS-1 Design Reference Mission \\
    68 xxx-xxx-xxx  &   Pan-STARRS C Code Conventions \\
     69xxx-xxx-xxx  &   \PS{} C Code Conventions \\
    6970\hline
    7071\multicolumn{2}{l}{\bf External Documents} \\
     
    7778\section{System Design Decisions}
    7879
    79 Pan-STARRS is a survey telescope system being developed by the
     80\PS{} is a survey telescope system being developed by the
    8081University of Hawaii Institute for Astronomy (IfA), the Maui High
    8182Performance Computing Center (MHPCC), Science Applications
    82 International Corporation (SAIC), and \note{Massachusetts Institute of
    83 Technology (MIT) Lincoln Laboratory}.  The baseline system will
    84 consist of 4 1.8m telescopes, each with a 1 gigapixel camera capable
    85 of sustained image rates of 2 per minute.  An single initial test
     83International Corporation (SAIC), and Massachusetts Institute of
     84Technology (MIT) Lincoln Laboratory.  The baseline system will consist
     85of four 1.8m telescopes, each with a 1 gigapixel camera capable of
     86sustained image rates of 2 per minute.  An single initial test
    8687telescope (PS-1) will be constructed on Haleakala and will see first
    8788light at the beginning of 2006.  The full four-telescope system (PS-4)
    8889will follow PS-1 by roughly 2 years.
    8990
    90 Since Pan-STARRS is a survey project, all data from the telescopes
    91 will be uniformly analysed by the Pan-STARRS Image Processing Pipeline
     91Since \PS{} is a survey project, all data from the telescopes
     92will be uniformly analysed by the \PS{} Image Processing Pipeline
    9293(IPP) and the appropriate resulting data products made available to
    9394internal and external science analysis systems as they become
     
    9596will consist of detrending and object detection for the individual
    9697images, combination of multiple overlapping images and further object
    97 detection, subtraction of a reference (static-sky) image and detectiono
    98 f residual objects, update of the static sky images, and detailed
     98detection, subtraction of a reference (static-sky) image and detection
     99of residual objects, update of the static sky images, and detailed
    99100object analysis of the static sky images.  In addition, the IPP will
    100101produce improved astrometric and photometric reference catalogs on an
     
    104105object photometry, and reference astrometry and photometry.
    105106
    106 The IPP interacts closely with other Pan-STARRS systems responsible
    107 for other aspects of the Pan-STARRS operation, including the summit
    108 systems (OATS), the science object database, the Moving/Transient
    109 Object Pipeline, and potentially other client science pipelines.
    110 
    111 The Pan-STARRS Image Processing Pipeline (IPP) consists of a
     107The IPP interacts closely with other \PS{} systems responsible
     108for other aspects of the \PS{} operation, including the summit
     109systems (OATS), the science object database, the Moving Object
     110Processing System (MOPS), and potentially other client science
     111pipelines.
     112
     113The \PS{} Image Processing Pipeline (IPP) consists of a
    112114collection of computer hardware and software organized to perform the
    113 tasks required to process images from the Pan-STARRS telescopes.  The
     115tasks required to process images from the \PS{} telescopes.  The
    114116primary goal of the IPP is to process the science images from the
    115 Pan-STARRS telescopes and make the results available to other systems
    116 within Pan-STARRS.  To achieve this goal, the IPP must also perform
     117\PS{} telescopes and make the results available to other systems
     118within \PS{}.  To achieve this goal, the IPP must also perform
    117119other analysis functions to generate the calibrations needed in the
    118120science image processing and to occasionally use the derived data to
     
    120122
    121123In order to meet these broad goals, the IPP must have the following
    122 capabilities.  First, the IPP must have the ability to store a large
    123 amount of image data, and other derived data products (metadata \&
    124 extracted objects), to provice access mechanisms to these data
    125 products (both to the subsystems of the IPP and in some cases to
    126 external users), and to continuously accept new image data and
    127 metadata from the telescope system, 2) to execute various analysis
    128 processes using these data products, 3) to provide the decision-making
    129 logic needed to guide the data processing, and to automatically launch
    130 the data processing tasks on an appropriate timescale.  The IPP
    131 therefore includes subsystems which provide the data storage
     124capabilities:
     125\begin{itemize}
     126\item Store a large amount of image data, and other derived data
     127products (metadata and extracted objects);
     128\item Provide access mechanisms to these data products (both to the
     129subsystems of the IPP and in some cases to external users);
     130\item Continuously accept new image data and
     131metadata from the telescope system;
     132\item Execute various analysis processes using these data products;
     133and
     134\item Provide the decision-making logic needed to guide the data
     135processing, and to automatically launch the data processing tasks on
     136an appropriate timescale.
     137\end{itemize}
     138The IPP therefore includes subsystems which provide the data storage
    132139framework, the data analysis framework, and the scheduling of the
    133140analysis processes.  The data storage subsystems also provide
    134 interface mechanisms to the external Pan-STARRS systems.
     141interface mechanisms to the external \PS{} systems.
    135142
    136143The IPP architecture can be viewed in several possible ways.  We first
     
    147154\subsubsection{Architectural Components}
    148155
    149 The IPP is organised into several different software elements, listed
     156The IPP is organised into several different architectural components,
    150157as follows:
    151158
    152159\begin{enumerate}
    153 \item Pixel Server
    154 \item Object Database
    155 \item Metadata Database
    156 \item Analysis Pipelines
    157 \item Controller
    158 \item Scheduler
     160\item IPP Pixel Server (IPS) --- a respository for all image pixel
     161data, including the raw images from the telescope, the master
     162calibration images, the reference static-sky images, and any temporary
     163image data products produced by the IPP.
     164\item IPP Object Database (IOD) --- a facility to store all of the
     165information about astronomical objects, including individual
     166measurements of objects on the images, the summary information about
     167those objects, and reference object data\footnote{Note that this is
     168(possibly) a separate entity from the object database being developed
     169by SAIC.}.
     170\item IPP Metadata Database (IMD) --- a storage element for all data
     171which is neither image pixel data or astronomical object data.
     172\item Analysis Pipelines --- all of the top-level analysis processes
     173which are performed on images or collections of object data.
     174\item Controller --- a system which manages the process of executing
     175in parallel analysis pipelines on specific datasets on the cluster of
     176computers.
     177\item Scheduler --- a system which evaluates the current state of data
     178in the various repositories and makes decisions about which analysis
     179processes should be executed at any given time.
    159180\end{enumerate}
    160181
    161182The relationship between these software elements is shown in
    162183Figure~\ref{overview}.  This figure also shows the interactions
    163 between the IPP and other Pan-STARRS systems.  The Pixel Server is a
    164 respository for all image pixel data, including the raw images from
    165 the telescope, the master calibration images, the reference static-sky
    166 images, and any temporary image data products produced by the IPP.
    167 The Object Database is a facility to store all of the information
    168 about astronomical objects, including individual measurements of
    169 objects on the images, the summary information about those objects,
    170 and reference object data.  The Metadata Database is a storage element
    171 for all data which is neither image pixel data or astronomical object
    172 data.  The analysis pipelines are all of the top-level analysis
    173 processes which are performed on images or collections of object data.
    174 The Controller is a system which manages the process of executing in
    175 parallel analysis pipelines on specific datasets on the cluster of
    176 computers.  The Scheduler is a system which evaluates the current
    177 state of data in the various repositories and makes decisions about
    178 which analysis processes should be executed at any given time. 
     184between the IPP and other \PS{} systems.
     185
     186The IPP team will develop and have responsibility for these systems.
    179187
    180188\begin{figure}
    181189\begin{center}
    182 \resizebox{8cm}{!}{\includegraphics{pics/overview.ps}}
     190\resizebox{8cm}{!}{\includegraphics{pics/overview}}
    183191\caption{ \label{overview} IPP System Overview}
    184192\end{center}
     
    194202OTA in one image does not depend on the results from another OTA.  We
    195203define the analysis pipelines to be the largest complete analysis task
    196 which may be performed on a single data item.  {\bf drop the word
    197 'pipeline' and use something else?}.  The data analysis pipelines are
    198 divided into three categories, and further subdivided as follows:
     204which may be performed on a single data item.  The data analysis
     205pipelines are divided into three categories, and further subdivided as
     206follows:
    199207
    200208\begin{enumerate}
     
    223231controller.  The thick lines represent the flow of pixel data, the
    224232thin lines represent the flow of metadata and object data, and the
    225 grey lines represent the flow of commands.  {\bf All subsystem
    226 interactions, except that between the scheduler and controller, are in
    227 the form of updates to and queries from the databases}.  The hatched
    228 systems represent external PanSTARRS systems (OATS, the Sky Server,
    229 the SAIC Object Database, the Moving/Transient Object Pipeline, and
    230 other Client Science Pipelines.
     233grey lines represent the flow of commands.  The hatched systems
     234represent external \PS{} systems (OATS, the Sky Server, the SAIC
     235Object Database, the Moving Object Processing System, and other Client
     236Science Pipelines).
    231237
    232238\begin{figure}
    233239\begin{center}
    234 \resizebox{8cm}{!}{\includegraphics{pics/pipelines.ps}}
     240\resizebox{8cm}{!}{\includegraphics{pics/pipelines}}
    235241\caption{ \label{pipelines} IPP System Overview}
    236242\end{center}
     
    246252databases.  This last aspect is largely theoretical until we have
    247253defined the details of these databases; it may be more appropriate
    248 depending on the eventual solutions to distribution these database
     254depending on the eventual solutions to distribute these database
    249255elements across the OTA and Static Sky subclusters.
    250256
    251257\begin{figure}
    252258\begin{center}
    253 \resizebox{8cm}{!}{\includegraphics{pics/hardware.ps}}
     259\resizebox{8cm}{!}{\includegraphics{pics/hardware}}
    254260\caption{ \label{hardware} IPP Hardware Organization}
    255261\end{center}
     
    258264\subsection{Software Hierarchy}
    259265
    260 \subsubsection{External Data Libraries}
    261 
    262 \subsubsection{Pan-STARRS Data Library}
    263 
    264266In order to facilitate testing and development, and to encourage
    265267flexibility, the IPP will be built in a layered fashion.  The lowest
    266268level functions will be written in C and collected together into a
    267 Pan-STARRS library.  These library functions can be used to write more
     269\PS{} library.  These library functions will be used to write more
    268270complex modules.  The modules will be written in C but will make use
    269271of the SWIG tool to make their functionality available within other
    270272frameworks.  In particular, the modules can be tied together with a
    271 simple framework ('the engine') or with detailed flow-control through
    272 the use of a high-level language such as Perl, Python, or TCL.  For
     273simple framework (an `engine') or with detailed flow-control through
     274the use of a high-level language such as Perl, Python, or Tcl.  For
    273275the high-level functions in the operational system, the IPP will make
    274276use of \tbd{Python} as the scripting language to tie the modules
    275 together.  Note that a subset of the library functions will be
    276 provided with SWIG interfaces as well to allow for their use the in
    277 creation of the top-level functions.
    278 
    279 The Pan-STARRS Data Library consists of C structures describing the
    280 basic data types needed by the IPP and C functions which perform the
    281 basic data manipulation operations.  The library is organized into NN
    282 topics.
     277together.
     278
     279This approach satisfies the requirement that complicated low-level
     280analysis steps run fast, while preserving flexibility for coding the
     281high-level wrappers for which the speed requirements are not so
     282stringent.
     283
     284\subsubsection{External Libraries}
     285
     286\PS{} will employ several external libraries to save duplicating
     287functionality that is already available.  These external libraries
     288will be wrapped by the \PS{} Library, insulating the project from the
     289implementation details of the external libraries.  Examples of the
     290external libraries are FFTW and SLALib.
     291
     292\subsubsection{\PS{} Library}
     293
     294The \PS{} Library will consist of C structures describing the basic
     295data types needed by the IPP and C functions which perform the basic
     296data manipulation operations.  Note that a subset of the library
     297functions will be provided with SWIG interfaces as well to allow for
     298their use in the creation of the processing stages.  Examples of the
     299\PS{} Library are fourier transforms and transforming between pixel
     300and celestial coordinates.
    283301
    284302\subsubsection{Modules}
     
    286304The IPP analysis tasks are broken down into modules which represent
    287305specific functional operations.  The modules will be written in C
    288 using the Pan-STARRS Data Library functions and will be grouped into a
    289 Pan-STARRS Module Library.  The modules will be provided with SWIG
    290 interfaces to all for their use in top-level functions.
     306using the \PS{} Library functions and will be grouped into a \PS{}
     307Module Library.  The modules will be provided with SWIG interfaces to
     308all public APIs for their use in processing stages.  Examples of modules
     309are overscan subtraction and image combination.
    291310
    292311\subsubsection{Stages}
    293312
    294 The major IPP tasks are organized into stages.  Each stage represents
    295 a collection of complex operations performed on a single data entity.
    296 Each stage therefore represents the maximum amount of effort which can
    297 be performed in serial without interaction between parallel threads. 
     313The major IPP tasks are organized into stages, which consist of
     314multiple modules.  Each stage represents a collection of complex
     315operations performed on a single data entity.  Each stage therefore
     316represents the maximum amount of effort which can be performed in
     317serial without interaction between parallel threads.  The stages will
     318be written in \tbd{Python}, linking the modules together.  Examples of
     319stages are Phase 2 (detrend images) and Phase 4 (combine images from
     320multiple telescopes and search for transients).
     321
     322\subsubsection{Controllers}
     323
     324The stages are parallelized by a controller, which initiates the
     325stages on separate machines and monitors their progress.  An example
     326of the controller functionality is ``Run the phase 2 processing on
     327exposure number 1234''.
     328
     329\subsubsection{Scheduler}
     330
     331The scheduler is responsible for interacting with \PS{} systems
     332external to the IPP, and for initiating the reduction appropriate for
     333images as they are received.  An example of the scheduler
     334functionality is ``I've just received exposure number 1234; run phase
     3351--4 controllers on these''.
    298336
    299337%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    316354they are needed, up to the lifetime of the project.  In order to
    317355achieve the I/O requirements, the IPS may maintain the pixel data
    318 distributed across the processor nodes in an organized fashion, ie
     356distributed across the processor nodes in an organized fashion, i.e.\
    319357associating specific machines with specific OTAs.  The IPS interacts
    320 with the IPP Internal Database to allow other systems or subsystems to
     358with the IPP Metadata Database to allow other systems or subsystems to
    321359identify the available images meeting specified criteria.  IPS
    322 specifications are described in the IPS subsystem specification. 
    323 
    324 In addition the IPS is responsible for acquiring new image data and
    325 meta-data from the Summit Pixel Server and making it available for
    326 processing by the IPP System. 
     360specifications are described in the IPS subsystem specification.
     361
     362In addition to storing the pixel data, the IPS is responsible for
     363acquiring new image data and metadata from the Summit Pixel Server and
     364making it available for processing by the IPP System.
    327365
    328366\paragraph{Pixel Server Components}
    329367
    330 The Pixel Server consists of the following components:
     368The IPP Pixel Server consists of the following components:
    331369
    332370\begin{enumerate}
     
    343381The IPP Pixel Data Scheduler coordinates the movement of image data
    344382onto {\em local} storage for processing by the IPP System and executes
    345 batch image data management tasks.
    346 
    347 The IPP Pixel Data Scheduler has four basic modes of operation.
     383batch image data management tasks.  By ``local storage'' is meant
     384storage accessible from a particular local machine (i.e.\ either on a
     385disk physically connected to the machine, or a disk mounted over the
     386network).
     387
     388The IPP Pixel Data Scheduler has four basic modes of operation:
    348389
    349390\begin{itemize}
    350 \item The Summit Pixel Server sends a new data available message to the
    351 IPP-PDS.  The IPP-PDS generates a {\em retrieve data} task which is passed
    352 through 0 or more registered filters.  The task is then sent to the IPP Controller.
    353 \item The IPP-PDS receives a clean stale data message.  \tbd{The source of
    354 which is TBD}.  A list of {\em delete data} tasks are generated
    355 which is passed to the IPP Pixel Data Locality Optimizer for assignment
    356 to specific the data storage locations.  The list of tasks is then sent
    357 to the IPP Controller.
    358 \item The IPP-PDS receives a data replication message.  \tbd{The source of
    359 which is TDB}.  A list of {\em retrieve data} tasks are generated to
    360 copy the data.  The list of tasks is then sent to the IPP Controller.
    361 \item The IPP-PDS receives a move data message. \tbd{The source of
    362 which is TDB}.  A list of {\em retrieve data} tasks are generated to copy the
    363 data to it's new destination.  The list of tasks is then sent to the IPP
    364 Controller.l  Upon receiving task completed notification from the IPP
    365 Controller a list of {\em delete data} tasks are generated to remove the data
    366 from it's original storage location.  This list of tasks is then sent to the
    367 IPP Controller.
     391\item Copy external data: The IPP-PDS generates {\em retrieve data}
     392  tasks which are executed on nodes specified by the IPP-DLO.  This
     393  mode will be used frequently to copy data from the Summit Pixel
     394  Server to the IPP nodes for processing.
     395\item Delete data: The IPP-PDS looks up the location of the data in
     396  the IPP Pixel Data Database and generates {\em delete data} tasks
     397  which are executed on the appropriate nodes.  This mode will be used
     398  on a regular basis to clean old data that is no longer required.
     399\item Replicate data: The IPP-PDS generates {\em retrieve data} tasks
     400  which are executed on nodes specified either by the ``replicate
     401  data'' command, or by the IPP-DLO.  This mode differs from the
     402  ``copy external data'' mode in that it copies data already within
     403  the IPP-PDS.  This mode will be used to backup and rearrange data.
     404\item Move data: the IPP-PDS executes a replication followed by a
     405  deletion.  This mode will be used to reorganise the storage.
    368406\end{itemize}
    369407
     408It is not intended that the IPP-PDS will be used by the nodes in the
     409course of processing --- it is only for bulk data management.  ``Copy
     410external data'' mode will be used frequently to retrieve data from the
     411Summit Pixel Server.  ``Delete data'' mode will be used on a regular
     412basis to flush the system of stale files.  It is expected that the
     413other modes will be used only occassionally, and initiated by a human
     414operator.
     415
     416
    370417\subparagraph{IPP Pixel Data Locality Optimizer (IPP-PDLO)}
    371418
    372 The IPP Pixel Data Locality Optimizer is a data task filter that registers with
    373 the IPP Pixel Data Scheduler.  Data tasks generated by the IPP Pixel Data
    374 Scheduler are passed through the IPP Pixel Data Locality Optimizer which may
    375 assign tasks to specific nodes.  This component is a merely a plug-in and maybe
    376 bypassed depending on the operating mode of the IPP Pixel Data Scheduler.
     419The IPP Pixel Data Locality Optimizer is a data task filter.  Data
     420tasks generated by the IPP Pixel Data Scheduler are passed through the
     421IPP Pixel Data Locality Optimizer which may assign tasks to specific
     422nodes.  This component is a merely a plug-in and may be bypassed
     423depending upon the operating mode of the IPP Pixel Data Scheduler.
    377424
    378425\subparagraph{IPP Pixel Data Database (IPP-PDD)}
    379426
    380 The IPP Pixel Data Database contains image data locations and the associated
    381 meta-data. 
     427The IPP Pixel Data Database contains image data locations \tbd{and the
     428associated metadata}.
    382429
    383430The IPP-PDD will contain at least:
    384431
    385432\begin{itemize}
    386 \item The location of image data and it's associated meta-data that is
     433\item The location of image data and its associated metadata that is
    387434available for retrieval from the Summit Pixel Server.
    388 \item The location of image data and it's associated meta-data that is available
    389 for processing within the IPP System.
    390 \item The location of calibration data and it's associated meta-data for
     435\item The location of image data and its associated metadata that is
     436yet to be processed by the IPP System.
     437\item The location of calibration data and its associated metadata for
    391438processing within the IPP System.
    392 \item The location of reduced image data and it's associated meta-data as
     439\item The location of reduced image data and its associated metadata as
    393440generated by the IPP System.
    394 \item The location of difference image data and it's associated meta-data as
     441\item The location of difference image data and its associated metadata as
    395442generated by the IPP System.
    396 \item The location of stacked image data and it's associated meta-data as
     443\item The location of stacked image data and its associated metadata as
    397444generated by the IPP System.
    398445\item A history of data management commands and actions.
     
    401448\subparagraph{IPP Pixel Data Retrieval Agent (IPP-PDRA)}
    402449
    403 The IPP Pixel Data Retrieval Agent acquires image data from a specified location,
    404 possibly the Summit Pixel Server(s), and stores it at a specified location.
    405 The IPP-PDRA attempts to be independent of the underlying storage medium by
    406 using the IPP Pixel Data I/O Library.
    407 
    408 \subparagraph{IPP Pixel Data Query Library (IPP-PDQL)}
    409 
    410 The IPP Pixel Data Query Library provides an interface to the IPP Pixel Data
    411 Database while hiding the implementation details (ie. the SQL queries).
    412 
    413 It will be able to:
    414 
     450The IPP Pixel Data Retrieval Agent acquires image data from a
     451specified location, possibly the Summit Pixel Server(s), and stores it
     452at a specified location.  The IPP-PDRA is independent of the
     453underlying storage medium by using the IPP Pixel Data I/O Library.
     454
     455
     456\subparagraph{IPP Pixel Data I/O Library (IPP-PDIOL)}
     457
     458The PDIOL is the workhorse of the Pixel Server system.  It is a
     459library for retrieving files from and storing files to Uniform
     460Resource Identifiers (URIs), which can be used on the nodes to access
     461the pixel data.  It will be able to:
    415462\begin{itemize}
    416 \item Locate new and reduced data for a sky cell.
    417 \item Locale the latest calibration data for sky cell.
    418 \item Add the storage location and meta-data of new data.
    419 \item Update the storage location and/or meta-data of any data.
    420 \item Remove the storage location of data and meta-data that has been deleted.
     463\item Locate new and reduced data for an exposure.
     464\item Locate the appropriate calibration data for an exposure.
     465\item Add the storage location and metadata of new data.
     466\item Update the storage location and/or metadata of any data.
     467\item Remove the storage location of data and metadata that has been
     468deleted.
    421469\end{itemize}
    422470
    423 \subparagraph{IPP Pixel Data I/O Library (IPP-PDIOL)}
    424 
    425 A library for retrieving files from and storing files to URIs.
     471
    426472
    427473\paragraph{Pixel Data Flow}
     
    430476
    431477\begin{enumerate}
    432 \item The Summit Pixel Server sends a new data notification to the
     478\item The Summit Pixel Server sends a ``new data notification'' to the
    433479IPP Pixel Data Data Scheduler.
    434 \item The IPP Pixel Data Data Scheduler generates a {\em retrieve data} task
    435 which is passed to the IPP Pixel Data Locality Optimizer.
    436 \item The IPP Pixel Data Locality Optimizer possibly assigns the task
    437 to a specific node or group of nodes and passes it on to the IPP Controller.
    438 \item The IPP Controller passes the task to a \tbd{IPP Node Agent}.
    439 \item The \tbd{IPP Node Agent} spawns a IPP Pixel Data Retrieval Agent
    440 and passes it the task.
    441 \item The IPP Pixel Data Retrieval Agent downloads the image data from the
    442 Summit Pixel Server.
    443 \item The IPP Pixel Data Retrieval Agent reports successful task completion
    444 to the \tbd{IPP Node Agent}.
    445 \item The \tbd{IPP Node Agent} reports the finished task to the IPP Controller.
    446 \item The IPP Controller reports the finished task to the IPP Pixel Data Scheduler.
     480\item The IPP Pixel Data Data Scheduler generates a {\em retrieve
     481data} task which is filtered through the IPP Pixel Data Locality
     482Optimizer, which possibly assigns the task to a specific node or group
     483of nodes.
     484\item The IPP Pixel Data Scheduler farms out the various copy tasks to
     485the nodes, which spawn IPP Pixel Data Retrieval Agents.
     486\item The IPP Pixel Data Retrieval Agents downloads the image data
     487from the Summit Pixel Server to the disk physically mounted on the
     488node.
     489\item The node reports the finished task to the IPP Pixel Data Scheduler.
    447490\item The IPP Pixel Data Scheduler updates the IPP Pixel Data Database to
    448491the new storage location.
     
    517560additional analysis.  The Metadata Database may potentially be used in
    518561close coupling with the analysis pipelines to store temporary data
    519 either within stages of the analysis or between pipeline stages.  In
    520 this scenario, the analysis pipeline will interact directly with the
    521 database.  However, database latency may make this scenario
    522 impractical, in which case the database may be used for long-term
    523 storage only.  In this scenario, the data produced by analysis
    524 pipelines which is destined for the Metadata Database may be collected
    525 and inserted by a separate, dedicated process or analysis pipeline
    526 collection of processes.
     562either within or between stages of the analysis.  In this scenario,
     563the analysis pipeline will interact directly with the database.
     564However, database latency may make this scenario impractical, in which
     565case the database may be used for long-term storage only.  In this
     566scenario, the data produced by analysis pipelines which is destined
     567for the Metadata Database may be collected and inserted by a separate,
     568dedicated process or analysis pipeline collection of processes.
    527569
    528570\paragraph{Metadata Tables}
    529571
    530 Table NN lists the Metadata tables identified for the Metadata
     572Table \tbd{NN} lists the Metadata tables identified for the Metadata
    531573Database.
    532574
     
    562604\paragraph{Metadata Table Contents}
    563605
    564 Tables NN -- NN list the basic contents of each of the Metadata tables
     606Tables \tbd{NN} -- \tbd{NN} list the basic contents of each of the Metadata tables
    565607listed above.
    566608
     
    938980\subsubsection{Controller}
    939981
    940 The IPP Controller is responsible for executing the connecting the
    941 low-level functions together to define the various processing
    942 subsystems.  The Controller manages the parallel processing of these
    943 subsystems in the IPP computer hardware environment and reports the
    944 processing status to the IID.  The Controller must be able to manage
    945 more than a single processing thread to make maximum use of available
    946 processor resources.  Some analysis jobs, such as operations on the
    947 OTAs, must be allocated preferentially to specified processors, while
    948 others must be distributed to the available machines in the cluster.
     982The IPP Controller is responsible for connecting the low-level modules
     983together to define the various processing subsystems.  The Controller
     984manages the parallel processing of these subsystems in the IPP
     985computer hardware environment and reports the processing status to the
     986IMD.  The Controller must be able to manage more than a single
     987processing thread to make maximum use of available processor
     988resources.  Some analysis jobs, such as operations on the OTAs, must
     989be allocated preferentially to specified processors, while others must
     990be distributed to the available machines in the cluster.
    949991
    950992\paragraph{Components}
    951993
    952 The Controller consists of N components: the Controller daemon, the
    953 remote clients, and the user clients. 
     994The Controller consists of the following components: the Controller
     995daemon, the remote clients, and the user clients.
    954996
    955997The Controller daemon maintains a table of processing nodes available
     
    9781020The commands include:
    9791021
    980 {\bf \em report status} return the state of the client (idle, busy,
    981 done), the state of the current job (none, busy, crash, done), and the
    982 exit status of the current job (none, 0-256).  The three states of the
    983 client indicate that the client has no current job (idle), that it has
    984 a job which is still running (busy), and that it has a job which has
    985 completed.  The job states indicate the there is no current job
    986 (none), that the current job is running (busy), that the current job
    987 has crashed (crash), and that the current job has exited gracefully
    988 (done).  The exit state is the exit state reported by the job (0-256
    989 with 0 indicating a successful completion) or is an indication that
    990 there is no current job (none).
    991 
    992 {\bf \em report stdout} Send and flush the current stdout buffer.  The
     1022{\bf \em report status}: Return the state of the client (idle, busy,
     1023done), the state of the current job\footnote{Note that a job is
     1024considered ``current'' until it is cleared with {\em clear job} ---
     1025even if it has crashed or completed.} (`none', `busy', `crash',
     1026`done'), and the exit status of the current job (`none', 0--256).  The
     1027three states of the client indicate that the client has no current job
     1028(`idle'), that it has a job which is still running (`busy'), and that
     1029it has a job which has completed.  The job states indicate the there
     1030is no current job (`none'), that the current job is running (`busy'),
     1031that the current job has crashed (`crash'), and that the current job
     1032has exited gracefully (`done').  The exit state is the exit state
     1033reported by the job (0--256 with 0 indicating a successful completion)
     1034or is an indication that there is no current job (`none').
     1035
     1036{\bf \em report stdout}: Send and flush the current stdout buffer.  The
    9931037remote client will return the complete contents of the stdout buffer
    9941038via a buffered write and flush the buffer when it is finished.  The
     
    9971041daemon must accept all of the buffer output.
    9981042
    999 {\bf \em report stderr} Identical to 'report stdout' for stderr. 
    1000 
    1001 {\bf \em kill job} remote client should send a kill signal to the
     1043{\bf \em report stderr}: Identical to `report stdout' for stderr. 
     1044
     1045{\bf \em kill job}: remote client should send a kill signal to the
    10021046current job.  When the job has exited, the remote client should set
    1003 the job status to crash and the client status to done.
    1004 
    1005 {\bf \em clear job} The remote client should set the current job state
    1006 to 'none' and the client state to 'idle'.  If a job is currently
     1047the job status to `crash' and the client status to `done'.
     1048
     1049{\bf \em clear job}: The remote client should set the current job state
     1050to `none' and the client state to `idle'.  If a job is currently
    10071051running, it should be killed before the job is cleared.
    10081052
    1009 {\bf \em start job [command]} execute the given command.  The command
     1053{\bf \em start job [command]}: execute the given command.  The command
    10101054should be a standard unix command without command line redirection or
    10111055backgrounding.
     
    10411085and for initiating the various processing systems, executed by the IPP
    10421086Controller, based on the state of the survey as reflected by the IPP
    1043 Internal Database (IID).  The Scheduler must send calibration data
     1087Metadata Database (IMD).  The Scheduler must send calibration data
    10441088requests to the PTS, including required flat-field images, flat-field
    10451089correction observations, or other specialized observations needed to
     
    10481092timely manner given the capabilities of the science pipelines.
    10491093
    1050 The scheduler is a subsystem which defines the tasks that the pipeline
    1051 needs to perform at any given time.  The scheduler takes input
    1052 information which describes the collection of all tasks which may need
    1053 to be performed, along with information about their requirements in
    1054 terms of specific data (images / entries in database tables).  The
    1055 scheduler decides which tasks to perform at any moment based on the
    1056 current state of the pixel and metadata databases, by confronting the
    1057 task descriptions and task requirements with the existence of data in
    1058 the databases.
    1059 
    10601094\tbd{how are the schedules defined? how are dependencies between jobs
    1061   defined? scheduler must communicate with the controller (as a user
    1062   client) to send new jobs}.
     1095defined? scheduler must communicate with the controller (as a user
     1096client) to send new jobs}.
    10631097
    10641098%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    10721106The IPP science image pipelines perform analyses on the night-sky
    10731107science images to extract the science data from these images.  These
    1074 consist of: Phase 0, the night preparation stage; Phase 1, the image
    1075 processing preparation stage; Phase 2, the image reduction stage;
    1076 Phase 3, the exposure analysis stage; and Phase 4, the image
    1077 combination stage.  These pipelines must process the images in a
    1078 timely manner so that the incoming data stream will not overload the
    1079 IPS.  The decision to execute a specific pipeline for a specific
    1080 dataset is made by the Scheduler, which sends the infomation to the
    1081 Controller.  The Controller executes the pipeline for the data on an
    1082 appropriate machine and monitors the success or failure of the job.
     1108consist of: Phase 1, the image processing preparation stage; Phase 2,
     1109the image reduction stage; Phase 3, the exposure analysis stage; and
     1110Phase 4, the image combination stage.  These pipelines must process
     1111the images in a timely manner so that the incoming data stream will
     1112not overload the IPS.  The decision to execute a specific pipeline for
     1113a specific dataset is made by the Scheduler, which sends the
     1114infomation to the Controller.  The Controller executes the pipeline
     1115for the data on an appropriate machine and monitors the success or
     1116failure of the job.
    10831117
    10841118\paragraph{Calibration Image Pipelines}
     
    10951129\paragraph{Reference Catalog Pipelines}
    10961130
    1097 The IPP reference catalog pipelines use the data in the IPP Internal
     1131The IPP reference catalog pipelines use the data in the IPP Metadata
    10981132Database and the IPP Object Database to determined improved
    10991133astrometric and photometric calibration references.
     
    11261160used by the later stages to initiate the analyses. 
    11271161
    1128 The phase 1 analysis is performed on a FPA basis to ensure that enough
    1129 reference stars are available for the astrometry calculation.  Phase 1
    1130 cannot be usefully calculated on the basis of a major frame since the
    1131 telescope positions are independent; no additional information is
    1132 available by combining stars from different FPAs.  This analysis does
    1133 not restrict the definition of a major frame in any way.
    1134 
    1135 \note{Phase 1 command: P1 (exposure)}
    1136 
    1137 \note{Megacam: P1 654321o}
     1162The phase 1 analysis is performed on an FPA basis to ensure that
     1163enough reference stars are available for the astrometry calculation.
     1164Phase 1 cannot be usefully calculated on the basis of a major frame
     1165since the telescope positions are independent; no additional
     1166information is available by combining stars from different FPAs.  This
     1167analysis does not restrict the definition of a major frame in any way.
     1168
     1169\tbd{Phase 1 command: P1 (exposure)}
     1170
     1171\tbd{Megacam: P1 654321o}
    11381172
    11391173%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    11511185\begin{figure}
    11521186\begin{center}
    1153 \resizebox{8cm}{!}{\includegraphics{pics/phase2.ps}}
     1187\resizebox{8cm}{!}{\includegraphics{pics/phase2}}
    11541188\caption{ \label{phase2} Phase 2 dataflow}
    11551189\end{center}
     
    11581192\paragraph{Phase 2 Concept}
    11591193
    1160 Phase~2 processing within the Pan-STARRS image processing pipeline is
     1194Phase~2 processing within the \PS{} image processing pipeline is
    11611195the de-trend stage, where the images from the detector are processed
    11621196to remove instrumental signatures.  Phase~2 processing is purely serial,
     
    11671201the guide stars and initial masking of ghost reflections.
    11681202
    1169 Phase~2 consists of the following tasks:
     1203Phase~2 consists of the following modules:
    11701204\begin{enumerate}
    11711205\item Form OT kernel;
    11721206\item Convolve de-trend images with the OT kernel;
    1173 \item bias / dark / Overscan subtraction;
    1174 \item Trim;
     1207\item Mask bad pixels
     1208\item Mask diffraction spikes and optical ghosts;
     1209\item Bias/dark/overscan subtraction;
     1210\item Trim overscan;
    11751211\item Non-linearity correction;
    11761212\item Flat-field;
    11771213\item Subtract sky;
    11781214\item Identify CRs by morphology;
    1179 \item Find objects in the image; and
     1215\item Determine PSF model;
     1216\item Find and photometer objects in the image;
     1217\item Improved astrometry; and
    11801218\item Bright object postage stamps.
    1181 \item {\em from old version:}
    1182 \item mask bad pixels
    1183 \item remove diffraction spikes
    1184 \item remove ghosts
    1185 \item remove cosmic rays
    1186 \item estimate foreground
    1187 \item subtract foreground
    1188 \item extract objects, photometry
    1189 \item determine PSF model
    1190 \item improved astrometry based on comparison with references.
    1191 \end{enumerate}
    1192 These tasks are each explained below.
     1219\end{enumerate}
     1220These modules are each explained below.
    11931221
    11941222\paragraph{Form OT Kernel}
    11951223
    1196 The first task for Phase~2 is to form the OT kernel from the image
     1224The first module for Phase~2 is to form the OT kernel from the image
    11971225metadata of pixel shifts made during the exposure.  This involves
    11981226decoding the metadata and converting it to a data type that can be
     
    12021230\paragraph{Convolve de-trend images}
    12031231
    1204 This task convolves the de-trend images with the OT convolution kernel
     1232This module convolves the de-trend images with the OT convolution kernel
    12051233so that they can be used to de-trend the object image.  The inputs
    12061234are:
    12071235\begin{enumerate}
    1208 \item The OT convolution kernel --- from the previous task;
     1236\item The OT convolution kernel --- from the previous module;
    12091237\item The appropriate dark frame --- from the IPP Pixel Server;
    12101238\item The appropriate flat-field --- from the IPP Pixel Server;
     
    12131241\end{enumerate}
    12141242
    1215 The task convolves each of the dark frame, flat-field, and the fringe
     1243The module convolves each of the dark frame, flat-field, and the fringe
    12161244frame(s) by the OT convolution kernel.  Specific flags in the static
    12171245bad pixel mask are grown by the outline of the OT convolution kernel
    1218 (see Appendix \ref{ap:masks}).  The output results are:
     1246(see Section \ref{ap:masks}).  The output results are:
    12191247\begin{enumerate}
    12201248\item The convolved flat-field;
     
    12221250\item The updated pixel mask.
    12231251\end{enumerate}
    1224 Each of these will be used for a later task.
     1252Each of these will be used for a later module.
    12251253
    12261254
    12271255\paragraph{Overscan Subtraction}
    12281256
    1229 This task corrects the object exposures for the electronic pedestal
     1257This module corrects the object exposures for the electronic pedestal
    12301258introduced by the readout electronics.  The inputs are:
    12311259\begin{enumerate}
    12321260\item The object image --- from the IPP Pixel Server;
    1233 \item The pixel mask --- from the previous task;
     1261\item The pixel mask --- from the previous module;
    12341262\item The overscan and physical detector regions --- from the
    12351263Metadata; and
     
    12421270Overscan rows having a standard deviation which exceeds a threshold of
    12431271twice (configurable) the detector read noise should be masked.  Pixels
    1244 saturated in the A/D converter should also be masked, and these regions
    1245 grown by an additional pixel.  The output is:
     1272saturated in the A/D converter should also be masked, and these
     1273regions grown by an additional pixel to counter CCD ``blooming''.  The
     1274output is:
    12461275\begin{enumerate}
    12471276\item The overscan-subtracted object image; and
    12481277\item The updated pixel mask.
    12491278\end{enumerate}
    1250 These will be used for a subsequent task.
     1279These will be used for a subsequent module.
    12511280
    12521281\paragraph{Trim}
    12531282
    1254 This task trims the object image and each of the calibration frames to
     1283This module trims the object image and each of the calibration frames to
    12551284remove the outer edge which was affected by the OT during the
    1256 exposure.  The inputs, each from previous tasks, are:
     1285exposure.  The inputs, each from previous modules, are:
    12571286\begin{enumerate}
    12581287\item The overscan-subtracted object image;
    12591288\item The corresponding pixel mask;
    1260 \item The convolved dark frame;
    12611289\item The convolved flat-field;
    12621290\item The convolved fringe frame(s); and
     
    12641292\end{enumerate}
    12651293
    1266 Each of the input frames (object image, dark frame, flat-field, fringe
    1267 frame(s) and pixel mask) are trimmed by the extent of the OT
    1268 convolution kernel in each direction ($+x$, $-x$, $+y$, $-y$).  The
    1269 outputs are trimmed images for each of the input images, which will be
    1270 used in later tasks.
     1294Each of the input frames (object image, flat-field, fringe frame(s)
     1295and pixel mask) are trimmed by the extent of the OT convolution kernel
     1296in each direction ($+x$, $-x$, $+y$, $-y$).  The outputs are trimmed
     1297images for each of the input images, which will be used in later
     1298modules.
    12711299
    12721300\paragraph{Non-Linearity Correction}
    12731301
    1274 This task corrects images for non-linearity in the detector.  The
     1302This module corrects images for non-linearity in the detector.  The
    12751303inputs are:
    12761304\begin{enumerate}
    1277 \item The trimmed object image --- from a previous task; and
     1305\item The trimmed object image --- from a previous module; and
    12781306\item The detector non-linearity correction coefficient(s) --- from
    12791307the Metadata.
    12801308\end{enumerate}
    12811309
    1282 The task corrects the flux in each pixel for non-linearity by applying
     1310The module corrects the flux in each pixel for non-linearity by applying
    12831311a polynomial correction, with the specified coefficients.  The output
    1284 is the corrected object image, which is used for a later task.
     1312is the corrected object image, which is used for a later module.
    12851313
    12861314\paragraph{Flat field}
    12871315
    1288 This task corrects the object image for variations in sensitivity over
     1316This module corrects the object image for variations in sensitivity over
    12891317the image.  The inputs are:
    12901318\begin{enumerate}
     
    12931321\item The convolved, trimmed flat-field.
    12941322\end{enumerate}
    1295 Each of these comes from a previous task.
    1296 
    1297 The task divides the object image by the flat-field, masking pixels
     1323Each of these comes from a previous module.
     1324
     1325The module divides the object image by the flat-field, masking pixels
    12981326that are non-positive in the flat-field.  The outputs are:
    12991327\begin{enumerate}
     
    13011329\item The updated pixel mask.
    13021330\end{enumerate}
    1303 Both of these will be used in later tasks.
     1331Both of these will be used in later modules.
    13041332
    13051333\paragraph{Subtract sky}
    13061334
    1307 This task subtracts the sky background from the object image.  The
     1335This module subtracts the sky background from the object image.  The
    13081336inputs are:
    13091337\begin{enumerate}
    1310 \item The object image --- from the previous task;
     1338\item The object image --- from the previous module;
    13111339\item The list of objects on the image --- from the object database; and
    1312 \item The convolved, trimmed fringe frame(s) --- from a previous task.
    1313 \end{enumerate}
    1314 
    1315 The task masks (though {\em not} in the ``official'' pixel mask) all
     1340\item The convolved, trimmed fringe frame(s) --- from a previous module.
     1341\end{enumerate}
     1342
     1343The module masks (though {\em not} in the ``official'' pixel mask) all
    13161344objects on the image using the astrometric solution from the
    13171345boresight, and fits for the sky background, consisting of a polynomial
     
    13201348is too high to reliably fit the sky background, the background
    13211349solution from an exposure close in time and airmass to the current
    1322 object image.  The output is the sky-subtracted object image, which is
    1323 sent to the IPP pixel server for use in Phase~3, and also used for the
    1324 next task.
     1350object image is used.  The output is the sky-subtracted object image,
     1351which is used for the next module.
    13251352
    13261353\paragraph{Identify CRs by morphology}
    13271354
    1328 This task identifies cosmic rays (or other hot pixels missed in the
     1355This module identifies cosmic rays (or other hot pixels missed in the
    13291356static bad pixel mask) on the basis of their morphology.  The inputs
    13301357are:
     
    13331360\item The corresponding pixel mask.
    13341361\end{enumerate}
    1335 Both of these come from a previous task.
    1336 
    1337 The task identifies CRs, the pixels of which are masked in the pixel
     1362Both of these come from a previous module.
     1363
     1364The module identifies CRs, the pixels of which are masked in the pixel
    13381365mask.  The pixels flagged as CRs are then grown by an additional pixel
    1339 in each direction.  The output is the updated pixel mask, which is
    1340 sent to the IPP pixel server for use in Phase~3, and is also used for
    1341 the next task.
     1366in each direction.  Masked pixels are interpolated over.  The outputs
     1367are the updated pixel mask, which is sent to the IPP pixel server for
     1368use in Phase~3, and is also used for the next module; and the object image,
     1369which is sent to the IPP Pixel Server.
    13421370
    13431371\paragraph{Find objects}
    13441372
    1345 This task finds objects on the object image.  The inputs are:
     1373This module finds objects on the object image.  The inputs are:
    13461374\begin{enumerate}
    13471375\item The sky-subtracted object image; and
    13481376\item The corresponding pixel mask.
    13491377\end{enumerate}
    1350 Both of these come from a previous task.
    1351 
    1352 The task identifies objects on the image, which will be later used to
     1378Both of these come from a previous module.
     1379
     1380The module identifies objects on the image, which will be later used to
    13531381register images from different focal planes.  The output is the
    1354 catalogue of objects (see Appendix~\ref{ap:catalogues}) identified on
     1382catalog of objects (see Appendix~\ref{ap:catalogs}) identified on
    13551383the image, which is sent to the metadata database, associated with the
    13561384object image.
     
    13581386\paragraph{Bright object postage stamps}
    13591387
    1360 This task saves postage stamps of bright objects, so that extra care
     1388This module saves postage stamps of bright objects, so that extra care
    13611389with regard to astrometry and photometry can be taken with them at a
    1362 later stage.  The inputs, each from a previous task, are:
     1390later stage.  The inputs, each from a previous module, are:
    13631391\begin{enumerate}
    13641392\item The sky-subtracted object image;
    13651393\item The corresponding pixel mask; and
    1366 \item The catalogue of objects.
    1367 \end{enumerate}
    1368 
    1369 The task makes postage stamps of all objects brighter than a given
     1394\item The catalog of objects.
     1395\end{enumerate}
     1396
     1397The module makes postage stamps of all objects brighter than a given
    13701398instrumental magnitude, along with corresponding pixel masks.  The
    13711399outputs are these postage stamps and pixel masks, which are sent to
     
    13851413detrend images;
    13861414\item Exposure time --- for the photometric calibration;
    1387 \item Detector gain --- for calculating photometric errors and
    1388 determining the quality of the overscan;
     1415\item Detector gain --- for calculating photometric errors; and
    13891416\item Detector read noise --- for calculating photometric errors and
    13901417determining the quality of the overscan;
     
    13951422
    13961423This section describes the requirements on Bad Pixel Masks (BPMs).
    1397 These will consist in of bit masks for each pixel.  For Phase 2, flags
     1424These will consist of bit masks for each pixel.  For Phase 2, flags
    13981425are required for at least each of the following pixel attributes:
    13991426\begin{enumerate}
     
    14121439affect the flux in neighbouring pixels
    14131440
    1414 \paragraph{Object Catalogues}
    1415 \label{ap:catalogues}
    1416 
    1417 Object catalogues from Phase 2 shall consist of at least the
     1441\paragraph{Object Catalogs}
     1442\label{ap:catalogs}
     1443
     1444Object catalogs from Phase 2 shall consist of at least the
    14181445following elements for each object:
    14191446\begin{enumerate}
     
    14261453\end{enumerate}
    14271454
    1428 Though further details may be required for catalogues in Phase~4,
    1429 the above details are minimum requirements for Phase~2 catalogues.
    1430 
    1431 \note{Phase 2 command: P2 (exposure.ota.fits)}
    1432 \note{Megacam: P2 654321o.fits[ccd00] - what are output names?}
    1433 \note{PS FPA is saved as a collection of MEF files.  Megacam FPA is
     1455Though further details may be required for catalogs in Phase~4,
     1456the above details are minimum requirements for Phase~2 catalogs.
     1457
     1458\tbd{Phase 2 command: P2 (exposure.ota.fits)}
     1459\tbd{Megacam: P2 654321o.fits[ccd00] - what are output names?}
     1460\tbd{PS FPA is saved as a collection of MEF files.  Megacam FPA is
    14341461  saved as a single MEF file.  how to handle this difference?}
    14351462
     
    14391466\begin{figure}
    14401467\begin{center}
    1441 \resizebox{8cm}{!}{\includegraphics{pics/phase3.ps}}
     1468\resizebox{8cm}{!}{\includegraphics{pics/phase3}}
    14421469\caption{ \label{phase3} Phase 3 dataflow}
    14431470\end{center}
    14441471\end{figure}
    14451472
    1446 Phase 3 : image processing preparation
    1447 
    1448 The Phase 3 system operates on the combined Phase 2 results from a
    1449 collection of FPA images to determine improved solutions for the image
    1450 calibrations and to provide the parameters needed by Phase 4.  The
    1451 Phase 3 output is saved by the IID, and consists largely of improved
    1452 values of the calibrations already determined by Phase 2.  The
    1453 analysis performed by this pipeline consists of:
     1473The Phase 3 system operates on the combined Phase 2 results from an
     1474FPA to determine improved solutions for the image calibrations and to
     1475provide the parameters needed by Phase 4.  The Phase 3 output is saved
     1476by the IMD, and consists largely of improved values of the
     1477calibrations already determined by Phase 2.  The analysis performed by
     1478this pipeline consists of:
    14541479
    14551480\begin{itemize}
     
    14601485\item photometric solution based on comparison to photometric
    14611486  standards
    1462 \item PSF convolution kernels to transform images to a common PSF.
    14631487\end{itemize}
    14641488
     
    14661490independently for each OTA.  These solutions are limited by the
    14671491assumption of a static distortion and \tbd{by the accuracy of the
    1468   astrometric reference}.  In the phase 3 analysis, the astrometric
    1469 solutions of the N FPA images are improved by ???
     1492astrometric reference}.  In the phase 3 analysis, the astrometric
     1493solutions of the N FPA images are improved by \tbd{???}.
    14701494
    14711495\tbd{what is the expected accuracy of the relative astrometric
     
    14881512absolute photometry solution? (probably)}
    14891513
    1490 In the Phase 4 analysis, N FPA images are optimally combined to create
    1491 a single image of the sky with bad-pixel and cosmic-ray rejection.
    1492 This combination requires the calculation of a set of PSF kernels to
    1493 convert each of the input images to a single, common PSF.  These PSF
    1494 kernels are determined from the per-OTA PSFs measured in Phase 2.
     1514In the Phase 4 analysis, the $N$ FPA images are optimally combined to
     1515create a single image of the sky with bad-pixel and cosmic-ray
     1516rejection.  This combination requires the calculation of a set of PSF
     1517kernels to convert each of the input images to a single, common PSF.
     1518These PSF kernels are determined from the per-OTA PSFs measured in
     1519Phase 2.
    14951520
    14961521%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    14991524\begin{figure}
    15001525\begin{center}
    1501 \resizebox{8cm}{!}{\includegraphics{pics/phase4.ps}}
     1526\resizebox{8cm}{!}{\includegraphics{pics/phase4}}
    15021527\caption{ \label{phase4} Phase 4 dataflow}
    15031528\end{center}
     
    15061531\paragraph{Phase 4 Concept}
    15071532
    1508 Phase 4 processing within the Pan-STARRS image processing pipeline is
     1533Phase 4 processing within the \PS{} image processing pipeline is
    15091534the final stage of processing for a science image.  It operates on
    15101535each sky cell that has overlapping imaging data from the exposure(s)
    15111536being processed, and produces the main output image data products of
    15121537the pipeline --- the difference images and a deep static sky image ---
    1513 along with the associated catalogues of static and variable sources.
     1538along with the associated catalogs of static and variable sources.
    15141539
    15151540Prior to Phase 4, the Phase 3 process produces the following products:
     
    15181543\item photometric calibration;
    15191544\item astrometric calibration with mapping to sky cells; and
    1520 \item PSF models for the images.
    15211545\end{itemize}
    1522 These will each be used by the Phase 4 tasks:
     1546These will each be used by the Phase 4 modules:
    15231547\begin{enumerate}
    15241548\item Combine Images;
     
    15271551\item Add to Static Sky.
    15281552\end{enumerate}
    1529 These tasks are each explained below.
     1553These modules are each explained below.
    15301554
    15311555\paragraph{Combine Images}
    15321556
    1533 The first task for Phase 4 is to combine the images from each
     1557The first module for Phase 4 is to combine the images from each
    15341558telescope, rejecting artifacts such as cosmic rays and low altitude
    1535 streaks.  The inputs to this task are:
     1559streaks.  The inputs to this module are:
    15361560\begin{enumerate}
    15371561\item the sky-subtracted images that overlap the sky cell (or portions
    15381562thereof) --- from the IPP Pixel Server (or directly from Phase 3);
    1539 \item a (linear) map for the image pixels of each detector to the sky
    1540 cell pixels --- from Phase 3;
     1563\item a \tbd{linear} map for the image pixels of each detector to the
     1564sky cell pixels --- from Phase 3;
    15411565\item photometric calibration (zeropoint) for each image --- from
    15421566Phase 3; and
     
    15461570\end{enumerate}
    15471571
    1548 The task maps the detector images to the sky cell using the specified
     1572The module maps the detector images to the sky cell using the specified
    15491573linear transformations, combines the images with strong rejection
    15501574criteria and uses the combined sky cell image to identify artifacts in
    15511575the original detector images.  It is desirable that the artifacts are
    15521576masked in the detector plane (i.e.\ before mapping to the sky cell) so
    1553 that they are not smeared out by the mapping.  The masked detector
    1554 images are then mapped to the sky cell and optimally combined using
    1555 the specified weighting.  Both sets of combinations use the
    1556 photometric calibration for the images to set the relative scales of
    1557 the input images.  The final combination should have the adopted
    1558 Universal zeropoint (25 mag, configurable).
    1559 
    1560 A PSF model for the combined sky cell image should be made by
    1561 identifying point sources in the combined image, scaling and stacking
    1562 them to achieve high signal-to-noise, and fitting with an analytic
    1563 functional form (e.g. Gaussian, Moffat, Waussian).  The limiting
    1564 magnitude for the combined sky cell image should also be estimated.
    1565 
    1566 The outputs from this task are:
     1577that they are not smeared out by the mapping; alternatively, the CR
     1578mask needs to be grown by an additional pixel (which is likely
     1579faster).  The mapped and masked detector images are then optimally
     1580combined using the specified weighting.  Both sets of combinations use
     1581the photometric calibration for the images to set the relative scales
     1582of the input images.  The final combination should have the adopted
     1583Universal zeropoint (25 mag, configurable).  The limiting magnitude
     1584for the combined sky cell image should also be estimated.
     1585
     1586The outputs from this module are:
    15671587\begin{enumerate}
    15681588\item The combined sky cell image --- sent to the IPP Pixel Server
    1569 and/or the next task;
    1570 \item PSF model for the combined sky cell image --- metadata
    1571 associated with the combined sky cell image, and used for the other
    1572 tasks in Phase 4;
     1589and/or the next module;
    15731590\item Limiting magnitude of the combined sky cell image --- metadata
    1574 associated with the combined sky cell image, and used for a later task
     1591associated with the combined sky cell image, and used for a later module
    15751592in Phase 4; and
    1576 \item Catalogue of sources on the combined sky cell image --- sent to
     1593\item Catalog of sources on the combined sky cell image --- sent to
    15771594the IPP Object Database.
    15781595\end{enumerate}
     
    15811598\paragraph{Identify Sources}
    15821599
    1583 This task identifies sources in the combined sky cell image.  The
    1584 inputs are:
    1585 \begin{enumerate}
    1586 \item The combined sky cell image --- from the IPP Pixel Server
    1587 or the previous task;
    1588 \item PSF model for the combined sky cell image --- metadata
    1589 associated with the combined sky cell image, from the previous task;
    1590 \end{enumerate}
     1600This module identifies sources in the combined sky cell image.  The
     1601input is the combined sky cell image, which is obtained from the IPP Pixel Server
     1602or the previous module.
    15911603
    15921604Sources are identified on the combined sky cell image by convolving
    1593 with the PSF model and searching for peaks above the noise.  The output
    1594 is:
    1595 \begin{enumerate}
    1596 \item Catalogue of sources on the combined sky cell image --- sent to
     1605with the PSF and searching for peaks above the noise.  The output
     1606is the catalog of sources on the combined sky cell image, which is to
    15971607the IPP Object Database.
    1598 \end{enumerate}
    15991608 
    16001609
    16011610\paragraph{Transient Identification}
    16021611
    1603 This task identifies variable/moving sources.  The inputs are:
    1604 \begin{enumerate}
    1605 \item The combined sky cell image --- from the previous task or the
    1606 IPP Pixel Server;
    1607 \item The PSF model for the combined sky cell image from the previous
    1608 task --- from the Metadata database, or the previous task;
    1609 \item The current static sky image --- from the Sky Image Server; and
    1610 \item The PSF model for the static sky image --- from the metadata or
    1611 the Sky Image Server.
    1612 \end{enumerate}
    1613 
    1614 The task subtracts the current static sky image from the combined sky
     1612This module identifies variable/moving sources.  The inputs are:
     1613\begin{enumerate}
     1614\item The combined sky cell image --- from the previous module or the
     1615IPP Pixel Server; and
     1616\item The current static sky image --- from the Sky Image Server.
     1617\end{enumerate}
     1618
     1619The module subtracts the current static sky image from the combined sky
    16151620cell image.  In order to do so, the PSFs need to be matched.  This is
    16161621done by convolving the image that has the narrower PSF with the
    16171622kernel, which is the ratio of the two PSFs (this should be done with a
    1618 fit to the PSFs instead of just using the data).  It should be
    1619 sufficient to assume that the kernel is constant over the sky cell.
     1623fit to the kernel instead of just using the data).  It should be
     1624sufficient to assume that the kernel is constant over the sky cell
     1625(otherwise, the sky cell can be broken into smaller sections).
    16201626
    16211627The subtracted image is scoured for point sources above the noise
     
    16391645per day.
    16401646
    1641 The task outputs:
     1647The module outputs:
    16421648\begin{enumerate}
    16431649\item Combined sky cell image, with all variable sources masked ---
    1644 used for the next task;
     1650used for the next module;
    16451651\item Subtracted image, with long trails masked --- sent to the IPP
    16461652Pixel Server; and
    1647 \item Catalogue of variable sources --- sent to the IPP Object
     1653\item Catalog of variable sources --- sent to the IPP Object
    16481654Database.
    16491655\end{enumerate}
     
    16521658\paragraph{Add to Static Sky}
    16531659
    1654 This task adds the combined sky cell image into the static sky, so
    1655 that a deep image of the sky may be formed.  The inputs are:
     1660This module adds the combined sky cell image into the static sky, so
     1661that a deep image of the sky may be formed.  This step should only be
     1662performed if the new data is of sufficient quality that it will not
     1663degrade the static sky image.  The inputs are:
    16561664\begin{enumerate}
    16571665\item The combined sky cell image with variable sources masked ---
    1658 from a previous task;
    1659 \item The current version of the static sky --- from a previous task,
     1666from a previous module;
     1667\item The current version of the static sky --- from a previous module,
    16601668or the IPP Pixel Server; and
    16611669\item Relative weightings, based on the relative signal-to-noise in
     
    16741682\begin{enumerate}
    16751683\item The new static sky image --- sent to the Sky Image Server;
    1676 \item The Catalogue of sources on the new static sky image --- sent to the IPP Object Database; and
     1684\item The Catalog of sources on the new static sky image --- sent to the IPP Object Database; and
    16771685\item The estimated limiting magnitude for the new static sky ---
    16781686metadata associated with the the new static sky image.
     
    16821690
    16831691\begin{itemize}
    1684 \item Catalogues should include positional information ($x,y$, with
     1692\item Catalogs should include positional information ($x,y$, with
    16851693associated errors), photometry (with associated error), and shape
    16861694parameters (FWHM, major and minor axes, position angle).
     
    16931701
    16941702%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1695 \subsubsection{basic detrend image creation}
     1703\subsubsection{Basic detrend image creation}
    16961704
    16971705The basic detrend image creation pipeline collects the appropriate
    16981706input detrend images (bias, dark, flat, etc?) and generates a master
    1699 image by combining the input images in some optimal way (median /
    1700 sigma-clipping / etc).  The master image is used to determine input
    1701 image residuals so that poor input images can be iteratively
    1702 rejected. 
     1707image by combining the input images in some optimal way
     1708\tbd{median/sigma-clipping/etc}.  The master image is used to
     1709determine input image residuals so that poor input images can be
     1710iteratively rejected.
    17031711
    17041712%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1705 \subsubsection{fringe pattern and sky foreground model creation}
     1713\subsubsection{Fringe pattern and sky foreground model creation}
    17061714
    17071715The fringe model creation and sky foreground model creation pipelines
     
    17151723
    17161724%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1717 \subsubsection{photometric flat correction image creation}
     1725\subsubsection{Photometric flat correction image creation}
    17181726
    17191727The photometric flat-field correction uses images which have been
     
    17271735\subsubsection{Astrometric Reference Catalog}
    17281736
     1737For PS1, this shall be UCAC.
     1738
     1739For PS4, this shall be the PS1 catalog.
     1740
    17291741%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    17301742\subsubsection{Photometric Reference Catalog}
    17311743
     1744For PS1, absolute photometry will not be available until the master
     1745fit which will be performed when all data is taken.  For purposes of
     1746relative photometric extinction, the guide star brightnesses should be
     1747sufficient.
     1748
     1749For PS4, the PS1 catalogue shall be used.
     1750
     1751%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    17321752\subsection{Modules}
    17331753
    1734 \subsection{PanSTARRS Library}
     1754\subsection{\PS{} Library}
    17351755
    17361756\subsection{Internal Interfaces}
    17371757
    1738 Internal interfaces consist of queries to the IID or IPS, insertion of
    1739 data in the IID, IPS, or IOD, or processing configuration files.  The
     1758Internal interfaces consist of queries to the IMD or IPS, insertion of
     1759data in the IMD, IPS, or IOD, or processing configuration files.  The
    17401760science and calibration image processing pipelines make requests for
    1741 images from the IPS, meta-data from the IID, and push their results
    1742 back onto the IPS and IID.  The reference catalog pipelines make
    1743 requests on the IID and the IOD and push their results back to the
     1761images from the IPS, metadata from the IMD, and push their results
     1762back onto the IPS and IMD.  The reference catalog pipelines make
     1763requests on the IMD and the IOD and push their results back to the
    17441764IOD.  The scheduler creates input processing configuration files for
    1745 the processing pipelines and queries the IID and IPS and pushes
     1765the processing pipelines and queries the IMD and IPS and pushes
    17461766results back to the IIS.
    17471767
     
    17611781
    17621782This subsection describes the interfaces between the IPP and other
    1763 Pan-STARRS systems and the external clients.  The interfaces are
    1764 illustrated in Figure NN.  Incoming data is received by either the IPS
    1765 (pixels), the IID (meta-data), or the IOD (objects).  Requests for
    1766 data by external clients are also made to these three databases.
    1767 Requests for data made by the IPP are generated by the IPP Schdeduler
    1768 or the science processing pipelines. 
     1783\PS{} systems and the external clients.  The interfaces are
     1784illustrated in Figure \tbd{NN}.  Incoming data is received by either
     1785the IPS (pixels), the IMD (metadata), or the IOD (objects).  Requests
     1786for data by external clients are also made to these three databases.
     1787Requests for data made by the IPP are generated by the IPP Scheduler
     1788or the science processing pipelines.
    17691789
    17701790\subsubsection{OATS}
    17711791
    1772 The Summit Pixel Server (SPS) sends raw image data, image meta-data,
    1773 and enviromental meta-data to the IPP.  The IPP provides an interface
     1792The Summit Pixel Server (SPS) sends raw image data, image metadata,
     1793and enviromental metadata to the IPP.  The IPP provides an interface
    17741794mechanism by which the SPS can register new images with the IPP, which
    17751795sends them to the appropiate subsystem: The image pixel data is sent
    1776 to the IPS while the metadata is sent to the IID.
    1777 
    1778 The Pan-STARRS Telescope Scheduler (PTS) sends information about the
    1779 telescope schelude to the IPP: observing plan for the night, or longer
     1796to the IPS while the metadata is sent to the IMD.
     1797
     1798The \PS{} Telescope Scheduler (PTS) sends information about the
     1799telescope schedule to the IPP: observing plan for the night, or longer
    17801800time scales.  The IPP scheduler sends telescope schedule requests to
    1781 the PTS.
     1801the PTS (i.e.\ calibration needs).
    17821802
    17831803\subsubsection{Published Static Sky Server}
     
    17881808provides updated static sky images to the SIS when available.
    17891809
    1790 \subsubsection{Published Object Database}
     1810\subsubsection{Object Database}
    17911811
    17921812The Master Science Object Database receives new object photometry from
     
    17951815timescale.  Is this a function of the IOD?}
    17961816
    1797 \subsubsection{Moving Object Pipeline}
    1798 
    1799 The Moving Object Pipeline interfaces with the IPP to receive the
    1800 objects detected in the difference images.  \tbd{Does the IPP IOD push
    1801 the objects out or respond to requests for new objects?}  The MOP
    1802 sends the IPP the current set of known ephemerids for objects as
    1803 requested. The MOP may interface with the IID as needed.
     1817\subsubsection{Moving Object Processing System}
     1818
     1819The Moving Object Processing System interfaces with the IPP to receive
     1820the objects detected in the difference images via queries to the IOD.
     1821The MOPS may interface with the IMD as needed.
    18041822
    18051823\subsubsection{Other Client Science Pipelines}
    18061824
    18071825The client science pipelines may interface with the IPP via requests
    1808 for data from the IID, IOD, or IPS.  \tbd{how many clients max? / how
     1826for data from the IMD, IOD, or IPS.  \tbd{how many clients max? / how
    18091827much data?}
    18101828
     
    18131831\subsubsection{Overview}
    18141832
    1815 This document discusses the likely range of the Pan-STARRS Image
     1833This document discusses the likely range of the \PS{} Image
    18161834Processing Pipeline (IPP) hardware requirements.  The hardware
    18171835requirements addressed in this document consist of:
     
    18661884organization scenario, which will require the software to track the
    18671885location of data products more carefully.  In addition, this document
    1868 will address the data requirements of the complete Pan-STARRS pipeline
    1869 with 4 telescopes as well as the single-telescope Pan-STARRS-1 scenario
     1886will address the data requirements of the complete \PS{} pipeline
     1887with 4 telescopes as well as the single-telescope \PS{}-1 scenario
    18701888based on the Design Reference Mission [REF].
    18711889
     
    18931911currently possible to buy a single switch which would have a
    18941912sufficient number of GigE ports for both sections of the PS-1 system,
    1895 such a two-switch organization may be needed for the full Pan-STARRS
     1913such a two-switch organization may be needed for the full \PS{}
    18961914system.  In such a case, the interswitch communication must also meet
    18971915the required throughput needs.  We discuss the hardware requirements
     
    19892007\subsubsection{Data Storage Requirements}
    19902008
    1991 The Pan-STARRS IPP data storage requirements may be divided into five
     2009The \PS{} IPP data storage requirements may be divided into five
    19922010principal areas: raw image data, static sky image data, master
    19932011calibration images, the metadata database, and the object database.
     
    23672385roughly 60-70 Sky-cells per exposure set.  Thus the Phase 4 processing
    23682386adds an additional 750 MB/sec network bandwidth.  In the architecture
    2369 defined in Figure NN, the Sky nodes and the OTA nodes are each
     2387defined in Figure \tbd{NN}, the Sky nodes and the OTA nodes are each
    23702388attached to separate switches.  An additional bandwidth requirement is
    23712389derived by the need to exchange data between these switches in for
     
    25012519reliable and robust to missing elements.  If a specific cell is
    25022520missing from an OTA, that information is known by the controller an
    2503 needs to be represented in the meta-data.  Similarly if an OTA is
     2521needs to be represented in the metadata.  Similarly if an OTA is
    25042522missing from a mosaic camera, that information is also known and must
    2505 be carried though the meta-data.  A more difficult association is that
     2523be carried though the metadata.  A more difficult association is that
    25062524between the telescopes to define the major frame.  Some possibilities:
    25072525
     
    25172535appropriate, some varient is required).
    25182536\item exposure links are defined more generally on the basis of the
    2519 resulting image meta-data.  The telescopes may have images requested
     2537resulting image metadata.  The telescopes may have images requested
    25202538at the same coordinates and time, and are defined as a major frame on
    25212539the basis of the observed time and coordinates.  The TCS or PTS might
     
    26122630and their orbital elements, and the time range for the calculation.
    26132631If the calculation is slow, Phase 0 could be paralellized by object.
    2614 If Phase 0 is fast enough ({\bf minutes?}), the process need not be
     2632If Phase 0 is fast enough (\tbd{minutes?}), the process need not be
    26152633parallel.  The {\tt lifetime} and {\tt date of calculation} allow old
    2616 Phase 0 entries to be removed when they are not needed.  {\bf [This
    2617 cleaning phase could be a function of Phase 0.]}.  Phase 0 need not be
     2634Phase 0 entries to be removed when they are not needed.  \tbd{This
     2635cleaning phase could be a function of Phase 0.}  Phase 0 need not be
    26182636run only for the current night.  Any time a specific set of data is to
    26192637be analysed by the later stages, phase 0 should be run for the
    2620 appropriate time period.  {\bf [Does there need to be a database table
     2638appropriate time period.  \tbd{Does there need to be a database table
    26212639with phase 0 runs and time periods defined?  this could be the
    26222640reference used by later phases to decide if phase 0 has been run. they
    26232641could also trigger the phase 0 run if they notice it has not been run
    2624 (a job of the scheduler).]}
    2625 
    2626 {\bf TBD: what is the orbit calculation speed?  does it scale with
    2627 Npts?  what is the number of known objects now? in 5 years?}
     2642(a job of the scheduler).}
     2643
     2644\tbd{what is the orbit calculation speed?  does it scale with Npts?
     2645what is the number of known objects now? in 5 years?}
    26282646
    26292647
     
    26702688affect the flux in neighbouring pixels
    26712689
    2672 \milsection{Object Catalogues}
    2673 \label{ap:catalogues}
    2674 
    2675 Object catalogues from Phase 2 shall consist of at least the
     2690\milsection{Object Catalogs}
     2691\label{ap:catalogs}
     2692
     2693Object catalogs from Phase 2 shall consist of at least the
    26762694following elements for each object:
    26772695\begin{enumerate}
     
    26842702\end{enumerate}
    26852703
    2686 Though further details may be required for catalogues in Phase~4,
    2687 the above details are minimum requirements for Phase~2 catalogues.
    2688 
     2704Though further details may be required for catalogs in Phase~4,
     2705the above details are minimum requirements for Phase~2 catalogs.
     2706
Note: See TracChangeset for help on using the changeset viewer.