Sky-Offset / Dynamic Bad pixel flagging Module

Similar documents
Wide-field Infrared Survey Explorer (WISE)

Wide-field Infrared Survey Explorer

Overview of Post-BCD Processing

WSDC Subsystem Peer Review. Frame Co-addition

WSDC Subsystem Peer Review

(Refer Slide Time 01:41 min)

Bootstrapping Method for 14 June 2016 R. Russell Rhinehart. Bootstrapping

Absolute Calibration Correction Coefficients of GOES Imager Visible Channel: DCC Reference Reflectance with Aqua MODIS C6 Data

SWAP Image Calibration. Daniel B. Seaton, D. Shaun Bloomfield, ROB & TCD SWAP Teams

DUPLICATE DETECTION AND AUDIO THUMBNAILS WITH AUDIO FINGERPRINTING

Intro. Scheme Basics. scm> 5 5. scm>

Chapter 5. Understanding and Comparing Distributions. Copyright 2010, 2007, 2004 Pearson Education, Inc.

Robust Regression. Robust Data Mining Techniques By Boonyakorn Jantaranuson

A New Segment Building Algorithm for the Cathode Strip Chambers in the CMS Experiment

Cpk: What is its Capability? By: Rick Haynes, Master Black Belt Smarter Solutions, Inc.

Bland-Altman Plot and Analysis

Overview of LFI maps generation and their characteristics

Understanding and Comparing Distributions. Chapter 4

The Italian LBT spectroscopic data reduction pipeline

Advanced Image Combine Techniques

Name Date Types of Graphs and Creating Graphs Notes

EE795: Computer Vision and Intelligent Systems

Summary of Publicly Released CIPS Data Versions.

8.882 LHC Physics. Analysis Tips. [Lecture 9, March 4, 2009] Experimental Methods and Measurements

Error Analysis, Statistics and Graphing

Image Segmentation. Overview. Input

Tightly-Integrated Visual and Inertial Navigation for Pinpoint Landing on Rugged Terrains

The Dynamic Typing Interlude

EE613 Machine Learning for Engineers LINEAR REGRESSION. Sylvain Calinon Robot Learning & Interaction Group Idiap Research Institute Nov.

Lecture 5. Essential skills for bioinformatics: Unix/Linux

Wide-field Infrared Survey Explorer (WISE) WISE Mission Operations System Preliminary Design Review. WSDC Architecture

3 Nonlinear Regression

Robotics. Lecture 5: Monte Carlo Localisation. See course website for up to date information.

Event reconstruction in STAR

Outline. Computer programming. Debugging. What is it. Debugging. Hints. Debugging

One way ANOVA when the data are not normally distributed (The Kruskal-Wallis test).

Introduction to Remote Sensing Wednesday, September 27, 2017

Digital image processing

Data Reduction for XCOV30

Slide Set 1. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Essential Skills for Bioinformatics: Unix/Linux

Section 4 Matching Estimator

MIPS Ge Pipeline Description Document

Further Maths Notes. Common Mistakes. Read the bold words in the exam! Always check data entry. Write equations in terms of variables

Chapter 10 Working with Graphs and Charts

General Program Description

ES-2 Lecture: Fitting models to data

Introduction to Digital Image Processing

THE L.L. THURSTONE PSYCHOMETRIC LABORATORY UNIVERSITY OF NORTH CAROLINA. Forrest W. Young & Carla M. Bann

CS 223B Computer Vision Problem Set 3

Stochastics and the Phenomenon of Line-Edge Roughness

SurvNET Lesson One - Processing an Assumed Coordinate System 2D Total Station Network

Wideband Mosaic Imaging for VLASS

Chapter 5. Understanding and Comparing Distributions. Copyright 2012, 2008, 2005 Pearson Education, Inc.

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14

Modify Panel. Flatten Tab

JWST Pipeline & Data Products

Programming with MPI

MODULE - 4. e-pg Pathshala

