Commit 3bf47efa authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

a couple of minor fixes

- numerical fixes in print_collection_item - make it compiler/machine independent
- commented out unused function taupoint_mismatch
- ChangeLog update
parent d8983ea9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
* version 1.4.0.rc5 (Sep 27, 2021)
- [PZ] fixes issues with matching
- [PZ] activate script fixed
- [PZ] added instrument macro examples
- [PZ] new logger - big change
- [PZ] numerical fix in print_collection_item

* version 1.3.7 (Sep 13, 2021)
- [PZ] logging messages updates - provide run/tau/pixel in drspine log file 
- [PZ] use is_pixel_ok in most subroutines (instead of pixel%status.eq.PIXEL_OK)
+5 −4
Original line number Diff line number Diff line
@@ -1590,6 +1590,7 @@ dotau: do it=it1,it2
      character(len=MAX_LINE_LENGTH)     :: cmsg
      real(kind=DBL)                     :: dvar, dtau_var, dq_var
      !real(kind=DBL)                     :: fqtraw, fdiff
      real(kind=DBL), parameter          :: eps = 1D-15

      header = .false.
      if (present(print_header) ) header=print_header
@@ -1610,11 +1611,11 @@ dotau: do it=it1,it2
               end if

               !dtau_var = ci%fqt_tau_var-ci%fqt_tau**2
               dtau_var = ci%fqt_tau_var/ci%fqt_tau**2 ! this is numerically more stable (paz) for small diffs
               if (dtau_var>1) then
                  dtau_var = ci%fqt_tau*sqrt(dtau_var-1)
               else
               dtau_var = sqrt(ci%fqt_tau_var)/ci%fqt_tau ! this is numerically more stable (paz) for small diffs
               if (abs(dtau_var-1)<EPS) then
                  dtau_var = 0.0_DBL
               else
                  dtau_var = ci%fqt_tau*sqrt(dtau_var**2-1)
               end if

              write(iok, '(5e15.7,i10,e15.7)') &
+33 −32
Original line number Diff line number Diff line
@@ -78,44 +78,45 @@ contains

  end function taupoint_match

  ! -------------------------------------------------------------------------
  ! (paz) unused function - commented out for now
  !--------------------------------------------------------------------------
  !> basic function returns largest mismatch normalized to the tolerance of
  !!fieldintgrals, phi and psi angles and frame parameters
  !!if the number of tau-points does not match HUGE(DBL) is returned.
  !!@param a [in]  scan_data_structure (taupoint to be compared)
  !!@param b [in]  scan_data_structure (taupoint to be compared)
  function taupoint_mismatch(a,b) RESULT (mismatch)
    !--------------------------------------------------------------------------
    implicit none

    type(scan_data_struct), intent(in) :: a
    type(scan_data_struct), intent(in) :: b
    real(kind=DBL)                     :: mismatch
    real(kind=DBL)                     :: del

    mismatch = 0

    del =  abs(a%physics%field_integral%value-b%physics%field_integral%value)/matching_tolerance%J0_abs
    if( del > mismatch) mismatch = del

    del = abs(2*(a%physics%field_integral%value-b%physics%field_integral%value) /   &
         (a%physics%field_integral%value+b%physics%field_integral%value)  ) / matching_tolerance%J0_rel
    if( del > mismatch) mismatch = del

    del = abs( (a%physics%scattering_angle%value-b%physics%scattering_angle%value)) / matching_tolerance%scattering_angle
    if( del > mismatch) mismatch = del

    del = abs( (a%physics%sample_angle%value    -b%physics%sample_angle%value)    ) / matching_tolerance%sample_angle
    if( del > mismatch) mismatch = del

    if(      a%spectrum(0)%no_lambda_bins .ne. b%spectrum(0)%no_lambda_bins    )  mismatch = HUGE(del)
    del = abs( (a%spectrum(0)%lambda_bin(1)  -b%spectrum(0)%lambda_bin(1))  ) / matching_tolerance%lambda_min
    if( del > mismatch) mismatch = del
    del = abs( (a%spectrum(0)%lambda_bin(a%spectrum(0)%no_lambda_bins) -            &
         b%spectrum(0)%lambda_bin(b%spectrum(0)%no_lambda_bins))      ) / matching_tolerance%lambda_max
    if( del > mismatch) mismatch = del

  end function taupoint_mismatch
  !function taupoint_mismatch(a,b) RESULT (mismatch)
  !  !--------------------------------------------------------------------------
  !  implicit none
  !  type(scan_data_struct), intent(in) :: a
  !  type(scan_data_struct), intent(in) :: b
  !  real(kind=DBL)                     :: mismatch
  !  real(kind=DBL)                     :: del
  !
  !  mismatch = 0
  !
  !  del =  abs(a%physics%field_integral%value-b%physics%field_integral%value)/matching_tolerance%J0_abs
  !  if( del > mismatch) mismatch = del
  !
  !  del = abs(2*(a%physics%field_integral%value-b%physics%field_integral%value) /   &
  !       (a%physics%field_integral%value+b%physics%field_integral%value)  ) / matching_tolerance%J0_rel
  !  if( del > mismatch) mismatch = del
  !
  !  del = abs( (a%physics%scattering_angle%value-b%physics%scattering_angle%value)) / matching_tolerance%scattering_angle
  !  if( del > mismatch) mismatch = del
  !
  !  del = abs( (a%physics%sample_angle%value    -b%physics%sample_angle%value)    ) / matching_tolerance%sample_angle
  !  if( del > mismatch) mismatch = del
  !
  !  if(      a%spectrum(0)%no_lambda_bins .ne. b%spectrum(0)%no_lambda_bins    )  mismatch = HUGE(del)
  !  del = abs( (a%spectrum(0)%lambda_bin(1)  -b%spectrum(0)%lambda_bin(1))  ) / matching_tolerance%lambda_min
  !  if( del > mismatch) mismatch = del
  !  del = abs( (a%spectrum(0)%lambda_bin(a%spectrum(0)%no_lambda_bins) -            &
  !       b%spectrum(0)%lambda_bin(b%spectrum(0)%no_lambda_bins))      ) / matching_tolerance%lambda_max
  !  if( del > mismatch) mismatch = del
  !
  !end function taupoint_mismatch



