= Description of known differences between SIXTE and eSASS = <> == Scope == This page is intended as a place to document the known differences between how the SIXTE simulation code models the response of eROSITA versus the assumptions in the eSASS code, particularly within SRCTOOL. <
> '''Note that in some cases it is entirely expected that SIXTE calibration files will differ from their CALDB counterparts.''' In the case of RMFs this is due to the internal modelling of event splitting/thresholding by SIXTE. ''Code and calibration files will change with time, so please include both the SIXTE and the eSASS version numbers in any comments, and include your initials in any additions.'' ---- == Differences in calibration files == === PSF model(s) === '''Comparison between [[http://www.sternwarte.uni-erlangen.de/research/sixte/downloads/sixte/instruments/instruments_srg-1.4.0.tar.gz|SIXTE instrument description v1.4.0]] vs eSASS CALDB as at 15/02/2018 (TD)''' * SIXTE uses a "small maps" representation of the eROSITA PSF -> erosita_psf_v3.1.fits * The PSF maps are evaluated at 7 energies (0.3, 1.5, 3.0, 4.5, 5.4, 6.4, 8.0 keV) and 7 off-axis angles (0, 5, 10, 5, 20, 25, 30 arcmin) * Each PSF map has 256x256 pixels, with pixel scale 75um pix^-1^ (=9.669 arcsec pix^-1^ for focal length=1.6m) * The PSF maps are either based on PANTER measurements or on a ray tracing model - '''TODO: confirm this''' * The CALDB contains two types of "instantaneous" PSF model (i.e. not survey-averaged) * A "small-maps" PSF representation -> e.g. fm1_2dpsf_100215v02.fits * The PSF maps are evaluated at 3 nominal energies (1.0, 4.0, 7.0 keV) and 7 off-axis angles (0, 5, 10, 5, 20, 25, 30 arcmin) * Note that for the purposes of CALDB interpretation the energies and off-axis angles are actually expressed as ranges * Energy ranges: 100.-2499.999, 2500.-5499.999, 5500.-12000. eV * Off-axis angle ranges: 0.0-2.499, 2.5-7.499, 7.5-12.499, 12.5-17.499, 17.5-22.499, 22.5-27.499, 27.5-35. arcmin * Each PSF map has 601x601 pixels, with pixel scale 3.867 arcsec pix^-1^ * The PSF maps are based on a ray tracing model * The PSF maps model is used by eSASS tools: SRCTOOL, ?? * A shapelet PSF model representation -> e.g. fm1_slet_psf_181217v02.fits * The shapelet PSF maps are evaluated at 6 energies (0.3, 1.5, 3.0, 4.5, 5.4, 6.4 keV) and at a regular grid of 169 positions ([-30:+30,5]x[-30:+30,5] arcmin) within the focal plane * The shapelet PSF model is computed from fits to PANTER PSF measurements, evaluated separately for each FM1-7 * The shapelet PSF model is used by eSASS tools: ERMLDET, APETOOL, ?? === Redistribution functions (RMF) === '''Comparison between [[http://www.sternwarte.uni-erlangen.de/research/sixte/downloads/sixte/instruments/instruments_srg-1.4.0.tar.gz|SIXTE instrument description v1.4.0]] vs eSASS CALDB as at 15/02/2018 (TD)''' * '''Note that due to the internal representation of event splitting+thresholding within SIXTE, differences between the input RMFs of eSASS and SIXTE are entirely expected.''' * SIXTE uses a single RMF model for all patterns -> sixte_erormf_normalized_singles_20170725.rmf * Splitting of photons into detected valid event patterns (singles, doubles, triples, quads, invalid patterns) and thresholding is modeled internally within SIXTE * Each row (i.e. sum over all the PI channels for a given input photon energy) of the SIXTE RMF sums to unity * The CALDB RMF contains redistribution matrices for each pattern separately -> e.g. fm1_rmf_141103v01.fits * The probability of incoming photons to be detected in a particular pattern type (as a function of incoming photon energy) is multiplied into the CALDB RMF matrices, i.e. each row sums to some value < unity. * Differences between the RMFs are illustrated in the figures below (x-axis = PI channel; y-axis = ENERGY bin; colour scale: log, range = [1e-7:1e-2], intended to bring out weak features) : || SIXTE RMF: All-patterns: || CALDB RMF: All-patterns || Ratio CALDB/SIXTE: All Patterns<
>(colour scale: linear, range=[0:1.5], magenta=NaN) || || {{attachment:sixte_erormf_normalized_singles_20170725_image.png|SIXTE RMF FM* all valid patterns)|width=300}} || {{attachment:fm1_rmf_141103v01_sdtq_image.png|CALDB RMF FM* all valid patterns) |width=300}} || {{attachment:CALDB_SIXTE_RMF_ratio.png|(CALDB RMF/SIXTE RMF), all valid patterns) |width=300}} || || CALDB RMF Singles || CALDB RMF Doubles || CALDB RMF Triples || CALDB RMF Quads || || {{attachment:fm1_rmf_141103v01_singles_image.png|CALDB RMF FM* singles) |width=200}} || {{attachment:fm1_rmf_141103v01_doubles_image.png|CALDB RMF FM* doubles) |width=200}} || {{attachment:fm1_rmf_141103v01_triples_image.png|CALDB RMF FM* triples) |width=200}} || {{attachment:fm1_rmf_141103v01_quads_image.png|CALDB RMF FM1 quads) |width=200}} || ---- == Differences in modelling the instrument == === Just out of field sources (SIXTE v2.1.1 - SRCTOOL v*) === * '''Difference:''' SIXTE generates counts for a point source only if its sky coordinates fall inside the detector footprint, however SRCTOOL assumes that sources just outside the detector footprint will create detectable counts due to the finite PSF. * The default FoV diameter of the eROSITA TMs in SIXTE is 1.020 degrees, this is slightly smaller than the detector mask diameter in eSASS = 384 pix*2.68574E-3 deg/pix = 1.031 deg * see e.g. /home/erosita/caldb/data/erosita/tm1/bcf/tm1_detmap_100602v02.fits, and figure below. * The SASS detector map has a "blurred" edge (i.e. pixels around the perimeter have a partial response) * '''Consequence:''' If one uses SIXTE to simulate a source observed in an eROSITA scan, and examines the lightcurve produced by SRCTOOL, the source will appear to be too faint as it crosses into and out of the detector FoV. * '''Notes:''' Clarification of SIXTE's use of FoV diamater {{{ On 25/06/2018 08:32, Thomas Dauser wrote: Sixte uses this value just to select the sources for which it creates photons. For sources within this FoV photons are created and thrown onto the detection plane / CCD. It will only be detected, however, if it actually hits the CCD. Meaning if you set the value to 2 degrees you should get the same results, just the simulation takes longer as many photons are created which will never hit the CCD. So, this value should not change anything in the simulation, as the instrumental setup is given with the size of the CCD chips and the vignetting. }}} {{attachment:detmap_comparison.jpeg|Comparison of SIXTE and eSASS definitions of the FoV|width=500}} === Pileup (SIXTE v* - SRCTOOL v*) === * '''Difference:''' SIXTE has a detailed model of pileup, SRCTOOL makes ''no'' attempt to correct for pileup (by design) * '''Consequence:''' When using SRCTOOL to analyse simulated eROSITA observations of very bright sources (made via SIXTE) will give misleading results (sources will appear to be too faint, too hard, and will have spurious variability) * ''Add more items when they are discovered'' ---- == Differences in interpolation methods == * Calibration parameters are typically computed for a specific value or range of values in energy and off-axis angle. These parameters must then be interpolated in some way to cover the full energy range or off-axis angle range of interest. Below we list the known ways in which interpolation is carried out differently in eSASS and SIXTE. * TBC ---- == Differences in calibration file formats and conversion between SIXTE<->CALDB formats == * Relevant parameters for conversions: * INST = "fm1", "fm2", ... -> eventually "tm1", "tm2", ... * CALDB_BASE = "/home/erosita/caldb/data/erosita" # on MPE machines * FOCAL_LENGTH = 1.60 (m) * SIXTE_BASE = ${SIXTE_DIR}/share/instruments/srg/ (or similar) * '''Vignetting files''' * CALDB uses arcmin for off-axis angle, SIXTE uses degrees * so to convert from CALDB format to SIXTE format do this: {{{#!highlight tcsh ftcalc ${CALDB_BASE}/${INST}/bcf/${INST}_tvignet_100302v01.fits+1 ${SIXTE_BASE}/${INST}_tvignet_100302v01_sixte.fits THETA "THETA/60.0" clobber=yes mode=q fparkey "degree" ${INST}_tvignet_100302v01_sixte.fits+1 TUNIT3 mode=q }}} * '''PSF files (small maps):''' * CALDB expects pixel scale (CDELT[12]) to be given in arcsec, SIXTE expects metres (together with a focal length) * CALDB expects ENERGY, THETA, PHI to be expressed as ranges in string keywords, SIXTE expects ENERGY, THETA, PHI to be expressed as single values in floating point header keywords * Assume that ENERGY,,mid,, = sqrt(ENERGY,,lo,,*ENERGY,,hi,,), THETA,,mid,, = (THETA,,lo,,*THETA,,hi,,)/2 * To adapt a CALDB PSF file for use within SIXTE do the following: {{{#!highlight tcsh set OUTFILE = ${SIXTE_BASE}/${INST}_2dpsf_100215v02_sixte.fits cp ${CALDB_BASE}/${INST}/bcf/${INST}_2dpsf_100215v02.fits ${OUTFILE} foreach I ($HDU_LIST ) set CDELT1 = `ftlist ${OUTFILE}+$I K include=CDELT1 mode=q | awk --field-separator="=" -v fl=$FOCAL_LENGTH 'BEGIN{d2r=4.*atan2(1.,1.)/180.} //{printf("%.6e", fl*$2*(d2r/3600.))}'` set CDELT2 = `ftlist ${OUTFILE}+$I K include=CDELT2 mode=q | awk --field-separator="=" -v fl=$FOCAL_LENGTH 'BEGIN{d2r=4.*atan2(1.,1.)/180.} //{printf("%.6e", fl*$2*(d2r/3600.))}'` set ENERGY = `ftlist ${OUTFILE}+$I K include=CBD10001 mode=q | awk --field-separator="=" '//{split($2,a,"-");split(a[1],b,"(");split(a[2],c,")"); x=sqrt(b[2]*c[1]) ;printf("%.6g", x)}'` set THETA = `ftlist ${OUTFILE}+$I K include=CBD20001 mode=q | awk --field-separator="=" '//{split($2,a,"-");split(a[1],b,"(");split(a[2],c,")"); x=0.5*(b[2]+c[1]) ;printf("%.6g", x)}'` set PHI = "0.0" fparkey $ENERGY ${OUTFILE}+$I ENERGY add=yes mode=q fparkey $THETA ${OUTFILE}+$I THETA add=yes mode=q fparkey $PHI ${OUTFILE}+$I PHI add=yes mode=q fparkey $CDELT1 ${OUTFILE}+$I CDELT1 add=yes mode=q fparkey $CDELT2 ${OUTFILE}+$I CDELT2 add=yes mode=q fparkey "m" ${OUTFILE}+$I CUNIT1 add=yes mode=q fparkey "m" ${OUTFILE}+$I CUNIT2 add=yes mode=q end }}} * '''ARFs''' * CALDB and SIXTE ARFS should be interchangeable * Make sure that the FILTER keyword is present in the header (needed by SIXTE) * The energy binning of the ARF '''must''' be identical to the binning in the "EBOUNDS" extension of the corresponding RMF file * RMFs are not directly interchangeable ---- ---- = Resolved differences = == Differences in calibration files == === SOLVED: Vignetting model (SIXTE: erosita_vignetting_v2.1.fits, eSASS: fm1_tvignet_100302v01.fits) === * ~+Update (TD) 24/05/2018: The eSASS tasks srctool (v1.17+) and expmap (v1.13+) now use an analytic vignetting function, the parameters of which are derived from the SIXTE erosita_vignetting_v2.1.fits file.+~ * ~+This means that differences between the vignetting functions in SIXTE and eSASS are now likely to be smaller.+~ * ~+However, there are still likely to be differences in the interpolation methods (in energy, offaxis angle) used by SIXTE and eSASS +~ '''Comparison between [[http://www.sternwarte.uni-erlangen.de/research/sixte/downloads/sixte/instruments/instruments_srg-1.4.0.tar.gz|SIXTE instrument description v1.4.0]] vs eSASS CALDB as at 15/02/2018 (TD)''' * SIXTE model is tabulated at 31 off-axis angles, eSASS version at only 7 * SIXTE model is tabulated over 3 energy ranges: 0.0-2.5, 2.5-5.5 and 5.5-20 keV, eSASS uses energy ranges: 0.0-2.5, 2.5-5.5 and 5.5-10 keV * SIXTE and CALDB both use identical vignetting functions for all FMs * Note that we expect to implement an analytically expressed vignetting function into the eSASS in the near- to mid-term future * Differences in the values of the vignetting function are illustrated in the figures below: {{attachment:compare_vignetting_vs_offaxis.png|Comparison of vignetting model as a function of off-axis angle|width=1000}} <
> {{attachment:compare_vignetting_vs_energy.png|Comparison of vignetting model as a function of energy|width=1000}} === SOLVED: Effective area curves (ARF) === * ~+Update (TD) 25/06/2018: The SIXTE erosim tool (v2.4.5, with instruments_srg-1.4.6.tar.gz) now uses the CALDB "FILTER" ARFs by default+~ '''Comparison between [[http://www.sternwarte.uni-erlangen.de/research/sixte/downloads/sixte/instruments/instruments_srg-1.4.0.tar.gz|SIXTE instrument description v1.4.0]] vs eSASS CALDB as at 15/02/2018 (TD)''' * Default SIXTE setup has two types of ARF: * On-chip 200nm Al filter layer and open external filter -> FM1, FM3, FM4, FM6, FM7 -> arf01_200nmAl_sdtq_onaxis.fits * No On-chip filter plus 100nm Al + 200nm PI external filter (on filter wheel) -> FM2, FM5 -> arf01_100nmAl_200nmPI_sdtq_onaxis.fits * The ARFs are evaluated for 1024 unevenly spaced energy bins * CALDB contains three types of ARF: * On-chip filter + open external filter -> FM1, FM3, FM4, FM6, FM7 -> e.g. fm1_arf_open_000101v02.fits * On-chip filter + external filter (on filter wheel) -> FM1, FM3, FM4, FM6, FM7 -> e.g. fm1_arf_filter_000101v02.fits * No on-chip filter + external filter (on filter wheel) -> Fm2, FM5 -> e.g. fm2_arf_filter_000101v02.fits * The ARFs are evaluated for 1024 unevenly spaced energy bins * SIXTE and CALDB both use identical vignetting functions for groups of FMs (On-chip group: FM1, FM3, FM4, FM6, FM7; No on-chip group: FM2, FM5) * We also compare to Konrad's survey averaged ARFs from here: [[https://wiki.mpe.mpg.de/eRosita/erocalib_calibration]] * Differences in the values of the ARF curves are illustrated in the figures below: [[attachment:compare_arfs_onchip_open.png|{{attachment:compare_arfs_onchip_open.png|Comparison of ARFs for Telescope modules with only on-chip filter (200nm Al; FM1, FM3, FM4, FM6, FM7) |width=400}}]] [[attachment:compare_arfs_onchip_wfilter.png|{{attachment:compare_arfs_onchip_wfilter.png|Comparison of ARFs for Telescope modules with both on-chip and on-wheel filter (200nm Al+200nm PI; FM1, FM3, FM4, FM6, FM7) |width=400}}]] [[attachment:compare_arfs_nochip_wfilter.png|{{attachment:compare_arfs_nochip_wfilter.png|Comparison of ARFs for Telescope modules with only on-wheel filter (200nm Al+100nm PI; FM2, FM5)|width=400}}]]