Differences between revisions 3 and 4
Revision 3 as of 2018-03-09 15:27:19
Size: 1865
Editor: TomDwelly
Comment:
Revision 4 as of 2018-03-09 16:03:56
Size: 4385
Editor: TomDwelly
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
''This is a holding page to gather together notes on produsing an analytic vignetting model for eSASS tasks'' ''This is a holding page to gather together notes on producing an analytic vignetting model for eSASS tasks''
Line 10: Line 10:
== First step == = Zeroth order model (TD) =

== Derivation of model parameters ==
Line 18: Line 20:
  * This quadratic form is probably bad at energies above the upper tabulated energy band   * This quadratic form does strange things at energies above the upper tabulated energy band and so the vignetting model is assumed to be constant in energy above 7.5keV
  * future versions will be based on more energy bands (five or six?) than the three available here
Line 20: Line 23:
 * The parameters describing this fit are as follows: === Figures demonstrating the fit ===
{{attachment:fit_sixte_vignetting_with_moffat.png|Vignetting model fitted to SIXTE file at defined energies|width=500}}
{{attachment:fit_sixte_vignetting_with_moffat_params_vs_energy.png|Trends of vignetting model parameters with energy|width=500}}
Line 24: Line 29:
{{attachment:fit_sixte_vignetting_with_moffat.png|Vignetting model fitted to SIXTE file at defined energies|width=500}}
{{attachment:fit_sixte_vignetting_with_moffat_params_vs_energy.png|Trends of vignetting model parameters with energy|width=500}}
{{attachment:fit_sixte_vignetting_analytic_model.png|Vignetting model at arbitrary energies|width=500}}
=== The parameters describing the model ===


