;+ ; Lists some rows of the input file (or optionally the keep file) based on the selection parameters ; given by the user. ; The _EXTRA parameters are passed directly to ; lower level selection functions. See the ; line search index or ; continuum search index ; for the full set of parameters that are available. ; ; @param start {in}{optional}{type=long} If set, the beginning of range to list ; @param finish {in}{optional}{type=long} If set, the end of range to list ; ; @keyword keep {in}{optional}{type=boolean} If set, the list comes from ; the keep file and !g.line is irrelevant. ; ; @examples ;
; ; list first 11 records in the input file ; list,0,10 ; ; ; list source and polarization for first 11 entries ; list,0,10,columns=['source','polarization'] ; ; ; list index, source and tsys for all data in ifnum=1 ; list,ifnum=1,columns=['index', 'source', 'polarization'] ;; ; @version $Id: list.pro,v 1.8 2005/05/24 20:35:09 jbraatz Exp $ ;- pro list, start, finish, keep=keep, _EXTRA=ex compile_opt idl2 on_error,2 if n_elements(start) eq 0 then start = 0 if start lt 0 then start = 0 if (keyword_set(keep)) then begin if !g.lineoutio->is_data_loaded() eq 0 then begin message,'No keep file has been set or the keep file is empty',/info return endif nmax = n_elements(!g.lineoutio->get_index()) if (n_elements(finish) eq 0) then finish = nmax endat = finish ge nmax ? (nmax-1) : finish !g.lineoutio->list,start,endat,_EXTRA=ex endif else begin if (!g.line) then begin if !g.lineio->is_data_loaded() eq 0 then begin message,'No line input file has been set or the file is empty',/info return endif nmax = n_elements(!g.lineio->get_index()) if (n_elements(finish) eq 0) then finish = nmax endat = finish ge nmax ? (nmax-1) : finish !g.lineio->list,start,endat,_EXTRA=ex endif else begin if !g.contio->is_data_loaded() eq 0 then begin message,'No continuum input file has been set or the file is empty',/info return endif nmax = n_elements(!g.contio->get_index()) if (n_elements(finish) eq 0) then finish = nmax endat = finish ge nmax ? (nmax-1) : finish !g.contio->list,start,endat,_EXTRA=ex endelse endelse return end