When I talk about “flattening the baseline,” I am talking about trying to remove a slow trend or curvature from my data.
“2nd order” refers to a second-order polynomial—basically a curve described by a quadratic equation:
What that means in practice
- 0th order → just a constant offset (flat line)
- 1st order → a straight-line slope (linear trend)
- 2nd order → a curved baseline (parabolic shape)
Why use 2nd order?
If my baseline isn’t just tilted but slightly curved, a 2nd-order fit can model and remove that curvature.
How it’s used
- Fit a quadratic curve to my baseline region (where there’s no signal of interest).
- Subtract that fitted curve from my data.
- Result: a flatter baseline, making real signals stand out.
In the context of radioastronomy.
With things like SDR spectra or interferometry data, a 2nd-order correction helps remove:
- Gain variations across frequency
- Instrumental curvature
- Sky/background gradients
If my baseline still looks wavy after a linear correction, that’s when stepping up to 2nd order makes sense.