From dea95358f381ec3b30ff2509aa1c45766f032ea1 Mon Sep 17 00:00:00 2001 From: ddahlbom Date: Mon, 30 Oct 2023 18:36:21 -0400 Subject: [PATCH] Sync --- .../sequoia_FWHM_per_energy.csv | 101 ++++++++++++++++++ src/instrument_corrections.jl | 4 +- 2 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 data/instrument_data/sequoia_FWHM_per_energy.csv diff --git a/data/instrument_data/sequoia_FWHM_per_energy.csv b/data/instrument_data/sequoia_FWHM_per_energy.csv new file mode 100644 index 0000000..53060b2 --- /dev/null +++ b/data/instrument_data/sequoia_FWHM_per_energy.csv @@ -0,0 +1,101 @@ +energy,FWHM +-1.200000000000000000e+01,3.884550769806265902e-01 +-1.176363636363636367e+01,3.847646284311661002e-01 +-1.152727272727272734e+01,3.810941750527386263e-01 +-1.129090909090909101e+01,3.774438522658777884e-01 +-1.105454545454545467e+01,3.738137978892622226e-01 +-1.081818181818181834e+01,3.702041521912310396e-01 +-1.058181818181818201e+01,3.666150579421081357e-01 +-1.034545454545454568e+01,3.630466604673128761e-01 +-1.010909090909090935e+01,3.594991077012260061e-01 +-9.872727272727273018e+00,3.559725502417814269e-01 +-9.636363636363636687e+00,3.524671414057417573e-01 +-9.400000000000000355e+00,3.489830372846186024e-01 +-9.163636363636364024e+00,3.455203968011869020e-01 +-8.927272727272727693e+00,3.420793817665371273e-01 +-8.690909090909091361e+00,3.386601569376094800e-01 +-8.454545454545455030e+00,3.352628900751356000e-01 +-8.218181818181818699e+00,3.318877520019172800e-01 +-7.981818181818181479e+00,3.285349166613583671e-01 +-7.745454545454545148e+00,3.252045611761556487e-01 +-7.509090909090908816e+00,3.218968659070524096e-01 +-7.272727272727272485e+00,3.186120145115436397e-01 +-7.036363636363636154e+00,3.153501940024137640e-01 +-6.799999999999999822e+00,3.121115948059772216e-01 +-6.563636363636363491e+00,3.088964108198829495e-01 +-6.327272727272727160e+00,3.057048394703318350e-01 +-6.090909090909090828e+00,3.025370817685418268e-01 +-5.854545454545454497e+00,2.993933423662891724e-01 +-5.618181818181818166e+00,2.962738296103361590e-01 +-5.381818181818181834e+00,2.931787555955464586e-01 +-5.145454545454545503e+00,2.901083362164746382e-01 +-4.909090909090909172e+00,2.870627912172046270e-01 +-4.672727272727272840e+00,2.840423442391962205e-01 +-4.436363636363636509e+00,2.810472228668910444e-01 +-4.200000000000000178e+00,2.780776586708087472e-01 +-3.963636363636362958e+00,2.751338872478595321e-01 +-3.727272727272726627e+00,2.722161482585833681e-01 +-3.490909090909090295e+00,2.693246854610155117e-01 +-3.254545454545453964e+00,2.664597467408714171e-01 +-3.018181818181817633e+00,2.636215841377326230e-01 +-2.781818181818181301e+00,2.608104538669123174e-01 +-2.545454545454544970e+00,2.580266163366758403e-01 +-2.309090909090908639e+00,2.552703361604879984e-01 +-2.072727272727272307e+00,2.525418821639681677e-01 +-1.836363636363635976e+00,2.498415273862375219e-01 +-1.599999999999999645e+00,2.471695490753591240e-01 +-1.363636363636363313e+00,2.445262286775893301e-01 +-1.127272727272726982e+00,2.419118518201872348e-01 +-8.909090909090906507e-01,2.393267082875668861e-01 +-6.545454545454543194e-01,2.367710919906181322e-01 +-4.181818181818179880e-01,2.342453009290843269e-01 +-1.818181818181816567e-01,2.317496371469566496e-01 +5.454545454545467464e-02,2.292844066809287540e-01 +2.909090909090910060e-01,2.268499195020675652e-01 +5.272727272727273373e-01,2.244464894509774489e-01 +7.636363636363636687e-01,2.220744341668924315e-01 +1.000000000000000000e+00,2.197340750113090102e-01 +1.236363636363636331e+00,2.174257369869850853e-01 +1.472727272727272663e+00,2.151497486533868186e-01 +1.709090909090908994e+00,2.129064420399527091e-01 +1.945454545454545325e+00,2.106961525588990358e-01 +2.181818181818181657e+00,2.085192189196897194e-01 +2.418181818181817988e+00,2.063759830477707169e-01 +2.654545454545454319e+00,2.042667900107226486e-01 +2.890909090909090651e+00,2.021919879556315081e-01 +3.127272727272726982e+00,2.001519280622368890e-01 +3.363636363636363313e+00,1.981469645173010996e-01 +3.599999999999999645e+00,1.961774545166901917e-01 +3.836363636363635976e+00,1.942437583028741865e-01 +4.072727272727274084e+00,1.923462392470070559e-01 +4.309090909090908639e+00,1.904852639864533792e-01 +4.545454545454546746e+00,1.886612026306612178e-01 +4.781818181818181301e+00,1.868744290507169670e-01 +5.018181818181819409e+00,1.851253212708243723e-01 +5.254545454545453964e+00,1.834142619834801258e-01 +5.490909090909092072e+00,1.817416392143940684e-01 +5.727272727272726627e+00,1.801078471684454396e-01 +5.963636363636364734e+00,1.785132872944253102e-01 +6.199999999999999289e+00,1.769583696143515461e-01 +6.436363636363637397e+00,1.754435143732244740e-01 +6.672727272727271952e+00,1.739691540778499912e-01 +6.909090909090910060e+00,1.725357360096891890e-01 +7.145454545454544615e+00,1.711437253178016704e-01 +7.381818181818182723e+00,1.697936088255649623e-01 +7.618181818181817277e+00,1.684858997214427057e-01 +7.854545454545455385e+00,1.672211433531894942e-01 +8.090909090909089940e+00,1.659999244118375572e-01 +8.327272727272728048e+00,1.648228758845263764e-01 +8.563636363636362603e+00,1.636906902860091051e-01 +8.800000000000000711e+00,1.626041338667778002e-01 +9.036363636363635266e+00,1.615640647724932988e-01 +9.272727272727273373e+00,1.605714565469987809e-01 +9.509090909090907928e+00,1.596274290198285428e-01 +9.745454545454546036e+00,1.587332896608834865e-01 +9.981818181818180591e+00,1.578905902247304815e-01 +1.021818181818181870e+01,1.571012065500062838e-01 +1.045454545454545325e+01,1.563674550067292446e-01 +1.069090909090909136e+01,1.556922702286202831e-01 +1.092727272727272592e+01,1.550794928362530523e-01 +1.116363636363636402e+01,1.545343741190182418e-01 +1.139999999999999858e+01,1.540645699823800230e-01 diff --git a/src/instrument_corrections.jl b/src/instrument_corrections.jl index 22746fc..b3613ef 100644 --- a/src/instrument_corrections.jl +++ b/src/instrument_corrections.jl @@ -4,7 +4,7 @@ function convolve_sequoia(slice, ωs) @assert length(ωs) == size(slice)[end] "Number of enegy values does not match slice dimension" # Load sequoia resolution data - data = CSV.read(datadir("sequoia", "FWHM_per_energy.csv"), DataFrame) + data = CSV.read(datadir("instrument_data", "sequoia_FWHM_per_energy.csv"), DataFrame) Es, FWHMs = data.energy, data.FWHM σs = σ_from_FWHM.(FWHMs) println(σs) @@ -16,7 +16,7 @@ function convolve_sequoia(slice, ωs) error("No resolution data available above 11.3 meV") end σ = σ_seq[ω] - gauss = @. 1/(σ*√(2π))*exp(- (ωs - ω)^2 / (2*σ^2)) + gauss = @. 1/(σ*√(2π))*exp(-(ωs - ω)^2 / (2σ^2)) for j ∈ 1:size(slice)[1] slice′[j,i] = slice[j,:] ⋅ gauss end