anchor.diff:             // Read until the end
              let arr = 
                  seq {while mm.Read(row, 0, nbytes) >= nbytes do 
  -                    let a,d = scale (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." |], 
  -                                     [||])
  -                    yield a }
  -           return array2D arr }
  +                    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
   
   
   
  
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:             match rowlist with
              | [] -> failwith "Error parsing rates."
              | hd::tl ->
                  // flds will be two entries: rate, endsample
                  let flds = splitstr hd 
                  try 
                      // newrate        ,    newsmpl                      , newrows
  