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

cmd collect

collect ... to <filename>
parent 992d088b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ export PROJECT=drspine

export VERSION_MAJOR=1
export VERSION_MINOR=4
export VERSION_RELEASE=0
export VERSION_RELEASE=1

export PROJLIB=lib$(PROJECT).a
export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR)
+13 −9
Original line number Diff line number Diff line
@@ -302,6 +302,7 @@ program drspine
  istat = add_tab_expansion('collect bgr 1')
  istat = add_tab_expansion('collect tfac')
  istat = add_tab_expansion('collect volfrac')
  istat = add_tab_expansion('collect to')
  !
  istat = add_tab_expansion('plot')
  istat = add_tab_expansion('plot sqt')
@@ -674,17 +675,18 @@ program drspine
     !> COMMAND: collect
     !-------------------------------------------------------------
     if(command('collect  ', &
          ' collect [bgr (0|1)] [tfac <val>] [volfrac <val>]  [use_mean] [resolution] [debug]  '//LF//&
          ' collect [bgr (0|1)] [tfac <val>] [volfrac <val>]  [to <filename>] [use_mean] [resolution] [debug]'//LF//&
          '     - collect data into S(Q,t) histogram'//LF//&
          '         bgr  (0|1)    - if 0 no background subtraction'//LF//&
          '                         if 1 perform standard background subtraction'//LF//&
          '         tfac <val>    - use transmission factor (default 1)'//LF//&              ! use tfac while reading data (pz)
          '         tfac <val>    - use transmission factor (default is set by read command or 1)'//LF//&   ! use tfac while reading data (pz)
          '                         <val> = transmission(sample)/transmission(bgr)'//LF//&
          '         volfrac <val> - use volume fraction factor (default 1)'//LF//&
          '         use_mean      - use arithmetic mean for wavelength calculations'//LF//&
          '                         default is flux weighted wavelength'//LF//&
          '         to <filename> - save results to <filename> (default is "last_sqt.dat")'//LF//&
          '         use_mean      - use arithmetic mean for wavelength calculations (debugging option)'//LF//&
          '                         default is to use flux weighted average wavelength (standard option)'//LF//&
          '         resolution    - produce R(Q,t) file for resolution data'//LF//&
          '         debug         - dump S(Q,t) debug info files (developer option)'//LF//&
          '         debug         - dump S(Q,t) debug info files (debugging option)'//LF//&
          ' NOTES:'//LF//&
          '   tfac flag overrides the transmission factor used in read command (see help read)'//LF//&
          '   resolution and debug flag are still under development$')) then
@@ -2110,7 +2112,7 @@ CONTAINS
    integer :: ier
    integer :: nsamples

    !character(len=cmd_len) :: cbuffer
    character(len=cmd_len) :: filename

    !nq   = 1
    !ntau = 1
@@ -2124,6 +2126,7 @@ CONTAINS
    do_resolution = .false.
    do_debug = .false.
    use_mean = .false.
    filename =  program_param%file_sqt_dat

    call msg_info('drspine', '===> collect data')

@@ -2131,6 +2134,7 @@ CONTAINS
    bgr_flag = get_named_value('bgr_flag', bgr_flag, inew)  ! for compatibility
    tfac     = get_named_value('tfac    ', tfac, inew)
    volfrac  = get_named_value('volfrac ', volfrac, inew)
    filename = get_named_value('to      ', filename, inew)


    !! in order to have these values for reporting !!
@@ -2230,7 +2234,7 @@ CONTAINS
    !! << mm20032017
    !!
    call write_datreat_collection(collected_data, &
         format_path(save_path, program_param%file_sqt_dat), bgr_flag, tfac, volfrac )
         format_path(save_path, filename), bgr_flag, tfac, volfrac )

    !! dump resolution
    if (do_resolution) &