anchor.diff:  
   
       /// gets finalcentroidlist and cellnumber and fits the fitting with threshold to trace. With numberOfSurroundingIntensities you can set the area in which a maxima has to be the highest point
  -    let fittingCaSignalToMaxima rickerarray threshold numberOfSurroundingIntensities rise (paddedTrace:float[]) = 
  -        let numberOfFrames = paddedTrace.Length - (2 * 3000)
  -        let (maximaarray,cWTCurve) = collectMaxima rickerarray numberOfSurroundingIntensities paddedTrace
  +    let fittingCaSignalToMaxima rickerarray threshold borderpadding numberOfSurroundingIntensities rise (paddedTrace:float[]) = 
  +        let numberOfFrames = paddedTrace.Length - (2 * borderpadding)
  +        let (maximaarray,cWTCurve) = collectMaxima rickerarray numberOfSurroundingIntensities borderpadding paddedTrace
   
           let fittedList =
               [|(int rise)..numberOfFrames-1|]
  
positive.code:             for a = 0 to 2*offset do
                  for b = 0 to 2*offset do
                      acc <- ((marr.Values).[a,b] * ((paddedframe).[((x+offsetpadding)+(a-offset)),((y+offsetpadding)+(b-offset))] |> float) )::acc
              acc |> List.fold (fun acc x -> acc + x) 0. //CONSTANT ENERGY times 1/(sqrt |scale|)
          let result =
              [|0..(Seq.length paddedData) - 1|]       
              |> Array.map (fun fr -> 
                  C3DWTatPositionAndFrame marr (paddedData |> Seq.item fr) y x)
          result
  
      let inline findTraceOfBestCoor marrList (paddedData:seq<'a[,]>) (coor:float*float) =
          let yCoor = (fst coor) |> Core.Operators.round |> int
          let xCoor = (snd coor) |> Core.Operators.round |> int 
  
negative.code:         let radius = (marrList.[indexOfBestScale]).Zero 
          (radius,trace)
  
      ///calculates the correlation values of a specified coordinate with given wavelets and returns the trace of highest correlation
      let inline getTraceOfBestCorrelation borderpadding marrList (paddedData:seq<'a[,]>) (coor:float*float) =
          let yCoor = (fst coor) |> round 0 |> int
          let xCoor = (snd coor) |> round 0 |> int 
          //calculates the summed correlation values of each wavelet transformed trace
          let intensityList = 
              marrList  
              |> List.map (fun x -> 
                  getCorrelationAtCoor borderpadding x yCoor xCoor paddedData
                  |> Array.sum)
          //gives the index of the best matching waveletfunction based on summed correlation values for each wavelet
          let indexOfBestScale = 
              intensityList 
              |> List.indexed
              |> List.maxBy snd
              |> fst
          //trace of highest correlation (best matching waveletfunction at this position)
          let trace = intensityList.[indexOfBestScale]
          //radius of the best matching waveletfunction at this position
          let radius = (marrList.[indexOfBestScale]).Zero 
          (radius,trace)
  
      [<Obsolete("Do not use anymore. Use FSharp.Stats.Signal.Padding.Discrete.padRnd with borderpadding=20,000 instead.")>]
      ///padds the trace with 20k data points randomly selected for 
      let paddTrace (cwtTrace:float[])= 
          let rnd = System.Random() 
          let padding = 20000  //number of zeros the data is padded with
          let listRnd = Array.init padding (fun _ -> cwtTrace.[rnd.Next(0,cwtTrace.Length-1)]|> float )
          let paddedCWT3Dtrace = Array.append (Array.append listRnd cwtTrace) listRnd
          paddedCWT3Dtrace
  
      ///computes the continuous wavelet transform of the padded trace with wavelet type myRicker.
      let transform2D borderpadding (myRicker: Ricker.myRicker) (paddedTrace: float []) =
          let padding =  borderpadding
          let myRickerOffsetRise = (6. * myRicker.ScaleRise) |> ceil |> int 
          let myRickerOffset = myRicker.PadArea
          let arr = Array.zeroCreate (paddedTrace.Length - (2 * padding))
  