Loading Makefile.version +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ export PROJECT=drspine export VERSION_MAJOR=1 export VERSION_MINOR=4 export VERSION_RELEASE=0.rc2 export VERSION_RELEASE=0.rc3 export PROJLIB=lib$(PROJECT).a export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR) Loading examples/macro_mk_iterate 0 → 100644 +31 −0 Original line number Diff line number Diff line macro ! ==== set paths ! datapath ./examples ! savepath ./out ! ==== set binning bins pix nbins 8 bins tof custom 2 13 26 39 ! ==== set histogramming set A 1e-10 set ns 1e-9 histo tau nbins 20 min 0.002*ns max 200.0*ns log histo q nbins 20 min 0.000/A max 0.5/A c ==== read data read s5848.echo s5849.echo s5850.echo s5851.echo s5852.echo s5853.echo as resolution read s5854.echo s5855.echo s5857.echo s5858.echo s5859.echo s5860.echo s5861.echo as sample c === process match all fit res fit sam flag offset collect verbose on histo tau iterate maxbins 50 xcatch 0.25 collect sources/binning.f90 +1 −1 Original line number Diff line number Diff line Loading @@ -660,7 +660,7 @@ dl: do nedges = nedges + 1 if(nedges > maxedges) then !write(6,*)"find_clusters_weights: too many edges!" call msg_warning('find_clusters_weights', "find_clusters_weights: too many edges!") call msg_warning('find_clusters_weights', msg="find_clusters_weights: too many edges!") return endif edges(nedges) = cedge(ith) Loading sources/data_manager.f90 +13 −13 Original line number Diff line number Diff line Loading @@ -45,13 +45,13 @@ contains if (present(stat)) stat = istat allocate(data_scan(max_size), stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat return end if allocate(data_table(max_size), stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat deallocate(data_scan) !deallocate(data_group) Loading @@ -62,8 +62,8 @@ contains data_scan%id = 0 data_scan%role = ROLE_UNDEFINED !call scan_group_init(data_group) call msg_info('data_manager_init', & msg_fmt('("data manager: memory initialized, allocated ",i0," slots")',max_size)) call msg_info('data_manager_init', msg='data manager initialized',& extra=msg_fmt('("=> allocated ",i0," slots")',max_size)) end subroutine data_manager_init ! ================================================================================= Loading @@ -79,17 +79,17 @@ contains if (present(stat)) stat = istat if (allocated(data_table)) deallocate(data_table, stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat return end if if (allocated(data_scan )) deallocate(data_scan , stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat return end if call msg_info('data_manager_clear', 'data manager: memory released') call msg_info('data_manager_clear', msg='data manager memory released') end subroutine data_manager_clear ! ================================================================================= Loading Loading @@ -117,7 +117,7 @@ contains ! integer :: i if (data_size <=0 ) then call msg_error('data_manager_print', msg='data manager: memory not initialized', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_print', msg='data manager error', extra='memory not initialized', err=ERROR_MEMORY_INVALID) return end if Loading Loading @@ -151,7 +151,7 @@ contains data_table(iaddr) = DATA_MANAGER_OK data_scan(iaddr)%id = 0 data_scan(iaddr)%role = ROLE_UNDEFINED call msg_trace('data_manager_del',msg_fmt('("data manager: slot ",i0," cleared")', iaddr)) call msg_trace('data_manager_del',msg='data manager delete', values=msg_fmt('("slot=",i0)', iaddr)) end subroutine data_manager_del ! ================================================================================= Loading @@ -162,12 +162,12 @@ contains ! iaddr = DATA_MANAGER_OK if (data_size <= 0 ) then call msg_error('data_manager_next', msg='data manager: memory not initialized', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_next', msg='data manager', extra='memory not initialized', err=ERROR_MEMORY_INVALID) iaddr = DATA_MANAGER_NOTINIT return end if if (data_manager_used() >= data_size ) then call msg_error('data_manager_next', msg='data manager: memory full', err=ERROR_NO_MEMORY) call msg_error('data_manager_next', msg='data manager', extra='memory full', err=ERROR_NO_MEMORY) iaddr = DATA_MANAGER_MEMFULL return end if Loading @@ -189,12 +189,12 @@ contains ! isuccess = DATA_MANAGER_OK if (data_size <= 0 ) then call msg_error('data_manager_free', msg='data manager: memory not initialized', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_free', msg='data manager error', extra='memory not initialized', err=ERROR_MEMORY_INVALID) isuccess = DATA_MANAGER_NOTINIT return end if if ( iaddr<0 .or. data_size<iaddr) then call msg_error('data_manager_free', msg='data manager: invalid address', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_free', msg='data manager error', extra='invalid address', err=ERROR_MEMORY_INVALID) isuccess = DATA_MANAGER_INVADDR return end if Loading sources/data_types.f90 +13 −23 Original line number Diff line number Diff line Loading @@ -573,13 +573,13 @@ CONTAINS allocate(this%delta_j(nphases), stat=istat) if (istat/=0) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) allocate(this%counts_pixel_bin(nphases), stat=istat) if (istat/=0) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) allocate(this%monitor(nphases), stat=istat) if (istat/=0) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) this%parent=>NULL() this%cpixel='<undefined>' Loading Loading @@ -767,7 +767,7 @@ CONTAINS if (allocated(this%pixelbin)) deallocate(this%pixelbin) allocate(this%pixelbin(0:this%no_lam, this%no_xpix, this%no_ypix), stat=istat) if (istat/=0 ) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) do it=0, this%no_lam do ix=1,this%no_xpix do iy=1, this%no_ypix Loading Loading @@ -800,7 +800,7 @@ CONTAINS if(allocated(this%scan_point)) deallocate(this%scan_point) allocate(this%scan_point(this%number_of_points), stat=istat) if (istat/=0) & call msg_fatal('init_scan_struct', 'memory exhausted') call msg_fatal('init_scan_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) do i=1, this%number_of_points call init_scan_data_struct(this%scan_point(i), nphases, nt, nx, ny) end do Loading Loading @@ -1094,7 +1094,7 @@ CONTAINS !!!>>> preliminary hint >>> !!! if(present(ps_background)) then call msg_fatal('add_pix_to_sqt', "ATTENTION: in the present version we do not yet treat background at this level") call msg_fatal('add_pix_to_sqt', msg="ATTENTION: in the present version we do not yet treat background at this level") endif !!!<<< preliminary hint <<< !!! Loading Loading @@ -1615,8 +1615,7 @@ dotau: do it=it1,it2 write(cmsg,'(7e15.7,i10,e15.7)') & ci%fqt_tau/NS, ci%fqt, ci%fqt_err2, ci%fqt_var, ci%fqt**2, & ci%fqt_tau_var, ci%fqt_tau**2, ci%update_counter, ci%fqt_Q*ANGSTROEM call msg_trace('print_collection_item/fqt',trim(cmsg)) call msg_trace('print_collection_item/fqt',msg='collection_item/fqt',values=cmsg) endif endif Loading @@ -1642,7 +1641,7 @@ dotau: do it=it1,it2 ci%sqt_tau/NS, ci%sqt, sqrt(ci%sqt_err2), dvar, dtau_var/NS write(cmsg,'(7e15.7,i8)') ci%sqt_tau/NS, ci%sqt, ci%sqt_err2, ci%sqt_var, ci%sqt**2, & ci%sqt_tau_var, ci%sqt_tau**2, ci%update_counter call msg_trace('print_collection_item/sqt',trim(cmsg)) call msg_trace('print_collection_item/sqt',msg='collection_item/sqt',values=cmsg) endif case("fqt-full") Loading Loading @@ -1705,7 +1704,7 @@ dotau: do it=it1,it2 ci%fqt_q*ANGSTROEM, sqrt(dq_var)*ANGSTROEM, ci%update_counter write(cmsg,'(6e15.7,i8)') ci%fqt_tau/NS, ci%fqt_tau_var, ci%fqt_tau**2, & ci%fqt_q*ANGSTROEM, ci%fqt_q_var, ci%fqt_q**2, ci%update_counter call msg_trace('print_collection_item/default',trim(cmsg)) call msg_trace('print_collection_item/default',msg='collection_item/default', values=cmsg) end if end select Loading Loading @@ -1927,7 +1926,7 @@ dotau: do it=it1,it2 ! call from addpix if(this%n_entries >= this%max_entries) then call msg_warning('add_to_sqtinfo', 'sqtinfo: too many entries, skip adding') call msg_warning('add_to_sqtinfo', msg='sqtinfo: too many entries, skip adding') return endif Loading Loading @@ -2076,24 +2075,15 @@ i1: if( xhisto(i) > 0 .and. histo(i) > 0) then edges(nedges) = edges(nedges) * (1d0 + xcatch) call msg_debug('tau_histogramming',"Result from automatic (iterated) tau_histogramming (still experimental):") call msg_debug('tau_histogramming', " edge # tau/ns ") call msg_debug('tau_histogramming', extra="Result from automatic (iterated) tau_histogramming (still experimental):") call msg_debug('tau_histogramming', extra=" edge # tau/ns ") do i = 1, nedges call msg_debug('tau_histogramming', trim(msg_fmt("(i5)",i))//": "//trim(msg_fmt("(es14.5)",edges(i)))) !write(6,'(i5,": ",es14.5)') i, edges(i) call msg_debug('tau_histogramming', extra=trim(msg_fmt("(i5)",i))//": "//trim(msg_fmt("(es14.5)",edges(i)))) edges(i) = edges(i) * NS ! back to SI values enddo end subroutine tau_histogramming !!! mm -- consolidate collected data -- !!! subroutine consolidate_colldata(coll_data , accepted_dq, cdout ) implicit none Loading Loading
Makefile.version +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ export PROJECT=drspine export VERSION_MAJOR=1 export VERSION_MINOR=4 export VERSION_RELEASE=0.rc2 export VERSION_RELEASE=0.rc3 export PROJLIB=lib$(PROJECT).a export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR) Loading
examples/macro_mk_iterate 0 → 100644 +31 −0 Original line number Diff line number Diff line macro ! ==== set paths ! datapath ./examples ! savepath ./out ! ==== set binning bins pix nbins 8 bins tof custom 2 13 26 39 ! ==== set histogramming set A 1e-10 set ns 1e-9 histo tau nbins 20 min 0.002*ns max 200.0*ns log histo q nbins 20 min 0.000/A max 0.5/A c ==== read data read s5848.echo s5849.echo s5850.echo s5851.echo s5852.echo s5853.echo as resolution read s5854.echo s5855.echo s5857.echo s5858.echo s5859.echo s5860.echo s5861.echo as sample c === process match all fit res fit sam flag offset collect verbose on histo tau iterate maxbins 50 xcatch 0.25 collect
sources/binning.f90 +1 −1 Original line number Diff line number Diff line Loading @@ -660,7 +660,7 @@ dl: do nedges = nedges + 1 if(nedges > maxedges) then !write(6,*)"find_clusters_weights: too many edges!" call msg_warning('find_clusters_weights', "find_clusters_weights: too many edges!") call msg_warning('find_clusters_weights', msg="find_clusters_weights: too many edges!") return endif edges(nedges) = cedge(ith) Loading
sources/data_manager.f90 +13 −13 Original line number Diff line number Diff line Loading @@ -45,13 +45,13 @@ contains if (present(stat)) stat = istat allocate(data_scan(max_size), stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat return end if allocate(data_table(max_size), stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat deallocate(data_scan) !deallocate(data_group) Loading @@ -62,8 +62,8 @@ contains data_scan%id = 0 data_scan%role = ROLE_UNDEFINED !call scan_group_init(data_group) call msg_info('data_manager_init', & msg_fmt('("data manager: memory initialized, allocated ",i0," slots")',max_size)) call msg_info('data_manager_init', msg='data manager initialized',& extra=msg_fmt('("=> allocated ",i0," slots")',max_size)) end subroutine data_manager_init ! ================================================================================= Loading @@ -79,17 +79,17 @@ contains if (present(stat)) stat = istat if (allocated(data_table)) deallocate(data_table, stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat return end if if (allocated(data_scan )) deallocate(data_scan , stat=istat, errmsg=cmsg) if (istat/=0 ) then call msg_error('data_manager_init', msg='data_manager: '//trim(cmsg), err=ERROR_NO_MEMORY) call msg_error('data_manager_init', msg='data_manager error', extra=cmsg, err=ERROR_NO_MEMORY) if (present(stat)) stat=istat return end if call msg_info('data_manager_clear', 'data manager: memory released') call msg_info('data_manager_clear', msg='data manager memory released') end subroutine data_manager_clear ! ================================================================================= Loading Loading @@ -117,7 +117,7 @@ contains ! integer :: i if (data_size <=0 ) then call msg_error('data_manager_print', msg='data manager: memory not initialized', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_print', msg='data manager error', extra='memory not initialized', err=ERROR_MEMORY_INVALID) return end if Loading Loading @@ -151,7 +151,7 @@ contains data_table(iaddr) = DATA_MANAGER_OK data_scan(iaddr)%id = 0 data_scan(iaddr)%role = ROLE_UNDEFINED call msg_trace('data_manager_del',msg_fmt('("data manager: slot ",i0," cleared")', iaddr)) call msg_trace('data_manager_del',msg='data manager delete', values=msg_fmt('("slot=",i0)', iaddr)) end subroutine data_manager_del ! ================================================================================= Loading @@ -162,12 +162,12 @@ contains ! iaddr = DATA_MANAGER_OK if (data_size <= 0 ) then call msg_error('data_manager_next', msg='data manager: memory not initialized', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_next', msg='data manager', extra='memory not initialized', err=ERROR_MEMORY_INVALID) iaddr = DATA_MANAGER_NOTINIT return end if if (data_manager_used() >= data_size ) then call msg_error('data_manager_next', msg='data manager: memory full', err=ERROR_NO_MEMORY) call msg_error('data_manager_next', msg='data manager', extra='memory full', err=ERROR_NO_MEMORY) iaddr = DATA_MANAGER_MEMFULL return end if Loading @@ -189,12 +189,12 @@ contains ! isuccess = DATA_MANAGER_OK if (data_size <= 0 ) then call msg_error('data_manager_free', msg='data manager: memory not initialized', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_free', msg='data manager error', extra='memory not initialized', err=ERROR_MEMORY_INVALID) isuccess = DATA_MANAGER_NOTINIT return end if if ( iaddr<0 .or. data_size<iaddr) then call msg_error('data_manager_free', msg='data manager: invalid address', err=ERROR_MEMORY_INVALID) call msg_error('data_manager_free', msg='data manager error', extra='invalid address', err=ERROR_MEMORY_INVALID) isuccess = DATA_MANAGER_INVADDR return end if Loading
sources/data_types.f90 +13 −23 Original line number Diff line number Diff line Loading @@ -573,13 +573,13 @@ CONTAINS allocate(this%delta_j(nphases), stat=istat) if (istat/=0) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) allocate(this%counts_pixel_bin(nphases), stat=istat) if (istat/=0) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) allocate(this%monitor(nphases), stat=istat) if (istat/=0) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) this%parent=>NULL() this%cpixel='<undefined>' Loading Loading @@ -767,7 +767,7 @@ CONTAINS if (allocated(this%pixelbin)) deallocate(this%pixelbin) allocate(this%pixelbin(0:this%no_lam, this%no_xpix, this%no_ypix), stat=istat) if (istat/=0 ) & call msg_fatal('init_scan_data_struct', 'memory exhausted') call msg_fatal('init_scan_data_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) do it=0, this%no_lam do ix=1,this%no_xpix do iy=1, this%no_ypix Loading Loading @@ -800,7 +800,7 @@ CONTAINS if(allocated(this%scan_point)) deallocate(this%scan_point) allocate(this%scan_point(this%number_of_points), stat=istat) if (istat/=0) & call msg_fatal('init_scan_struct', 'memory exhausted') call msg_fatal('init_scan_struct', msg='memory exhausted', values=msg_fmt('("stat=",i0)',istat)) do i=1, this%number_of_points call init_scan_data_struct(this%scan_point(i), nphases, nt, nx, ny) end do Loading Loading @@ -1094,7 +1094,7 @@ CONTAINS !!!>>> preliminary hint >>> !!! if(present(ps_background)) then call msg_fatal('add_pix_to_sqt', "ATTENTION: in the present version we do not yet treat background at this level") call msg_fatal('add_pix_to_sqt', msg="ATTENTION: in the present version we do not yet treat background at this level") endif !!!<<< preliminary hint <<< !!! Loading Loading @@ -1615,8 +1615,7 @@ dotau: do it=it1,it2 write(cmsg,'(7e15.7,i10,e15.7)') & ci%fqt_tau/NS, ci%fqt, ci%fqt_err2, ci%fqt_var, ci%fqt**2, & ci%fqt_tau_var, ci%fqt_tau**2, ci%update_counter, ci%fqt_Q*ANGSTROEM call msg_trace('print_collection_item/fqt',trim(cmsg)) call msg_trace('print_collection_item/fqt',msg='collection_item/fqt',values=cmsg) endif endif Loading @@ -1642,7 +1641,7 @@ dotau: do it=it1,it2 ci%sqt_tau/NS, ci%sqt, sqrt(ci%sqt_err2), dvar, dtau_var/NS write(cmsg,'(7e15.7,i8)') ci%sqt_tau/NS, ci%sqt, ci%sqt_err2, ci%sqt_var, ci%sqt**2, & ci%sqt_tau_var, ci%sqt_tau**2, ci%update_counter call msg_trace('print_collection_item/sqt',trim(cmsg)) call msg_trace('print_collection_item/sqt',msg='collection_item/sqt',values=cmsg) endif case("fqt-full") Loading Loading @@ -1705,7 +1704,7 @@ dotau: do it=it1,it2 ci%fqt_q*ANGSTROEM, sqrt(dq_var)*ANGSTROEM, ci%update_counter write(cmsg,'(6e15.7,i8)') ci%fqt_tau/NS, ci%fqt_tau_var, ci%fqt_tau**2, & ci%fqt_q*ANGSTROEM, ci%fqt_q_var, ci%fqt_q**2, ci%update_counter call msg_trace('print_collection_item/default',trim(cmsg)) call msg_trace('print_collection_item/default',msg='collection_item/default', values=cmsg) end if end select Loading Loading @@ -1927,7 +1926,7 @@ dotau: do it=it1,it2 ! call from addpix if(this%n_entries >= this%max_entries) then call msg_warning('add_to_sqtinfo', 'sqtinfo: too many entries, skip adding') call msg_warning('add_to_sqtinfo', msg='sqtinfo: too many entries, skip adding') return endif Loading Loading @@ -2076,24 +2075,15 @@ i1: if( xhisto(i) > 0 .and. histo(i) > 0) then edges(nedges) = edges(nedges) * (1d0 + xcatch) call msg_debug('tau_histogramming',"Result from automatic (iterated) tau_histogramming (still experimental):") call msg_debug('tau_histogramming', " edge # tau/ns ") call msg_debug('tau_histogramming', extra="Result from automatic (iterated) tau_histogramming (still experimental):") call msg_debug('tau_histogramming', extra=" edge # tau/ns ") do i = 1, nedges call msg_debug('tau_histogramming', trim(msg_fmt("(i5)",i))//": "//trim(msg_fmt("(es14.5)",edges(i)))) !write(6,'(i5,": ",es14.5)') i, edges(i) call msg_debug('tau_histogramming', extra=trim(msg_fmt("(i5)",i))//": "//trim(msg_fmt("(es14.5)",edges(i)))) edges(i) = edges(i) * NS ! back to SI values enddo end subroutine tau_histogramming !!! mm -- consolidate collected data -- !!! subroutine consolidate_colldata(coll_data , accepted_dq, cdout ) implicit none Loading