Detecting Cosmic Rays in Infrared Data Rachel Anderson Karl Gordon RIAB Monthly Meeting 5/28/2016 Outline The CR Problem Linear Fit Algorithm CR Detection Methods The 2-Point Difference Method The Deviation from Fit Method The Y-Intercept Method Results RIAB Monthly Meeting 5/28/2016 The CR Problem Every 1000 seconds, up to 20% of the field of view of JWST will be affected by CRs RIAB Monthly Meeting Offenberg, J.D., et al. 1999 Rouscher, B., et al. 2000, STScI-NGSTR-0003A 5/28/2016 The CR Problem Every 1000 seconds, up to 10% - 20% of the field of view of JWST will be affected by CRs + CR = RIAB Monthly Meeting Offenberg, J.D., et al. 1999 Rouscher, B., et al. 2000, STScI-NGSTR-0003A 5/28/2016 The CR Problem (cont.) The Question: What is the best we can do, given the noise in the ramp? The How: Simulate non-destructive read ramps. Add some CRs with various magnitudes and locations. Test CR detection methods, then try to find them. RIAB Monthly Meeting 5/28/2016 Linear Fit Algorithm We want to solve the equation: Y = AX, with solution: X = [ATC-1A]-1[ATC-1Y] y1 Y = y2 , … yn 1 A= 1 … 1 x1 x2 , … xn X= b m σy12 c1,2 … c1,n , and C = c2,1 … σy22 … c2,n … … … cn,1 cn,2 … σyn2 Fixsen, D. J., et al. 2000, PASP, 112, 1350 Gordon, K. D., et al. 2005, PASP, 117, 503 Hogg, D. W. et al. 2010, ArXiv e-prints RIAB Monthly Meeting 5/28/2016 Linear Fit Algorithm We want to solve the equation: Y = AX, with solution: X = [ATC-1A]-1[ATC-1Y] y1 Y = y2 , … yn 1 A= 1 … 1 x1 x2 , … X= b m xn σy12 c1,2 … c1,n , and C = c2,1 … σy22 … c2,n … … … cn,1 cn,2 … σyn2 It is easiest to think of C as the sum of two matrices: C = R + P p 12 p12 p 12 … 2 R = r2 I , and P = p1 p 12 p22 p22 … p22 … … … RIAB Monthly Meeting … … pn 2 Fixsen, D. J., et al. 2000, PASP, 112, 1350 Gordon, K. D., et al. 2005, PASP, 117, 503 Hogg, D. W. et al. 2010, ArXiv e-prints 5/28/2016 CR Detection Methods Three methods: 2- Point Difference Deviation from Fit Y-Intercept For each method: Detect CRs (largest first) Calculate the slope for the resulting ‘semi-ramps’ Calculate final slope of entire ramp by taking weighted average of the slopes of the ‘semi-ramps’ Regan, M. 2007, JWST-STScI-001212 Robberto, M. 2008, JWST-STScI-0001490, SM-12 RIAB Monthly Meeting 5/28/2016 2-Point Difference | di – μd | Ratio = σd di = yi – yi-1 μd: median of di’s σd = √2rn2 + pn2 … where pn = √μd RIAB Monthly Meeting 5/28/2016 Deviation From Fit yi – fi devi = σi RIAB Monthly Meeting 5/28/2016 Y-Intercept | b2 – b1 | Ratio = σb σb = √2rn2 + pn2 … where pn = √ m , and rn is calculated from un-correlated errors in our linear-fit program. RIAB Monthly Meeting 5/28/2016 Results: Fraction Found vs. False Detections 40 Frames, Input Slope: 10.00 DN/s RIAB Monthly Meeting 5/28/2016 Results: Fraction Found vs. False Detections 40 Frames, Input Slope: 0.00 DN/s RIAB Monthly Meeting 5/28/2016 Results: Multiple CR’s 2-Point Difference RIAB Monthly Meeting 5/28/2016 Conclusions To optimize results, our linear fit algorithm must take into account correlated and un-correlated errors. The 2-Point Difference method is simple, fast, consistent, and best for photon-noise dominated regime. The Y-Intercept method is better in read-noise dominated regime. RIAB Monthly Meeting 5/28/2016 Results: Number of Frames Slope = 10.0 DN/s Fraction of False Detections = 0.05 RIAB Monthly Meeting 5/28/2016 Results: Various Slopes 2- Point Difference RIAB Monthly Meeting 5/28/2016 Results: Various Slopes Deviation from Fit RIAB Monthly Meeting 5/28/2016 Results: Various Slopes Y-Intercept RIAB Monthly Meeting 5/28/2016 slopecalc / (slope-1) Linear Fit Algorithm (cont.) RIAB Monthly Meeting 5/28/2016 Results: Number of Frames 2-Point Difference Slope = 0.00 DN/s RIAB Monthly Meeting Slope = 10.00 DN/s 5/28/2016 Results: Number of Frames Deviation from Fit Slope = 0.00 DN/s RIAB Monthly Meeting Slope = 10.00 DN/s 5/28/2016 Results: Number of Frames Y-Intercept Slope = 0.00 DN/s RIAB Monthly Meeting Slope = 10.00 DN/s 5/28/2016 Results: Multiple CR’s Deviation from Fit RIAB Monthly Meeting 5/28/2016 MIRI Parameters RIAB Monthly Meeting Frame Time (s) 27.7 Slope (SN/s) 10.0 Zero Point (DN) 3,000.0 Number of Frames 40 Gain (e-/DN) 7.0 Dark Current (e-/s) 0.02 Read Noise (e-/sample) 16.0/√8 5/28/2016 Results: Multiple CR’s Y-Intercept RIAB Monthly Meeting 5/28/2016