IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39846


Ignore:
Timestamp:
Dec 11, 2016, 9:09:09 PM (10 years ago)
Author:
eugene
Message:

updates

Location:
trunk/doc/release.2015
Files:
2 edited

Legend:

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

    r39823 r39846  
    55
    66\RequirePackage{color}
     7\RequirePackage{code}
    78\input{astro.sty}
    89
     
    1819
    1920% Pick a terse version of the title here;
    20 \shorttitle{PS1 Data Processing Stages}
     21\shorttitle{PS1 Data Processing System}
    2122\shortauthors{E.A. Magnier et al}
    2223\begin{document}
    23 \title{Pan-STARRS Data Processing Stages}
     24\title{Pan-STARRS Data Processing System}
    2425
    2526% this is a crude trick to get the order of affiliations right.  These
     
    9293% \section{INTRODUCTION}\label{sec:intro}
    9394
    94 \section{Processing Database}
     95\section{IPP Software Subsystems}
     96
     97\subsection{Processing Database}
    9598
    9699A critical element in the Pan-STARRS IPP infrastructure is the
     
    161164crashes.
    162165
    163 \section{Download from Summit}
     166\subsection{Nebulous}
     167
     168\subsection{Pantasks \& Parallel Processing}
     169
     170\subsection{DVO}
     171
     172The Pan-STARRS IPP uses an internal database system, distinct from the
     173publically visible database system, to determine the association
     174between multiple detections of the same astronomical object and as
     175part of the astrometric and photometric calibration process.  This
     176database system, called the ``Desktop Virtual Observatory'' (DVO) was
     177developed originally for the LONEOS project, and used as part of the
     178CFHT Elixir system (Magnier \& Cuillandre REF).  The capabilities of
     179this databasing system have been somewhat expanded for the Pan-STARRS
     180context. 
     181
     182One of the main purposes of the DVO system is to define the
     183relationship between individual detections of an astronomical object
     184and the definition of that object.  Before describing the database
     185schema, we will discuss the process by which detections are associated
     186with objects.  New detections are generally added to the database in a
     187group associated with, for example, an image from the GPC1 camera.  As
     188new detections are loaded, they are compared to the objects already
     189stored in the database.  If an object is already found in the database
     190within the match radius, the new detection is associated to that
     191object. If more than one object exists within the database, the
     192detection is associated with the closest object. 
     193
     194Detections in DVO have a special piece of metadata called the
     195\code{photcode} which identifies the source of the measurement.  A
     196\code{photcode} has a name which in general consists of the name of
     197the camera or telescope (e.g., GPC1 or 2MASS), the name (or short-hand
     198name) of the filter used for the measurement (e.g., $g$), and an
     199identifier for the detector, if not unique (e.g., XY01 for GPC1).
     200Along with each name, there is a numerical value for the photcode.  A
     201table within the DVO system, \code{Photcode}, lists the photcoes and
     202defines a number of additional pieces of information for each
     203photcode.  These include the nominal zero point and airmass slope, as
     204well as color trends to transform a measurement in the specific
     205photcode to a common system.  There are 3 classes of photcodes defined
     206within the DVO system.  Those photcodes associated with detections
     207from an image loaded into the database system are called \code{DEP}
     208photcodes.  There are also photcodes associated with the average
     209photometry values, called SEC photcodes.  There are also those
     210measurements which come from external data sources for which DVO does
     211not have any information to determine a calibration (e.g.,
     212instrumental magnitudes and detector coordinates).  These are
     213measurements are reference values and are assigned REF photcodes.
     214
     215In the implementation of DVO used for the PV3 calibration analysis,
     216the database tables are stored on disk using binary FITS tables.  Each
     217type of database table is stored as a separate file, or a collection
     218of files for table which are spatially partitioned.  The binary FITS
     219tables may be optionally compressed using the (to date) experimental
     220FITS binary table compression strategy outlined by REF.  In this
     221compression scheme, using a strategy similar to that used for FITS
     222image compression (REF), the data stored in the binary table is
     223compressed and stored in the 'HEAP' section of the FITS table.  In
     224brief, each column in the FITS table is compressed as one (or more)
     225blocks.  The standard fields which describe the data column format
     226(e.g., TFORM1) are replaced with columns which describe the location
     227and size of the compressed data in the HEAP section; the information
     228about the uncompressed data is moved to a field with 'Z' prepended
     229(e.g., ZFORM1) and an additional field is added to define the
     230compression algorithm (e.g., ZCTYP1).  The column names (e.g., TTYPE1)
     231and units (e.g., TUNIT1) are retained in their original form.  The
     232compression algorithm can treat the entire column as a single block of
     233data, or it may be broken into a number of chunks, each compressed in
     234turn (this must be the same for all columns).  Additional header
     235information is added to describe the block sizes and infomation needed
     236to describe the HEAP data section.  The compression algorithms
     237currently defined consist of the GZIP, RICE, PLIO, and HCOMPRESS
     238(REFS).  For GZIP, the compression algorithm may transpose the byte
     239order before compression: for floating point data of a similiar
     240dynamic range, this choice may allow for better compression as each
     241byte in the 4 or 8 byte floating point value is more likely to be
     242similar to the same byte in other rows than to the other bytes of the
     243same row value.  This option is called \code{GZIP_2} in the FITS
     244standard, as opposed to the standard order, \code{GZIP_1}.  The DVO
     245system can be set to specify the compression options for each column
     246in the tables.  In practice, we have chosen a default in which
     247floating point numbers used \code{GZIP_2}, character strings use
     248\code{GZIP_1}, integers use \code{RICE}. 
     249
     250\subsubsection{Sky Partition}
     251
     252DVO includes two major classes of database tables: those containing
     253information directly about astronomical objects in the sky and those
     254containing other supporting information.  The object-related tables
     255are partitioned on the basis of position in the sky: objects within a
     256region bounded by lines of constant RA,DEC are contained in a specific
     257file.  The boundaries and the associated partition names are stored in
     258one of the supporting tables, \code{SkyTable}.  This table contains
     259the definitions of the boundaries for each sky region (\code{R_MIN},
     260\code{R_MAX}, \code{D_MIN}, \code{D_MAX}), the name of the sky region,
     261an ID (\code{INDEX}, equal to the sequence number of the region in the
     262table), and index entries to enable navigation within the table.  The
     263regions are defined in a hierarchical sense, with a series of levels
     264each containing a finer mesh of regions covering the sky. 
     265
     266In the default used by the PV3 DVO, the partitioning scheme is based
     267on the one used by the Hubble Space Telescope Guide Star Catalog
     268files.  Level 0 is a single region covering the full sky.  Level 1
     269divides the sky in Declination into bands 7.5\degree\ high.  Level 2
     270subdivides these Declination bands in the RA direction, with spacing
     271related to the stellar density.  Level 3 divides these RA chunks into
     2724 - 8 smaller partitions.  This level exactly matches the HST GSC
     273layout, and uses the same naming convention to identify the
     274partitions: n0000/0000, etc. \note{more on the names?}.  Level 4
     275further divides these regions by a factor of 16.  In the
     276\code{SkyTable}, a region at one level has a pointer to its parent
     277region (the one which contains it) and a sequence pointing to its
     278children (regions it contains).  The \code{SkyTable} enables fast
     279lookups of the on-disk partitions which map to a specific coordinate
     280on the sky.  In general, a single DVO will have the full sky
     281represented with tables at a single level, though it is possible for
     282mixed levels to be used, this mode is not well tested.  For the PV3
     283master database, the partitioning at the 5th level results in \approx
     284150,000 regions to cover the full sky, of which \approx 110,000 are
     285used for the PV3 $3\pi$ data.  The densest portions of the bulge
     286contain at most \approx 300k astronomical objects in the database
     287files, with an associated maximum of 30M measurements in these files.
     288With the compression scheme described above, this makes the largest
     289database files \approx 3GB, which can be loaded into memory in 30
     290seconds on our partition machines.
     291
     292The DVO software system allows the tables which are partitioned across
     293the sky to also be distributed across multiple computers, which we
     294call partition hosts.  A single file defines the names of these
     295partition hosts and the location of the database partition on the
     296disks of that machine.  The \code{SkyTable} contains elements to
     297define by ID the parition host to which a partitioned set of tables
     298has been assigned.  Operations which query the database, or perform
     299other operations on the database, are aware of the partitioning scheme
     300and will launch their operations as remote processes on the machines
     301which contain the data they need.  For example, a query for data from
     302a small region will launch sub-query operations on the machines which
     303contain the data overlapping the region of interest.  These remote
     304query operations will select the database information which matches
     305the query request (i.e., applying restrictions as defined) and return
     306to the master process the results.  The results from the various
     307partition hosts are then merged into a single result by the master
     308process.  This parallelization is critical to querying and
     309manipulating the enormous database on a reasonable timescale.
     310
     311\subsection{Tables which describe objects}
     312
     313Two tables carry the most important information about the astronomical
     314objects in the database: Average and SecFilt.  These two tables
     315specify the main average properties of the astronomical object.  The
     316Average table includes the astrometric information ($\alpha, \delta,
     317\mu \alpha, \mu \delta, \pi$) and associated errors, data quality
     318flags for each object, links to the other tables, and a number of IDs,
     319with one row for each astronomical object.  \note{go into complete
     320  detail here on the IDs?}.  The SecFilt table\footnote{The name
     321  SecFilt is a bit of a historical misnomer: originally, DVO was
     322  designed for a monochromatic survey and data for a single
     323  photometric band was maintained in the Average table.  Later, DVO
     324  was adapted to a multifilter system and additional filters were
     325  added to the SecFilt (Secondary Filter) table.  Eventually, the
     326  schema was normalized and all photometric data placed in SecFilt,
     327  with the Primary filter concept being dropped, but the name has
     328  since stuck.} contains average photometric information for a
     329collection of filters.  A given DVO instance has a specified set of
     330filters for which average photometry is stored in the SecFilt table.
     331The number and choice of filters for the SecFilt may be modified by
     332the database administrator fairly easily, but the process of updating
     333the database is somewhat expensive (\approx 24 hours for the current
     334PV3 instance).  Thus the choice is semi-static for a given DVO
     335instance.  In the case of the PV3 DVO instance, 9 average bandpasses
     336are defined: {\it g, r, i, z, y, J, H, K, w}.  The SecFilt table
     337contains one row for each filter for each object, thus the PV3 DVO
     338contains 9 times as many rows as the Average table.  The order of the
     339table is fixed in relation to the Average table: row $i$ of Average
     340defines the object with photometry contained in rows $9i \rightarrow 9i +
     3418$ ($i$ is zero counting). 
     342
     343The individual measurements of the astronomical objects are carried in
     344the table \code{Measure}.  This table lists the values measured by
     345\code{psphot} for each chip, warp, or stack image.  This includes the
     346instrumental magnitudes for the PSF, aperture, and Kron photometry;
     347raw position (Xccd, Yccd) and second moments (Mxx, Myy, Mxy), along
     348with shape parameters of the PSF model at the position of the object
     349(FWx, FWy, theta).  This table also includes metadata such as the
     350exposure time, the date \& time of the observation, airmass, azimuth,
     351and information specifying the filter \note{describe the photcodes}.
     352The \code{Measure} table also carried the calibration magnitude offsts
     353($M_{\rm cal}$ and $M_{\rm flat}$ discussed below) and the
     354astrometrically calibrated position.  Astrometric offsets for several
     355systematic corrections discussed below are also defined for each
     356measurement.  Since stacks and forced warp photometry may have
     357non-significant values, the table is somewhat de-normalized in that it
     358also carried instrumental flux values for the PSF, aperture, and Kron
     359photometry. 
     360
     361In the \code{Measure} table, there are three fields which provide two
     362independent links from the specific measurement to the associated
     363object: \code{Measure.catID} specifies the spatial partition to which
     364the measurement belongs; \code{Measure.objID} specifies to which entry
     365in the \code{Average} table the measurement belongs.  These two 32 bit
     366fields can thus be combined into a single 64 bit unique ID for all
     367objects in the database.  In addition, the field \code{Measure.averef}
     368specifies the row number in the \code{Average} table of the associated
     369object.  The \code{Measure} table may be unsorted, in which case it is
     370slow to find the measurements associated with a specific object (a
     371full table scan is required).  After the table is sorted, the
     372\code{Measure} rows for a given object are grouped together.  In the
     373case, the fields \code{Average.measureOffset} and
     374\code{Average.Nmeasure} define an index for the code to jump to the
     375list of measurements for a single object.  The field
     376\code{Measure.imageID} defines the link from the measurement to the
     377image which supplied the measurement.
     378
     379\note{some discussion of the db construction, addstar, dvomerge, etc?}
     380
     381For the warp images, we also measure the weak lensing KSB parameters
     382related to the shear and smear tensors.  These measurements are stored
     383in the \code{Lensing} table, along with the radial aperture fluxes for
     384radii numbers 5, 6, \& 7 (XX, XX, XX arcsec).  This table contains one
     385row for every warp row.  Similarly to the \code{Measure} table, the fields
     386\code{objID}, \code{catID}, and \code{averef} define links from the
     387\code{Lensing} table to the \code{Average} table.  In a similar
     388fashion, the fields \code{Average.lensingOffset} and
     389\code{Average.Nlensing} are the index into the sorted \code{Lensing}
     390table entries.  \note{discuss failure of the Lensing to Measure
     391  indexing}
     392
     393The values stored in the \code{Lensing} table are used to calculate
     394average values for each of these types of measurements in each
     395filter.  The \code{Lensobj} table stores the averaged KSB and radial
     396aperture photometry for each of the 5 filters \grizy.  This table
     397contains one entry per object per filter.  The table is not generally
     398stored unsorted as it is calculated after the full database is
     399populated.  The link from \code{Average} to \code{Lensobj} is defined
     400by the fields \code{Average.offsetLensobj} and
     401\code{Average.Nlensobj}.  Each \code{Lensobj} row also includes the
     402photcode (filter) for which the average lensing (and radial aperture)
     403properties have been calculated.
     404
     405The \code{Galphot} table stores the results of the forced galaxy
     406fitting analysis for each object that has been measured.  This table
     407contains one row per filter and model type (Sersic, Exponential,
     408DeVaucouleur) if forced galaxy models have been calculate for the
     409object.  \note{need to expand on this somewhat}
     410
     411The \code{Starpar} table carries measurements provide by Greg Green \&
     412Eddie Schlafly from their analysis of the SED of objects in the PS1
     413$3\pi$ data, using the \note{PV1?} version of the analysis (Green et
     414al REF).  In this work, the goal was a 3D model of the dust in the
     415Galaxy based on Pan-STARRS (\note{and WISE \& 2MASS?}) photometry.  As
     416part of this analysis, the authors fit the SEDs of all \note{stellar?}
     417sources with stellar models including free parameters of extinction,
     418distance modulus, metallicity, and absolute r-band magnitude.  While
     419these photometric distance modulus measurements are not extremely
     420precise (see below), they provide a constraint on the distance is used
     421in our analysis of the astrometry (see Section~\ref{sec:astrometry}).
     422
     423\subsection{Other Tables}
     424
     425Data from GPC1 (and other cameras processed by the IPP) are loaded
     426into DVO in units \code{smf} files generated by the Camera calibration
     427stage.  As described above, these files contain all measurements from
     428a complete exposure, with measurements from each chip grouped into
     429separate FITS tables.  When these measurements are loaded into the
     430\code{Measure} and similar tables, a subset of the information from
     431the chip header is used to populated a row in the DVO \code{Image}
     432table.  This table contains one row for each chip known to DVO, with
     433information such as the filter (\code{photcode}), the exposure time,
     434the airmass, the astrometric calibration terms, the photometric
     435zero point, etc.  For GPC1 and other mosaic cameras, an additional row
     436is defined to carry the projection and camera distortion elements of
     437the astrometry model.  As chips are loaded into this table, they are
     438assigned an internal ID (a running sequence in the table).  Images may
     439also be assigned an external ID: in the case of the GPC1 images, this
     440ID is defined by the processing mysql database and is guaranteed to be
     441unique within the processing system.
     442
     443Other tables are used to track information used by the calibration
     444system.  This includes the complete set of flat-field corrections
     445determined by the photometry calibration analysis (see
     446Section~\ref{sec:relphot}) and the astrometric flat-field corrections
     447determined by the astrometry calibration analysis (see Section~\ref{sec:relastro})
     448
     449\section{IPP Data Processing Stages}
     450
     451\subsection{Download from Summit}
    164452
    165453As exposures are taken by the PS1 telescope \& camera system, the 60
     
    197485chips. 
    198486
    199 \section{Image Registration}
     487\subsection{Image Registration}
    200488
    201489Once chips for an exposure have all been downloaded, the exposure is
     
    223511database tables (rawExp and rawImfile).
    224512
    225 \section{Chip Processing}
     513\subsection{Chip Processing}
    226514
    227515The science analysis of an exposure begins with the processing of the
     
    260548the processing monitor tool.
    261549
    262 \section{Camera Calibration}
     550\subsection{Camera Calibration}
    263551
    264552After sources have been detected and measured for each of the chip,
     
    300588monitoring system to visualize the data processing.
    301589
    302 \section{Warp}
     590\subsection{Warp}
    303591
    304592Once astrometric and photometric calibrations have been performed,
     
    316604  available} from the image extraction tools \note{in DR2}.
    317605
    318 \section{Stack}
     606\subsection{Stack}
    319607
    320608The skycell images generated by the Warp process are added together to
     
    348636transients from a given season.
    349637
    350 \section{Stack Photometry}
     638\subsection{Stack Photometry}
    351639
    352640The stack images are generated in the Stack stage of the IPP, but the
     
    389677is used for the Camera and Stack calibration stages.
    390678
    391 \section{Forced Warp Photometry}
     679\subsection{Forced Warp Photometry}
    392680
    393681Traditionally, projects which use multiple exposures to increase the
     
    462750measurement as the signal-to-noise increases by $\sqrt{N}$. 
    463751
    464 \section{Forced Galaxy Models}
     752\subsection{Forced Galaxy Models}
    465753
    466754The convolved galaxy models are also re-measured on the warp images by
     
    515803  and objects}.
    516804
    517 \section{Difference Images}
     805\subsection{Difference Images}
    518806
    519807Two of the primary science drivers for the Pan-STARRS system are the
     
    548836diffs'. 
    549837
    550 \begin{verbatim}
    551 DVO Ingest
    552 Calibration
    553 IPP to PSPS
    554 PSPS Load & Merge
    555 \end{verbatim}
     838\subsection{Addstar : DVO Ingest}
     839
     840\subsection{Calibration Operations}
     841
     842\subsection{IPP to PSPS}
     843
     844\subsection{PSPS Load \& Merge}
     845
     846\section{IPP Hardware Systems}
     847
     848\subsection{Kihei Processing Cluster}
     849
     850\subsection{Los Alamos National Labs}
     851
     852\subsection{UH Cray Cluster}
    556853
    557854\end{document}
  • trunk/doc/release.2015/ps1.calibration/calibration.tex

    r39845 r39846  
    503503the data from the exposure are loaded into the DVO database.
    504504
    505 \section{DVO Description}
    506 
    507 The Pan-STARRS IPP uses an internal database system, distinct from the
    508 publically visible database system, to determine the association
    509 between multiple detections of the same astronomical object and as
    510 part of the astrometric and photometric calibration process.  This
    511 database system, called the ``Desktop Virtual Observatory'' (DVO) was
    512 developed originally for the LONEOS project, and used as part of the
    513 CFHT Elixir system (Magnier \& Cuillandre REF).  The capabilities of
    514 this databasing system have been somewhat expanded for the Pan-STARRS
    515 context. 
    516 
    517 One of the main purposes of the DVO system is to define the
    518 relationship between individual detections of an astronomical object
    519 and the definition of that object.  Before describing the database
    520 schema, we will discuss the process by which detections are associated
    521 with objects.  New detections are generally added to the database in a
    522 group associated with, for example, an image from the GPC1 camera.  As
    523 new detections are loaded, they are compared to the objects already
    524 stored in the database.  If an object is already found in the database
    525 within the match radius, the new detection is associated to that
    526 object. If more than one object exists within the database, the
    527 detection is associated with the closest object. 
    528 
    529 Detections in DVO have a special piece of metadata called the
    530 \code{photcode} which identifies the source of the measurement.  A
    531 \code{photcode} has a name which in general consists of the name of
    532 the camera or telescope (e.g., GPC1 or 2MASS), the name (or short-hand
    533 name) of the filter used for the measurement (e.g., $g$), and an
    534 identifier for the detector, if not unique (e.g., XY01 for GPC1).
    535 Along with each name, there is a numerical value for the photcode.  A
    536 table within the DVO system, \code{Photcode}, lists the photcoes and
    537 defines a number of additional pieces of information for each
    538 photcode.  These include the nominal zero point and airmass slope, as
    539 well as color trends to transform a measurement in the specific
    540 photcode to a common system.  There are 3 classes of photcodes defined
    541 within the DVO system.  Those photcodes associated with detections
    542 from an image loaded into the database system are called \code{DEP}
    543 photcodes.  There are also photcodes associated with the average
    544 photometry values, called SEC photcodes.  There are also those
    545 measurements which come from external data sources for which DVO does
    546 not have any information to determine a calibration (e.g.,
    547 instrumental magnitudes and detector coordinates).  These are
    548 measurements are reference values and are assigned REF photcodes.
    549 
    550 In the implementation of DVO used for the PV3 calibration analysis,
    551 the database tables are stored on disk using binary FITS tables.  Each
    552 type of database table is stored as a separate file, or a collection
    553 of files for table which are spatially partitioned.  The binary FITS
    554 tables may be optionally compressed using the (to date) experimental
    555 FITS binary table compression strategy outlined by REF.  In this
    556 compression scheme, using a strategy similar to that used for FITS
    557 image compression (REF), the data stored in the binary table is
    558 compressed and stored in the 'HEAP' section of the FITS table.  In
    559 brief, each column in the FITS table is compressed as one (or more)
    560 blocks.  The standard fields which describe the data column format
    561 (e.g., TFORM1) are replaced with columns which describe the location
    562 and size of the compressed data in the HEAP section; the information
    563 about the uncompressed data is moved to a field with 'Z' prepended
    564 (e.g., ZFORM1) and an additional field is added to define the
    565 compression algorithm (e.g., ZCTYP1).  The column names (e.g., TTYPE1)
    566 and units (e.g., TUNIT1) are retained in their original form.  The
    567 compression algorithm can treat the entire column as a single block of
    568 data, or it may be broken into a number of chunks, each compressed in
    569 turn (this must be the same for all columns).  Additional header
    570 information is added to describe the block sizes and infomation needed
    571 to describe the HEAP data section.  The compression algorithms
    572 currently defined consist of the GZIP, RICE, PLIO, and HCOMPRESS
    573 (REFS).  For GZIP, the compression algorithm may transpose the byte
    574 order before compression: for floating point data of a similiar
    575 dynamic range, this choice may allow for better compression as each
    576 byte in the 4 or 8 byte floating point value is more likely to be
    577 similar to the same byte in other rows than to the other bytes of the
    578 same row value.  This option is called \code{GZIP_2} in the FITS
    579 standard, as opposed to the standard order, \code{GZIP_1}.  The DVO
    580 system can be set to specify the compression options for each column
    581 in the tables.  In practice, we have chosen a default in which
    582 floating point numbers used \code{GZIP_2}, character strings use
    583 \code{GZIP_1}, integers use \code{RICE}. 
    584 
    585 \subsubsection{Sky Partition}
    586 
    587 DVO includes two major classes of database tables: those containing
    588 information directly about astronomical objects in the sky and those
    589 containing other supporting information.  The object-related tables
    590 are partitioned on the basis of position in the sky: objects within a
    591 region bounded by lines of constant RA,DEC are contained in a specific
    592 file.  The boundaries and the associated partition names are stored in
    593 one of the supporting tables, \code{SkyTable}.  This table contains
    594 the definitions of the boundaries for each sky region (\code{R_MIN},
    595 \code{R_MAX}, \code{D_MIN}, \code{D_MAX}), the name of the sky region,
    596 an ID (\code{INDEX}, equal to the sequence number of the region in the
    597 table), and index entries to enable navigation within the table.  The
    598 regions are defined in a hierarchical sense, with a series of levels
    599 each containing a finer mesh of regions covering the sky. 
    600 
    601 In the default used by the PV3 DVO, the partitioning scheme is based
    602 on the one used by the Hubble Space Telescope Guide Star Catalog
    603 files.  Level 0 is a single region covering the full sky.  Level 1
    604 divides the sky in Declination into bands 7.5\degree\ high.  Level 2
    605 subdivides these Declination bands in the RA direction, with spacing
    606 related to the stellar density.  Level 3 divides these RA chunks into
    607 4 - 8 smaller partitions.  This level exactly matches the HST GSC
    608 layout, and uses the same naming convention to identify the
    609 partitions: n0000/0000, etc. \note{more on the names?}.  Level 4
    610 further divides these regions by a factor of 16.  In the
    611 \code{SkyTable}, a region at one level has a pointer to its parent
    612 region (the one which contains it) and a sequence pointing to its
    613 children (regions it contains).  The \code{SkyTable} enables fast
    614 lookups of the on-disk partitions which map to a specific coordinate
    615 on the sky.  In general, a single DVO will have the full sky
    616 represented with tables at a single level, though it is possible for
    617 mixed levels to be used, this mode is not well tested.  For the PV3
    618 master database, the partitioning at the 5th level results in \approx
    619 150,000 regions to cover the full sky, of which \approx 110,000 are
    620 used for the PV3 $3\pi$ data.  The densest portions of the bulge
    621 contain at most \approx 300k astronomical objects in the database
    622 files, with an associated maximum of 30M measurements in these files.
    623 With the compression scheme described above, this makes the largest
    624 database files \approx 3GB, which can be loaded into memory in 30
    625 seconds on our partition machines.
    626 
    627 The DVO software system allows the tables which are partitioned across
    628 the sky to also be distributed across multiple computers, which we
    629 call partition hosts.  A single file defines the names of these
    630 partition hosts and the location of the database partition on the
    631 disks of that machine.  The \code{SkyTable} contains elements to
    632 define by ID the parition host to which a partitioned set of tables
    633 has been assigned.  Operations which query the database, or perform
    634 other operations on the database, are aware of the partitioning scheme
    635 and will launch their operations as remote processes on the machines
    636 which contain the data they need.  For example, a query for data from
    637 a small region will launch sub-query operations on the machines which
    638 contain the data overlapping the region of interest.  These remote
    639 query operations will select the database information which matches
    640 the query request (i.e., applying restrictions as defined) and return
    641 to the master process the results.  The results from the various
    642 partition hosts are then merged into a single result by the master
    643 process.  This parallelization is critical to querying and
    644 manipulating the enormous database on a reasonable timescale.
    645 
    646 \subsection{Tables which describe objects}
    647 
    648 Two tables carry the most important information about the astronomical
    649 objects in the database: Average and SecFilt.  These two tables
    650 specify the main average properties of the astronomical object.  The
    651 Average table includes the astrometric information ($\alpha, \delta,
    652 \mu \alpha, \mu \delta, \pi$) and associated errors, data quality
    653 flags for each object, links to the other tables, and a number of IDs,
    654 with one row for each astronomical object.  \note{go into complete
    655   detail here on the IDs?}.  The SecFilt table\footnote{The name
    656   SecFilt is a bit of a historical misnomer: originally, DVO was
    657   designed for a monochromatic survey and data for a single
    658   photometric band was maintained in the Average table.  Later, DVO
    659   was adapted to a multifilter system and additional filters were
    660   added to the SecFilt (Secondary Filter) table.  Eventually, the
    661   schema was normalized and all photometric data placed in SecFilt,
    662   with the Primary filter concept being dropped, but the name has
    663   since stuck.} contains average photometric information for a
    664 collection of filters.  A given DVO instance has a specified set of
    665 filters for which average photometry is stored in the SecFilt table.
    666 The number and choice of filters for the SecFilt may be modified by
    667 the database administrator fairly easily, but the process of updating
    668 the database is somewhat expensive (\approx 24 hours for the current
    669 PV3 instance).  Thus the choice is semi-static for a given DVO
    670 instance.  In the case of the PV3 DVO instance, 9 average bandpasses
    671 are defined: {\it g, r, i, z, y, J, H, K, w}.  The SecFilt table
    672 contains one row for each filter for each object, thus the PV3 DVO
    673 contains 9 times as many rows as the Average table.  The order of the
    674 table is fixed in relation to the Average table: row $i$ of Average
    675 defines the object with photometry contained in rows $9i \rightarrow 9i +
    676 8$ ($i$ is zero counting). 
    677 
    678 The individual measurements of the astronomical objects are carried in
    679 the table \code{Measure}.  This table lists the values measured by
    680 \code{psphot} for each chip, warp, or stack image.  This includes the
    681 instrumental magnitudes for the PSF, aperture, and Kron photometry;
    682 raw position (Xccd, Yccd) and second moments (Mxx, Myy, Mxy), along
    683 with shape parameters of the PSF model at the position of the object
    684 (FWx, FWy, theta).  This table also includes metadata such as the
    685 exposure time, the date \& time of the observation, airmass, azimuth,
    686 and information specifying the filter \note{describe the photcodes}.
    687 The \code{Measure} table also carried the calibration magnitude offsts
    688 ($M_{\rm cal}$ and $M_{\rm flat}$ discussed below) and the
    689 astrometrically calibrated position.  Astrometric offsets for several
    690 systematic corrections discussed below are also defined for each
    691 measurement.  Since stacks and forced warp photometry may have
    692 non-significant values, the table is somewhat de-normalized in that it
    693 also carried instrumental flux values for the PSF, aperture, and Kron
    694 photometry. 
    695 
    696 In the \code{Measure} table, there are three fields which provide two
    697 independent links from the specific measurement to the associated
    698 object: \code{Measure.catID} specifies the spatial partition to which
    699 the measurement belongs; \code{Measure.objID} specifies to which entry
    700 in the \code{Average} table the measurement belongs.  These two 32 bit
    701 fields can thus be combined into a single 64 bit unique ID for all
    702 objects in the database.  In addition, the field \code{Measure.averef}
    703 specifies the row number in the \code{Average} table of the associated
    704 object.  The \code{Measure} table may be unsorted, in which case it is
    705 slow to find the measurements associated with a specific object (a
    706 full table scan is required).  After the table is sorted, the
    707 \code{Measure} rows for a given object are grouped together.  In the
    708 case, the fields \code{Average.measureOffset} and
    709 \code{Average.Nmeasure} define an index for the code to jump to the
    710 list of measurements for a single object.  The field
    711 \code{Measure.imageID} defines the link from the measurement to the
    712 image which supplied the measurement.
    713 
    714 \note{some discussion of the db construction, addstar, dvomerge, etc?}
    715 
    716 For the warp images, we also measure the weak lensing KSB parameters
    717 related to the shear and smear tensors.  These measurements are stored
    718 in the \code{Lensing} table, along with the radial aperture fluxes for
    719 radii numbers 5, 6, \& 7 (XX, XX, XX arcsec).  This table contains one
    720 row for every warp row.  Similarly to the \code{Measure} table, the fields
    721 \code{objID}, \code{catID}, and \code{averef} define links from the
    722 \code{Lensing} table to the \code{Average} table.  In a similar
    723 fashion, the fields \code{Average.lensingOffset} and
    724 \code{Average.Nlensing} are the index into the sorted \code{Lensing}
    725 table entries.  \note{discuss failure of the Lensing to Measure
    726   indexing}
    727 
    728 The values stored in the \code{Lensing} table are used to calculate
    729 average values for each of these types of measurements in each
    730 filter.  The \code{Lensobj} table stores the averaged KSB and radial
    731 aperture photometry for each of the 5 filters \grizy.  This table
    732 contains one entry per object per filter.  The table is not generally
    733 stored unsorted as it is calculated after the full database is
    734 populated.  The link from \code{Average} to \code{Lensobj} is defined
    735 by the fields \code{Average.offsetLensobj} and
    736 \code{Average.Nlensobj}.  Each \code{Lensobj} row also includes the
    737 photcode (filter) for which the average lensing (and radial aperture)
    738 properties have been calculated.
    739 
    740 The \code{Galphot} table stores the results of the forced galaxy
    741 fitting analysis for each object that has been measured.  This table
    742 contains one row per filter and model type (Sersic, Exponential,
    743 DeVaucouleur) if forced galaxy models have been calculate for the
    744 object.  \note{need to expand on this somewhat}
    745 
    746 The \code{Starpar} table carries measurements provide by Greg Green \&
    747 Eddie Schlafly from their analysis of the SED of objects in the PS1
    748 $3\pi$ data, using the \note{PV1?} version of the analysis (Green et
    749 al REF).  In this work, the goal was a 3D model of the dust in the
    750 Galaxy based on Pan-STARRS (\note{and WISE \& 2MASS?}) photometry.  As
    751 part of this analysis, the authors fit the SEDs of all \note{stellar?}
    752 sources with stellar models including free parameters of extinction,
    753 distance modulus, metallicity, and absolute r-band magnitude.  While
    754 these photometric distance modulus measurements are not extremely
    755 precise (see below), they provide a constraint on the distance is used
    756 in our analysis of the astrometry (see Section~\ref{sec:astrometry}).
    757 
    758 \subsection{Other Tables}
    759 
    760 Data from GPC1 (and other cameras processed by the IPP) are loaded
    761 into DVO in units \code{smf} files generated by the Camera calibration
    762 stage.  As described above, these files contain all measurements from
    763 a complete exposure, with measurements from each chip grouped into
    764 separate FITS tables.  When these measurements are loaded into the
    765 \code{Measure} and similar tables, a subset of the information from
    766 the chip header is used to populated a row in the DVO \code{Image}
    767 table.  This table contains one row for each chip known to DVO, with
    768 information such as the filter (\code{photcode}), the exposure time,
    769 the airmass, the astrometric calibration terms, the photometric
    770 zero point, etc.  For GPC1 and other mosaic cameras, an additional row
    771 is defined to carry the projection and camera distortion elements of
    772 the astrometry model.  As chips are loaded into this table, they are
    773 assigned an internal ID (a running sequence in the table).  Images may
    774 also be assigned an external ID: in the case of the GPC1 images, this
    775 ID is defined by the processing mysql database and is guaranteed to be
    776 unique within the processing system.
    777 
    778 Other tables are used to track information used by the calibration
    779 system.  This includes the complete set of flat-field corrections
    780 determined by the photometry calibration analysis (see
    781 Section~\ref{sec:relphot}) and the astrometric flat-field corrections
    782 determined by the astrometry calibration analysis (see Section~\ref{sec:relastro})
    783 
    784505\section{Photometry Calibration}
    785506
Note: See TracChangeset for help on using the changeset viewer.