The Logical Design of the Tokeniser

Chapter 12: Statistics

Chapter 6: DESCRIPTIVE STATISTICS

Chandra Source Catalog Quality Assurance Specifications

Chapter 3 Image Registration. Chapter 3 Image Registration

Systematic errors Random errors

Feature Detectors and Descriptors: Corners, Lines, etc.

Week 7: The normal distribution and sample means

CS 664 Image Matching and Robust Fitting. Daniel Huttenlocher

Numerical Precision. Or, why my numbers aren t numbering right. 1 of 15

Wide-field Infrared Survey Explorer

Evaluations of Interactive Segmentation Methods. Yaoyao Zhu

ChristoHouston Energy Inc. (CHE INC.) Pipeline Anomaly Analysis By Liquid Green Technologies Corporation

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

EE613 Machine Learning for Engineers LINEAR REGRESSION. Sylvain Calinon Robot Learning & Interaction Group Idiap Research Institute Nov.

S2 MPC Data Quality Report Ref. S2-PDGS-MPC-DQR

MULTIVIEW REPRESENTATION OF 3D OBJECTS OF A SCENE USING VIDEO SEQUENCES

Using Arithmetic of Real Numbers to Explore Limits and Continuity

CS 231A Computer Vision (Fall 2012) Problem Set 3

Students received individual feedback throughout year on assignments.

Lecture 15: Segmentation (Edge Based, Hough Transform)

EXAMINING THE CODE. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist:

STA Rev. F Learning Objectives. Learning Objectives (Cont.) Module 3 Descriptive Measures

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

NHSC Data Processing Workshop Pasadena 2 nd -9 th Feb Map-Making Basics. C. Kevin Xu (NHSC/IPAC) page 1 PACS

3 Graphical Displays of Data

Slides for Data Mining by I. H. Witten and E. Frank

IRS Large Offset Test

Getting Started With Linux and Fortran Part 3

Things to Know for the Algebra I Regents

Decision Trees Dr. G. Bharadwaja Kumar VIT Chennai

<<Subsystem>> Software Architecture Document

Analysis Ready Data For Land (CARD4L-ST)

Accelerating Pattern Matching or HowMuchCanYouSlide?

LAB 2: DATA FILTERING AND NOISE REDUCTION

Cover Page. The handle holds various files of this Leiden University dissertation.

Configuring Anomaly Detection

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations I

Multivariate Calibration Quick Guide

Important Things to Remember on the SOL

Bootstrap confidence intervals Class 24, Jeremy Orloff and Jonathan Bloom

Transcription:

Sky-Offset / Dynamic Bad pixel flagging Module F. Masci, version 1.0 (3/19/2008) 1. Background The functions of this module shall be twofold: i. Compute a sky-offset image from a median (or trimmed average) of N consecutive frames along a scan, where the pixel values therein are distributed about a zero median (or zero-mean). ii. Identify and flag persistent new bad pixels from the stack of N images. This is the essence of dynamic pixel masking. Both these tasks will attempt to capture instrumental transients in the WISE detectors, and will be corrected (or propagated along) in the instrumental calibration pipeline. We discuss each in turn below. A suggested name for this module is tempcal, for temporary calibration. The developer can choose a new name if this doesn t appeal. The author also thought of transientcal, but this sounds too long winded. Short-term variations in the bias, dark (and possibly gain) structure over an array will not be captured by ground calibrations. The ground calibrations are designed to remove instrumental signatures that are more-or-less static in the long-term. If the short-term systematic variations are not removed, they will persist as residuals and impact photometric accuracy (as shown on 2MASS). These can be corrected by computing a zero-mean (or zero-median) image from N ~ 50-100 frames within a moving block window along the WISE orbit, then subtracting this from all the frames in that window. The tempcal module will only create the sky-image calibration product, not apply it. We estimate that at least 50-100 frames will be needed to reliably filter out sources in any band. A window that s too big may miss the short-term instrumental variations sought for. An important assumption is that the transient bias/dark structure is constant over this window span. A schematic of the concept is shown in Figure 1. Figure 1: Sky-offset schematic Page 1 of 6

