IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2018, 12:33:01 PM (8 years ago)
Author:
eugene
Message:

cleanup text, add skypartition figure, repair system overview paper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/release.2015/ps1.datasystem/datasystem.tex

    r40566 r40578  
    241241  responsible for linking individual detections of solar-system
    242242  objects together and determining the orbits \citep[][]{2013PASP..125..357D}.
    243 \item PSPS : this system ingests the calibrated measurements from the
    244   IPP, MOPS, and others and generates a high-availability database
    245   with web-based interactions for public consumption \citet[][]{flewelling2017}.
     243\item Published Science Products Subsystem (PSPS) : this system
     244  ingests the calibrated measurements from the IPP, MOPS, and others
     245  and generates a high-availability database with web-based
     246  interactions for public consumption \citet[][]{flewelling2017}.
    246247
    247248\end{itemize}
     
    255256at MAST, to those which perform offline analysis for eventual ingest
    256257back into the Pan-STARRS databases and archive.  The latter category
    257 includes the ubercal photometric analysis \citep{ubercal}, the photo-z
    258 analysis \citep{photoz}, and the QSO / RR Lyra search efforts
    259 \citep{hernitschek2016}.  In addition, collaborations within the wider
     258includes the ubercal photometric analysis \citep{2012ApJ...756..158S}, the photo-z
     259analysis \citep{2012ApJ...746..128S}, and the QSO / RR Lyra search efforts
     260\citep{2016ApJ...817...73H}.  In addition, collaborations within the wider
    260261Pan-STARRS community have implemented a variety of science-level
    261262analyses of their own to support their science goals \citep[e.g., M31
    262   variable search][]{M31.REF}.
     263variable search][]{2014ApJ...797...22L,2012AJ....143...89L}.
    263264
    264265Figure~\ref{fig:analysis.elements} illustrates the many elements of
     
    266267analysis steps which occur within the Pan-STARRS Observatory, with an
    267268emphasis on the analysis, calibration, and database ingest stages.
    268 The MOPS is described in detail by \cite{2013PASP..125..357D}, while
    269 the summit systems are described by \note{REF?}.
     269The MOPS is described in detail by \cite{2013PASP..125..357D}.
     270
     271% the summit systems are described by \note{REF?}.
    270272
    271273\begin{figure*}[htbp]
     
    277279    external groups (``customers'').  The arrows show a simplified representation
    278280  of the major flow of data between the analysis stages and data
    279   processing elements. \note{arrow types are unclear for on-demand vs DVO}}
     281  processing elements.}
    280282  \end{center}
    281283\end{figure*}
     
    298300(\IPPstage{stack}) or used in an image subtraction (\IPPstage{diff}).
    299301As part of nightly science processing, images for certain fields such
    300 as the Medium Deep survey fields \citep[see][]{MDref}, are stacked
     302as the Medium Deep survey fields \citep[see][]{huber2017}, are stacked
    301303together in nightly chunks, providing deeper detection capability on
    3023041-day timescales.  Depending on the survey mode, difference images are
     
    11041106epoch.  The quality of such a difference image can be enhanced by
    11051107convolving one or both of the images so that the PSFs in the two
    1106 images are matched \citep[e.g.,][]{AlardLupton}.
     1108images are matched \citep[e.g.,][]{1998ApJ...503..325A}.
    11071109
    11081110In the \ippstage{diff} stage, the IPP generates difference images for
     
    11591161entry as such.
    11601162
    1161 \section{Post-Processing : Database Ingest and Calibration}
    1162 \label{sec:postprocessing}
    1163 
    11641163\begin{table}[hb]
    11651164\begin{center}
    1166 \caption{DVO Database Tables\label{tab:DVO_schema} \note{fix names, include missing}}
     1165\caption{DVO Database Tables\label{tab:DVO_schema}}
    11671166\begin{tabular}{ll}
    11681167\hline
     
    11711170\hline
    11721171Images               & The images that have objects in the DB. \\
    1173 % Image Overlaps       & Image regions which are touched by specific images. \\
    1174 Objects              & The objects --- average properties of multiple detections of the same object. \\
    1175 Average              & Average photometry in multiple filters \\
    1176 % Solar System Objects & Identification of solar system objects \\
    1177 Measure              & Detections of sources in an image identified with an Object. \\
    1178 % Orphaned Detections  & Detections of sources in an image not identified with an Object. \\
    1179 % Non-detections       & Non-detections of objects in an image. \\
     1172Average              & Astronomical objects including their astrometric properties. \\
     1173SecFilt              & Average photometry of the objects in multiple filters (one filter per row) \\
     1174Measure              & Detections of sources identified with an Object, potentially linked to an image. \\
     1175StarPar              & Stellar parameters determined by the Harvard group \citep{2015ApJ...810...25G} \\
     1176Lensing              & Lensing (KSB) parameters and fixed circular aperture photometry from the warps \\
     1177LensObj              & Average lensing and fixed circular aperture photometry \\
     1178Galphot              & Result of galaxy model fits (forced galaxy models) \\
    11801179SkyRegions           & spatial distribution of tables \\
    1181 % Filters              & Filters understood by the system. \\
    11821180Photcodes            & Transformations between different photometric systems \\
    1183 % Zero Points          & History of Zero-point \& Airmass terms \\
    1184 % Distortion Models    & History of Optical Distortion terms \\
    11851181Hosts                & computers used to store the tables \\
    11861182\hline
     
    11881184\end{center}
    11891185\end{table}
     1186
     1187\section{Post-Processing : Database Ingest and Calibration}
     1188\label{sec:postprocessing}
    11901189
    11911190\subsection{DVO}
     
    12001199part of the astrometric and photometric calibration process.  This
    12011200database system, called the ``Desktop Virtual Observatory'' (DVO) was
    1202 developed originally for the LONEOS project \citep{}, and used as part of the
    1203 CFHT Elixir system \citep{2004PASP..116..449M}.  The capabilities of
    1204 this databasing system have been somewhat expanded for the Pan-STARRS
    1205 context. 
     1201developed originally for the LONEOS project
     1202\citep{1995DPS....27.0110B}, and used as part of the CFHT Elixir
     1203system \citep{2004PASP..116..449M}.  The capabilities of this
     1204databasing system have been somewhat expanded for the Pan-STARRS
     1205context.
    12061206
    12071207% overview
    12081208DVO tracks three main classes of information: 1) average properties of
    12091209astronomical objects; 2) measurements of those objects (from which the
    1210 average properties are derived); 3) properties of the images which provided
    1211 some or all of the measuements.  Figure~\ref{fig:DVO_schema}
    1212 illustrates the schematic relationship between these types of
    1213 measurements.
     1210average properties are derived); 3) properties of the images which
     1211provided some or all of the measuements.  In addition, certain
     1212metadata tables define general features of the database.
     1213Table~\ref{tab:DVO_schema} lists the full collection of database
     1214tables used by DVO.
     1215
     1216%Figure~\ref{fig:DVO_schema}
     1217%illustrates the schematic relationship between these types of
     1218%measurements.
     1219
     1220\begin{figure*}[htbp]
     1221  \begin{center}
     1222 \includegraphics[width=\hsize,clip]{skypartition.png}
     1223  \caption{\label{fig:sky.partition} Level 3 sky paritioning.  The
     1224    blue grid shows the outlines of the different regions assigned to
     1225    separate tables in the sky partitioning scheme.  The Galactic
     1226    plane is shown as a solid red line while the ecliptic is shown in
     1227    green.  This organization of the sky duplicates that used by the
     1228    HST Guide Star Catalog \citep{1988IAUS..133..239J}. 
     1229 }
     1230\end{center}
     1231\end{figure*}
    12141232
    12151233In the most basic implementation, a collection of measurements for
     
    12271245and the derived astronomical objects.
    12281246
    1229 \subsubsection{DVO Schema}
    1230 
    1231 Table~\ref{tab:DVO_schema} lists the full collection of database
    1232 tables used by DVO.  These tables fall into one of several classes:
    1233 those which store information about the average properties of
    1234 astronomical objects; those which store information about individual
    1235 measurements; those which store information about the images; those
    1236 which store supporting information (metadata).
     1247%
     1248%% These tables fall into one of several classes:
     1249%% those which store information about the average properties of
     1250%% astronomical objects; those which store information about individual
     1251%% measurements; those which store information about the images; those
     1252%% which store supporting information (metadata).
    12371253
    12381254%% DVO includes two major classes of database tables: those containing
     
    12511267%% levels each containing a finer mesh of regions covering the sky.
    12521268
     1269\subsubsection{DVO Schema}
     1270
    12531271\subsubsubsection{Photcodes}
    12541272
     
    12691287from external data sources for which DVO does not have any information
    12701288to determine a calibration (e.g., instrumental magnitudes and detector
    1271 coordinates).  These are measurements are reference values and are
     1289coordinates).  These measurements are reference values and are
    12721290assigned \ippmisc{REF} photcodes.
    12731291
     
    12831301transform a measurement in the specific photcode to a common system.
    12841302For example, a \ippmisc{DEP} photcode GPC1.g.X01 would have the
    1285 nominal zero point (24.563) and airmass term (0.147).  The structures
    1286 allow for individual chips to have different color terms to bring them
    1287 to a common filter system.
    1288 
    1289 Beyond the basic use, DVO has the ability to accept data from other
    1290 kinds of data sources in which measurements are not clearly associated
    1291 with specific images.  DVO ingest methods are defined for several
    1292 large-scale surveys for which the published data represent average
    1293 properties derived from multiple measurements, and for which the
    1294 measurement-to-image relationship is not provided.  Ingests methods
    1295 have been defined, for example, for 2MASS, WISE, Gaia, USNO-B.  In each
    1296 of these cases, the astrometric and photometric measurements are
    1297 stored in the \ippdbtable{Measure} table, with the data source
    1298 identified by the photcode of the measurement.
     1303nominal zero point (24.563) and airmass term (0.147).  The database
     1304elements allow for individual chips to have different color terms to
     1305bring them to a common filter system.
     1306
     1307DVO ingest methods are defined for several large-scale surveys for
     1308which the published data represent average properties derived from
     1309multiple measurements, and for which the measurement-to-image
     1310relationship is not provided.  Ingests methods have been defined, for
     1311example, for 2MASS, WISE, Gaia, USNO-B.  In each of these cases, the
     1312astrometric and photometric measurements are stored in the
     1313\ippdbtable{Measure} table, with the data source identified by the
     1314photcode of the measurement.
    12991315
    13001316\subsubsubsection{Measurement Tables}
     
    13021318In most cases, the individual measurements of the astronomical objects
    13031319are carried in the table \ippdbtable{Measure}.  For measurements from
    1304 PS1 in the PV3 / DR1 database, this would consist of values determined
    1305 by \ippprog{psphot} for each \ippstage{chip}, \ippstage{warp}, or
    1306 \ippstage{stack} stage image.  Measurements for other cameras
    1307 processed by the IPP may also be included similarly in a DVO database.
    1308 Measurements from other sources, such as SDSS, 2MASS, or WISE, can
    1309 also be included in this table, distinguished by their different
    1310 photcodes.
     1320PS1 in the PV3 / DR1 or DR2 databases, this would consist of values
     1321determined by \ippprog{psphot} for each \ippstage{chip},
     1322\ippstage{warp}, or \ippstage{stack} stage image.  Measurements for
     1323other cameras processed by the IPP may also be included similarly in a
     1324DVO database.  Measurements from other sources, such as SDSS, 2MASS,
     1325or WISE, can also be included in this table, distinguished by their
     1326different photcodes.
    13111327
    13121328The \ippdbtable{Measure} table includes the instrumental magnitudes
     
    13381354(respectively 3.0, 4.63, and 7.43 arcsec).  This table contains one
    13391355row for every warp image on which the object was measured.
     1356
     1357The \ippdbtable{Galphot} table stores the results of the forced galaxy
     1358fitting analysis for each object that has been measured.  This table
     1359contains one row per filter and model type (Sersic, Exponential, or
     1360DeVaucouleur) if forced galaxy models have been calculate for the
     1361object.
     1362
     1363The \ippdbtable{Starpar} table carries measurements provided by the
     1364Harvard team (Green, Schlafly, Finkbeiner) from the analysis of the
     1365SED of objects in the PS1 $3\pi$ data, using the PV2 analysis version
     1366\citep{2015ApJ...810...25G,2014ApJ...783..114G}.  In this work, the
     1367goal was a 3D model of the dust in the Galaxy based on Pan-STARRS and
     13682MASS photometry.  As part of this analysis, the authors fit the SEDs
     1369of all stellar sources (as determined by a cut based on the PSF -
     1370aperture magnitudes) with stellar models including free parameters of
     1371extinction, distance modulus, metallicity, and absolute r-band
     1372magnitude.  While these photometric distance modulus measurements are
     1373not extremely precise, they provide a constraint on the distance which
     1374is used in our analysis of the astrometry
     1375\citep[see][]{magnier2017.calibration}.
    13401376
    13411377%% Similarly to the \ippdbtable{Measure} table, the fields
     
    14131449calculated.
    14141450
    1415 The \ippdbtable{Galphot} table stores the results of the forced galaxy
    1416 fitting analysis for each object that has been measured.  This table
    1417 contains one row per filter and model type (Sersic, Exponential, or
    1418 DeVaucouleur) if forced galaxy models have been calculate for the
    1419 object.
    1420 
    1421 The \ippdbtable{Starpar} table carries measurements provide by Greg
    1422 Green \& Eddie Schlafly from their analysis of the SED of objects in
    1423 the PS1 $3\pi$ data, using the PV1 version of the analysis
    1424 \citep{2015ApJ...810...25G}.  In this work, the goal was a 3D model of
    1425 the dust in the Galaxy based on Pan-STARRS and 2MASS photometry.  As
    1426 part of this analysis, the authors fit the SEDs of all \note{stellar?}
    1427 sources with stellar models including free parameters of extinction,
    1428 distance modulus, metallicity, and absolute r-band magnitude.  While
    1429 these photometric distance modulus measurements are not extremely
    1430 precise (see below), they provide a constraint on the distance is used
    1431 in our analysis of the astrometry
    1432 \citep[see][]{magnier2017.calibration}.
    1433 
    1434 In the \ippdbtable{Measure} table, there are three fields which
    1435 provide two independent links from the specific measurement to the
    1436 associated object: \ippdbtable{Measure}.\ippdbcolumn{catID} specifies
    1437 the spatial partition to which the measurement belongs (see
    1438 Section~\ref{sec:SkyPartition} below);
    1439 \ippdbtable{Measure}.\ippdbcolumn{objID} specifies to which entry in
    1440 the \ippdbtable{Average} table the measurement belongs.  These two 32
    1441 bit fields can thus be combined into a single 64 bit ID unique for all
    1442 objects in the database.  In addition, the field
    1443 \ippdbtable{Measure}.\ippdbcolumn{averef} specifies the row number in
    1444 the \ippdbtable{Average} table of the associated object.  The
    1445 \ippdbtable{Measure} table may be unsorted, in which case it is slow
    1446 to find the measurements associated with a specific object (a full
    1447 table scan is required).  After the table is sorted and indexed, the
    1448 \ippdbcolumn{Measure} rows for a given object are grouped together.
    1449 In this case, the fields
    1450 \ippdbtable{Average}.\ippdbcolumn{measureOffset} and
    1451 \ippdbcolumn{Average}.\ippdbcolumn{Nmeasure} define an index for the
    1452 code to jump to the list of measurements for a single object.  The
    1453 field \ippdbtable{Measure}.\ippdbcolumn{imageID} defines the link from
    1454 the measurement to the image which supplied the measurement.
    1455 
    1456 \note{Discuss PSPS IDs}
    1457 
    14581451\subsubsubsection{Image Tables}
    14591452
     
    14701463zero point, etc.  For GPC1 and other mosaic cameras, an additional row
    14711464is defined to carry the projection and camera distortion elements of
    1472 the astrometry model.  As images are loaded into this table, they
    1473 are assigned an internal ID (a running sequence in the table).  Images
    1474 may also be assigned an external ID: in the case of the GPC1 images,
    1475 this ID is defined by the processing mysql database and is guaranteed
    1476 to be unique within the processing system.
     1465the astrometry model.  As images are loaded into this table, they are
     1466assigned an internal ID (a running sequence in the table), stored in
     1467the field \ippdbcolumn{imageID}.  Images may also be assigned an ID
     1468derived from the external source of the image (field
     1469\ippdbcolumn{externID}): in the case of the GPC1 images, this ID is
     1470defined by the processing mysql database and is guaranteed to be
     1471unique within the processing system.  In the case of GPC1 exposures,
     1472the external image ID is set to the database field
     1473\ippdbtable{chipImfile}.\ippdbcolumn{chip_imfile_id}. A second field
     1474(\ippdbcolumn{sourceID}) identifies which of the possible image-like
     1475tables supplied this image, guaranteeing uniqueness of image IDs
     1476across the different IPP stages.
    14771477
    14781478%% Data from GPC1 (and other cameras processed by the IPP) are loaded
     
    14911491flat-field corrections determined by the astrometry calibration
    14921492analysis \citep[see][]{magnier2017.calibration}.
    1493 \note{use names and match DVO schema table}
    14941493
    14951494\subsubsection{Sky Partition}
     
    15131512files.  Level 0 is a single region covering the full sky.  Level 1
    15141513divides the sky in declination into bands 7.5\degree\ high, as defined
    1515 by the HST GSC.  Level 2 subdivides these declination bands in the RA
    1516 direction, with spacing related to the stellar density.  Level 3
    1517 divides these RA chunks into 4 - 8 smaller partitions.  This level
    1518 exactly matches the HST GSC layout, and uses the same naming
    1519 convention to identify the partitions: \code{n0000/0000}, etc. Level 4
    1520 further divides these regions by a factor of 16.  In the
    1521 \ippdbtable{SkyTable}, a region at one level has a pointer to its
    1522 parent region (the one which contains it) and a sequence pointing to
    1523 its children (regions it contains).  The \ippdbtable{SkyTable} enables
    1524 fast lookups of the on-disk partitions which map to a specific
    1525 coordinate on the sky.  In general, a single DVO will have the full
    1526 sky represented with tables at a single level, although it is possible
    1527 for mixed levels to be used.  For the PV3 master database, the
    1528 partitioning is at Level 4, resulting in \approx 150,000 regions to
    1529 cover the full sky, of which \approx 110,000 are used for the PV3
    1530 $3\pi$ data.  The densest portions of the bulge contain at most
    1531 \approx 300,000 astronomical objects in the database files, with an
    1532 associated maximum of \approx 30 million measurements in these files.
    1533 With the compression scheme described below, the largest database
    1534 files are \approx 3GB, which can be loaded into memory in 30 seconds
    1535 on the processing machines that contain partition data.
     1514by the HST Guide Star Catalog
     1515\citep[GSC][]{1988IAUS..133..239J,1990AJ.....99.2019L}.  Level 2
     1516subdivides these declination bands in the RA direction, with spacing
     1517related to the stellar density.  Level 3 divides these RA chunks into
     15184 - 8 smaller partitions.  This level exactly matches the HST GSC
     1519layout, and uses the same naming convention to identify the
     1520partitions: \code{n0000/0000}, etc. Level 4 further divides these
     1521regions by a factor of 16.  In the \ippdbtable{SkyTable}, a region at
     1522one level has a pointer to its parent region (the one which contains
     1523it) and a sequence pointing to its children (regions it contains).
     1524The \ippdbtable{SkyTable} enables fast lookups of the on-disk
     1525partitions which map to a specific coordinate on the sky.  In general,
     1526a single DVO will have the full sky represented with tables at a
     1527single level, although it is possible for mixed levels to be used.
     1528For the PV3 master database, the partitioning is at Level 4, resulting
     1529in \approx 150,000 regions to cover the full sky, of which \approx
     1530110,000 are used for the PV3 $3\pi$ data.  The densest portions of the
     1531bulge contain at most \approx 300,000 astronomical objects in the
     1532database files, with an associated maximum of \approx 30 million
     1533measurements in these files.  With the compression scheme described
     1534below, the largest database files are \approx 3GB, which can be loaded
     1535into memory in 30 seconds on the processing machines that contain
     1536partition data.
    15361537
    15371538% parallel partitions
     
    15591560reasonable timescale.
    15601561
     1562\subsubsection{Object and Measurement IDs}
     1563
     1564Within the DVO system, certain integer fields are used to provide unique
     1565identifiers for measurements and objects.  The original implementation
     1566of DVO was limited to 32-bit integer fields, but since the maximum
     1567number of objects and measurements was expected to be larger than
     1568$2^{32}$, two 32-bit integer fields are joined together to make
     1569sufficiently large IDs.
     1570
     1571In the table of objects (\ippdbtable{Average}), the fields
     1572\ippdbcolumn{objID} and \ippdbcolumn{catID} together form a unique
     157364-bit integer value to identify the objects.  The \ippdbcolumn{catID}
     1574field is a sequence number for the sky partition table (the
     1575`catalog') in which the object is contained, while \ippdbcolumn{objID}
     1576is an incrementing sequence number within that sky partition
     1577table.  As long as no sky partition tables contain more that
     1578$2^{32}$ objects, these fields will not overflow.  These two fields
     1579are included in the \ippdbtable{Measure}, \ippdbtable{GalPhot},
     1580\ippdbtable{StarPar}, \ippdbtable{Lensing}, and \ippdbtable{LensObj}
     1581tables to link the entries in those tables back their corresponding
     1582object.  Note that \ippdbtable{SecFilt} does {\em not} contain these
     1583ID fields; the rows in this table are maintained in the correct
     1584sequence to match the \ippdbtable{Average} table entries.
     1585
     1586The \ippdbtable{Measure} table, containing the detections of objects
     1587from individual exposures or stack, or the (potentially
     1588non-signficant) measurements from a warp, uses the 32-bit integer
     1589fields \ippdbcolumn{detID} and \ippdbcolumn{imageID} to uniquely
     1590identify each entry.  The \ippdbcolumn{imageID} is the running
     1591sequence number of the ``image'' (GPC1 OTA, stack, warp, or other
     1592other source of the measurement) in which the object was measured.
     1593The \ippdbcolumn{imageID} is a value internal to DVO, and is unique
     1594across all types of images.  The \ippdbcolumn{detID} field is a 32-bit
     1595integer giving the sequence number of the detection within the image.
     1596For images processed by the IPP (e.g., using \ippprog{psphot}), the
     1597\ippdbcolumn{detID} corresponds to the output field labeled as
     1598\ippmisc{IPP_IDET} in those data products.  Since measurements from
     1599the same image may be spread across multiple sky partition tables,
     1600both \ippdbcolumn{detID} and \ippdbcolumn{imageID} much be used to
     1601uniquely identify a detection within the database. 
     1602
     1603In the \ippdbtable{Measure} table, the field \ippdbcolumn{averef}
     1604specifies the row number in the \ippdbtable{Average} table of the
     1605associated object.  The \ippdbtable{Measure} table may be unsorted, in
     1606which case it is slow to find the measurements associated with a
     1607specific object (a full table scan is required, referencing
     1608\ippdbcolumn{objID}).  After the table is sorted and indexed, the
     1609\ippdbcolumn{Measure} rows for a given object are grouped together.
     1610In this case, the fields \ippdbtable{Average}.\ippdbcolumn{measureOffset} and
     1611\ippdbcolumn{Average}.\ippdbcolumn{Nmeasure} define an index for the
     1612code to jump to the list of measurements for a single object.  The
     1613field \ippdbtable{Measure}.\ippdbcolumn{imageID} defines the link from
     1614the measurement to the image which supplied the measurement.
     1615
     1616DVO is also used to construct the unique object and detection IDs used
     1617by the Published Science Products Subsystem (PSPS).  Within the PSPS,
     1618the field named \ippdbcolumn{objID} in that database is used to
     1619allows valid joins between tables to select the different kinds of
     1620attributes of the same astronomical objects.  This 64-bit integer ID
     1621is constructed based on the coordinates of the object, as described by
     1622\cite[][]{flewelling2017}.  In short, the digits of the right
     1623ascension and declination coordinates are used to define a single
     162464-bit integer with spatial resolution of roughly 3 milliarcseconds.
     1625This values used by this field are generated by the DVO system and
     1626stored in the \ippdbtable{Average} table in the field
     1627\ippdbcolumn{extID}. 
     1628
     1629Within the PSPS, the \ippdbtable{Detection} table carries an ID which
     1630is unique for each measurement, equivalent to the DVO
     1631\ippdbcolumn{det_id}, \ippdbcolumn{image_id} pair.  In this case, the
     1632PSPS \ippdbcolumn{detectID} is constructed from the MJD of the
     1633exposure, the number of the OTA (e.g., OTA64), and the detection
     1634sequence within the image to form a single unique 64-bit integer value.
     1635For detections from the stack images, the MJD is not unique, so a
     1636different rubrick is used to define IDs for those detections.  The
     1637field \ippdbcolumn{XstackDetectID} (where '\ippdbcolumn{X}' is one of
     1638g,r,i,z,y) is constructed from the GPC1 stack ID
     1639(\ippdbtable{stackRun.stack_id}), the detection sequence within the
     1640stack image, and the same value used to define \ippdbcolumn{sourceID}
     1641above.  These two types of detection IDs are generated by the program
     1642\ippprog{addstar} when the images and stacks are ingested into DVO.
     1643
    15611644\subsubsection{DVO Data Storage}
    15621645
     
    15671650of files for tables which are spatially partitioned.  The binary FITS
    15681651tables are compressed using the (to date) experimental FITS binary
    1569 table compression strategy outlined by \citet{RickWhite}.  Table compression
     1652table compression strategy outlined by \citet{2012arXiv1201.1340P}.  Table compression
    15701653is an option in DVO; for the PV3 database, the large data
    15711654volume (70TB compressed) drove the decision to compress the tables.
     
    15731656% FITS table compression details
    15741657The FITS binary table compression scheme uses a strategy similar to
    1575 that used for FITS image compression (\note{REF}).  The binary tabular
    1576 data is compressed and stored in the ``HEAP'' section of the FITS table
    1577 extension, with pointers to the compressed data stored in the regular
    1578 data section.  Each column in the FITS table is compressed as one (or
    1579 more) blocks.  The standard header keywords which describe the data
    1580 column format (e.g., TFORM1) are replaced with keywords which describe
    1581 the location and size of the compressed data in the HEAP section; the
    1582 information about the uncompressed data is moved to a keyword with ``Z''
    1583 prepended (e.g., ZFORM1) and an additional field is added to define
    1584 the compression algorithm (e.g., ZCTYP1).  The column names (e.g.,
    1585 TTYPE1) and units (e.g., TUNIT1) are retained in their original form.
     1658that used for FITS image compression
     1659\citep[][]{1999ASPC..172..125W,2000ASPC..216..551P}.  The binary
     1660tabular data is compressed and stored in the ``HEAP'' section of the
     1661FITS table extension, with pointers to the compressed data stored in
     1662the regular data section.  Each column in the FITS table is compressed
     1663as one (or more) blocks.  The standard header keywords which describe
     1664the data column format (e.g., TFORM1) are replaced with keywords which
     1665describe the location and size of the compressed data in the HEAP
     1666section; the information about the uncompressed data is moved to a
     1667keyword with ``Z'' prepended (e.g., ZFORM1) and an additional field is
     1668added to define the compression algorithm (e.g., ZCTYP1).  The column
     1669names (e.g., TTYPE1) and units (e.g., TUNIT1) are retained in their
     1670original form.
    15861671
    15871672% FITS table compression details
     
    16981783catalog files (``smf files'') and determined the zero points of those
    16991784exposures which were believed to be obtained in photometric
    1700 conditions.  This process, called ``\"ubercal'', is described in detail
    1701 by \cite{2012ApJ...756..158S} for the first (PV1) version.  In brief, photometric
    1702 periods, with time-scales of at least \note{half of a night}, are
    1703 identified by a combination of automatic analysis and manual
    1704 inspection.  A single solution for all images in a given filter is
    1705 determined to minimize scatter for individual stars.  The free
     1785conditions.  This process, called ``\"ubercal'', is described in
     1786detail by \cite{2012ApJ...756..158S} for the first (PV1) version.  In
     1787brief, photometric periods, with time-scales of a large fraction of a
     1788night, are identified by a combination of automatic analysis and
     1789manual inspection.  A single solution for all images in a given filter
     1790is determined to minimize scatter for individual stars.  The free
    17061791parameters in this solution consist of a single zero point and airmass
    17071792slope for each photometric period along with a collection of
     
    17091794seasons'').  For the PV3 \"ubercal analysis, the flat-field offsets
    17101795were determined on a $2\times2$ grid for each chip and 5 flat-field
    1711 seasons were chosen (listed in Table~\ref{tab:flat-field-seasons}).
    1712 The boundaries of the flat-field seasons were determined by
    1713 independent inspection of the residuals observed in the Medium Deep
    1714 fields.
     1796seasons were identified.  The boundaries of the flat-field seasons
     1797were determined by independent inspection of the residuals observed in
     1798the Medium Deep fields.
     1799
     1800%%  (listed in Table~\ref{tab:flat-field-seasons}) XXX add this table
    17151801
    17161802After the \"ubercal analysis of the photometric periods is completed,
     
    17411827Telescope Sciences Institute through their Mikulski Archive for Space
    17421828Telescopes (MAST).  The underying database at MAST is a copy of a
    1743 database generated at the IfA by the subsystem
    1744 called PSPS : the \note{define PSPS}.  The construction of the PSPS
    1745 version of the PS1 database starts once the PS1 photometry and
    1746 astrometry measurements have been calibrated within the DVO system.
    1747 The construction takes place in several stages, described in detail by
    1748 \cite{flewelling2017}.  We summarize those steps here.
     1829database generated at the IfA by the Published Science Products
     1830Subsystem (PSPS).  The construction of the PSPS version of the PS1
     1831database starts once the PS1 photometry and astrometry measurements
     1832have been calibrated within the DVO system.  The construction takes
     1833place in several stages, described in detail by \cite{flewelling2017}.
     1834We summarize those steps here.
    17491835
    17501836The first stage of constructing the PSPS database consists of the
     
    18241910collection of ``tasks'' which describe the concept of a command which
    18251911might be run and to regularly generate new commands based on that
    1826 concept.  The ``tasks'' are defined using the opihi scripting language
     1912concept.  The ``tasks'' are defined using the \ippprog{opihi} scripting language
    18271913(also shared by DVO and other user-interactive programs within the
    18281914IPP).
    18291915
    1830 \ippprog{Pantasks} repeatedly checks each task in an attempt to generate a new
    1831 command: we say \ippprog{pantasks} attempts to ``execute'' the task in each of
    1832 these attempts.  Tasks may specify the time between execution
     1916\ippprog{Pantasks} repeatedly checks each task in an attempt to
     1917generate a new command: we say \ippprog{pantasks} attempts to
     1918``execute'' the task.  Tasks may specify the time between execution
    18331919attempts, with a 1 second default.
    18341920
     
    18391925executed.  A dynamic command is defined within a special block of the
    18401926task, called \code{task.exec}.  This block is a snipet of code (in the
    1841 opihi language) which is run each time the task is executed.  The
     1927\ippprog{opihi} language) which is run each time the task is executed.  The
    18421928\code{task.exec} code may refer to variables or other data structures
    1843 defined by the opihi language within the \ippprog{pantasks} environment.  Within
    1844 a single \ippprog{pantasks} instance, all opihi variables and data
    1845 structures have global context (\ie, all are visible to all tasks).
    1846 Variables are by default global, but within the context of an opihi
    1847 macro (equivalent of a function call), variables may be
    1848 locally-scoped.  Other data structures (see below) are global and must
    1849 be protected with name space choices.
    1850 
    1851 Within the \ippprog{task.exec} macro, the command to be run must be
    1852 defined with the function ``command''.  Once the \ippprog{task.exec}
    1853 macro exits successfully, the defined command is then added to the list of jobs
    1854 to be run within the UNIX environment.  Jobs may be run in one of two
    1855 ways: locally or via the parallel processing system.  The task, or the
    1856 \ippprog{task.exec} macro, uses the ``host'; command to define how to
    1857 run the job.  If the host is set to ``local'', then the job is run in
    1858 the background by \ippprog{pantasks} itself (using the C \code{execvp}
    1859 function).  Otherwise, the job is sent to the parallel processing
    1860 system to be run on another machine within the cluster.  If the host
    1861 is set to the special value ``anyhost'', then the parallel processing
    1862 system is allowed to choose the processing computer arbitrarily.  Any
    1863 other value is taken to be the DNS name of the computer on which this
    1864 job should run.  If the option \code{-required} is supplied to the
    1865 \code{host} command, then the parallel processing system must ensure
    1866 that the job only runs on the specifically named computer.  Otherwise,
    1867 the parallel processing system may choose to redirect the command to
    1868 another computer using its own rules, e.g. to balance processing load
    1869 across the cluster.
    1870 
    1871 When the \ippprog{task.exec} macro is run, the code may choose (e.g.,
     1929defined by the \ippprog{opihi} language within the \ippprog{pantasks}
     1930environment.  Within a single \ippprog{pantasks} instance, all \ippprog{opihi}
     1931variables and data structures have global context by default (\ie, all
     1932are visible to all tasks).  Within the context of an \ippprog{opihi} macro
     1933(equivalent of a function call), variables may be locally-scoped.
     1934Other data structures (see below) are global and must be protected
     1935with name space choices.
     1936
     1937Within the \code{task.exec} macro, the command to be run is defined by
     1938the script.  Once the \code{task.exec} macro exits successfully, the
     1939defined command is then added to the list of jobs to be run within the
     1940UNIX environment.  Jobs may be run in one of two ways: locally or via
     1941the parallel processing system.  The task, or the \code{task.exec}
     1942macro, uses the \code{host} command to define how to run the job.  If
     1943the host is set to ``local'', then the job is run in the background by
     1944\ippprog{pantasks} itself (using the C \code{execvp} function).
     1945Otherwise, the job is sent to the parallel processing system to be run
     1946on another machine within the cluster.  If the host is set to the
     1947special value ``anyhost'', then the parallel processing system is
     1948allowed to choose the processing computer arbitrarily.  Any other
     1949value is taken to be the DNS name of the computer on which this job
     1950should run.  The host may (optionally) be required for the command, in
     1951which case the parallel processing system must ensure that the job
     1952only runs on the specifically-named computer.  Otherwise, the parallel
     1953processing system may choose to redirect the command to another
     1954computer using its own rules, e.g. to balance processing load across
     1955the cluster.
     1956
     1957When the \code{task.exec} macro is run, the code may choose (e.g.,
    18721958based on tests of some global variables) to exit the macro with an
    1873 error condition, e.g., with the ``break'' command.  In this
    1874 circumstance, no job is produced by the task.  The task will be tried
    1875 again the next time it is executed.  This feature allows for the user
    1876 to set processing blocks which depend on some external tests.  For
    1877 example, some task may check external network connectivity and set a
    1878 variable based on the network status; other tasks may then choose to
    1879 wait until the network is available before attempting to run.
    1880 
    1881 Other task options discussed below exist to control the system
    1882 behavior in detail.  Note that the options below may be dynamically
    1883 reset by the \ippprog{task.exec} macro.   
    1884 
    1885 \note{this section probably has too much detail; move this into an
    1886   online user guide?}
    1887 
    1888 The option ``npending'' may be used to limit the number of jobs which
    1889 are simultaneously executed for a specific task.  For example, some
    1890 classes of jobs should only be run one-at-a-time because they are not
    1891 protected against collisions or they may overload a resource.  The use
    1892 of ``npending'' allows these situations to be handled cleanly within
    1893 \ippprog{pantasks} (avoiding cumbersome coding within with program or supporting
    1894 script).
    1895 
    1896 The option ``nmax'' limits the total number of jobs which a task
    1897 generates.  This option may be useful in cases where
    1898 \ippprog{pantasks} is used to perform a limited set of operations.
    1899 \note{do we actually use this in IPP?}
    1900 
    1901 The option ``trange'' allows the user to restrict the time period during
    1902 which the specific tasks is executed.  This option is given with a
    1903 start and an end time for the limiting time range.  These times may be
    1904 of one of several forms: ``HH:MM:SS'' specifies a time within a day
    1905 (in UT or local time?).  ``Day[@HH:MM:SS]'' specifies a time on a
    1906 specific day, e.g., \code{trange Mon@13:00 Tue@09:00} says the task
    1907 should be run from 1pm on Mondays to 9am on Tuesdays.  ``YYYY/MM/DD,HH:MM:SS''
    1908 specifies a time on a specific date within the year.  The start and
    1909 end times must be of the same class.  The \code{trange} command has
    1910 some optional arguments as well.  The option \code{-nmax NNN} defines
    1911 the maximum number of jobs which may be run in that time range.  The
    1912 option \code{-exclude} specifies that the time range is a period when
    1913 the task should {\em not} be executed.  An arbirary number of time
    1914 ranges may be specified \note{how are they evaluated?}
    1915 
    1916 The option \code{nice} specifies the ``nice'' level at which the job is
    1917 run when it is executed.  The parallel processing system must respect
    1918 this concept.
    1919 
    1920 The option \code{active} can be used to turn on and off a task for
    1921 periods.  Since a user command or a macro run by \ippprog{pantasks} can
    1922 re-define task options, the \code{active} state may be changed
    1923 independently of the task execute.  This is useful for keeping tasks
    1924 defined by a \ippprog{pantasks} instance, but allowing the user to
    1925 prevent them from running for some reason.
     1959error condition.  In this circumstance, no job is produced by the
     1960task.  The task will be tried again the next time it is executed.
     1961This feature allows for the user to set processing blocks which depend
     1962on some external tests.  For example, some task may check external
     1963network connectivity and set a variable based on the network status;
     1964other tasks may then choose to wait until the network is available
     1965before attempting to run.
     1966
     1967Other task options exist to control the system behavior in detail.
     1968These options may be dynamically reset by the \code{task.exec} macro.
     1969Some options control the number of jobs, such as limiting the number
     1970of currently-outsanding jobs for a given task, or limiting the total
     1971number generated.  Other options can be used to control the time when
     1972jobs of a certain task are allowed to run.  It is also possible to
     1973specify the UNIX ``nice'' level at which the job is
     1974run when it is executed.  Finally, individual tasks may be disabled
     1975while the system is still running.
    19261976
    19271977\subsubsection{pcontrol}
     
    19311981across many machines in the computing cluster.  The parallel
    19321982processing system used by \ippprog{pantasks} is an independent
    1933 software system.  The default parallel processing system is a program
    1934 called \ippprog{pcontrol}\footnote{Alternatives are possible: e.g.,
    1935   {\tt condor} has been experimentally integrated with
     1983software system called \ippprog{pcontrol}\footnote{Alternatives are
     1984  possible: e.g., {\tt condor} has been experimentally integrated with
    19361985  \ippprog{pantasks} for tests}.
    19371986
     
    19461995one of several states: pending (ready to run), running (jobs which are
    19471996running), exit (job has completed), busy (job is being checked by
    1948 \ippprog{pcontrol}), crash (job has exited with a signal(?), normally
    1949 segv).
     1997\ippprog{pcontrol}), crash (job has exited with a signal, normally
     1998\code{segv}).
    19501999
    19512000Similarly, the hosts may also have one of several states: off, down,
     
    20012050
    20022051The \ippprog{pantasks} program can be run as a stand-alone program
    2003 which presents an opihi shell interface to the user when it is
     2052which presents an \ippprog{opihi} shell interface to the user when it is
    20042053started.  This mode is useful for testing as all errors are reported
    2005 back to the opihi shell.  However, when the user exits the shell, the
     2054back to the \ippprog{opihi} shell.  However, when the user exits the shell, the
    20062055\ippprog{pantasks} instance exits, shutting down \ippprog{pcontrol} and all remote client
    20072056connections.  In standard operations, \ippprog{pantasks} is run in a client
     
    20252074\end{verbatim}
    20262075\caption{\label{fig:task_example} Example of a simple static
    2027   task in the opihi-based scripting language used by ippprog{pantasks}.  In
    2028   this example, ippprog{pantasks} would run a single instance of the command
     2076  task in the opihi-based scripting language used by pantasks.  In
     2077  this example, pantasks would run a single instance of the command
    20292078  ({\tt ls /tmp}) every 5 seconds, sending the stdout and stderr to
    20302079  the listed files. }
     
    20362085\subsubsection{Pantasks scripts: ippTasks}
    20372086
    2038 \ippprog{Pantasks} provides an environment in which commands can be generated
    2039 and extensive parallel processing managed.  The details of how to
    2040 implement the different stages of IPP processing are captured in a
    2041 collection of scripts written for \ippprog{pantasks} in the \code{opihi}
    2042 language.  In general, each stage is defined by an associated script
    2043 collected together under the \ippmisc{ippTasks} collection.  While
    2044 each script has its own details, there are a number of common
    2045 elements.
     2087\ippprog{Pantasks} provides an environment in which commands can be
     2088generated and extensive parallel processing managed.  The details of
     2089how to implement the different stages of IPP processing are captured
     2090in a collection of scripts written for \ippprog{pantasks} in the
     2091\ippprog{opihi} language.  In general, each stage is defined by an
     2092associated script collected together under the \ippmisc{ippTasks}
     2093collection.  While each script has its own details, there are a number
     2094of common elements.
    20462095
    20472096Most stages consist of two related tasks: a \ippmisc{load} task, which
     
    20592108job is permitted to run simultaneously, preventing race conditions.
    20602109
    2061 The results from the database query job are stored in an opihi data
     2110The results from the database query job are stored in an \ippprog{opihi} data
    20622111structure called a \ippmisc{book} within the \ippprog{pantasks}
    20632112environment.  Each row in the result set is saved to a separate entry
     
    20772126\ippmisc{book} for any pages with \ippdbcolumn{pantasksState} set to
    20782127\ippmisc{DONE}, and removes them from the book, as these represent
    2079 jobs that have finished. \note{the manipulation above takes place in
    2080   the task.exit subscript}
     2128jobs that have finished.
     2129
     2130% \note{the manipulation above takes place in the task.exit subscript}
    20812131
    20822132The associated \ippmisc{run} task generates jobs constructed from the
     
    20992149program to do the data analysis work and a supporting Perl script
    21002150which performs the database update upon completion.  Upon completion,
    2101 the \ippprog{pantasks} \ippmisc{RUN} tasks is responsible for updating the
     2151the \ippprog{pantasks} \ippmisc{RUN} task is responsible for updating the
    21022152status within the book, but not within the processing database.  This
    21032153split keeps the interactions at the \ippprog{pantasks} level relatively light,
     
    21472197\label{sec:automation}
    21482198
    2149 Outside of the basic sequence of \ippstage{chip} to \ippstage{warp}, there is no single
    2150 natural next step.  For example: a stack can be generated with any
    2151 number of input warps; a difference image can be generated between a
    2152 warp and any one of many other warps or stacks.  Without a single
    2153 sequence, more complex and sophisticated decisions much be made.
     2199Beyond of the basic sequence of \ippstage{chip} to \ippstage{warp},
     2200there is no single natural ``next step''.  For example: a stack can be
     2201generated with any number of input warps; a difference image can be
     2202generated between a warp and any one of many other warps or stacks.
     2203Without a single sequence, more complex and sophisticated decisions
     2204much be made.
    21542205
    21552206For nightly processing of data obtained at the summit, this is handled
     
    22522303generated by the GPC1 camera.  The \ippprog{Nebulous} system was
    22532304designed to aid in thie process.  \ippprog{Nebulous} is not a file
    2254 system per-se, but only method of tracking the locations of files
     2305system per-se, but only a method of tracking the locations of files
    22552306within the file system, and of tracking duplicate copies of the same
    22562307file.  The core of \ippprog{Nebulous} is a mysql database which tracks
     
    22762327All of the analysis stages which interact with that chip could then be
    22772328preferentially targeted to be run on that computer.  The localization
    2278 in \ippprog{Nebulous} and the host targeted processing in \ippprog{pantasks}
    2279 can therefore work together to encourage processing to require only
    2280 local disk access, reducing the I/O local on the network
    2281 infrastructure.  In the early stages of the Pan-STARRS project, this
    2282 was important because network bandwidth was an expensive resource.  In
    2283 practice, the as-built IPP has had sufficient network bandwidth that
    2284 this targetting was not required.  In practice, due to the timing of
    2285 hardware acquisition, occasional hardware failures, and other
    2286 organizational details, targeted processing has only been used to a
    2287 moderate degree within the Pan-STARRS cluster.
     2329in \ippprog{Nebulous} and the host targeted processing in
     2330\ippprog{pantasks} can therefore work together to encourage processing
     2331to require only local disk access, reducing the I/O local on the
     2332network infrastructure.  In the early stages of the Pan-STARRS
     2333project, this was important because network bandwidth was an expensive
     2334resource.  In practice, the as-built IPP has had sufficient network
     2335bandwidth that this targetting was not completely required.  In
     2336practice, due to the timing of hardware acquisition, occasional
     2337hardware failures, and other organizational details, targeted
     2338processing has only been used to a moderate degree within the
     2339Pan-STARRS cluster.
    22882340
    22892341\subsubsection{Implementation Details}
    22902342
    22912343The user interfaces to Nebulous consist of command-line programs as
    2292 well as APIs in both C and Perl. 
    2293 
    2294 The basic user commands to interact with Nebulous are to 1) query the
    2295 database for an existing storage object, and find a valid file
    2296 instance associated with that object; 2) create a new storage object,
    2297 which instantiates an empty file that can be opened for writing; 3)
    2298 replicate an existing storage object to create more file instances; 4)
    2299 cull a single file instance of storage object from the cluster; and 5)
    2300 remove a storage object, and ensure that all file instances are
    2301 removed.  The filehandles returned for newly created instances can
    2302 then be opened for reading and writing data to that instance.
     2344well as APIs in both C and Perl.  The basic user commands to interact
     2345with Nebulous are to 1) query the database for an existing storage
     2346object, and find a valid file instance associated with that object; 2)
     2347create a new storage object, which instantiates an empty file that can
     2348be opened for writing; 3) replicate an existing storage object to
     2349create more file instances; 4) cull a single file instance of storage
     2350object from the cluster; and 5) remove a storage object, and ensure
     2351that all file instances are removed.  The filehandles returned for
     2352newly created instances can then be opened for reading and writing
     2353data to that instance.
    23032354
    23042355% The basic user commands to interact
     
    24292480Requests to this server may restrict to the latest by time.  Each row
    24302481in the listing includes basic information about the exposure: an
    2431 exposure identifier (e.g., o5432g0123o; see~\ref{GPC1.names} for
    2432 details), the date and time of the exposure, the telescope commanded
    2433 pointing, the filter and exposure time, and the observation comment
    2434 for that exposure.  The row also provides a link to a listing of the
    2435 chips associated with that exposure.  This listing includes a link to
    2436 the individual chip FITS files as well as an md5 checksum.  Systems
    2437 which are allowed access may download the raw chip FITS files via http
    2438 requests to the provided links.
     2482exposure identifier \citep[e.g., o5432g0123o; see][for
     2483  details]{chambers2017}, the date and time of the exposure, the
     2484telescope commanded pointing, the filter and exposure time, and the
     2485observation comment for that exposure.  The row also provides a link
     2486to a listing of the chips associated with that exposure.  This listing
     2487includes a link to the individual chip FITS files as well as an md5
     2488checksum.  Systems which are allowed access may download the raw chip
     2489FITS files via http requests to the provided links.
    24392490
    24402491% \note{add a discussion of gpc1 filenames?}
Note: See TracChangeset for help on using the changeset viewer.