Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ *.a *.h5 .*.swp .DS_Store # work directory (for tmp development) work/* Loading sources/data_types.f90 +26 −6 Original line number Diff line number Diff line Loading @@ -299,8 +299,8 @@ module data_types !! calibration set of data may also be present !! type collection_item !> fqt = sqt/sq is the standard evaluation result of 2*amplitude/(up-down)/resolution !! this shall contain the standard NSE result representing @f$ F(Q,t) = S(Q,t)/S(Q,t=0) @f$. !> fqt = sqt/sq is the standard evaluation result of 2*amplitude/(up-down)/resolution. !! This shall contain the standard NSE result representing @f$ F(Q,t) = S(Q,t)/S(Q,t=0) @f$. !! @f[ !! F(Q,t) = \frac{2 A(Q,t)}{U(Q,t)-D(Q,t)} \times {\cal{R}}(Q,t)^{-1} !! @f] Loading @@ -310,17 +310,30 @@ module data_types !! @f[ !! F_{n+1} = (1-w_n) \, F_n + w_n \Delta !! @f] !! with !! and @f$ \delta_n @f$ the (statistical error) of the current value of fqt !! @f[ !! \delta_{n+1}^2 = (1-w_n)^2 \, \delta_{n}^2 + w_n^2 \delta^2 !! @f] !! where !! @f[ !! w_n = \delta_n^2 / ( \delta_n^2 + \delta^2 ) !! @f] !! with @f$ \delta_n @f$ the (statistical error) of the current value of fqt !! !! Note that the these expressions for @f$F_{n+1}@f$ and @f$\delta_{n+1}@f$ are equivalent: !! !! @f[ !! \delta_{n+1}^2 = (1-w_n)^2 \, \delta_{n}^2 + w_n^2 \delta^2 !! F_{n+1} = (1-w_n) \, F_n + w_n \Delta = !! \left(\frac{F_{n}}{\delta_{n}^2} + \frac{\Delta}{\delta^2} \right) / !! \left(\frac{1}{\delta{n}^2} + \frac{1}{\delta^2} \right) !! @f] !! and !! @f[ !! \delta_{n+1}^2 = (1-w_n)^2 \, \delta_{n}^2 + w_n^2 \delta^2 = w_n \delta^2 = !! \left(\frac{1}{\delta_{n}^2} + \frac{1}{\delta^2} \right)^{-1} !! @f] real(kind=DBL) :: fqt !> sqt/sq-variance the variance of valuec collected in this bin during filling the collection bins, !> sqt/sq-variance the variance of values collected in this bin during filling the collection bins, !! during filling the value shall accumulate @f$ \langle fqt^2 \rangle @f$. !! The final variance is then sqrt(fqt_var - fqt**2). !! when adding a new increment @f$ \Delta \pm \delta @f$ with statistical error @f$ \delta @f$ Loading Loading @@ -1362,6 +1375,13 @@ CONTAINS sqt%tq_bin(it,iq)%fqt_var = (1.0_DBL-w) *sqt%tq_bin(it,iq)%fqt_var + w * ps_sample%fqtRes%value**2 sqt%tq_bin(it,iq)%fqt_err2 = (1.0_DBL-w)**2 *sqt%tq_bin(it,iq)%fqt_err2 + w**2 * ps_sample%fqtRes%sigma2 ! ----------------------------------------------------------------------------------------------------------------- ! (paz) testing error propagation: these three expressions are equivalent ! (1.0_DBL-w)**2 *sqt%tq_bin(it,iq)%fqt_err2 + w**2 * ps_sample%fqtRes%sigma2 = ! w * ps_sample%fqtRes%sigma2 = ! (1/sqt%tq_bin(it,iq)%fqt_err2 + 1/ps_sample%fqtRes%sigma2)**(-1) ! ----------------------------------------------------------------------------------------------------------------- sqt%tq_bin(it,iq)%fqt_tau = (1.0_DBL-w) *sqt%tq_bin(it,iq)%fqt_tau + w * tau ! ps_sample%tau sqt%tq_bin(it,iq)%fqt_tau_var = (1.0_DBL-w) *sqt%tq_bin(it,iq)%fqt_tau_var + w * tau**2 ! ps_sample%tau**2 Loading Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ *.a *.h5 .*.swp .DS_Store # work directory (for tmp development) work/* Loading
sources/data_types.f90 +26 −6 Original line number Diff line number Diff line Loading @@ -299,8 +299,8 @@ module data_types !! calibration set of data may also be present !! type collection_item !> fqt = sqt/sq is the standard evaluation result of 2*amplitude/(up-down)/resolution !! this shall contain the standard NSE result representing @f$ F(Q,t) = S(Q,t)/S(Q,t=0) @f$. !> fqt = sqt/sq is the standard evaluation result of 2*amplitude/(up-down)/resolution. !! This shall contain the standard NSE result representing @f$ F(Q,t) = S(Q,t)/S(Q,t=0) @f$. !! @f[ !! F(Q,t) = \frac{2 A(Q,t)}{U(Q,t)-D(Q,t)} \times {\cal{R}}(Q,t)^{-1} !! @f] Loading @@ -310,17 +310,30 @@ module data_types !! @f[ !! F_{n+1} = (1-w_n) \, F_n + w_n \Delta !! @f] !! with !! and @f$ \delta_n @f$ the (statistical error) of the current value of fqt !! @f[ !! \delta_{n+1}^2 = (1-w_n)^2 \, \delta_{n}^2 + w_n^2 \delta^2 !! @f] !! where !! @f[ !! w_n = \delta_n^2 / ( \delta_n^2 + \delta^2 ) !! @f] !! with @f$ \delta_n @f$ the (statistical error) of the current value of fqt !! !! Note that the these expressions for @f$F_{n+1}@f$ and @f$\delta_{n+1}@f$ are equivalent: !! !! @f[ !! \delta_{n+1}^2 = (1-w_n)^2 \, \delta_{n}^2 + w_n^2 \delta^2 !! F_{n+1} = (1-w_n) \, F_n + w_n \Delta = !! \left(\frac{F_{n}}{\delta_{n}^2} + \frac{\Delta}{\delta^2} \right) / !! \left(\frac{1}{\delta{n}^2} + \frac{1}{\delta^2} \right) !! @f] !! and !! @f[ !! \delta_{n+1}^2 = (1-w_n)^2 \, \delta_{n}^2 + w_n^2 \delta^2 = w_n \delta^2 = !! \left(\frac{1}{\delta_{n}^2} + \frac{1}{\delta^2} \right)^{-1} !! @f] real(kind=DBL) :: fqt !> sqt/sq-variance the variance of valuec collected in this bin during filling the collection bins, !> sqt/sq-variance the variance of values collected in this bin during filling the collection bins, !! during filling the value shall accumulate @f$ \langle fqt^2 \rangle @f$. !! The final variance is then sqrt(fqt_var - fqt**2). !! when adding a new increment @f$ \Delta \pm \delta @f$ with statistical error @f$ \delta @f$ Loading Loading @@ -1362,6 +1375,13 @@ CONTAINS sqt%tq_bin(it,iq)%fqt_var = (1.0_DBL-w) *sqt%tq_bin(it,iq)%fqt_var + w * ps_sample%fqtRes%value**2 sqt%tq_bin(it,iq)%fqt_err2 = (1.0_DBL-w)**2 *sqt%tq_bin(it,iq)%fqt_err2 + w**2 * ps_sample%fqtRes%sigma2 ! ----------------------------------------------------------------------------------------------------------------- ! (paz) testing error propagation: these three expressions are equivalent ! (1.0_DBL-w)**2 *sqt%tq_bin(it,iq)%fqt_err2 + w**2 * ps_sample%fqtRes%sigma2 = ! w * ps_sample%fqtRes%sigma2 = ! (1/sqt%tq_bin(it,iq)%fqt_err2 + 1/ps_sample%fqtRes%sigma2)**(-1) ! ----------------------------------------------------------------------------------------------------------------- sqt%tq_bin(it,iq)%fqt_tau = (1.0_DBL-w) *sqt%tq_bin(it,iq)%fqt_tau + w * tau ! ps_sample%tau sqt%tq_bin(it,iq)%fqt_tau_var = (1.0_DBL-w) *sqt%tq_bin(it,iq)%fqt_tau_var + w * tau**2 ! ps_sample%tau**2 Loading