The labels in Figure 1 are defined as follows: "T = timescale of possible systematic variation S pixel i, j = median or mean signal in single pixel i, j over stack of N frames in "T S all i, j = median or mean signal over all pixels and N frames in "T Sky - offset correction : "S i, j,"t = S pixel i, j # S all i, j - Number of frames must satisfy: N min $ N $ N "T, where N min is minimum needed to filter out stars - If N "T < N min (fast instrumental variations), then method can't be used - Plan is to determine optimal frame windows N min and N "T in IOC Note: the angled brackets can represent either a trimmed mean, median or whatever estimator is used to optimally combine the pixels in the N-frame stack. See section 3 for more details. The rationale behind including dynamic pixel masking in this module is that it s the only place in the infrastructure (so far) that gathers all frames pertaining to the same time interval, ΔT, along a scan. As discussed above, this time-interval may contain 50-100 frames, or <~ 40% of a scan (North-to-South ecliptic pole). If a pixel suddenly becomes hot, it may persist in this state for the entire interval ΔT, or just part of it for a duration δt. Bad pixels (where the criteria for bad are defined below) occur at the same location in pixel space, whereas astronomical sources don t. One can therefore envisage a method where if a pixel is detected as an outlier with respect to its neighbors in the same frame, and it persists in this state for a time δt in subsequent frames of the stack, then it can be identified as a transient bad pixel. Pixels identified as permanently bad a priori (e.g., on the ground) are omitted before performing the dynamic bad-pixel search. More details are given below. A minor detail (which should not concern the developer here) is that not all frames in the mission will have an associated sky-offset calibration and dynamic bad-pixel flagging performed. This is because there may be contiguous chunks of frames that are unusable for this purpose (or for anything else for that matter), e.g., anneals and recovery thereafter, South Atlantic Anomaly passes, and other predicted events. This also includes unforeseen events and transients picked up by the ingest-qa subsystem, e.g., ultra-bright sources and persistence there from. 2. Command-line Synopsis and I/O Here s a baseline (suggested) synopsis basically the on-screen tutorial if the module is executed with no command-line arguments. Some variables are further discussed in section 3. The developer is free to reword, reorder any of the below. I m sure there ll be more as development proceeds. Program tempcal vsn 1.0 Usage: tempcal -f1 <inp_img_list_fname> (Required: list of pre-calibrated frames in FITS format) Page 2 of 6

-f2 <inp_mask_list_fname> (Optional: list of bad-pixel masks in 32-bit INT FITS format; only values 0 -> 2^31 are used) -f3 <inp_unc_list_fname> (Optional: list of uncertainty images in FITS format) -lt <lower_threshold> -ut <upper_threshold> -pn <frame_persist_num> (Optional: lower-tail threshold for in-frame outlier [candidate bad-pixel] detection; Default = 5) (Optional: upper-tail threshold for in-frame outlier [candidate bad-pixel] detection; Default = 5) (Optional: minimum number of consecutive frames in time-ordered sequence of stack for which an 'outlier pixel' must persist to be declared bad; Default = number of frames in input list) -m <inp_mask_bits> (Optional: mask template [decimal] specifying bits to flag/omit from processing; Default=0) -p <out_maskdy_bits> (Required if <-f2> specified: mask template [decimal] specifying bit to set in _specific_ input masks for dynamic bad-pixel masking) -s <out_maskso_bits> (Required if <-f2> specified: mask template [decimal] specifying bit to set in _all_ input masks for unreliable/erroneous sky-offset) -o1 <out_skyoff_img> (Required; output sky-offset image FITS filename) -o2 <out_skyoff_unc_img> (Required; output sky-offset uncertainty image FITS filename) -d (Optional; switch to print debug statements to stdout, ancillary QA to ascii files) -v (Optional; switch to increase verbosity to stdout) 3. Suggested Algorithm and Details Below is an outline of the main processing steps. I encourage the developer to take initiative on making the overall process as efficient as possible (goes without saying, right?). 3.1 Sky-offset calibration product Input frames will have already been pre-calibrated, e.g., dark subtracted, linearized and flat-fielded. The units of the pixel values in each are in native WISE scaled-slope units with no offset. More specifically, they will be in units of scaled DN/SUR, where DN = Data Number and SUR = Sample Up the Ramp. Page 3 of 6

