IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.