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

1
2
3
4
5
[smoothed_y] = SGOL (
    y,
    number of points left,
    number of points right,
    Poynominal Order)

Example

1
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...

How do you define successful engineering leadership?

The Philosophy

Many view technical leadership as being the “smartest architect in the room.” I see it as the opposite. My job is to build a room where I don’t have to be the smartest person because the systems, culture, and communication are so robust that the team can out-innovate me.

The Strategy

  • Alignment: Does every engineer understand how their sprint task impacts the company’s bottom line?
  • Velocity vs. Stability: We aren’t just “shipping fast”; we are building a predictable, repeatable engine that doesn’t collapse under its own weight at the next order of magnitude.
  • The Human Growth Curve: Success is when the engineering team’s capability evolves faster than the product’s complexity. If the team feels stagnant, the tech stack will soon follow.

What is your approach to scaling technical organizations?

The Philosophy

Scaling isn’t just “hiring more people” - that’s often how you slow down. Scaling is about moving from Individual Heroics to Organizational Systems.

The Strategy

  • The 3-Continent Perspective: Having managed global teams, I focus on “High-Signal Communication.” As you grow, the cost of a meeting triples. I implement “Asynchronous-First” cultures that protect deep-work time while ensuring no one is blocked by a timezone.

  • Modular Autonomy: I advocate for breaking down monolithic teams into autonomous units with clear ownership. This reduces the “communication tax” and allows us to scale the headcount without scaling the bureaucracy.

  • Automation as Infrastructure: At petabyte scale, manual intervention is a failure. I treat the developer experience (CI/CD, observability, self-service infra) as a first-class product to keep the “path to production” frictionless.

How do you balance high-growth velocity with technical stability?

The Philosophy

Technical debt isn’t a “bad thing” to be avoided; it’s a set of historical decisions that no longer serve you. Like any loan, leverage can accelerate growth when investments payoff. But if velocity and returns are slowing you need a payment plan before the interest kills you.

The Strategy

  • The ROI Filter: I don’t refactor for the sake of “clean code.” I don’t refactor a micro-service with no users. I refactor when the pain on that debt - measured in bugs, downtime, or developer frustration - starts to exceed the cost of the fix.

  • Zero-Downtime Culture: Especially at scale, stability is a feature. I implement “Guardrail Engineering” where the system is designed to fail gracefully, ensuring that a Series B growth spike becomes a success story rather than a post-mortem.

  • The 70/20/10 Rule: I typically aim to dedicate 70% of resources to new features, 20% to infrastructure/debt, and 10% to R&D. This ensures we never stop innovating, but we never stop fortifying either.