Read/store all frames and accompanying (optional) masks, uncertainty frames in memory. 150 frames with accompanying masks and uncertainty images (the maximum expected at any one time - i.e., 450 in total) won t take up more than 2 GB of memory. Flag or tag prior-known bad pixels according to mask bits specified by the < m> input option. These will be omitted from processing: both when creating the sky-offset image, and when detecting new bad pixels for dynamic masking (see below). For a given pixel location, take all the values from the stack of frames and combine them in some optimal manner [e.g., to compute <S> pixel ij in Figure 1]. I suggest using a robust non-parametric method with optional trimming for outliers. An example is to first use the Median Absolute Deviation (MAD) from the sample median on the lower-tail values (<median) to get a robust measure of sigma, then using this with a given threshold to detect outliers at both ends of the distribution, then re-computing the median with the outliers thrown out. Another method involves estimating the mode and using this as the optimum measure of location. Mode estimation however is complicated! Yet another method is that used on 2MASS the general Recursive Median- Distance Rejection (RMDR) method. Unless the developer commits to one method right off the bat and is happy with it, these methods need to be experimented with. The best estimator is that which yields the smallest variance in the least-squares sense. A Monte Carlo simulation may be needed to test the different possibilities. Using the same method, compute the same value for all pixels i, j in all the input frames. This is represented by <S> all ij in Figure 1. Subtract this value from the individual <S> pixel ij. This will make all the values zero-mean ( mean here is used loosely and represents the real estimator used). The main output (<-o1> command-line parameter) is a FITS image of the ΔS ij = <S> pixel ij - <S> all ij values, i.e., the sky-offset image. An example header is below. The angle brackets indicate information whose literal content depends on actual execution or generation circumstances. SIMPLE = T / file does conform to FITS standard BITPIX = -32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = <Num> / length of data axis 1 NAXIS2 = <Num> / length of data axis 2 BAND = <Num> / WISE band number (1, 2, 3 or 4) NUMINP = <Num> / Number of input frames used UTCSBGN = <Num> / Earliest UTCS in frame stack [sec] UTCSEND = <Num> / Latest UTCS in frame stack [sec] FRMIDSEQ= < Num..Num > / Range of frameids used BUNIT = 'scaled DN/SUR' / Units of image data COMMENT WISE sky-offset calibration product, created <YYYY-MM-DD> COMMENT generated by tempcal, v.1.0 on <YYYY-MM-DD> at <HH:MM:SS> Notes: o BITPIX = -32 refers to single precision floating point. o For bands 1, 2 and 3, the input frames will have NAXIS1 = NAXIS2 = 1016. For band 4, NAXIS1 = NAXIS2 = 508. o The UTCSBGN, UTCSEND keywords specify the start/end observation time of frames in the input ensemble. These time tags will be available in the input frame headers [e.g., UTCS_OBS] o The FRMIDSEQ specifies the range of input frame IDs: a string composed of the min and max ID delimited by two dots, e.g., 31412..31505. The frame IDs will be present in the input frame headers [keyword unknown at time of writing]. o The BUNIT keyword specifies the data units and will always have the string value as shown. Page 4 of 6

