X-ray data analysis Tomáš Plšek High Energy Astrophysics 4.11.2024 Literature ● An X-ray Data Primer (20 pages) - N.P. Lee & J.C. McDowell ● Handbook to X-ray astronomy - K. Arnaud, R. Smith, A. Sieminigovska ● High-Resolution X-ray Spectroscopy - C. Bambi & J. Jiang ● Tutorial Guide to X-ray and Gamma-ray Astronomy - C. Bambi ● Rentgenová spektroskopie kosmické pavučiny (bak. práce) - Martin Kolář 2 X-ray Missions & Pipelines Chandra X-ray Observatory (1999-now) ● High resolution X-ray imaging ● CCD & grating spectroscopy ● Software: CIAO, Sherpa XMM-Newton (1999-now) ● X-ray imaging (~6 arcsec) ● CCD & grating spectroscopy ● Software: SAS (Science Analysis Software), eSAS Swift-XRT (2004-now) ● Long-term monitoring of X-ray point sources ● Software: HEASoft, Build Swift-XRT Products eROSITA (2019-now) ● All-sky survey in the soft X-ray band ● Software: eSASS (eROSITA Science Analysis Software) XRISM (2023-now) ● High-resolution X-ray spectroscopy (microcalorimeters) ● Software: HEASoft, XSlide, FTOOLS 3 X-ray observations 4 It is hard to focus X-ray photons - they are energetic enough to penetrate the material → current X-ray telescopes are based on total reflection - they are composed of shells of parabolic + hyperbolic metal (Zerodur) mirrors. Baffles are used to prevent stray light or single reflection (only 2 times reflected photons allowed). Chandra X-ray Observatory ● High Resolution Mirror Assembly (HRMA) ● multiple detectors - ACIS-S, ACIS-I - imaging spectrometers - front (FI) or back (BI) illuminated chips - HRC-S, HRC-I - high resolution cameras ● grating spectroscopy - LETG, HETG + ACIS/HRC 5 Proposers Guide Chandra data (ACIS-S / ACIS-I) $ download_chandra_obsid 785 Secondary ● level 1 event file (evt1.fits) ● aspect solution (aspect folder) ● mask (msk1.fits) ● … Primary ● level 2 event file (evt2.fits) ● image (img2.fits) ● aspect solution (asol1.fits) ● bad pixel map (bpix1.fits) ● FOV (fov1.fits) ● … 6 Reprocessing data $ chandra_repro 785 785/repro - reads primary & secondary directories - produces newly calibrated evt2, asol1, bpix1, msk1, fov1 … files 7 Event file 8 = sparse representation of 4D data (X, Y, time, energy) Aspect solution 9 = orientation of telescope vs time ● based on Aspect Camera - optical astrometry ● aspect solution (asol1 file) - dither pattern - Lissajous figures ● level 0 → level 1 event file - data levels Instrument & Exposure map instrument map (bad pixels / rows) exposure map (total exposure time) $ mkinstmap outfile=instmap.fits monoenergy=1.5 obsfile=evt.fits … $ mkexpmap asphist.fits outfile=expmap.fits instmapfile=instmap.fits … 10 Exposure correction $ fluximage 782_evt.fits … → expmap & flux image for OBSID $ flux_obs */*_evt.fits … → merged expmap, merged flux image $ dmimgcalc “merged.img,expmap.fits” none opt=”img1/img2” outfile=expcor.img 11 Point Spread Function (PSF) = response of telescope to point-like emission 12 On-axis PSF (ecf=50%) Chandra ~ 0.5” XMM MOS ~ 6” XRISM ~ 1.3’ On-axis Chandra PSF radial profile Chandra (HRMA) PSF spatial dependence (Chandra) energy dependence (Chandra) 0.9 keV 1.5 keV 3.8 keV 13 On-axis PSF treatment PSF for any given position, energy and time will be different - real PSF will also differ from ground measurements. Best way to treat PSF is to perform a simulation (e.g. using MARX). $ srcflux … psfmethod=’ideal | quick | arfcorr | psffile’ 14 Off-axis PSF treatment (psfmap) $ fluximage 782_evt.fits psfecf=0.9 … → inc. psfmap for OBSID $ flux_obs */*_evt.fits psfecf=0.9 … → inc. merged psfmap $ mkpsfmap acis_img.fits acis_psf.fits energy=1.5 ecf=0.9 15 merged psfmapsingle-OBSID psfmap Point source detection $ wavdetect evt.fits … scales="2 4 8" sigthresh=1e-5 psffile=psfmap.fits 16 Filling point sources $ flux_obs */*evt.fits outroot=rgb bands=broad bin=1 $ dmfilth broad.img broad_filled.img src.reg bkg.reg method=POISSON 17 → Blanksky vs Stowed background $ blanksky evt.fits bkg.fits asol.fits stowedbg=’yes | no’ - can be used for image / spectral subtraction - based on calibration files, scaled to match 9-12 keV 18 inst. + CXBinst. → → stowed blanksky blanksky bkg Contaminations and Defects ● soft protons (due to Solar activity) - background lightcurve → deflaring alogrithm → Good Time Intervals (GTI) ● pile-up - when source is too bright - two photons arriving at same time - lowers count rate - makes spectrum harder - PIMMS - tool to estimate pile-up ● contamination of ACIS chips - molecular contamination (frozen water) - decreases effective area in the soft band 19 Image analysis $ flux_obs */*evt.fits outroot=merged bands=broad bin=1 ● Beta modelling (see next slide) ● Gaussian Gradient Magnitude (GGM) filter ● Unsharp masking ● Surface Brightness Fluctuations (Churazov, Dupourqué) ● Cavity detection (CADET) 20 Perseus c. GGM Beta modelling → Ettori 1999 (Introduction), Sherpa notebooks github.com/tomasplsek/Beta-modelling 21 Narrow-band imaging $ flux_obs */*evt.fits outroot=rgb bands=csc bin=1 $ flux_obs */*evt.fits outroot=myband bands=’0.5:1.5:0.9’ bin=1 22 False-RGB image $ ds9 -rgb -red soft.fits -green medium.fits -blue hard.fits -rgb lock scale yes -rgb lock colorbar yes -rgb lock smooth yes 2323 Spectral analysis $ specextract ’infile[sky=region(file.reg)]’ outroot bkgfile $ ftgrouppha infile outfile respfile grouptype=min groupscale=1 Produced spectral files (per region per OBSID) ● spec.pha - pulse height amplitude, source spectrum ● spec.pi - pulse intensity (gain-corrected PHA) ● spec.grp - grouped source spectrum ● spec_bkg.pi - background spectrum ● spec.arf - ancilarry response file (ARF) ● spec.rmf - redistribution matrix file (RMF) $ combine_spectra ‘src1.pi,src2.pi’ outroot 24 Spectral files (ARF, RMF) Ancillary Response File (ARF) Redistribution Matrix File (RMF) 25 eff. area = geom. area, vignetting, QE response of detector to E 𝞬 Fitting X-ray spectra The fitting is performed by backward modelling - instead of deconvolving the noisy spectrum with ARF and RMF files (RMF is singular) to obtain the physical spectrum, we fold our physical model through the responses of the telescope (ARF, RMF) and compare to the observed spectrum. X-ray fitting software ● Xspec (AtomDB) ● Sherpa (xspec-modelsonly) ● SPEX (SPEXACT) 26 X-ray sources phabs(vapec) phabs(powerlaw + gauss) temperature kT electron density ne abundance Fe,Mg,Si,S… column density nH photon index Gamma emission lines E,𝞼E ,z 27 hot galaxy / cluster ICM X-ray bright AGN Backgrounds & Foregrounds Sources of absorption ● Galactic absorption - phabs (nH ) ● intrinsic absorption - zphabs/zwabs (nH,int ) Sources of background / foreground emission ● cosmic X-ray background (CXB) - pow (Γ = 1.4) ● Low-Mass X-ray Binaries (LMXB) - pow (Γ = 1.56) ● North Polar Spur (NPS) - apec (kT = 0.25 keV) ● Galactic halo (GH) - apec (kT = 0.2 keV) ● Local Hot Bubble (LHB) - apec (kT = 0.1 keV) ● instrumental background (background file) Instrumental background treatment ● subtraction (chi2, at least 1 count/bin) ● subtraction (cstat) ● modelling (broken powerlaw + lines) 28 Spectral deprojection Projected spectra of extended sources (galaxies or clusters) extracted from thin annuli are “polluted” by spectra from further shells. For systems with temperature gradient (e.g. cool core clusters), projection will not only affects estimates of electron density (ne ), but also temperature (kT) and abundance (Z). 29 Spectral deprojection - methods Onion peeling - projct (Xspec) - deproject (Sherpa) - pyproffit Forward modelling - cluster (SPEX) Direct (non-modelling) method - dsdeproj (spectral subtraction) 30 From raw data to image / spectrum / lightcurve ● download_chandra_obsid - download specific Chandra OBSID ● chandra_repro - produce level 2 products (evt, asol, bpix) ● reproject - reproject OBSIDs into one aimpoint ● flux_obs - merge OBSIDs (images, expmaps, psfmaps) ● wavdetect - detects point sources ● dmextract - extract background lightcurve (w/o point sources) ● deflare - deflare bg lightcurve → Good Time Intervals (GTI) ● flux_obs - merge cleaned OBSIDs ● fill_sources - fill point sources in image (Poisson) ● blanksky_files - produce blanksky/stowed background files ● specextract - extract spectra from regions of interest ● dmextract - extract lightcurve for a point source 31 Archives & Tools Data archives - ChaSeR - Chandra data archive - browse - HEASARC search (UV, X-ray, Gamma) - Build Swift-XRT Products - Swift-XRT lightcurve and spectra - VLA, VLBI, SAOImageDS9 (DAX - 4ciaodemos) Databases - NASA Extragalactic Database NED (RA, DEC, z, D, SED) - HyperLeda (morphology, 𝞼v , magnitudes, …) - Galactic nH (HEASARC, Swift) Other tools - PIMMS - Hiligt 32 Example 1: Centaurus cluster (NGC4696) ● distance (D, z) ● galactic column density nH ● scale pc/” ● velocity dispersion 𝞼v → MSMBH , g(