# what is the correct order of applying a nonlinear operation and downsampling (with anti-aliasing)

In UltraSound imaging, after beam-forming and obtaining the envelope, Log-compression which is a non-linear operation and scan conversion which is a 2D interpolation (with inherent down-sampling) is performed. I was wondering what would be the correct order of log-compression as a nonlinear operation and the 2D interpolation which inherently down-sample the signal.

Generally if we perform some non-linear operation and down sampling what would be the correct order?

• the right order depends on what you want to achieve - there's no general answer. May 26, 2021 at 19:13
• @MarcusMüller, thanks, but how could I analyse the problem further and what would be advantages and disadvantages of each order? May 26, 2021 at 19:27

When one nonlinear and one linear operation are suitably adapted to the problem, the nonlinear one is quite often applied first. Nonlinear processing is often applied to modify data such that more classical algorithms apply more easily, even when the original data does not follow the proper assumptions. Examples are:

• removing outliers/trimming data before computing averages,
• applying variance stabilizing transformations (Anscombe) to use regression needing constant variance,
• computing a logarithm to convert a multiplicative problem before using an additive technique on the log-transformed data.

Of course, applying a non-adapted nonlinear transform first can be very harmful. Yet in you case, a log-coompression may either:

• reduce the impact of extreme data values
• stabilize an heteroskedastic noise
• account for multiplicative effects

before an interpolation (a kind of weighting average or filtering). This goes under the hood of homomorphic filtering.