Commit 5bfe8bf9 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

minor updates

* drspine - init file default moved before parsing options
	so that one can override (if desired) via '-c <filename>'
* fixed spelling error in data_manager
* clarified warning messages in add_pix_to_sqt
parent 71d84845
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -34,5 +34,8 @@ match run 10875 tau 2 to 10903 tau2 3 ! 11A bgr to 8A sample
match show

! test fitting/collection
fit all
fit res
fit sam flag offset
verbose dec ! warning
verbose dec ! error
collect
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ module data_manager

  private

  integer, parameter, public :: DATA_MANAGER_OK      =  0 ! initalized and ready to use
  integer, parameter, public :: DATA_MANAGER_OK      =  0 ! initialized and ready to use
  integer, parameter, public :: DATA_MANAGER_NOTINIT = -1
  integer, parameter, public :: DATA_MANAGER_INVADDR = -2
  integer, parameter, public :: DATA_MANAGER_MEMFULL = -3
@@ -63,7 +63,7 @@ contains
    data_scan%role = ROLE_UNDEFINED
    !call scan_group_init(data_group)
    call msg_info('data_manager_init', &
        msg_fmt('("data manager: memory initalized, allocated ",i0," slots")',max_size))
        msg_fmt('("data manager: memory initialized, allocated ",i0," slots")',max_size))
  end subroutine data_manager_init

  ! =================================================================================
+9 −19
Original line number Diff line number Diff line
@@ -1058,29 +1058,19 @@ CONTAINS


     if( abs(ps_reference%J0 - ps_sample%J0)/ps_reference%J0 > matching_tolerance%J0_rel ) then
        call msg_warning('add_pix_to_sqt', "Reference and Sample J0 are too different !")
        !write(6,*)"add_pix_to_sqt: Reference and Sample J0 are too different !"
        !return
        call msg_warning('add_pix_to_sqt', "pixel "//trim(ps_sample%cpixel)//&
                        ": sample and reference field integral match is outside of tolerance")
     endif         
     
     !if( abs(ps_reference%lambda_1 - ps_sample%lambda_1)/ps_reference%lambda_1 > matching_tolerance%J0_rel) then
     if( abs(ps_reference%lambda_1 - ps_sample%lambda_1) > matching_tolerance%lambda_min) then
        call msg_warning('add_pix_to_sqt', "Reference and Sample lambda1 are too different !")
        !write(6,*)"add_pix_to_sqt: Reference and Sample lambda1 are too different !"
        !return
     endif      
  
     !if( abs(ps_reference%lambda_2 - ps_sample%lambda_2)/ps_reference%lambda_2 > matching_tolerance%J0_rel) then
     if( abs(ps_reference%lambda_2 - ps_sample%lambda_2) > matching_tolerance%lambda_max) then
        call msg_warning('add_pix_to_sqt', "Reference and Sample lambda2 are too different !")
        !write(6,*)"add_pix_to_sqt: Reference and Sample lambda2 are too different !"
        !return
     if( (abs(ps_reference%lambda_1 - ps_sample%lambda_1) > matching_tolerance%lambda_min) .or. &
         (abs(ps_reference%lambda_2 - ps_sample%lambda_2) > matching_tolerance%lambda_max) ) then
        call msg_warning('add_pix_to_sqt', "pixel "//trim(ps_sample%cpixel)//&
                        ": sample and reference wavelength match is outside of tolerance")
     endif      

     if( abs(ps_reference%scattering_angle_polar - ps_sample%scattering_angle_polar) > matching_tolerance%scattering_angle) then
        call msg_warning('add_pix_to_sqt', "Reference and Sample theta are too different !")
        !write(6,*)"add_pix_to_sqt: Reference and Sample theta are too different !"
        !return
        call msg_warning('add_pix_to_sqt', "pixel "//trim(ps_sample%cpixel)//&
                        ": sample and reference scattering angle match is  outside of tolerance")
     endif         

!> @note we still have to include further exclusion criteria     
+3 −3
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ program drspine
  call set_progvar()

  !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  call set_init_file("drspine_profile") ! (paz) - move it to here
                                        ! and use new_com function
  ! ------------------------------------------------------------------------

  do
@@ -349,8 +350,7 @@ program drspine
  !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  info = 0
  mycommand = "  "
 ! call push_cmd_line("drspine_profile")
  init_file_path = "drspine_profile"

  commandloop: do