+13 −13
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ values
  0.1321220E+00  0.9494897E+00  0.1091529E-01  0.2442804E-01  0.1871744E-01         4  0.4898485E-01
  0.3001187E+00  0.9808650E+00  0.1603496E-01  0.3670112E-03  0.0000000E+00         2  0.4898475E-01
  0.5993170E+00  0.9622180E+00  0.1649818E-01  0.7193139E-02  0.0000000E+00         2  0.4898864E-01
  0.1197961E+01  0.9874398E+00  0.1552697E-01  0.1572925E-01  0.1785101E-07         2  0.4898714E-01
  0.1197961E+01  0.9874398E+00  0.1552697E-01  0.1572925E-01  0.0000000E+00         2  0.4898714E-01
  0.2396120E+01  0.9762121E+00  0.1546501E-01  0.8832497E-02  0.0000000E+00         2  0.4898054E-01
  0.4863218E+01  0.9635948E+00  0.1650869E-01  0.3355147E-01  0.0000000E+00         2  0.4899093E-01
  0.7474805E+01  0.9944874E+00  0.2142266E-01  0.8623680E-01  0.0000000E+00         2  0.4900539E-01
@@ -55,7 +55,7 @@ upd_cnt 9053

values
        tau/ns    S(q,t)/S(q)    err(sqt/sq)    var(sqt/sq)    var(tau)/ns   nupdates   Qeff/A**-1  
  0.3117668E-02  0.9288950E+00  0.1937101E-01  0.7972394E-02  0.4645688E-10         4  0.6676592E-01
  0.3117668E-02  0.9288950E+00  0.1937101E-01  0.7972394E-02  0.0000000E+00         4  0.6676592E-01
  0.4976504E-02  0.9453819E+00  0.5587590E-02  0.3088924E-01  0.4389023E-03        26  0.6408005E-01
  0.9128883E-02  0.9696278E+00  0.4923009E-02  0.3191406E-01  0.9882153E-03        40  0.6324348E-01
  0.1495052E-01  0.9711221E+00  0.8460087E-02  0.2998871E-01  0.4161081E-03        22  0.6374090E-01
@@ -97,7 +97,7 @@ upd_cnt 9053

values
        tau/ns    S(q,t)/S(q)    err(sqt/sq)    var(sqt/sq)    var(tau)/ns   nupdates   Qeff/A**-1  
  0.3117668E-02  0.9211860E+00  0.1232366E-01  0.4573212E-01  0.8046567E-10        16  0.8674498E-01
  0.3117668E-02  0.9211860E+00  0.1232366E-01  0.4573212E-01  0.0000000E+00        16  0.8674498E-01
  0.5091488E-02  0.9464864E+00  0.5345183E-02  0.4678654E-01  0.5614981E-03        56  0.8636925E-01
  0.9285273E-02  0.9614852E+00  0.5366935E-02  0.4567729E-01  0.8576412E-03        61  0.8643894E-01
  0.1524061E-01  0.9532028E+00  0.8437685E-02  0.5726049E-01  0.4620107E-03        39  0.8650864E-01
