Savitzky-Golay - sgol

The Savitzky-Golay smoothing function essentially applies a local polynominal fitting routine to a series of data points to then find the smoothed data points. This has the benefit that for sharp intense peaks (common to EPR) that the line broadening effects and lessening of peak intensity seen by a local moving window average are not seen.

To perform a Savitzky-Golay smoothing functions requires a polynominal order to be defined as well as the window size (or number of data points to be sampled at any given time). We can also weight the window such that future data points are more/less favourable than past points

Syntax

[smoothed_y] = SGOL (
    y,
    number of points left,
    number of points right,
    Poynominal Order)

Example

y_smoothed = SGOL( y, 16, 16, 4)

This smoothes the data in array y using a 4th order polynominal (y = ax4 + bx3 + cx2 + dx + e), using a window of 16 data points either side of the current point being examined


This page previously appeared on morganbye.net[^1][^2][^3]

[^1:] http://morganbye.net/savitzky-golay-sgol [^2:] http://morganbye.net/eprtoolbox/savitzky-golay-sgol) [^3:] http://morganbye.net/uncategorized/2012/05/savitzky-golay-sgol

Older post

cwViewer

Newer post

Red car...

What distinguishes you from other developers?

I've built data pipelines across 3 continents at petabyte scales, for over 15 years. But the data doesn't matter if we don't solve the human problems first - an AI solution that nobody uses is worthless.

Are the robots going to kill us all?

Not any time soon. At least not in the way that you've got imagined thanks to the Terminator movies. Sure somebody with a DARPA grant is always going to strap a knife/gun/flamethrower on the side of a robot - but just like in Dr.Who - right now, that robot will struggle to even get out of the room, let alone up some stairs.

But AI is going to steal my job, right?

A year ago, the whole world was convinced that AI was going to steal their job. Now, the reality is that most people are thinking 'I wish this POC at work would go a bit faster to scan these PDFs'.

When am I going to get my self-driving car?

Humans are complicated. If we invented driving today - there's NO WAY IN HELL we'd let humans do it. They get distracted. They text their friends. They drink. They make mistakes. But the reality is, all of our streets, cities (and even legal systems) have been built around these limitations. It would be surprisingly easy to build self-driving cars if there were no humans on the road. But today no one wants to take liability. If a self-driving company kills someone, who's responsible? The manufacturer? The insurance company? The software developer?