Results of fits at each energy:
 * functional form is:
  * vign(oa,theta,,0,,,beta,alpha) = ((1.0 + (oa/theta,,0,,)^^alpha^^)^^beta^^)
 * where
  * oa = off-axis angle in degrees
  * theta0 is a scaling parameter, also in degrees
  * alpha,beta are dimensionless exponents
 * independent fits at each of [1.25, 4.0, 7.5] keV give:
{{{
Energy= 1.25 keV: theta0= 0.44966 +- 0.02004 beta=-1.02111 +- 0.05693 alpha= 1.71288 +- 0.01767
Energy= 4 keV: theta0= 0.22575 +- 0.00860 beta=-0.83151 +- 0.04289 alpha= 1.97408 +- 0.03523
Energy= 7.5 keV: theta0= 0.10547 +- 0.00350 beta=-0.50753 +- 0.03063 alpha= 2.52732 +- 0.09069
}}}

  * we can describe this as a matrix of coefficients [3 coeffs X N,,energies,,]
{{{
coeff[1,1],coeff[2,1],coeff[3,1] = [ 0.44966, -1.02111, 1.71288]
coeff[1,2],coeff[2,2],coeff[3,2] = [ 0.22575, -0.83151, 1.97408]
coeff[1,3],coeff[2,3],coeff[3,3] = [ 0.10547, -0.50753, 2.52732]
}}}

 * clipping of model in energy:
{{{
emin = 0.0
emax = 7.5
clip(eraw) = (eraw<emin?emin:(eraw>emax?emax:eraw))
}}}

 * Lagrangian polynomial interpolation ([[https://en.wikipedia.org/wiki/Lagrange_polynomial]])
  * given three points on the plane at (x1,y1), (x2,y2), (x3,y3), what is the quadratic equation that passes through all of them?
{{{
lagr(x,x1,x2,x3,y1,y2,y3) = y1*((x-x2)/(x1-x2))*((x-x3)/(x1-x3)) + y2*((x-x1)/(x2-x1))*((x-x3)/(x2-x3)) + y3*((x-x1)/(x3-x1))*((x-x2)/(x3-x2))
}}}
  * Therefore, energy dependent versions of theta0,beta,alpha are given by
{{{
f_theta0(energy) = lagr(clip(energy),e[1],e[2],e[3],coeff[1,1],coeff[1,2],coeff[1,3])
f_beta(energy) = lagr(clip(energy),e[1],e[2],e[3],coeff[2,1],coeff[2,2],coeff[2,3])
f_alpha(energy) = lagr(clip(energy),e[1],e[2],e[3],coeff[3,1],coeff[3,2],coeff[3,3])
}}}
 * And so the general vignetting function is:
{{{
vign_gen(oa,energy) = vign(oa,f_theta0(energy),f_beta(energy),f_alpha(energy))
}}}


{{attachment:fit_sixte_vignetting_analytic_model.png|Vignetting model at arbitrary energies|width=700}}


== Description of model in CALDB ==

 * See script: "/home/erosita/sw/eSASSdevel/erosita/task/srctool/scripts/build_avign_caldb_files.csh"

== Using the analytic vignetting model in eSASS ==

 * See module eSASS "/home/erosita/sw/eSASSdevel/erosita/task/srctool/srctool_generic_avign_mod.f90"

Modelling the vignetting function of eROSITA

This is a holding page to gather together notes on producing an analytic vignetting model for eSASS tasks

Problem: The current method to represent the eROSITA vignetting function in the eSASS required interpolation from a tabulated grid of calibration measurements, this is computationally awkward, and can lead to discontinuities in the derived system response. Desired improvement: Compute an analytic description of the vignetting function of each eROSITA telescope module, and save the parameters of this model into the CALDB

Zeroth order model (TD)

Derivation of model parameters

  • Start from the vignetting description file supplied with the current version of SIXTE (share/sixte/instruments/srg/erosita_vignetting_v2.1.fits)
    • this contains a list of vignetting values evaluated at 3 energy bands and 31 offaxis angles
      • it is not clear what mean energy should be assumed for each energy band, we assume 1.25keV, 4.5keV and 7.5keV.
  • For each energy value we fit a simple model as a function of off-axis angle
    • A pseudo-Moffat distribution is found to give a reasonable match to the tabulated values, i.e. vign(oa) = [1 + (oa/theta0)**alpha]**beta
  • The values of theta0,beta,alpha are then interpolated using a quadratic expression to allow evaluation of the expression at any energy
    • This quadratic form does strange things at energies above the upper tabulated energy band and so the vignetting model is assumed to be constant in energy above 7.5keV
    • future versions will be based on more energy bands (five or six?) than the three available here

Figures demonstrating the fit

Vignetting model fitted to SIXTE file at defined energies Trends of vignetting model parameters with energy

The parameters describing the model

Results of fits at each energy:

  • functional form is:
    • vign(oa,theta0,beta,alpha) = ((1.0 + (oa/theta0)alpha)beta)

  • where
    • oa = off-axis angle in degrees
    • theta0 is a scaling parameter, also in degrees
    • alpha,beta are dimensionless exponents
  • independent fits at each of [1.25, 4.0, 7.5] keV give:

Energy=    1.25 keV: theta0= 0.44966 +-  0.02004  beta=-1.02111 +-  0.05693  alpha= 1.71288 +-  0.01767
Energy=       4 keV: theta0= 0.22575 +-  0.00860  beta=-0.83151 +-  0.04289  alpha= 1.97408 +-  0.03523
Energy=     7.5 keV: theta0= 0.10547 +-  0.00350  beta=-0.50753 +-  0.03063  alpha= 2.52732 +-  0.09069
  • we can describe this as a matrix of coefficients [3 coeffs X Nenergies]

coeff[1,1],coeff[2,1],coeff[3,1] = [ 0.44966, -1.02111, 1.71288]
coeff[1,2],coeff[2,2],coeff[3,2] = [ 0.22575, -0.83151, 1.97408]
coeff[1,3],coeff[2,3],coeff[3,3] = [ 0.10547, -0.50753, 2.52732] 
  • clipping of model in energy:

emin = 0.0
emax = 7.5
clip(eraw) = (eraw<emin?emin:(eraw>emax?emax:eraw))

lagr(x,x1,x2,x3,y1,y2,y3) = y1*((x-x2)/(x1-x2))*((x-x3)/(x1-x3)) + y2*((x-x1)/(x2-x1))*((x-x3)/(x2-x3)) + y3*((x-x1)/(x3-x1))*((x-x2)/(x3-x2))
  • Therefore, energy dependent versions of theta0,beta,alpha are given by

f_theta0(energy) = lagr(clip(energy),e[1],e[2],e[3],coeff[1,1],coeff[1,2],coeff[1,3])
f_beta(energy)   = lagr(clip(energy),e[1],e[2],e[3],coeff[2,1],coeff[2,2],coeff[2,3])
f_alpha(energy)  = lagr(clip(energy),e[1],e[2],e[3],coeff[3,1],coeff[3,2],coeff[3,3])
  • And so the general vignetting function is:

vign_gen(oa,energy) = vign(oa,f_theta0(energy),f_beta(energy),f_alpha(energy))

Vignetting model at arbitrary energies

Description of model in CALDB

  • See script: "/home/erosita/sw/eSASSdevel/erosita/task/srctool/scripts/build_avign_caldb_files.csh"

Using the analytic vignetting model in eSASS

  • See module eSASS "/home/erosita/sw/eSASSdevel/erosita/task/srctool/srctool_generic_avign_mod.f90"

EROSITAwiki: EroCat/AnalyticVignetting (last edited 2020-06-11 14:45:06 by JeremySanders)