fname = '/asl/data/hitran/h2k.by.gas/g2.dat';
[line]=hitread(2000,2500,0,2,fname);

aa = 1;
while aa > 0
  aa = input('enter iIso,iL,iU : ');
  iISO = aa(1); iL = aa(2); iU = aa(3);
  ii = find(line.iso == iISO & line.iusgq == iU & line.ilsgq == iL );
  if length(ii) > 0
    semilogy(line.wnum,line.stren,'.',...
         line.wnum(ii),line.stren(ii),'r.')
    str = ['iso = ' num2str(iISO) ' iL = ' num2str(iL) ];
    str = [str ' iU = ' num2str(iU)];
    title(str)
    end
  aa = input('again? (-1/+1) : ');
  end

%%% see /asl/data/hitran/HITRAN2k/BD_Vibs.for
for iISO = 1 : 10
  for iL = 1 : 10
    for iU = 1 : 60
      iAll = 1 : length(line.iso);
      ii = find(line.iso == iISO & line.iusgq == iU & line.ilsgq == iL );
      if length(ii) > 0
        semilogy(line.wnum,line.stren,'.',...
               line.wnum(ii),line.stren(ii),'r.')
        str = ['iso = ' num2str(iISO) ' iL = ' num2str(iL) ];
        str = [str ' iU = ' num2str(iU)];
        title(str)
        numlines(iISO,iU,iL) = length(ii);
        maxstren(iISO,iU,iL) = max(line.stren(ii));
        avgwnum(iISO,iU,iL)  = mean(line.wnum(ii));
        iUpper(iISO,iU,iL)   = iU;
        iLower(iISO,iU,iL)   = mean(line.ilsgq(ii));

    jj = setdiff(iAll,ii); 

    line.iso    = line.iso(jj); 
    line.wnum   = line.wnum(jj); 
    line.stren  = line.stren(jj); 
    line.tprob  = line.tprob(jj); 
    line.abroad = line.abroad(jj); 
    line.sbroad = line.sbroad(jj); 
    line.els    = line.els(jj); 
    line.abcoef = line.abcoef(jj); 
    line.tsp    = line.tsp(jj); 
    line.iusgq  = line.iusgq(jj); 
    line.ilsgq  = line.ilsgq(jj); 
    line.gasid  = line.gasid(jj); 
    line.linct  = length(line.iso); 

        pause;
      else
        numlines(iISO,iU,iL) = 0;
        maxstren(iISO,iU,iL) = 0;
        avgwnum(iISO,iU,iL)  = 2000;
        iUpper(iISO,iU,iL)   = iU;
        iLower(iISO,iU,iL)   = -1;
        end
      end
    end
  end
