Changes between Version 240 and Version 241 of DatabaseBasedAnalysis/Spectrum


Ignore:
Timestamp:
12/09/19 18:44:21 (5 years ago)
Author:
tbretz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseBasedAnalysis/Spectrum

    v240 v241  
    245245== Summarize Corsika Production ==
    246246
     247{{{#!Spoiler
     248{{{#!sql
     249CREATE TEMPORARY TABLE SimulatedSpectrum
     250(
     251   `.energy` SMALLINT UNSIGNED NOT NULL COMMENT 'Bin Index [MC Energy]',
     252   CountN    DOUBLE            NOT NULL,
     253   CountW    DOUBLE            NOT NULL,
     254   CountW2   DOUBLE            NOT NULL,
     255   PRIMARY KEY (`.energy`) USING HASH
     256) ENGINE=Memory
     257AS
     258(
     259   SELECT
     260      INTERVAL(LOG10(Energy), %0:energyest) AS `.energy`,
     261      COUNT(*) AS CountN,
     262      SUM(    (%2:spectrum)/pow(Energy, SpectralIndex)   ) AS CountW,
     263      SUM(POW((%2:spectrum)/pow(Energy, SpectralIndex),2)) AS CountW2
     264   FROM
     265      MonteCarloFiles
     266   LEFT JOIN
     267      factmc.RunInfoMC USING (FileId)
     268   LEFT JOIN
     269      factmc.OriginalMC USING (FileId)
     270   GROUP BY
     271      `.energy`
     272   ORDER BY
     273      `.energy`
     274)
     275}}}
     276}}}
     277
     278
    247279== Result (Spectrum) ==
    248280