Changeset 2176
- Timestamp:
- Oct 19, 2004, 10:17:36 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/design/ippSDRS.tex (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/design/ippSDRS.tex
r2172 r2176 1 %%% $Id: ippSDRS.tex,v 1. 8 2004-10-19 03:28:04eugene Exp $1 %%% $Id: ippSDRS.tex,v 1.9 2004-10-20 08:17:36 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 369 369 Database) are also shown. 370 370 371 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 372 371 373 \section{System Design : Architectural Components} 372 374 … … 723 725 724 726 \begin{itemize} 727 \item AP Database database tables 728 \item AP Database database engine 725 729 \item AP Database servers 726 730 \item AP Database client APIs 727 \item AP Database storage hardware728 \item AP Database database engine729 \item AP Database database tables730 731 \end{itemize} 731 732 … … 735 736 contents of these tables are outlined in 736 737 Appendix~\ref{APDBTableContents}. Below, we discuss how these tables 737 are used by the AP Database software. Three of the tables are not 738 simple tables but instead are divided into many subtables, each of 739 which represents a portion of the sky. These subtables may also be 740 distributed across different computers to distribute the processing 741 load. 742 743 The table of Images lists all of the images which provided the data in 744 the AP Database. In general, these images correspond to the Chips. 745 This table includes sufficient astrometric parameters to represent the 746 coordinates of the detections to a sufficient accuracy. 747 748 The Images in the image table group are stored in the Image table 749 which contains the (center? 0,0 pixel?) of the chip. A specific 750 coordinate can be specified to a single Image region table. However, 751 it is frequently useful to determine all regions which a specific 752 image overlaps. The Image Overlaps tables contains a list of the 753 image regions which are overlapped by each image. 754 755 The Objects table group (divided by region) stores the average 756 parameters for each astronomical object. Certain details of this 757 table have not yet been specified. In particular, objects with 738 are used by the AP Database software. Several of the tables are not 739 just simple tables in the database but are instead divided into many 740 subtables, each of which represents a portion of the sky. These 741 subtables may also be distributed across different computers to 742 distribute the processing load. 743 744 The {\tt Images} table group lists all of the images which provided 745 the data in the AP Database. These tables are subdivided by region. 746 In general, the images listed in this table correspond to the Chips. 747 This group of tables includes sufficient astrometric parameters to 748 represent the coordinates of the detections to a sufficient accuracy. 749 750 The specific subtable of {\tt Images} which contains a given image is 751 that one which contains the center pixel \tbr{or 0,0 pixel} of that 752 image. An additional table group, {\tt Image Overlaps} (with the same 753 subtable organization as the {\tt Images} subtables), lists images 754 which overlap that specific subtable. Thus, given a particular 755 coordinate, in order to find that images which overlap that 756 coordinate, it is necessary to load the images in the {\tt Images} 757 subtable which includes that coordinate, and all images in the {\tt 758 ImageOverlaps} table for that coordinate. 759 760 The {\tt Objects} table group (also divided by region) stores the 761 average parameters for each astronomical object. Certain details of 762 this table have not yet been specified. In particular, objects with 758 763 significant parallax and/or proper motion may potentially be stored in 759 a distinct table. Solar system objects, to the extent average 760 properties are maintained, are certainly stored in a separate table. 761 A related table, also divided in the same regions, is the Average 762 Magnitudes table. In this table, there are multiple rows per average 764 a distinct table. Solar system object identifications, to the extent 765 average properties are maintained in the AP Database, will certainly 766 be stored in a separate table. 767 768 A related table, also divided in the same regions, is the {\tt Average 769 Magnitudes} table. In this table, there are multiple rows per average 763 770 object, one for each of the primary filters of interest for which 764 photometric averaging is performed. 765 766 The Detections table stores all of the measurements of astronomical 767 objects on specific images. \tbd{is this table divided into P2, P4S, 768 P4D tables? 3$\sigma$ objects vs 5$\sigma$ objects? We don't want to 769 store all detections in a single table, I think}. 770 771 The Non-detections table stores information about detection failures 772 for each object. If an image is added to the database which overlaps 773 an object but the object is not detected, an entry is made in this 774 table. In fact, this table may store only the most recent 771 photometric averaging is performed. This organization makes the 772 number of primary (averaged) filters a configurable value. 773 774 The {\tt Matched Detections} table stores all of the measurements of 775 astronomical objects on specific images. This table includes all 776 detections associated with the average {\tt Objects}. As discussed 777 below, bright objects (above a configuration-specified signal-to-noise 778 level) are assigned an object even if only one detection has been 779 found at that position. Faint orphaned objects are not added to this 780 list or the list of objects. The different types of detections (P2, 781 P4$\Delta$, P4$\Sigma$) are distinguished by their photometry codes. 782 \tbr{This is only valid if the AP Database does not store different 783 quantities for these types of detections} 784 785 The {\tt Orphaned Detections} table stores the detections which have 786 not been correlated with an existing object. This table is only 787 populated for objects below a configuration-specified signal-to-noise 788 limit. Otherwise, even orphaned detections are assigned an object and 789 added to the {\tt Matched Detections} table. 790 791 The {\tt Non-detections} table stores information about detection 792 failures for each object. If an image is added to the database which 793 overlaps an object but the object is not detected, an entry is made in 794 this table. In practice, this table may store only the most recent 775 795 non-detection and the total number, or a similar reduced set of 776 796 non-detection statistics. 777 797 778 The table of regions is used to subdivide the tables of images, 779 objects, and detections. The AP Database divides the sky into a 780 hierarchy of regions (portions of the sky) each of which is in turn 781 sub-divided into smaller portions. These three tables are the three 782 largest in terms of both data volume and number of rows. Since nearly 798 The {\tt Regions} table is used to subdivide the tables of images, 799 objects, and detections, etc, as discussed above. The AP Database 800 divides the sky into a hierarchy of regions (portions of the sky) each 801 of which is in turn sub-divided into smaller portions. Since nearly 783 802 all interactions with the AP Database performed by the IPP are limited 784 803 in spatial coverage, subdividing the tables allows a specific 785 804 interaction to search only a small subset of the data. The table of 786 805 images is the smallest of the three; the table of detections is likely 787 to be the largest. As a result, the images tables will be subdivided 788 at a shallow hierarchical level, while the objects and detections are 789 subdivided on deeper (more finely sampled) levels. The region table 790 defines the sky regions and specifies if the region corresponds to an 791 image table, and object table, and/or a detection table. It also 792 specified which regions in the next level of the hierarchy are 806 to be the largest. As a result, the {\tt Images} table group will be 807 subdivided at a shallow hierarchical level, while the {\tt Objects} 808 and {\tt Detections} are subdivided on deeper (more finely sampled) 809 levels. The {\tt Regions} table defines the boundaries of the sky 810 regions and specifies if the region corresponds to an {\tt Images} 811 table, an {\tt Objects} table, and/or a {\tt Detections} table. It 812 also specifies which regions in the next level of the hierarchy are 793 813 contained by the region, and which parent region it belongs to. In 794 814 addition to improving the spatial access to the image, object, and 795 detection data, the region table allows for the multiple computers to796 serve the database tables. The region file specifies the machine815 detection data, the {\tt Regions} table allows for multiple computers 816 to serve the database tables. The region file specifies the machine 797 817 which stores the specific table. Figure~\ref{ABDBRegions} illustrates 798 this subdivision of the sky and the association between different 799 levels of the hierarchy with different subtables. 800 801 The Filters table identifies all of the physical filters (specific, 802 named pieces of glass) known to the system. A related table, 803 photcodes, defines relationships between specific photometry systems. 804 A system may consist of a detector, telescope, and specific filter, or 805 it may be a derived photometry system. \tbd{distinguish between 806 reference, average, and detection photcodes}. 818 schamatically the subdivision of the sky and the association between 819 different levels of the hierarchy with different subtables. 820 821 The {\tt Filters} table identifies all of the physical filters 822 (specific, named pieces of glass) known to the system. A related 823 table, {\tt Photcodes}, defines relationships between specific 824 photometry systems. A system may consist of a detector, telescope, 825 and specific filter, or it may be a derived photometry system. The 826 {\tt Database Machines} table identifies all of the computers 827 available to the AP Database. 807 828 808 829 \begin{table} … … 814 835 {\bf Table Name} & {\bf Description} \\ 815 836 \hline 816 Region Table & spatial distribution of tables \\ 817 Images & The images that have objects in the DB. \\ 818 Image Overlaps & Image regions which are touched by specific images. \\ 819 Objects & The objects --- average properties of multiple detections of the same object. \\ 820 Average Magnitudes & Average photometry in multiple filters \\ 821 Detections & Detections of sources in an image. \\ 822 Non-Detections & Non-detections of objects in an image. \\ 823 Filters & Filters understood by the system. \\ 824 Photcodes & Transformations between different photometric systems \\ 825 Database Machines & computers used to store the tables \\ 837 Images & The images that have objects in the DB. \\ 838 Image Overlaps & Image regions which are touched by specific images. \\ 839 Objects & The objects --- average properties of multiple detections of the same object. \\ 840 Average Magnitudes & Average photometry in multiple filters \\ 841 Matched Detections & Detections of sources in an image identified with an Object. \\ 842 Orphaned Detections & Detections of sources in an image not identified with an Object. \\ 843 Non-detections & Non-detections of objects in an image. \\ 844 Region Table & spatial distribution of tables \\ 845 Filters & Filters understood by the system. \\ 846 Photcodes & Transformations between different photometric systems \\ 847 Database Machines & computers used to store the tables \\ 848 % Zero Points & Transformations between different photometric systems \\ 849 % Distortion Models & Transformations between different photometric systems \\ 826 850 \hline 827 851 \end{tabular} … … 852 876 the sky is defined by the Region table. Each machine has a 853 877 corresponding AP Database server which runs on that machine to 854 interact with the tables available on that machine. A client chooses 855 one of the machines and sends its query or data to be inserted to that 856 machine. The server then uses the region table to determine which 857 machines contain the relevant portion of the sky. The data to be 858 inserted is divided into corresponding region chunks and sent to the 859 appropriate servers. In the case of queries, the queries are 860 redirected to the appropriate server(s). The original server may 861 collect the results and return them to the original client. 862 863 \subsubsection{AP DB Operations} 864 865 \begin{itemize} 866 \item addstar 867 \item delstar 868 \item relphot 869 \item uniphot 870 \item mosastro 871 \item distortion 872 \end{itemize} 878 interact with the tables available on that machine. Two possible 879 interaction models are considered. 880 881 {\bf Option A:} A client chooses one of the machines and sends its 882 query or data to be inserted to that machine. The server then uses 883 the region table to determine which machines contain the relevant 884 portion of the sky. The data to be inserted is divided into 885 corresponding region chunks and sent to the appropriate servers. In 886 the case of queries, the queries are redirected to the appropriate 887 server(s). The original server may collect the results and return 888 them to the original client. 889 890 {\bf Option B:} The client downloads the region table and performs the 891 division of the data into appropriate subsets. The subsets are then 892 sent to the corresponding servers by the client. 893 894 The differences between these models is small. The first option may 895 make the code more testable, placing all of the logic in the servers 896 and making each server symmetric. The smaller tables (ie, Region, 897 Filters, etc) could either be downloaded from a single server or 898 replicated to all AP DB servers. 899 900 \subsubsection{AP Database engine} 901 902 The backend database engine for the AP Database stores the tables and 903 provides them to the servers on demand. The AP Database will use a 904 \code{mysql} database engine for the function. 905 906 \subsubsection{AP DB Client operations} 907 908 The AP Database client interactions consist of a collection of basic 909 queries of the database, along with more complex operations to perform 910 particular tasks. \tbd{queries are not yet listed; provide list from 911 DVO}. The complex operations are listed below. 912 913 \paragraph{Insert Image \& Detection Set (addstar)} 914 915 One of the most basic operations needed by the AP Database is to 916 insert a collection of detections derived from a specific image, and 917 add the definition of that image to the database. This operation is 918 critical in terms of the processing throughput. After the detections 919 have been assigned to the appropriate regions, they are matched 920 against all objects in the {\tt Objects} table. Matches are performed 921 only on the basis of positional coincidence, using a matching radius 922 which may depend on the image astrometry errors, or may be a fixed 923 distance. Any matched detections are added to the {\tt Matched 924 Detections} table. Any unmatched detections brighter than the Faint 925 Detection cut-off are specified as a new {\tt Object} and also added 926 to the {\tt Matched Detections} table. Any faint unmatched detections 927 are added to the {\tt Orphaned Detections} table. This division is 928 important because it lets us automatically associate new detections 929 with existing bright objects and limits the I/O volume required to 930 make the detections. In general, there will be many few {\tt Objects} 931 than {\tt Detections}, and there will be fewer bright orphans than 932 faint orphans. 933 934 \paragraph{Insert Reference Objects (addrefs)} 935 936 This operation is very similar to the previous one. A collection of 937 reference objects are added to the database as a collection of 938 detections. The reference photometry should in general be given its 939 own photometry code. The reference data is different from the image 940 detection set because the associated image information is not 941 included. Thus, no corresponding images are added to the database. 942 943 \paragraph{Determine Relative Photometry in region (relphot)} 944 945 This operation uses the overlaps of images and multiple observations 946 of the same objects to determine the relative photometry zero-points 947 for a collection of images. This is a task which would be run much 948 more infrequently than the object insertion tasks. 949 950 \paragraph{Determine Consistent Photometry Zero Points (uniphot)} 951 952 This operation uses the time history of relative photometry zero 953 points for images and the spatial overlap information to determine a 954 best set of image zero points which have a specific time scale for the 955 atmospheric stability. 956 957 \paragraph{Determine Distortion Model (mosastro)} 958 959 This operation uses the reference and image detections to determine an 960 optical distortion model for the camera. ñ 873 961 874 962 \begin{table} … … 1157 1245 \subsection{Scheduler} 1158 1246 1247 \begin{figure} 1248 \begin{center} 1249 \resizebox{6in}{!}{\includegraphics{pics/Scheduler}} 1250 \caption{ \label{Scheduler} IPP Scheduler} 1251 \end{center} 1252 \end{figure} 1253 1159 1254 The IPP is responsible for a variety of analysis tasks: processing of 1160 1255 the science images through several stages; routine assessment of the … … 1172 1267 The IPP Scheduler acts as an intermediary between several components 1173 1268 of the IPP and also between the IPP and external agents such as OTIS 1174 and the users who must monitor the behavior of the IPP. 1269 and the users who must monitor the behavior of the IPP. The IPP 1270 Scheduler may be viewed as the central brain of the IPP. 1271 Figure~\ref{Scheduler} illustrates the design of the IPP Scheduler. 1272 1273 The IPP Scheduler performs two types of actions. 'Tasks' are 1274 long-running programs which are executed by the Controller. These are 1275 not only background tasks, but are distributed computing tasks. 1276 Examples of these include the science analysis tasks (eg, Phase 1, 2, 1277 3, 4), the Calibration construction tasks, and data copy tasks (such 1278 as copying images and metadata from the summit system). 'Tests' are 1279 short-running programs which are used to decide which tasks should be 1280 run. Tests should be designed to return immediately ($< 100 ms$) and 1281 are not run in the background; the Scheduler will block until the test 1282 is complete. The IPP Scheduler daemon, which runs continuously, 1283 performs tests (eg, queries of the IPP Metadata Database, queries of 1284 OTIS, checks of the IPP hardware status, etc). Based on these tests, 1285 the daemon defines appropriate tasks and sends them to the Controller. 1286 When tasks are completed, their results may be used by the Scheduler 1287 to update the external systems (update the Metadata Database), or the 1288 tasks themselves may send their results directly to the Metadata 1289 Database or other subsystems. Based on the successful completion (or 1290 not!) of the tasks, and the new state of entries in the Metadata 1291 Database, the Scheduler can define new tasks. 1175 1292 1176 1293 The IPP Scheduler sends commands to the IPP Controller for execution. … … 1186 1303 Controller does not need to have any information about the details of 1187 1304 the tasks which it executes, while the IPP Scheduler does not need to 1188 have detailed information about the available computer hardware.1305 monitor the computer hardware. 1189 1306 1190 1307 Communication between the IPP Scheduler and the IPP Controller is … … 1266 1383 The analysis stages are written as UNIX commands, which may be 1267 1384 executed by the IPP Controller, or may be executed individually by 1268 hand. This aspectmakes testing of the complete analysis system much1385 hand. This option makes testing of the complete analysis system much 1269 1386 easier because the individual analysis stages may be tested 1270 independently of each other and the IPP infrastructure. 1271 1272 In keeping with this design model, the analysis stages have several 1273 methods for accepting and returning the input and output data. All of 1274 the analysis stages load an analysis recipe file, which defines the 1275 details of the analysis. This includes the location of the data 1276 sources (from the metadata, from the image headers, from other 1277 external files, or supplied directly), and which steps to employ. For 1278 example, in the discussion of the Phase 2 analysis below, the recipe 1279 file may specify {\em if} a bias subtraction should be applied, {\em 1280 where} to find the overscan region and {\em which} bias image, if any, 1281 to apply. 1282 1283 \tbd{further discussion of the recipe / configuration files?} 1284 1387 independently of each other and the IPP infrastructure. 1388 1389 As part of this design model, the analysis stages have several methods 1390 for accepting and returning the input and output data and for defining 1391 optional choices in the analysis. All of the analysis stages load an 1392 analysis recipe, which defines the details of that analysis. The 1393 recipe includes the location of the data sources (from the metadata, 1394 from the image headers, from other external files, or supplied 1395 directly), which steps to employ, and how to assign optional 1396 parameters. For example, in the discussion of the Phase 2 analysis 1397 below, the recipe file may specify {\em if} a bias subtraction should 1398 be applied, {\em where} to find the overscan region and {\em which} 1399 bias image, {\em if any}, to apply. 1400 1401 The recipe is loaded as part of the runtime configuration information 1402 loaded when the analysis script starts. We define four levels of 1403 runtime configuration information. The {\tt site} configuration 1404 defines values specific to the particular installation of the 1405 software. For example, the name of the machine which hosts the 1406 Metadata Database or a default path for data files could be part of 1407 the {\tt site} configuration. Multiple installations or versions of 1408 the IPP software would need to have separate {\tt site} configuration 1409 entries. For example, a version of the IPP installed at the IfA would 1410 use a different computer for the Image Server from the live IPP 1411 installation running on the Pan-STARRS cluster. The {\tt base} 1412 configuration defines general data sources which may be needed by any 1413 portion of the IPP. The list of known telescope or filters might be 1414 an example. The {\tt camera} configuration consists of information 1415 which defines the parameters relevant to the camera known by the IPP. 1416 For example, the default layout of the detectors or the names of 1417 specific header keyword values would be defined for each camera in a 1418 camera-specific configuration collection. Finally, each analysis 1419 script loads its own recipe. The location of this configuration 1420 information may be a collection of configuration files available on 1421 disk or some subset of the information may be stored in the Metadata 1422 Database. The source of these configuration entries can be overridden 1423 when the script is executed, and individual configuration values may 1424 also be specified on the command line. Examples of the recipe and 1425 other runtime configuration options are given in 1426 Appendix~\ref{RuntimeConfig}. 1285 1427 1286 1428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 1390 1532 \item Form OT kernel 1391 1533 \item Convolve detrend images with the OT kernel 1534 \item Bias/dark/overscan subtraction 1392 1535 \item Mask bad pixels 1393 \item Mask diffraction spikes and optical ghosts1394 \item Bias/dark/overscan subtraction1395 1536 \item Trim overscan 1396 1537 \item Non-linearity correction 1397 1538 \item Flat-field 1539 \item Mask diffraction spikes and optical ghosts 1398 1540 \item Subtract sky 1541 \item Find and photometer objects in the image 1399 1542 \item Identify CRs by morphology 1400 1543 \item Determine PSF model 1401 \item Find and photometer objects in the image 1402 \item Improved astrometry 1544 \item Improve astrometry 1403 1545 \item Extract Bright object postage stamps 1404 1546 \end{itemize} 1405 1406 Several of the steps are explained in detail below. 1407 1408 \subsubsection{Form OT Kernel} 1409 1410 Certain detrend images are convolved by the OT kernel, so that they 1411 accurately represent the detrend images appropriate for the object 1412 images, which have been shifted using OT. The detrend images which 1413 must be convolved include: the flat-field and the 1414 high-spatial-frequency fringe images. The appropriate kernel for each 1415 cell of an OTA must be determined from the guide star history, 1416 extracted from the IPP Metadata Database\footnote{or image header}. 1417 If the OT kernel is not available, but the image metadata notes that 1418 it should be, the convolution is skipped, with a warning. 1419 1420 The first module for Phase 2 forms the OT kernel from the list of 1421 pixel shifts made during the exposure. This involves decoding the 1422 metadata and converting it to a data type that can be used to convolve 1423 by. The output is the OT convolution kernel. 1424 1425 \subsubsection{Convolve detrend images} 1426 1427 This module convolves the detrend images with the OT convolution kernel 1428 so that they can be used to detrend the object image. The inputs 1429 are: 1430 \begin{itemize} 1431 \item The OT convolution kernel --- from the previous module; 1432 \item The appropriate dark frame --- from the IPP Pixel Server; 1433 \item The appropriate flat-field --- from the IPP Pixel Server; 1434 \item The appropriate fringe frame(s) --- from the IPP Pixel Server; and 1435 \item The appropriate static bad pixel mask --- from the IPP Pixel Server. 1436 \end{itemize} 1437 1438 The module convolves each of the dark frame, flat-field, and the fringe 1439 frame(s) by the OT convolution kernel. Specific flags in the static 1440 bad pixel mask are grown by the outline of the OT convolution kernel 1441 (see Section \ref{ap:masks}). The output results are: 1442 \begin{itemize} 1443 \item The convolved flat-field; 1444 \item The convolved fringe frame(s); and 1445 \item The updated pixel mask. 1446 \end{itemize} 1447 Each of these will be used for a later module. The convolution method 1448 depends on the size and structure of the OT kernel. If the kernel is 1449 small ($< 5x5$ pixels), direct convolution may be employed. If the 1450 kernel is large, but may be decomposed using Gaussians, then it may be 1451 convolved using a decomposition method. 1547 The steps are explained in detail below. 1548 1549 \subsubsection{Load Images} 1550 1551 The Phase 2 analysis must load the science image to be analysed into 1552 memory, as well as the corresponding metadata (either from the image 1553 header and/or from the IPP Metadata Database). It must use the 1554 metadata for the image, along with information from the processing 1555 recipe, to determine the appropriate detrend images to be used for 1556 this analysis. The Metadata Database stores the information necessary 1557 to associate a specific science image with one of the registered 1558 master detrend images for each type. These images are also loaded by 1559 the Phase 2 analysis (note that the design of Phase 2 may perform the 1560 actual loading of pixels in blocks or groups to minimize the memory 1561 impact). 1562 1563 \subsubsection{Form OT Kernel \& Convolve with Detrend Images} 1564 1565 Science images which have been obtained with Orthogonal-Transfer 1566 Guiding have had thier pixel response smoothed by the image correction 1567 motion. For these images, some of the detrend images need to be 1568 convolved by the same OT kernel, so that they accurately represent the 1569 effective pixel response. The detrend images which must be convolved 1570 include: the flat-field image, the high-spatial-frequency fringe 1571 images, and dark images, if they are used. The appropriate kernel for 1572 each cell of an OTA must be determined from the guide star history, 1573 extracted from the IPP Metadata Database or from the image header. If 1574 the OT kernel is not available, but the image metadata notes that it 1575 should be, the convolution is skipped, with a warning. 1576 1577 The convolution method depends on the size and structure of the OT 1578 kernel. If the kernel is small ($< 5x5$ pixels), direct convolution 1579 may be employed. If the kernel is large, but may be decomposed using 1580 Gaussians, then it may be convolved using a decomposition method. 1581 1582 The module convolves each of the dark frame, flat-field, and the 1583 fringe frame(s) by the OT convolution kernel. Specific flags in the 1584 static bad pixel mask are also grown by the outline of the OT 1585 convolution kernel (see Section \ref{ap:masks}). 1452 1586 1453 1587 \subsubsection{Bias Correction / Overscan Subtraction} 1454 1588 1455 This module corrects the object exposures for the electronic pedestal 1456 introduced by the readout electronics. The inputs are: 1457 \begin{itemize} 1458 \item The object image --- from the IPP Pixel Server; 1459 \item The pixel mask --- from the previous module; 1460 \item The overscan and physical detector regions --- from the 1461 Metadata; and 1462 \item Detector characteristics (gain, read noise) --- from the 1463 Metadata. 1464 \end{itemize} 1465 1466 The overscan is averaged (either in bulk, or individually by rows) or 1467 fit with a polynomial, and the result is subtracted from the image. 1468 Overscan rows having a standard deviation which exceeds a threshold of 1469 twice (configurable) the detector read noise should be masked. Pixels 1470 saturated in the A/D converter should also be masked, and these 1471 regions grown by an additional pixel to counter CCD ``blooming''. The 1472 output is: 1473 \begin{itemize} 1474 \item The overscan-subtracted object image; and 1475 \item The updated pixel mask. 1476 \end{itemize} 1477 These will be used for a subsequent module. 1478 1479 \subsubsection{Trim} 1480 1481 This module trims the object image and each of the calibration frames to 1482 remove the outer edge which was affected by the OT during the 1483 exposure. The inputs, each from previous modules, are: 1484 \begin{itemize} 1485 \item The overscan-subtracted object image; 1486 \item The corresponding pixel mask; 1487 \item The convolved flat-field; 1488 \item The convolved fringe frame(s); and 1489 \item The dimension of the OT convolution kernel in each direction. 1490 \end{itemize} 1491 1492 Each of the input frames (object image, flat-field, fringe frame(s) 1493 and pixel mask) are trimmed by the extent of the OT convolution kernel 1494 in each direction ($+x$, $-x$, $+y$, $-y$). The outputs are trimmed 1495 images for each of the input images, which will be used in later 1496 modules. 1497 1498 \subsubsection{Non-Linearity Correction} 1499 1500 This module corrects images for non-linearity in the detector. The 1501 inputs are: 1502 \begin{itemize} 1503 \item The trimmed object image --- from a previous module; and 1504 \item The detector non-linearity correction coefficient(s) --- from 1505 the Metadata. 1506 \end{itemize} 1507 1508 The module corrects the flux in each pixel for non-linearity by applying 1509 a polynomial correction, with the specified coefficients. The output 1510 is the corrected object image, which is used for a later module. 1511 1512 \subsubsection{Flat field} 1513 1514 This module corrects the object image for variations in sensitivity over 1515 the image. The inputs are: 1516 \begin{itemize} 1517 \item The object image corrected for non-linearity; 1518 \item The corresponding pixel mask; and 1519 \item The convolved, trimmed flat-field. 1520 \end{itemize} 1521 Each of these comes from a previous module. 1522 1523 The module divides the object image by the flat-field, masking pixels 1524 that are non-positive in the flat-field. The outputs are: 1525 \begin{itemize} 1526 \item The flattened object image; and 1527 \item The updated pixel mask. 1528 \end{itemize} 1529 Both of these will be used in later modules. 1530 1531 \subsubsection{Subtract sky} 1532 1533 This module subtracts the sky background from the object image. The 1534 inputs are: 1535 \begin{itemize} 1536 \item The object image --- from the previous module; 1537 \item The list of objects on the image --- from the object database; and 1538 \item The convolved, trimmed fringe frame(s) --- from a previous module. 1539 \end{itemize} 1540 1541 The module masks (though {\em not} in the ``official'' pixel mask) all 1542 objects on the image using the astrometric solution from the 1543 boresight, and fits for the sky background, consisting of a polynomial 1544 to model the continuum, and the fringe frame(s) to model the fringes 1545 from sky emission lines. If the concentration of objects in the image 1546 is too high to reliably fit the sky background, the background 1547 solution from an exposure close in time and airmass to the current 1548 object image is used. The output is the sky-subtracted object image, 1549 which is used for the next module. 1550 1551 \subsubsection{Identify CRs by morphology} 1552 1553 This module identifies cosmic rays (or other hot pixels missed in the 1554 static bad pixel mask) on the basis of their morphology. The inputs 1555 are: 1556 \begin{itemize} 1557 \item The object image; and 1558 \item The corresponding pixel mask. 1559 \end{itemize} 1560 Both of these come from a previous module. 1561 1562 The module identifies CRs, the pixels of which are masked in the pixel 1563 mask. The pixels flagged as CRs are then grown by an additional pixel 1564 in each direction. Masked pixels are interpolated over. The outputs 1565 are the updated pixel mask, which is sent to the IPP pixel server for 1566 use in Phase 3, and is also used for the next module; and the object image, 1567 which is sent to the IPP Pixel Server. 1568 1569 \subsubsection{Detect and Measure objects} 1570 1571 This module finds objects on the object image. The inputs are: 1572 \begin{itemize} 1573 \item The sky-subtracted object image; and 1574 \item The corresponding pixel mask. 1575 \end{itemize} 1576 Both of these come from a previous module. 1577 1578 The module identifies objects on the image, which will be later used to 1579 register images from different focal planes. The output is the 1580 catalog of objects (see Appendix~\ref{ap:catalogs}) identified on 1581 the image, which is sent to the metadata database, associated with the 1582 object image. 1583 1584 Object catalogs from Phase 2 shall consist of at least the 1585 following elements for each object: 1586 \begin{itemize} 1587 \item Object centre, with corresponding errors; 1588 \item Object magnitude, with corresponding error; 1589 \item Object isophotal magnitude, with corresponding error; 1590 \item Object FWHM; 1591 \item Object elliptical axis lengths; and 1592 \item Object position angle for ellipse. 1593 \end{itemize} 1594 1595 Though further details may be required for catalogs in Phase 4, 1596 the above details are minimum requirements for Phase 2 catalogs. 1597 1598 \subsubsection{Bright object postage stamps} 1599 1600 This module saves postage stamps of bright objects, so that extra care 1601 with regard to astrometry and photometry can be taken with them at a 1602 later stage. The inputs, each from a previous module, are: 1603 \begin{itemize} 1604 \item The sky-subtracted object image; 1605 \item The corresponding pixel mask; and 1606 \item The catalog of objects. 1607 \end{itemize} 1608 1609 The module makes postage stamps of all objects brighter than a given 1610 instrumental magnitude, along with corresponding pixel masks. The 1611 outputs are these postage stamps and pixel masks, which are sent to 1612 the IPP Pixel Server. 1613 1614 \subsubsection{Pixel Masks} 1615 \label{ap:masks} 1616 1617 This section describes the requirements on Bad Pixel Masks (BPMs). 1618 These will consist of bit masks for each pixel. For Phase 2, flags 1589 The image bias must be subtracted. Since different detectors behave in 1590 different ways, several options for modelling the bias are available. 1591 The bias is measured from the image overscan region. The bias 1592 subtraction method must be capable of subtracting a single constant 1593 from the complete image, or to subtract a 1-D bias which varies as a 1594 function along the overscan. The function used to represent the 1595 overscan region may be a spline or a chebychev polynomial derived from 1596 the data values along the overscan. The values used to determine both 1597 the single constant or the inputs to the spline and polynomial fits 1598 are derived from groups of pixels on the basis of one of several 1599 statistics, including the sample and robust mean, median, and modes. 1600 In the case of a single constant, all of the overscan pixel values are 1601 used in the calculation of this statistic. In the case of the 1-D 1602 functional representation, the input values to the fit must represent 1603 the coordinate along the overscan, with the statistic derived from the 1604 pixels in the perpendicular direction at each location. 1605 Sigma-clipping on the input data values must be an option. 1606 1607 \subparagraph{Flag bad and saturated pixels} 1608 1609 A static bad pixel mask is used to identify pixels which are known to 1610 be bad in the camera. This mask is then processed with the science 1611 image. Bad pixels which are charge traps are grown by the extent of 1612 the OT convolution kernel. Bad pixels above a charge trap (i.e.\ bad 1613 colums) must not be grown, since they were not affected by pixel 1614 shifting, but only became bad at read-out. 1615 1616 Pixels which are saturated in the A/D converter, or with a signal 1617 level at which the response is excessively non-linear, must also be 1618 masked, and this area must be grown by an additional pixel to mask 1619 excess charge spillover. 1620 1621 The bad pixel mask is carried with the science images. Different bits 1622 are set to identify different reasons for masking the pixel. Flags 1619 1623 are required for at least each of the following pixel attributes: 1624 1620 1625 \begin{itemize} 1621 1626 \item The pixel is a charge trap; … … 1628 1633 \end{itemize} 1629 1634 1630 Of these, only masks for the charge traps need to be grown by the 1631 extent of the OT convolution kernel. For other pixel types, 1632 orthogonal transfer of the flux in this pixel will not (necessarily) 1633 affect the flux in neighbouring pixels 1634 1635 \subsubsection{Phase 2 Metadata} 1636 1637 The following metadata associated with the images are required for 1638 Phase 2 operation: 1639 \begin{itemize} 1640 \item The orthogonal transfer (OT) image shifts made during the 1641 exposure --- in order to create a convolution kernel; 1642 \item Time of observation --- for selecting the appropriate detrend 1643 images; 1644 \item Filter --- for selecting the appropriate detrend images; 1645 \item Telescope identification --- for selecting the appropriate 1646 detrend images; 1647 \item Exposure time --- for the photometric calibration; 1648 \item Detector gain --- for calculating photometric errors and 1649 determining the quality of the overscan; 1650 \item Detector read noise --- for calculating photometric errors and 1651 determining the quality of the overscan; 1652 \end{itemize} 1653 1654 \subsubsection{Notes} 1655 1656 \tbd{how long are processed images kept?} 1657 1658 \tbd{what subsystem deletes processed images?} 1635 \subsubsection{Trim} 1636 1637 The image is trimmed to remove the non-imaging pixels, such as the 1638 overscan and any pre-scan pixels, along with those pixels near the 1639 edges that have been compromised due to OT operation. The definition 1640 of the imaging area of the detector is determined from the camera 1641 configuration data or from the metadata associated with the image, 1642 with the choice a user-configurable option. 1643 1644 The input science and mask frames are trimmed by the extent of the OT 1645 convolution kernel in each direction ($+x$, $-x$, $+y$, $-y$). Within 1646 the PSLib image handling functions, the trim function is a virtual 1647 operation which simply marks the boundaries of the trimmed image but 1648 does not remove the corresponding memory. This allows the later 1649 corrections to work with untrimmed correction images and still apply 1650 the correct pixels. At the end of Phase 2, the only the trimmed 1651 portions of the output images are written out to disk. 1652 1653 \subsubsection{Non-Linearity Correction} 1654 1655 If required, the science image (after bias correction) must be 1656 corrected for the effects of non-linearity through a provided 1657 polynomial fit to the pixel data values or a numeric lookup table as a 1658 function of pixel flux. The choice to apply the correction must be 1659 set by the analysis recipe. 1660 1661 \subsubsection{Flat field Correction} 1662 1663 The object image (after bias correction and non-linearity correction) 1664 must be corrected for sensitivity variations as a function of 1665 position, dividing by a flat-field image. The mask is also modified 1666 for zero-valued pixels in the flat-field image. 1667 1668 \subsubsection{Sky \& Fringe subtraction} 1669 1670 After the science image has been flat-fielded, the flux contribution 1671 of the sky (from both continuum emission and the line emission that 1672 causes fringing) must be subtracted from the image. The subtraction 1673 needs to remove background (technically, foreground) variations which 1674 are not celestial but generated in the atmosphere or by more localized 1675 scattering. This background should include the contribution from the 1676 zodiacal light. This background subtraction does not address the 1677 artifacts generated by bright stars: bleeding columns, ghosts, or 1678 other localized reflection effects. This process also produces a 1679 superbinned image of the background map which may be used as a 1680 debugging diagnostic. 1681 1682 This analysis step temporarily masks objects on the image using the 1683 astrometric solution from the boresight and fits for the sky 1684 background, consisting of a polynomial to model the continuum, and the 1685 fringe frame(s) to model the fringes from sky emission lines. If the 1686 concentration of objects in the image is too high to reliably fit the 1687 sky background, the background solution from an exposure close in time 1688 and airmass to the current object image is used. The output is the 1689 sky-subtracted object image. 1690 1691 \subsubsection{Detect and Measure objects} 1692 1693 After the image have been processed by the preceeding steps, the Phase 1694 2 analysis performs a basic object detection analysis. Objects on the 1695 flat-fielded object image are found, and general parameters are 1696 measured. Object detection is performed at several stages by the IPP, 1697 with different object parameters measured in each case. 1698 Table~\ref{APdetections} gives a list of the different detection 1699 stages and the object parameters measured for those stages. For the 1700 Phase 2 analysis, the object parameters are: the object centroid and 1701 the position covarience matrix, the instrumental PSF magnitude and 1702 error, local background level and error, a measurement of the 1703 star-galaxy separation, and a measurement of the object shape 1704 ($\sigma_x, \sigma_y, \theta$). The detection threshold must be 1705 configurable, and be a function of the average background flux or the 1706 image noise map. Minimal object classification must be performed to 1707 distinguish objects which are consistent with a single PSF, objects 1708 which are inconsistent, and objects which are saturated. The 1709 resulting collection of detected objects are saved in the AP Database 1710 along with the relevant image metadata (\ie filter, exposure time, 1711 etc). In addition, this process constructs a model of the 1712 point-spread-function (PSF) as a function of position in the image. 1713 This PSF model is saved as part of the image metadata. 1714 1715 \subsubsection{Identify CRs by morphology} 1716 1717 Charged particles in the detector frequently cause features which do 1718 not have the morphology of astronomical objects. In a well-sampled 1719 image, these may be easily identified by the sharpness of the image. 1720 In a near critically-sampled image, these `cosmic rays' may be 1721 indistinguishable from stellar objects. This analysis step makes 1722 morphological identification of cosmic rays if the imaging data is 1723 sufficiently well sampled. The identified cosmic rays are masked with 1724 a configurable growth factor so that additional pixels beyond the 1725 detected pixels in the feature are also masked. 1726 1727 \subsubsection{Perform Astrometry} 1728 1729 The detected objects are matched with known astrometric reference 1730 objects, using reference object coordinates which have been adjusted 1731 for proper motion. The matches are then used to improve the 1732 astrometric parameters for the individual OTAs. The OTA astrometric 1733 parameters which are determined may include terms up to 3rd order in 1734 position, though the terms which are actually fitted are 1735 user-configurable. The Cell astrometric parameters are not allowed to 1736 vary at this stage. The fit must be robust, rejecting outlier matches 1737 (either stars with poorly determined proper motion or spurious 1738 matches). The resulting astrometric solution is consistent across the 1739 OTA field to within \tbr{0.2 arcsec}. 1740 1741 \subsubsection{Perform Photometry} 1742 1743 If possible (if a local photometry reference exists), the Phase 2 1744 analysis determines a photometry zero point for each image. To do 1745 this, it extracts the appropriate reference objects (from the AP 1746 Database) and matches the stars between the two samples. The 1747 zero-point is derived on the basis of a static atmospheric absorption 1748 model (eg, linear airmass slope). 1749 1750 \subsubsection{Bright object postage stamps} 1751 1752 The IPP must have the capability of extracting regions surrounding a 1753 specified subset of objects from the flattened images. These postage 1754 stamp images must be saved for additional use by client science 1755 pipelines. The identification of these objects must be on the basis 1756 of a set of rules applied to the object's magnitude and position. The 1757 postage stamps are not restricted in shape to simple rectangles, but 1758 may represent more complex regions. They are written to the Image 1759 Server. The outputs are these postage stamps and pixel masks, which 1760 are sent to the IPP Pixel Server. 1659 1761 1660 1762 \begin{figure} … … 1683 1785 \item photometric solution based on comparison to photometric 1684 1786 standards 1787 \item FPA-wide PSF analysis 1685 1788 \end{itemize} 1686 1789 … … 1689 1792 assumption of a static distortion and by the accuracy of the 1690 1793 astrometric reference. In the phase 3 analysis, the astrometric 1691 solutions of the $N$ FPA images are improved by... 1692 1693 For image combination in phase 4, should we use relative astrometry to 1694 map N-1 images to 1, or are we sufficiently accurate to use absolute 1695 astrometry to map N images to the sky-cells? 1794 solutions of the complete FPA images are improved by combining the 1795 astrometry for all chips. The astrometry model consists of a 1796 projection of the celestial coordinates to the telescope boresite 1797 center, followed by a rotation to the average rotation of the FPA and 1798 adjustment for the central plate scale. The free parameters in this 1799 stage are the boresite coordiates ($R_o, D_o$), the field rotation 1800 ($\theta_o$) and the plate scale ($\rho_o$), and are fitted in Phase 1801 1. These tangent plane coordinates are then distorted by the optical 1802 distortion model, consisting of $N^{\rm th}$ order polynomials in two 1803 dimensions. Finally, the focal plane coordinates are mapped to the 1804 individual chip coordinates, including the chip position and rotation, 1805 as well as possible higher order terms representing warping of the 1806 individual detectors. A first pass at the chip positions is 1807 calculated in Phase 2, while the complete set of parameters is fitted 1808 as a whole during Phase 3. The fitting process is determined in a 1809 robust and stable way by fitting the gradient of the distortion as a 1810 function of field position, removing the degeneracy of the distortion 1811 coefficients on the chip position parameters. 1696 1812 1697 1813 In the Phase 2 analysis, the background is determined based only on … … 1699 1815 structures are normally correlated on the scale of the FPA, so an 1700 1816 improved background solution can be determined by combining the 1701 information from many chips. \tbd{is the background correlated 1702 between FPAs?} 1703 1704 Phase 3 photometric improvement 1817 information from many chips. A high-order polynomial model of the 1818 background may be used and subtracted from all chips. 1819 1820 The Phase 3 photometric improvement is made by comparing the 1821 photometered objects from Phase 2 with the corresponding objects in a 1822 local reference catalog. This analysis may only be performed if a 1823 local reference is available. Note that improved relative photometry 1824 calculations may be performed in the absense of a reference catalog on 1825 the basis of image overlaps in the AP Database {\em after} the 1826 detections have been added to the Database. Such a relative 1827 photometry analysis is outside the scope of Phase 3 and will likely be 1828 performed as an independent analysis process. Given the presence of a 1829 local photometry reference, the zero point variations across the field 1830 may be measured, and possibly modelled. If the zero-point variations 1831 are excessive, then the image is marked as non-photometric by the 1832 analysis. 1705 1833 1706 1834 In the Phase 4 analysis, the $N$ FPA images are optimally combined to … … 1724 1852 \subsubsection{Overview} 1725 1853 1726 Phase 4 processing within the Pan-STARRS image processing pipeline is 1727 the image combination stage of processing for a science image. It 1728 operates on each sky cell that has overlapping imaging data from the 1729 exposure(s) being processed, and produces a set of clean, combined 1730 images of the sky. It also subtracts the current static sky image to 1731 generate a difference image, which it uses to identify transient 1732 objects. These are then excised from the summed image, which is in 1733 turn then added to the static sky image. 1734 1735 Prior to Phase 4, the Phase 3 process produces the following products: 1736 \begin{itemize} 1737 \item bias-subtracted, flattened, sky-subtracted images; 1738 \item photometric calibration; 1739 \item astrometric calibration with mapping to sky cells; and 1740 \end{itemize} 1741 1742 These will each be used by the Phase 4 modules: 1743 \begin{itemize} 1744 \item Combine Images; 1745 \item Identify Sources; 1746 \item Transient Identification; and 1747 \item Add to Static Sky. 1748 \end{itemize} 1749 These modules are each explained below. 1750 1751 \subsubsection{Combine Images} 1752 1753 \tbd{for moving objects and images which are not simultaneous, do we 1754 identify the moving objects?} 1755 1756 \tbd{use the spatial information? fit a 2-D Nth order polynomial to 1757 the collection of pixels and then look for outliers} 1758 1759 The first module for Phase 4 is to combine the images from each 1760 telescope, rejecting artifacts such as cosmic rays and low altitude 1761 streaks. The inputs to this module are: 1762 \begin{itemize} 1763 \item the sky-subtracted images that overlap the sky cell (or portions 1764 thereof) --- from the IPP Pixel Server (or directly from Phase 3); 1765 \item a \tbd{linear} map for the image pixels of each detector to the 1766 sky cell pixels --- from Phase 3; 1767 \item photometric calibration (zeropoint) for each image --- from 1768 Phase 3; and 1769 \item a (relative) weighting for each image proportional to the 1770 signal-to-noise (i.e.\ sky noise divided by the square of the seeing) 1771 --- from metadata associated with the images. 1772 \end{itemize} 1773 1774 The module maps the detector images to the sky cell using the specified 1775 linear transformations, combines the images with strong rejection 1776 criteria and uses the combined sky cell image to identify artifacts in 1777 the original detector images. It is desirable that the artifacts are 1778 masked in the detector plane (i.e.\ before mapping to the sky cell) so 1779 that they are not smeared out by the mapping; alternatively, the CR 1780 mask needs to be grown by an additional pixel (which is likely 1781 faster). The mapped and masked detector images are then optimally 1782 combined using the specified weighting. Both sets of combinations use 1783 the photometric calibration for the images to set the relative scales 1784 of the input images. The final combination should have the adopted 1785 Universal zeropoint (25 mag, configurable). The limiting magnitude 1786 for the combined sky cell image should also be estimated. 1787 1788 The outputs from this module are: 1789 \begin{itemize} 1790 \item The combined sky cell image --- sent to the IPP Pixel Server 1791 and/or the next module; 1792 \item Limiting magnitude of the combined sky cell image --- metadata 1793 associated with the combined sky cell image, and used for a later module 1794 in Phase 4; and 1795 \item Catalog of sources on the combined sky cell image --- sent to 1796 the IPP Object Database. 1797 \end{itemize} 1798 1799 \subsubsection{Identify Sources} 1800 1801 This module identifies sources in the combined sky cell image. The 1802 input is the combined sky cell image, which is obtained from the IPP Pixel Server 1803 or the previous module. 1804 1805 Sources are identified on the combined sky cell image by convolving 1806 with the PSF and searching for peaks above the noise. The output 1807 is the catalog of sources on the combined sky cell image, which is to 1808 the IPP Object Database. 1809 1810 \subsubsection{Transient Identification} 1811 1812 \tbd{what about different stellar colors?} 1813 1814 This module identifies variable/moving sources. The inputs are: 1815 \begin{itemize} 1816 \item The combined sky cell image --- from the previous module or the 1817 IPP Pixel Server; and 1818 \item The current static sky image --- from the Sky Image Server. 1819 \end{itemize} 1820 1821 The module subtracts the current static sky image from the combined sky 1822 cell image. In order to do so, the PSFs need to be matched. This is 1823 done by convolving the image that has the narrower PSF with the 1824 kernel, which is the ratio of the two PSFs (this should be done with a 1825 fit to the kernel instead of just using the data). It should be 1826 sufficient to assume that the kernel is constant over the sky cell 1827 (otherwise, the sky cell can be broken into smaller sections). 1828 1829 The subtracted image is scoured for point sources above the noise 1830 threshold, as well as short and long streaks caused by asteroids and 1831 satellites, respectively. It may be neccessary to determine whether 1832 the detection is false by virtue of its PSF (a cosmic ray missed by 1833 the combination script should have a very narrow PSF, at least in one 1834 dimension), or negative pixels surrounding a positive core (caused by 1835 a bad subtraction, in turn caused by a bad kernel). 1836 1837 If the subtraction is very bad (many false detections), then Phase 4 1838 for this sky cell should fail neatly, with a flag for the human 1839 supervisor. Otherwise, all variable sources identified in the 1840 subtracted image should be masked in the combined sky cell image. The 1841 pixels from the combined sky cell image for point sources and short 1842 trails (asteroids) should be saved (say, 3 $\times$ FWHM in radius 1843 surrounding the source, configurable). The long trails (satellites) 1844 should be removed in the combined sky cell image and the subtracted 1845 image, from edge to edge. The dividing limit between short and long 1846 trails shall be a configurable parameter, initially set to 15 degrees 1847 per day. 1848 1849 The module outputs: 1850 \begin{itemize} 1851 \item Combined sky cell image, with all variable sources masked --- 1852 used for the next module; 1853 \item Subtracted image, with long trails masked --- sent to the IPP 1854 Pixel Server; and 1855 \item Catalog of variable sources --- sent to the IPP Object 1856 Database. 1857 \end{itemize} 1858 1859 \subsubsection{Add to Static Sky} 1860 1861 \tbd{how to handle variable stars?} 1862 1863 This module adds the combined sky cell image into the static sky, so 1864 that a deep image of the sky may be formed. This step should only be 1865 performed if the new data is of sufficient quality that it will not 1866 degrade the static sky image. The inputs are: 1867 \begin{itemize} 1868 \item The combined sky cell image with variable sources masked --- 1869 from a previous module; 1870 \item The current version of the static sky --- from a previous module, 1871 or the IPP Pixel Server; and 1872 \item Relative weightings, based on the relative signal-to-noise in 1873 each of the images --- estimate made from metadata associated with 1874 each image. 1875 \end{itemize} 1876 1877 The sky cell image is added to the static sky. The sky cell image 1878 should already be photometrically accurate (when combined), and 1879 variable sources have been masked, so it is safe to simply add the 1880 images, employing the weightings. Sources should be identified on the 1881 new static sky, and the limiting magnitude of the new static sky image 1882 estimated. 1883 1884 The output is: 1885 \begin{itemize} 1886 \item The new static sky image --- sent to the Sky Image Server; 1887 \item The Catalog of sources on the new static sky image --- sent to the IPP Object Database; and 1888 \item The estimated limiting magnitude for the new static sky --- 1889 metadata associated with the the new static sky image. 1890 \end{itemize} 1891 1892 \subsubsection{Notes} 1893 1894 \begin{itemize} 1895 \item Catalogs should include positional information ($x,y$, with 1896 associated errors), photometry (with associated error), and shape 1897 parameters (FWHM, major and minor axes, position angle). 1898 \item Limiting magnitudes can be obtained by photometering many 1899 regions of blank sky (if possible), and (robustly) estimating the mean 1900 and standard deviation (in counts). The limiting magnitude is the 1901 magnitude corresponding to 3 (configurable) standard deviations above 1902 the mean. 1903 \end{itemize} 1854 Phase 4 is the image combination stage, in which multiple images of 1855 the same portion of the sky are merged and confronted with the static 1856 sky image. Phase 4 operates on the smallest data unit of the static 1857 sky, the sky cell, along with the associated pixels from a collection 1858 of images which have been processed through phases 1--3. The size and 1859 exact representation of a static sky cell are yet to be determined. 1860 The working concept is that the static sky cells contain roughly the 1861 same number of pixels as an OTA (4k x 4k) and represent a portion of a 1862 local tangent plane projection. As mentioned above 1863 (Section~\ref{IPP:ImageServer}), the pixel scale of the static sky is 1864 planned to be 0.2\arcsec, somewhat smaller than the 0.3\arcsec\ raw 1865 image pixel scale. 1866 1867 For each sky cell, the corresponding pixels are extracted from the 1868 exposures being processed and mapped to the projection of the sky 1869 cell. The pixels from the multiple input processed images are combined 1870 into a single, cleaned image. Outlier pixels may be optionally 1871 rejected at this stage (optionally, since moving objects will be 1872 rejected in images obtained over a wide range of times). This image 1873 is then confronted with the static sky cell data to produce a 1874 difference image. Residual objects in the difference image above a 1875 threshold are detected and excised from the original cleaned image. 1876 The remaining pixels are added to the existing static sky image. 1877 Object detection must be performed on the difference ($P4\Delta$) and 1878 cleaned ($P4\Sigma$) images. 1879 1880 \subsubsection{Image Warping and Matching} 1881 1882 The analysis first maps the detector images to the sky cell using the 1883 specified linear transformations, then combines the images with strong 1884 rejection criteria and uses the combined sky cell image to identify 1885 artifacts in the original detector images. It is desirable that the 1886 artifacts are masked in the detector plane (i.e.\ before mapping to 1887 the sky cell) so that they are not smeared out by the mapping; 1888 alternatively, the CR mask needs to be grown by an additional pixel. 1889 The mapped and masked detector images are then optimally combined 1890 using the specified weighting. Both sets of combinations use the 1891 photometric calibration for the images to set the relative scales of 1892 the input images. The limiting magnitude for the combined sky cell 1893 image should also be estimated. 1894 % 1895 1896 \subsubsection{Static Sky Subtraction} 1897 1898 \tbd{add some details about the static-sky subtraction issues. 1899 Allard-Lupton-Price method}. 1900 1901 \subsubsection{Object Detection and Measurement} 1902 1903 Objects in the difference image are detected and a specific set of 1904 object parameters are measured from these detections. 1905 Table~\ref{APdetections} gives a list of the different detection 1906 stages and the object parameters measured for those stages. For the 1907 Phase 4 difference image (P4$\Delta$), the measured object parameters 1908 consist of: the object centroid and the position covarience matrix, 1909 the instrumental PSF magnitude and error, local background level and 1910 error, a measurement of the star-galaxy separation, and a measurement 1911 of the object shape ($\sigma_x, \sigma_y, \theta$). The detection 1912 threshold must be configurable, and be a function of the average 1913 background flux or the image noise map. Detections must be performed 1914 for both positive and negative (static sky only) sources. Minimal 1915 object classification must be performed to distinguish objects which 1916 are consistent with a single PSF, objects which are inconsistent, and 1917 objects which are saturated. The resulting collection of detected 1918 objects are saved along with the relevant image metadata (\ie filter, 1919 exposure time, etc). 1920 1921 Objects in the cleaned, summed image are detected and a specific set 1922 of object parameters are measured from these detections. 1923 Table~\ref{APdetections} gives a list of the different detection 1924 stages and the object parameters measured for those stages. For the 1925 Phase 4 summed image (P4$\Sigma$), the measured object parameters 1926 consist of: the object centroid and the position covarience matrix, 1927 the instrumental PSF magnitude and error, local background level and 1928 error, a measurement of the star-galaxy separation, a measurement of 1929 the object shape ($\sigma_x, \sigma_y, \theta$), the Petrosian radius, 1930 magnitude, axis ratio, and angle; and the S\'ersic radius, magnitude, axis 1931 ratio, angle, and parameter $\nu$. The detection threshold must be 1932 configurable, and be a function of the average background flux or the 1933 image noise map. Minimal object classification must be performed to 1934 distinguish objects which are consistent with a single PSF, objects 1935 which are inconsistent, and objects which are saturated. The 1936 resulting collection of detected objects are saved along with the 1937 relevant image metadata (\ie filter, exposure time, etc). In this 1938 measurement, objects at known positions will also be measured even if 1939 they have not been detected. 1940 1941 Objects which are detected in both of the Phase 4$\Sigma$ and Phase 1942 4$\Delta$ images are saved to the AP Database, along with the relevant 1943 image metadata (\ie filter, exposure time, etc). In the process of 1944 adding these objects to the database, the transients which are 1945 correlated with previous detections of an object (and those which are 1946 not) will automatically be determined. An independent process will 1947 query the AP Database for such transient objects of interest which are 1948 to be sent, along with their associated metadata, to the MOPS and 1949 other science client pipelines. This step must be performed at least 1950 once per night. 1951 1952 \subsubsection{Static Sky Update} 1953 1954 It is essential that the static sky image (which may have been 1955 painstakingly accumulated over many months) not be corrupted by adding 1956 in transient sources, or data that is of suspect quality (due, e.g., 1957 to an error upstream in the processing). 1958 1959 Object analysis of the static sky images is {\em not} a part of the 1960 Phase 4 analysis. This processing is envisioned to take place 1961 relatively infrequently (perhaps weekly or even monthly) and is 1962 scheduled as a separate analysis task, probably run during the day at 1963 a time when the computing infrastructure is not under significant load. 1904 1964 1905 1965 \begin{figure} … … 2093 2153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2094 2154 2095 \section{System Design : Reference Catalog Processing} 2096 2097 The IPP reference catalog pipelines use the data in the IPP Metadata 2098 Database and the IPP Object Database to determined improved 2099 astrometric and photometric calibration references. 2155 \section{System Design : Miscellaneous Tasks} 2156 2157 In this section, we discuss the design of the science analysis stages 2158 which perform the fundamental image analysis steps of the IPP. 2159 2160 \subsection{Retrieval} 2161 2162 The retrieval stages simply retrieve pixel data from an external 2163 source (ordinarily OATS at the Summit, but it could conceivably be 2164 some other external source) and store it on the nodes. 2165 2166 \subsection{Static Sky Analysis} 2167 2168 The IPP is responsible for performing object detection and analysis on 2169 the static sky. This analysis is performed continuously (every day or 2170 week) on those portions of the sky within 15\degree\ of the sun. In 2171 this analysis, the object measurement is much more detailed than those 2172 performed in the real-time analysis. The currently envisioned 2173 parameters to be measured for every object are listed in 2174 Table~\ref{APdetections}. The parameters include the object centroid 2175 and the position covarience matrix, the instrumental PSF magnitude and 2176 error, local background level and error, a measurement of the 2177 star-galaxy separation, a measurement of the object shape ($\sigma_x, 2178 \sigma_y, \theta$), the Petrosian radius, magnitude, axis ratio, and 2179 angle; the S\'ersic radius, magnitude, axis ratio, angle, and 2180 parameter $\nu$, and a collection of annular aperture flux 2181 measurements, all of which are also measured for the P4$\Sigma$ 2182 images. In addition, the galaxy-shape parameters $Gamma_1 \& 2183 \Gamma_2$, along with the complete `polarization' terms are measured, 2184 as well as a collection of annular aperture flux and variance 2185 measurements. Another unique feature of the static sky analysis is 2186 that the object detection may be performed simultaneously on all 2187 filters, in which case the locations and other parameters may be more 2188 strongly constrained by simultaneously fitting between all bands. The 2189 analysis to be performed may be substantially more complex than the 2190 real-time analysis because of the relatively low data rate. Instead 2191 of needing to process thousands of images per night ($\sim 350$Mpix 2192 per second), it is only necessary to process the complete sky in a 2193 year, or an average rate of $\sim$2 Mpix per second, or $< 1$\% of the 2194 object analysis in the other analysis stages. 2100 2195 2101 2196 \subsection{AstroRef: Astrometric Reference Catalog creation} 2197 2198 \tbd{needs to be fleshed out substantially} 2102 2199 2103 2200 This processing stage shall use many observations over a given time … … 2108 2205 \subsection{PhotoRef: Photometric Reference Catalog creation} 2109 2206 2207 \tbd{needs to be fleshed out substantially} 2208 2110 2209 This processing stage shall use many observations over a given time 2111 2210 period to fit a consistent global photometric solution, resulting in a … … 2115 2214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2116 2215 2117 \section{System Design : Miscellaneous Tasks}2118 2119 In this section, we discuss the design of the science analysis stages2120 which perform the fundamental image analysis steps of the IPP.2121 2122 \subsection{Retrieval}2123 2124 The retrieval stages simply retrieve pixel data from an external2125 source (ordinarily OATS at the Summit, but it could conceivably be2126 some other external source) and store it on the nodes.2127 2128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2129 2130 2216 \section{Software Hierarchy} 2131 2217 … … 2133 2219 flexibility, the IPP will be built in a layered fashion. The lowest 2134 2220 level functions will be written in C and collected together into a 2135 Pan-STARRS library. These library functions will be used to write more 2136 complex modules. The modules will be written in C but will make use 2137 of the SWIG tool to make their functionality available within other 2138 frameworks. In particular, the modules can be tied together with a 2139 simple framework (an `engine') or with detailed flow-control through 2140 the use of a high-level language such as Perl, Python, or Tcl 2141 employing the SWIG interfaces. For the high-level functions in the 2142 operational system, the IPP will make use of \tbd{Python} as the 2143 scripting language to provide the required flow-control to tie the 2144 modules together. 2221 Pan-STARRS library. These library functions will be used to write 2222 more complex modules. The modules will be written in C but will make 2223 use of SWIG to make their functionality available within other 2224 languages. In particular, the modules can be tied together with a 2225 program in C or through the use of a high-level language such as Perl, 2226 Python, or Tcl employing the SWIG interfaces. For the high-level 2227 functions in the operational system, the IPP will make use of 2228 \tbd{Python} as the scripting language to provide the required 2229 flow-control to tie the modules together. 2145 2230 2146 2231 This approach satisfies the requirement that complicated low-level … … 2194 2279 \subsection{Internal Interfaces} 2195 2280 2196 \tbd{To be updated and expanded.} 2197 2198 Internal interfaces consist of queries to the IMD or IPS, insertion of 2199 data in the IMD, IPS, or IOD, or processing configuration files. The 2200 science and calibration image processing pipelines make requests for 2201 images from the IPS, metadata from the IMD, and push their results 2202 back onto the IPS and IMD. The reference catalog pipelines make 2203 requests on the IMD and the IOD and push their results back to the 2204 IOD. The scheduler creates input processing configuration files for 2205 the processing pipelines and queries the IMD and IPS and pushes 2206 results back to the IIS. 2207 2208 FITS Images 2209 2210 FITS Tables 2211 2212 XML 2213 2214 SQL queries 2215 2216 C:DB interactions 2281 Internal interfaces consist of interactions between the analysis 2282 scripts and the IPP Metadata Database, Image Server or AP Database. 2283 There are also interfaces between the IPP Scheduler, Controller, and 2284 the Metadata Database. 2285 2286 The science and calibration image processing pipelines make requests 2287 for images from the Image Server, metadata from the Metadata Database, 2288 and push their results back onto the Image Server and Metadata 2289 Database. The Scheduler specifies analysis tasks and sends them to 2290 the Controller, and determines the next action based on the contents 2291 of the Metadata Database. The various subsystems specify the API for 2292 client / server interactions with them. Commands will be sent using 2293 either text-based commands, SOAP or an equivalent protocol. The 2294 format of the exchanged data may be in one of several forms discussed 2295 below. 2296 2297 FITS Images will be used to transport images between the components of 2298 the IPP. Non-standard FITS images representing triangular collections 2299 of pixels may be used to store the static sky images. 2300 2301 FITS Tables will be used to store and transport tabular data, 2302 especially large queries from database subsystems. The Autocoding 2303 technique discussed in Appendix~\ref{Autocode} is used to define many 2304 different table interactions. 2305 2306 XML files will be used to store and transport data which is not 2307 well-suited to the rectangular form of FITS Tables. Hierarchical data 2308 concepts and variable-length structures fall in this class. Examples 2309 include mosaic astrometry description information and configuration 2310 information. 2311 2312 SQL queries and C wrappers of SQL queries will be used as the direct 2313 interface to the databases. 2217 2314 2218 2315 \subsection{External Interfaces} 2219 2220 \tbd{This whole section to be updated.}2221 2316 2222 2317 This subsection describes the interfaces between the IPP and other 2223 2318 Pan-STARRS systems and the external clients. The interfaces are 2224 illustrated in Figure~\ref{fig:functionalities}. Incoming data is 2225 received by either the IPS (pixels), the IMD (metadata), or the IOD 2226 (objects). Requests for data by external clients are also made to 2227 these three databases. Requests for data made by the IPP are 2228 generated by the IPP Scheduler or the science processing pipelines. 2319 illustrated in Figure~\ref{overview}. 2320 2321 Incoming data is received by 2322 either the IPS (pixels), the IMD (metadata), or the IOD (objects). 2323 Requests for data by external clients are also made to these three 2324 databases. Requests for data made by the IPP are generated by the IPP 2325 Scheduler or the science processing pipelines. 2326 2327 \subsubsection{OTIS} 2328 2329 The IPP Scheduler may query OTIS for a list of new images and 2330 metadata. The locations of those images in the Summit Pixel Server is 2331 sent back as a table, and all metadata may be sent to the IPP as a 2332 collection of FITS Tables. The IPP also may send quality assessment 2333 information for each FPA and major frame by writing out FITS tables 2334 and notifying OTIS of the presence of the new tables. 2229 2335 2230 2336 \subsubsection{Camera} 2231 2337 2232 \subsubsection{OTIS} 2233 2234 The Summit Pixel Server (SPS) sends raw image data, image metadata, 2235 and enviromental metadata to the IPP. The IPP provides an interface 2236 mechanism by which the SPS can register new images with the IPP, which 2237 sends them to the appropiate subsystem: The image pixel data is sent 2238 to the IPS while the metadata is sent to the IMD. 2239 2240 The Pan-STARRS Telescope Scheduler (PTS) sends information about the 2241 telescope schedule to the IPP: observing plan for the night, or longer 2242 time scales. The IPP scheduler sends telescope schedule requests to 2243 the PTS (i.e.\ calibration needs). 2338 Images are pulled from the Summit Pixel Server, part of the Camera 2339 team's purview. The locations of the files are sent by OTIS. IPP may 2340 grab these via {\tt http} commands or via {\tt NFS} or another network 2341 file exchange protocol. The IPP notifies OTIS (and Camera) when each 2342 image has been received. 2244 2343 2245 2344 \subsubsection{PSPS} 2246 2345 2247 The Static Image Server provides segments of the current static sky 2248 image to the IPP on demand. IPP subsystems which require this data 2249 will block until it is available or timeout if it is not. The IPP 2250 provides updated static sky images to the SIS when available. 2346 The details of the transfer mechanism have \tbd{not been worked out}. 2347 The data to be transfered include: 2348 \begin{itemize} 2349 \item Static Sky images 2350 \item Postage Stamps 2351 \item Metadata tables 2352 \item Detections \& Object associations. 2353 \end{itemize} 2251 2354 2252 2355 \subsubsection{MOPS} 2253 2356 2254 The Moving Object Processing System interfaces with the IPP to receive 2255 the objects detected in the difference images via queries to the IOD. 2256 The MOPS may interface with the IMD as needed. 2357 The details of the transfer mechanism have \tbd{not been worked out}. 2358 The data to be transfered include: 2359 \begin{itemize} 2360 \item Image Metadata tables 2361 \item Orphaned Detections 2362 \end{itemize} 2257 2363 2258 2364 \subsubsection{Other Preferred Client Science Pipelines} 2259 2365 2260 The client science pipelines may interface with the IPP via requests 2261 for data from the IMD, IOD, or IPS. \tbd{how many clients max? / how 2262 much data?} 2366 The details of the transfer mechanism have \tbd{not been worked out}. 2263 2367 2264 2368 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 2703 2807 2704 2808 \subsection{Software Runtime Configuration Issues} 2809 \label{RuntimeConfig} 2705 2810 2706 2811 The IPP Software requires extensive runtime configuration information. … … 2879 2984 2880 2985 \end{document} 2881 2882 2883 2884 \section{Notes}2885 2886 \subsection{Cell vs Chip vs FPA vs Major Frame}2887 2888 There are several levels of input data pixel groups: Cell, Chip, Focal2889 Plane Array (FPA), and Major Frame. It is necessary to make the2890 association between the data of one level and that of the next in a2891 way that is reliable and robust to missing elements. If a specific2892 cell is missing from a chip, that information is known by the2893 controller an needs to be represented in the metadata. Similarly if a2894 chip is missing from a mosaic camera, that information is also known2895 and must be carried though the metadata. A more difficult association2896 is that between the telescopes to define the major frame. Some2897 possibilities:2898 2899 \begin{itemize}2900 \item exposures in a major frame are always synchronized; the2901 telescopes are required to take exposures in a coordinated fashion and2902 these linked exposures are identified as being part of a specific2903 major frame by the TCS or PTS.2904 \item exposures may be taken in a coordinated fashion, and identified2905 by the TCS or PTS as part of a specific major frame, but not all2906 exposures are required to be taken in this fashion. Independent2907 images are handled by the IPP differently (Phase 3 and Phase 4 are not2908 appropriate, some varient is required).2909 \item exposure links are defined more generally on the basis of the2910 resulting image metadata. The telescopes may have images requested2911 at the same coordinates and time, and are defined as a major frame on2912 the basis of the observed time and coordinates. The TCS or PTS might2913 not be the entity which defines these major-frame associations; this2914 may be the role of some component in the IPP. Different types of2915 major frames may be defined depending on the correlation period in2916 time or space. For example, a major frame in which the telescopes are2917 pointing at the same position in the sky to within a few pixels and2918 with exposures taken within a second can be treated with more special2919 assumptions (minimal differential distortion; moving objects2920 coincident) than a major frame in which the offsets are larger in2921 either dimension.2922 \end{itemize}2923 2924 A decisions between these possibilities will drive some requirements2925 either on the IPP side or on the PTS/TCS side.2926 2927 \subsection{Identifying ghosts, spikes, etc}2928 2929 One of the functions currenly defined for Phase 1 is the prediction of2930 the location of the bright star spikes, ghost images, and regions of2931 complex astronomical background. Elsewhere in the IPP, these2932 identifications are used to excise or mark image pixels. How these2933 regions are defined and saved are is not very clear. I propose that2934 we use the mask image to mark as bit-flags all of these cosmetic pixel2935 flagging issues. If we need to save this information, for the short2936 period that the input science images are kept, then it is only a small2937 addition of data.2938 2939 \subsection{Pending Sky-cell / Detector table}2940 2941 Define a pending sky-cell / detector table to define the overlaps and to2942 give something which the scheduler can query to decide when to2943 initiate phase 4.2944
Note:
See TracChangeset
for help on using the changeset viewer.