Whatever method is used to optimally combine the pixel values (in a stack) into a single value, an uncertainty must also be computed. Note that estimators based on the median and associated measures of spread (the MAD) tend to yield noisier estimates relative to those optimized for a prior-assumed underlying distribution (e.g., for a normal distribution and many others, the mean is the minimum variance estimator). Also, beware that trimming (both symmetric and asymmetric versions) will also affect the uncertainty in your estimator (whether it s the mean or median). For example, a trimmed mean will not have a normal distribution even if the data were drawn from a normal population. In the end, I recommend using a robust non-parametric estimator (e.g., a median) when the sample is of reasonable size (like here). The slight increase in variance is a small price to pay, since a missed outlier (or improperly tuned trimming threshold) can wreck greater havoc on the mean. One-sigma uncertainties corresponding to the ΔS ij should be stored in a separate FITS file (<-o2> command-line parameter). For these, the header can be the same as above, except that the relevant COMMENT field will need to indicate that this is a sky-offset uncertainty calibration product. If the sky-offset was unreliable or could not be computed for any of the pixel stacks, then a bit should be set for the corresponding pixel in all of the input masks. This bit is specified by the <-s> command-line parameter (in decimal format). At the time of writing, the value 2 23 (= 8388608) has been reserved for flagging pixels where the sky-offset was unreliable, or could not be computed. In production, the sky-offset will not be applied to such pixels. Note: the above formalism does not make use of prior uncertainties (propagated upstream from an error model), even though they were included in the above synopsis (<-f3> command-line parameter). If the developer thinks the overall estimation process will benefit from them (e.g., χ 2 sanity checks), then they will certainly be available for use. 3.2 Dynamic bad-pixel detection/flagging Dynamic pixel masking should only be performed if a list of frame processing masks were supplied on input (<-f2> command-line parameter). Before proceeding to identify bad pixels, it is recommended that the input frames (and accompanying mask images) be time ordered using the time-tag keyword in the headers [e.g., UTCS_OBS]. The reason for this is that a pixel may be in a bad state for only part (δt) of the time interval ΔT used for the sky-offset calibration. Having a time-ordered sequence will make detection of a bad-pixel easier, e.g., by tracking its repeated occurrences in consecutive frames, rather than at random locations as represented by the unknown frame order in the input list. The definition of bad pixel here is constrained by the detection method. To keep it simple, a bad pixel shall be one whose signal behaves differently from its neighbors in the same frame, and this behavior is more-or-less consistent for some duration δt ΔT in the frame stack. For example, the method will mainly be sensitive at detecting pixels that become highly responsive (hot), or lowly responsive (almost dead), not necessarily pixels with abnormally fluctuating values (i.e., noisy). High/low responsive pixels are defined relative to neighbors in the same frame, assuming that the majority are in their normal operating state. Note that this method also has the potential to flag strong persisting latents, but these will be handled more robustly elsewhere. The specific steps for dynamic pixel flagging are as follows: Page 5 of 6

i. Time order the input frames and masks (see second bullet point in this section). ii. Take the first frame in the time-ordered list and histogram the pixel values. iii. Isolate the outliers from this histogram, e.g., using the same robust sigma-estimation method as used for the sky-offsets above, or some variant thereof. The lower/upper threshold commandline input parameters: <-lt> and <-ut> may be used for this purpose. iv. Omit prior-known (static) bad pixels from this outlier list using the input masks and the bitmasking template: command-line inputs <-f2> and <-m>. v. Repeat steps ii, iii and iv for all frames in the input list where the outliers from iii (the candidate bad pixels) are stored in memory for each frame. vi. Cycle through each outlier in each frame-outlier list and search for repeating offenders in subsequent outlier lists. If a particular outlier persists for N b consecutive frames, where N b is given by the input parameter <-pn>, set a bit for the respective pixel in the corresponding input masks. This bit is specified by the <-p> command-line parameter (in decimal format). At the time of writing, the value 2 21 (= 2097152) has been reserved for the dynamic pixel flagging. Page 6 of 6