You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The algorithms which use van der monde matrices (spc.fit.poly and spc.rubberband) can not handle higher order polinomials if the xaxis does not match the right criteria. The returned error message is Error in qr.solve(vdm[use, ], y[use, i]) : singular matrix 'a' in solve.
The hypothesis for that is that the numerical fitting becomes instable for an axis containing high numbers far away from 0.
The workaround for this problem is to normalise the wavelength axis before doing the fit and recover it afterwards.
I put the basic x-offset option into hyperSpec's code base (master branch).
Now, there is the possiblity to ask spc.fit.poly and spc.fit.poly.below to return the polynomial coefficient instead of the evaluated polynomial baseline.
These need to be backtransformed from a_0 (x - ofs)^0 + a_1 (x - ofs)^1 + ... a_n (x - ofs)^n -> a'_0 x^0 + a'_1 x^1 + ... a'_n x^n.
Activity
cbeleites commentedon Apr 15, 2016
Workaround:
cbeleites commentedon Apr 15, 2016
Reproduce issue:
cbeleites commentedon Nov 17, 2016
Hi Michael,
I put the basic x-offset option into hyperSpec's code base (master branch).
Now, there is the possiblity to ask
spc.fit.polyandspc.fit.poly.belowto return the polynomial coefficient instead of the evaluated polynomial baseline.These need to be backtransformed from a_0 (x - ofs)^0 + a_1 (x - ofs)^1 + ... a_n (x - ofs)^n -> a'_0 x^0 + a'_1 x^1 + ... a'_n x^n.
Could you provide a function that does this?
Many thanks,
Merge pull request #1 from GegznaV/updates-in-description-file
Merge pull request #1 from GegznaV/updates-in-description-file
Translate vignettes - chondro.Rmd (small fixes)