Commit b561fc23 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

reduction max_bfield variation

parent 47c135bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ install:
depend:
	@echo "# Makefile.depend" `date`  >  Makefile.depend
ifdef MAKEDEPF90
	@$(MAKEDEPF90)        ${FSOURCES1} ${FSOURCES2} ${PROGSRC} >> Makefile.depend
	@$(MAKEDEPF90) -W     ${FSOURCES1} ${FSOURCES2} ${PROGSRC} >> Makefile.depend
endif
ifdef MAKEDEPEND
	@$(MAKEDEPEND) -Y -f- ${CSOURCES}  >> Makefile.depend 2> /dev/null
+4 −1
Original line number Diff line number Diff line
@@ -145,6 +145,8 @@ module drspine_parameters
     integer :: symmetry_phase_patch_size
     !> catch band for post collecting q-values
     real(kind=DBL) :: post_collection_qcatch
     !> max magnetic field variation in a scan
     real(kind=DBL) :: max_bfield_variation
  end type reduction_pars_struct
  type(reduction_pars_struct) :: reduction_parameters = reduction_pars_struct(&
       100.0_DBL, & ! min_counts_per_pixel
@@ -164,7 +166,8 @@ module drspine_parameters
       300.0_DBL, & ! max_chisquare (chi2/ndf)
       4      ,   & ! "central" detector area size (pixel x pixels)
       2      ,   & ! symmetry phase patch size (for smoothing)
       0.00_DBL   & ! pz, 0 should be the default (off) catch band for post collecting q-values
       0.00_DBL,  & ! pz, 0 should be the default (off) catch band for post collecting q-values
       1.0D-06    & ! max magnetic field variation
       !0.002e10_DBL & ! catch band for post collecting q-values
       )
  !
+0 −2
Original line number Diff line number Diff line
@@ -146,7 +146,6 @@ contains
        if (ier==0) then
            if (present(inew)) then
                inew = (newval /= dval)
                if (inew) print *, 'nuove(R) '//trim(cname), inew, newval, dval
            end if
            dval = newval
        end if
@@ -165,7 +164,6 @@ contains
        if (ier==0) then
            if (present(inew)) then
                inew = (int(newval) /= ival)
                if (inew) print *, 'nuove(I) '//trim(cname), inew, int(newval), ival
            end if
            ival = int(newval)
        end if
+4 −3
Original line number Diff line number Diff line
@@ -1442,7 +1442,7 @@ contains
    character(len=MAX_NAME_LENGTH), intent(out) :: pnames(:)
    real(kind=DBL)                , intent(out) :: pvalues(:,:)
    !
    real(kind=DBL), parameter :: bfield_max_chi2 = 1d-6
    !real(kind=DBL), parameter :: bfield_max_chi2 = 1d-6
    !
    type(environment_parameters_struct) :: env
    type(phase_scan_struct)             :: centerbin
@@ -1496,7 +1496,8 @@ contains

        call msg_debug('check_magnetic_fields','b-field variation '//trim(bfield(1,i)%name)//&
                        trim(msg_fmt("(4g14.5)", [a,b,r,chi2])))
        if (chi2>bfield_max_chi2 .and. bfield_critical(i) ) then
        !if (chi2>bfield_max_chi2 .and. bfield_critical(i) ) then
        if (chi2>reduction_parameters%max_bfield_variation .and. bfield_critical(i) ) then
            call msg_warning('check_magnetic_fields', trim(msg_fmt("('tau=',i0.3)", iscan))//&
                             ' '//trim(bfield(1,i)%name)//&
                             ' magnetic field variation '//&
+5 −0
Original line number Diff line number Diff line
@@ -93,6 +93,11 @@ contains
       sig: associate(sig_point => sig_data%scan_point(iscan))
       if ( .not. associated(sig_point%matching_ref) ) cycle
       has_bgr = associated(sig_point%matching_bgr)
       if (bgr_flag>0 .and. .not.has_bgr) then
          call msg_warning('calculate_sqt_raw', trim(msg_fmt("('run ',i0)",sig_data%id))//&
                            trim(msg_fmt("('[',i0,']')",iscan))//&
                            ': no background data found')
       end if
       res: associate(res_point => sig_point%matching_ref,&
                      bgr_point => sig_point%matching_bgr)
       do it=0, sig_point%no_lam