XMM-NEWTON EPIC-pn DATA PROCESSING AND REDUCTION ================================================ This tutorial describes a basic EPIC-pn workflow using XMM-SAS. Run the commands in a Bash shell after initializing the SAS environment. Commands below assume that you start in the observation's working directory. Replace example filenames, coordinates, extraction radii, and thresholds with values appropriate for your observation. PART A. DATA PROCESSING ----------------------- 1. Unpack the downloaded observation archives tar -xzvf yourOBSID.tar.gz If this creates an additional TAR archive containing the ODF files, extract it: tar -xvf 0123_OBSID.tar The exact archive names and layout depend on the download. Inspect the files before proceeding. If your ODF files are already extracted, skip this step. 2. Organize the original ODF files Create a directory named 'odf' and place all original ODF files in it. For example, if the extracted FIT, ASC and MANIFEST files are in the current directory: mkdir odf mv -- *.FIT *.ASC MANIFEST.* odf/ The example 'mv' command assumes that all these file types exist; otherwise move only the files actually present. Keep the original ODF files together, including the MANIFEST and any other ODF components. Do not move processed files into this directory. The intended directory layout is: observation/ odf/ (original ODF files) evt/ (SAS processing products) 3. Set the ODF environment variable From the observation directory: export SAS_ODF="$PWD/odf" echo "$SAS_ODF" ls -l "$SAS_ODF" SAS_ODF must initially point to the directory containing the original ODFs. 4. Create the processing directory and calibration index mkdir evt cd evt cifbuild export SAS_CCF="$PWD/ccf.cif" ls -l "$SAS_CCF" 'cifbuild' creates the calibration index, ccf.cif. Make sure that the SAS calibration repository has been configured before running it. 5. Ingest the ODFs odfingest ls -l *SUM.SAS 'odfingest' creates an observation summary file. Set SAS_ODF to its full path. For example, for observation 0203280301: export SAS_ODF="$PWD/yourFILESUM.SAS" echo "$SAS_ODF" ls -l "$SAS_ODF" Use the ACTUAL summary filename produced for your observation. 6. Process EPIC-pn events epproc Find the calibrated pn imaging event list: ls -l *EPN*ImagingEvts.ds For the example observation, the file is: yourFILE_EPN_S003_ImagingEvts.ds For convenience, make a copy with a short filename: cp yourFILE_EPN_S003_ImagingEvts.ds pn.evt Use your own actual event-list filename. If more than one pn exposure exists, identify the appropriate science exposure rather than choosing arbitrarily. The original pipeline output is preserved by using 'cp' instead of 'mv'. PART B. DATA REDUCTION ---------------------- 1. Identify and filter soft-proton flares Extract a high-energy single-event light curve (10-12 keV) to inspect the particle background. For EPIC-pn, PI is in eV: evselect table=pn.evt withrateset=yes rateset=pn_high_energy.lc \ maketimecolumn=yes makeratecolumn=yes timebinsize=100 \ expression='(PI>10000)&&(PI<12000)&&(PATTERN==0)&&(#XMMEA_EP)' Inspect this light curve through the tool LCURVE and choose an appropriate quiescent-background count-rate threshold in counts/s (there is NO universal threshold valid for every observation or bin size): lcurve Replace THRESHOLD with your chosen numeric value (e.g., 0.4 only if justified by the observed high-energy count-rate distribution): tabgtigen table=pn_high_energy.lc gtiset=good_bkg.gti \ expression='RATE