page 1 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Preprocesing PACS photometer 2melines for map-‐making with MADmap
Babar Ali (NHSC)
page 2 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
MADmap in one slide
• Mapping code wri>en by the Berkeley CMB group to remove 1/f noise from bolometers. h>p://newscenter.lbl.gov/feature-‐stories/2010/02/03/madmap/
• MADmap was ported to Java for use in HIPE. • MADmap offers the so-‐called opPmal map-‐making to convert Pme ordered readouts to a final map. – Uses maximum likelihood (given a noise/probability model) to determine the opPmal sky value.
• Details in the next talk.
page 3 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
The need for preprocessing.
• MADmap assumes that bolometer Pme-‐lines are relaPvely calibrated. – No pixel-‐to-‐pixel variaPons
• MADmap assumes that 1/f noise is uncorrelated amongst pixels.
• PACS Level 1 Pmelines contain all of the above.
page 4 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Documenta2on Reference
• PACS data reducPon guide, chapter 9 • NHSC Tutorials:
– PACS-‐101: IntroducPon to PACS tutorials – PACS-‐103: Accessing & Storing PACS data – PACS-‐104: Using iPipe scripts – PACS-‐201: Level 0 to 1 processing of PACS photometer data
– PACS-‐401: MADmap map-‐making. h>ps://nhscsci.ipac.caltech.edu/sc/index.php/Pacs/DataProcessing
page 5 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Preprocessing Steps
I. Remove pixel-‐to-‐pixel electronic offsets (addiPve). II. Remove correlated signal driZ (addiPve). III. IdenPfy and fix module/row/pixel anomalies.
page 6 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
I: Pixel-to-pixel offsets Additive correction
page 7 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Electronic Offsets
• “StarPng point” of the raw readout value for each pixel is different and addiPvely offset.
• Usually, the offset pa>ern is the only visible structure in raw PACS readouts
• Correct by using calibraPon file, or median of the enPre Pmeline for the pixel.
!
Raw Corrected
page 8 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
II: Correlated Signal Drift Additive correction
page 9 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Proper2es of Signal DriH
• The median value of the en2re array shows a strong correla2on with 2me.
• The trend is usually more dominant than astrophysical signal.
Median vs. Time When present, this is the strongest trend in PACS cubes
page 10 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Proper2es (cont.)
• No model has been idenPfied (so far) to explain said behavior. – Caused by temperature varia0ons? But, no thermometers available to confirm or reject.
– Caused by electronics? But, not correlated with suspected Housekeeping values tried.
• The trend is strongest at the start of PACS OD and driZs to negligible values by the end of OD
page 11 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Proper2es (cont.)
• The trend is also different from module to module.
(next slide)
page 12 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Examples of signal driH color coded by individual PACS 16x16 pixel modules
“Usual”
Strong module-to-module differences
Rare. Ascending
“Hook”
page 13 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Proper2es (cont.)
• There is now evidence that individual pixels or groups of pixels have 2nd-‐order driZs on Pme scales larger than used for 1/f correcPon.
• Will require separate pre-‐processing • Or, increased noise filters lengths
page 14 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Correc2ng Signal DriH
• First step is to define the baseline.
page 15 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Es2ma2ng DriH Baseline
Use MEDIAN to pick up the correlation.
Astronomical source
page 16 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Es2ma2ng DriH Baseline
Divide MEDIAN values in bins.
Size of bin.
page 17 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Es2ma2ng DriH baseline
Take MINIMUM of bins to reject sources. Fit MINIMUM values.
page 18 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
DriH Correc2on Modules
• photGlobalDri9Correc0on – 1st generaPon. – Same correcPon for enPre FOV – Applies a single polynomial fit to baselines.
• photBaselineDri9Corr – 2nd generaPon. – Correct module-‐by-‐module – Segment baseline for spline-‐like ficng instead of a single polynomial
page 19 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
DriH Correc2on Modules
• photSignalDri9Corr – 3rd generaPon – Development version. – Fits the local neighborhood only
• for be>er esPmate of “hooks” and similar structures.
– Adds an iteraPve sigma-‐clipper to remove deviant points.
– Adds an “outer iteraPon”
page 20 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Width is the number of +/- points used to calculated the local baseline
Larger widths = smoother baseline
page 21 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
“Outer Itera2on”
Determine baseline
Project Naivemap
Naivemap Signal Timelines
Subtract Signal Timeline from Original L1 Timelines
Original L1 Timelines
Subtract baseline
Baseline Timelines Per pixel
Smooth Baseline Timelines
Subtract Baseline Timelines from Original L1 Timelines
Project MADmap
page 22 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
3rd gen. results
Good, but not fully tested.
page 23 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Proper correc2on is crucial
Bad
Good
page 24 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
DriH Correc2on
• Preprocessing remains very interacPve. – Less so with 3rd gen code.
• Crucial to detect and mask remove bad data and avoid pidalls.
page 25 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
III. Masking bad pixels
page 26 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Calibra2on block echoes
No correction (yet) in preprocessing.
Unstable frames: Usually at the beginning Likely due to calibration pre-amble.
Fix: mask range of readouts as “bad”
page 27 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Clean up
Artifacts on projected maps are usually issues in readouts (next slide).
page 28 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Clean up (cont.)
Example: Single pixel that went berserk.
Not a single readout, but 1000s of readouts
page 29 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Clean up (cont.)
Example: An entire row
page 30 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Fixes
• There is no PACS pipeline module for automaPcally detecPng these signal anomalies.
• IdenPfy by examining the final map, then reproject to Pmelines to idenPfy pixels and readout range.
• Masking the affected readouts as “bad glitches” remains the only opPon.
page 31 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
IV. Post-processing Correct the final map for point source
artifacts
page 32 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
Point-‐source ar2facts
Original map
Corrected map
Artifact map Naïve
map
page 33 MapMaking Workshop 2013
PACS pre-‐processing MADmap.
How does it work?
• Reference: – Lorenzo et al. in prep (available on request) – Developed for HiGal data processing.
• Uses the opPmal map as the starPng point for sky emission. • Subtract sky from original Pme lines, which leaves only noise
+arPfacts in the Pme-‐line. • High-‐pass filter the noise+arPfacts Pme-‐lines. This removes
noise and leaves on arPfact. • In pracPce, several iteraPons are necessary.