next up previous contents
Next: Mapping while retaining and Up: Example command files Previous: Make a MONGO-plottable listing   Contents


Selecting scans by source name

!-------------------------------------------------- 
!   source_select.spx
! Tests selection of scan by source
!-------------------------------------------------- 

  declare n      i4
  declare source c10

  ask 'Source to select?', source, ?
  read-spectrum 1

  clear-stack

  do n 1 no_file_spectra
    read-spec n
    if (source_name<>source) 
      print 'Scan ', n:i3.3, '  for wrong source, continuing'
      pop
    else
      print 'Averaging scan ', n:i3
      average
    endif
  enddo



Jamie Leech 2004-08-16