@@ -114,7 +114,7 @@ values
  0.9365173E+01  0.8758116E+00  0.3661897E-02  0.5692176E-01  0.1478953E+01        77  0.8613859E-01
  0.1682317E+02  0.8723074E+00  0.4337382E-02  0.7056260E-01  0.2155044E+01        72  0.8694100E-01
  0.2507160E+02  0.8697378E+00  0.6063460E-02  0.7533350E-01  0.1196622E+01        44  0.8591923E-01
  0.3736873E+02  0.8435083E+00  0.1885405E-01  0.5405765E-01  0.5568375E-06        12  0.8533154E-01
  0.3736873E+02  0.8435083E+00  0.1885405E-01  0.5405765E-01  0.0000000E+00        12  0.8533154E-01

#nxt
_AAO_413p0K _AAO_413p0K; Krutyeva M; 10/20/2014 - 10/31/2014 (IPTS-117
@@ -265,7 +265,7 @@ upd_cnt 9053

values
        tau/ns    S(q,t)/S(q)    err(sqt/sq)    var(sqt/sq)    var(tau)/ns   nupdates   Qeff/A**-1  
  0.3125771E-02  0.8561914E+00  0.2044232E-01  0.8020674E-01  0.4657762E-10        17  0.1870985E+00
  0.3125771E-02  0.8561914E+00  0.2044232E-01  0.8020674E-01  0.0000000E+00        17  0.1870985E+00
  0.5142356E-02  0.8814840E+00  0.1012460E-01  0.6747098E-01  0.6469805E-03        53  0.1860175E+00
  0.9401702E-02  0.8488236E+00  0.1058124E-01  0.6567161E-01  0.4645165E-03        40  0.1861686E+00
  0.1545675E-01  0.8239273E+00  0.1688681E-01  0.7106933E-01  0.3076435E-03        21  0.1879086E+00
@@ -306,7 +306,7 @@ upd_cnt 9053

values
        tau/ns    S(q,t)/S(q)    err(sqt/sq)    var(sqt/sq)    var(tau)/ns   nupdates   Qeff/A**-1  
  0.3125771E-02  0.8242190E+00  0.2301606E-01  0.1038260E+00  0.6587071E-10        20  0.2128918E+00
  0.3125771E-02  0.8242190E+00  0.2301606E-01  0.1038260E+00  0.0000000E+00        20  0.2128918E+00
  0.5473333E-02  0.8503934E+00  0.1574851E-01  0.9742269E-01  0.7495050E-03        39  0.2149887E+00
  0.8617742E-02  0.8399836E+00  0.1451333E-01  0.9168605E-01  0.9960375E-03        38  0.2142177E+00
  0.1518781E-01  0.8402512E+00  0.1485538E-01  0.1085518E+00  0.4215046E-03        39  0.2114141E+00
@@ -323,7 +323,7 @@ values
  0.7253384E+01  0.3709489E+00  0.9980614E-02  0.6413159E-01  0.6893835E+00        39  0.2113289E+00
  0.1331619E+02  0.2963429E+00  0.1851077E-01  0.7769687E-01  0.2099767E+01        20  0.2103860E+00
  0.2743627E+02  0.2301481E+00  0.3003871E-01  0.5921650E-01  0.4879170E+00        12  0.2134569E+00
  0.3717656E+02  0.2208655E+00  0.3855123E-01  0.8951195E-01  0.5539740E-06         8  0.2147724E+00
  0.3717656E+02  0.2208655E+00  0.3855123E-01  0.8951195E-01  0.0000000E+00         8  0.2147724E+00

#nxt
_AAO_413p0K _AAO_413p0K; Krutyeva M; 10/20/2014 - 10/31/2014 (IPTS-117
@@ -440,7 +440,7 @@ values
  0.4732107E-01  0.7431474E+00  0.1559884E-01  0.7650501E-01  0.4919511E-03        29  0.2861308E+00
  0.7800291E-01  0.7282062E+00  0.7499196E-02  0.7887484E-01  0.1269247E-01       104  0.2842386E+00
  0.1693495E+00  0.6864726E+00  0.1042060E-01  0.7478865E-01  0.2979899E-01        46  0.2847102E+00
  0.2527394E+00  0.6287957E+00  0.1884229E-01  0.6983490E-01  0.3766110E-08        16  0.2865426E+00
  0.2527394E+00  0.6287957E+00  0.1884229E-01  0.6983490E-01  0.0000000E+00        16  0.2865426E+00
  0.4260808E+00  0.5767027E+00  0.1014805E-01  0.7075092E-01  0.6088174E-01        46  0.2848336E+00
  0.8350758E+00  0.4773481E+00  0.8882140E-02  0.7524956E-01  0.1158965E+00        46  0.2845675E+00
  0.1515851E+01  0.4026186E+00  0.1104598E-01  0.7183564E-01  0.1434707E-01        29  0.2837457E+00
@@ -472,13 +472,13 @@ upd_cnt 9053

values
        tau/ns    S(q,t)/S(q)    err(sqt/sq)    var(sqt/sq)    var(tau)/ns   nupdates   Qeff/A**-1  
  0.3149960E-02  0.7470840E+00  0.2534293E-01  0.1137565E+00  0.4693806E-10        24  0.3113979E+00
  0.3149960E-02  0.7470840E+00  0.2534293E-01  0.1137565E+00  0.0000000E+00        24  0.3113979E+00
  0.6259735E-02  0.7348757E+00  0.2571178E-01  0.1325651E+00  0.0000000E+00        24  0.3110786E+00
  0.1558116E-01  0.7328127E+00  0.2445704E-01  0.1213409E+00  0.0000000E+00        23  0.3106767E+00
  0.4728222E-01  0.6971909E+00  0.1396023E-01  0.9921611E-01  0.5016165E-03        44  0.3107397E+00
  0.6345302E-01  0.6850291E+00  0.1844694E-01  0.1002635E+00  0.9455236E-09        20  0.3112545E+00
  0.6345302E-01  0.6850291E+00  0.1844694E-01  0.1002635E+00  0.0000000E+00        20  0.3112545E+00
  0.1265207E+00  0.6509259E+00  0.1804838E-01  0.7293764E-01  0.0000000E+00        20  0.3102143E+00
  0.2527394E+00  0.5688307E+00  0.1772439E-01  0.6895509E-01  0.7532220E-08        20  0.3106553E+00
  0.2527394E+00  0.5688307E+00  0.1772439E-01  0.6895509E-01  0.0000000E+00        20  0.3106553E+00
  0.5050690E+00  0.4776411E+00  0.1566906E-01  0.7891626E-01  0.0000000E+00        20  0.3108672E+00
  0.1009428E+01  0.3684479E+00  0.1524581E-01  0.8287030E-01  0.0000000E+00        20  0.3109424E+00
  0.2578370E+01  0.2323857E+00  0.1126404E-01  0.8900729E-01  0.5509693E+00        38  0.3109412E+00
@@ -512,11 +512,11 @@ values
  0.1558116E-01  0.6186764E+00  0.7666122E-01  0.7762432E-01  0.0000000E+00         6  0.3334171E+00
  0.4747235E-01  0.6196071E+00  0.3578993E-01  0.7805516E-01  0.4193588E-03        16  0.3300211E+00
  0.6345302E-01  0.6803545E+00  0.4264152E-01  0.1053998E+00  0.0000000E+00        10  0.3291787E+00
  0.1265207E+00  0.5991783E+00  0.4064871E-01  0.1231205E+00  0.1885305E-08        10  0.3285774E+00
  0.1265207E+00  0.5991783E+00  0.4064871E-01  0.1231205E+00  0.0000000E+00        10  0.3285774E+00
  0.2527394E+00  0.5223214E+00  0.4130814E-01  0.9891426E-01  0.0000000E+00        10  0.3287252E+00
  0.5050690E+00  0.4537880E+00  0.3679333E-01  0.1061786E+00  0.0000000E+00        10  0.3292946E+00
  0.1009428E+01  0.3494779E+00  0.4108585E-01  0.1170544E+00  0.0000000E+00         8  0.3276620E+00
  0.2329851E+01  0.2468300E+00  0.4192899E-01  0.1406622E+00  0.4798236E+00        15  0.3286630E+00
  0.1166826E+02 -0.3114115E+00  0.2248837E+00  0.1261283E-01  0.1738707E-06         2  0.3330970E+00
  0.1166826E+02 -0.3114115E+00  0.2248837E+00  0.1261283E-01  0.0000000E+00         2  0.3330970E+00

#nxt