anchor.diff:                  | (r, e, s)::_ -> e + (float (newsmpl - s)/newrate) 
               (newrate, endtime, newsmpl)::acc
           // If finished with rates, return the accumulated list
  -        if n >= nrates then {finfo with Rates = (List.rev acc')}, newrows
  +        if n >= nrates then 
  +            {finfo with Rates = (List.rev acc')
  +                        NumSamples = match List.head acc' with
  +                                     | _, _, s -> s}, newrows
           else parseRate newrows acc' (n+1)
       parseRate (List.tail rows) [] 1 
   
  
positive.code:                seq {for row in csv.Rows do 
                      // Each row is idx, time, analogs..., digitals...
                      let vals = row.Columns 
                      let a,d = scale (vals.[0].AsInteger64() |> uint32, 
                                       vals.[1].AsFloat(), 
                                       [|for i in 2..nanalogs+1 -> vals.[i].AsFloat(missingValues = [|""; " "|])|], 
                                       [||])
                      yield a }
             return array2D arr } 
  
  // Processes a binary comtrade dat file
  let processBinaryAsync (cfg:ComtradeFileInfo) channels2read fname = 
  
negative.code:            // Read until the end
             let arr = 
                 seq {while mm.Read(row, 0, nbytes) >= nbytes do 
                      let cnt, tm, algs, digs = 
                          BitConverter.ToUInt32(row, 0), 
                          BitConverter.ToUInt32(row, 4) |> float, 
                          [|for i in 1 .. nanalogs -> 
                              match cfg.FileType with 
                              | ComtradeDatFileFmt.Binary -> BitConverter.ToInt16(row, 8+(i-1)*2) |> float
                              | ComtradeDatFileFmt.Binary32  -> BitConverter.ToInt32(row, (i+1)*4) |> float
                              | ComtradeDatFileFmt.Float32  -> BitConverter.ToSingle(row, (i+1)*4) |> float
                              | _ -> failwith "Could not correctly parse file type." |], 
                          [||]
                      if cnt <= cfg.NumSamples then
                          let a,d = scale (cnt, tm, algs, digs)
                          yield a }
             return array2D arr 
      } // end async block
  
  
  
  