Changes between Version 256 and Version 257 of DatabaseBasedAnalysis/Spectrum


Ignore:
Timestamp:
12/10/19 15:29:56 (5 years ago)
Author:
tbretz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseBasedAnalysis/Spectrum

    v256 v257  
    274274=== Analysis Query ===
    275275
    276 The analysis of Data and !MontaCarlo files must be done totally identical to produce reasonable results. Therefore, the exact same query (or code) should be used for the analysis of both. In this example, the query has to provide two columns, `Weight` and `LogEnergyEst` for all gamma-line events. The weight must be +1 for events in the on-region and -0.2 for an event in the off-region (corresponding to the number of five wobble positions). !LogEnergyEst must contain \(\log_{10}\) of the estimated energy for each event. Only events surviving background suppression and spatial (theta) cuts should be considered.
     276The analysis of Data and !MontaCarlo files must be done totally identical to produce reasonable results. Therefore, the exact same query (or code) should be used for the analysis of both. In this example, the query has to provide two columns, `Weight` and `LogEnergyEst` for all gamma-line events. The weight must be +1 for events in the on-region and -0.2 for an event in the off-region (corresponding to the number of five wobble positions). !LogEnergyEst must contain \(\log_{10}\) of the estimated energy for each event. Only events surviving background suppression and spatial (theta) cuts should be considered. 
    277277
    278278{{{#!Spoiler
     
    434434=== Analyze Monte Carlo Data ===
    435435
    436 Similarly to the analysis of Data, another query summarizes the !MonteCarlo Analysis.
     436Similarly to the analysis of Data, another query summarizes the !MonteCarlo Analysis. The result is stored in a temporary table (`AnalysisMC`).
    437437
    438438{{{#!Spoiler
     
    514514=== Summarize Corsika Production ===
    515515
     516The following queries produces a summary of the events simulated at first by Corsika. The result is stored in a temporary table (`SimulatedSpectrum`).
     517
    516518{{{#!Spoiler
    517519{{{#!sql
     
    529531      INTERVAL(LOG10(Energy), %0:energyest) AS `.energy`,
    530532      COUNT(*) AS CountN,
    531       SUM(    (%2:spectrum)/pow(Energy, SpectralIndex)   ) AS CountW,
    532       SUM(POW((%2:spectrum)/pow(Energy, SpectralIndex),2)) AS CountW2
     533      SUM(    (%1:spectrum)/pow(Energy, SpectralIndex)   ) AS CountW,
     534      SUM(POW((%1:spectrum)/pow(Energy, SpectralIndex),2)) AS CountW2
    533535   FROM
    534536      MonteCarloFiles
     
    545547}}}
    546548
     549The placeholder `%0:energyest` is the binnings (as used previously) for the logarithm (base 10) of the estimated energy. `%1:spectrum` is the (unknown) 'true' source spectrum, for example `POW(Energy, -2.4)`.
     550
    547551
    548552=== Result (Spectrum) ===