anchor.diff:              deriv i a.[i .. i+1] c.[i .. i+1] t
               )
       
  -    //recalculates the polynomial coefficients of the given spline f(knot) and f''(knot)
  -    let getcoefficients (x:Vector<float>) (a:Vector<float>) (c:Vector<float>) =
  +    ///recalculates the polynomial coefficients of the given spline f(knot) and f''(knot)
  +    ///[a1,b1,c1,d1,a2,b2...] (ax^3+bx^2...)
  +    let getCoefficients (x:Vector<float>) (a:Vector<float>) (c:Vector<float>) =
           let n = x.Length
           //Definiere Intervalle
           let h = Vector.init (n-1) (fun i -> x.[i+1] - x.[i] )
  
positive.code: 
      ///gets the observation values (x,y), the number of measured replicates and the weightingmethod and returns the spline result of the best fit
      let getBestFit xVal yVal repNumber weightingMethod = 
          let yValMeans = calcMeanOfRep yVal repNumber |> normValues
          let weightingMatrix = (getWeighting xVal (yVal |> vector) weightingMethod repNumber)
          let (cl,fit) = getBestFitOfWeighting xVal yValMeans weightingMatrix 
          //let (mins,maxs) = investigateTrace 0.001 (fit.TraceA |> Seq.toArray)
  
negative.code:             deriv i a.[i .. i+1] c.[i .. i+1] t
              )
          
      ///returns a function that calculates the third derivative for a given xValue
      let getTrdDerivative (x:Vector<float>) (a:Vector<float>) (c:Vector<float>) =
          let n = x.Length
          //define interval stepwidth
          let h = Vector.init (n-1) (fun i -> x.[i+1] - x.[i] )
          let deriv i (a:Vector<float>) (c:Vector<float>) xV=
              let pa = -1./6. * c.[0] + 1./6. * c.[1]
              6. * pa
          (fun t ->
              let i =
                  if t = Seq.last x then 
                      Seq.length x - 2
                  else
                      x
                      |> Seq.findIndex(fun x_Knot -> (x_Knot - t) > 0.)
                      |> fun nextInterval -> nextInterval - 1
              deriv i a.[i .. i+1] c.[i .. i+1] t
              )
  
      ///gets indices of minima and maxima by brute force search
      let private investigateTrace pct (arr:float[]) =
  