|
From: David N. (Y. <ye...@gw...> - 2012-06-03 23:18:52
|
On Thu, May 31, 2012 at 11:22:32PM +0000, Peter Eaton wrote:
> AS has been mentioned on this list before, this routine would be
> *very* welcome in Gwyddion. It is one of the few functions I sometime
> use other software for. I would say that the "poor" implementation
> mentioned by Yeti would be very useful by itself...
Well, Gwyddion must do *something* if the mask covers entire lines.
Excluding options such as crashing or silently doing nothing, we then
have a message box of the ‘our algorithm does not like your data’ kind –
and that I want to avoid too.
The ‘obvious’ answer to what to do with completely covered rows is to
leave them as they are. But I even do not know how to do this! More
precisely, there are two kinds of levelling algorithms:
(a) Global/absolute, calculating some quantity for each row and making
it equal for all rows. This includes the mean and median levelling.
In this case the algorithm itself defines how to align aribtrary two
rows [included in the levelling]. So we can say what the hell and
just make the total mean or median of the levelled rows the same as
before. This means they will not move, in some sense, with respect
to the excluded rows.
(b) Local/relative, calculating how to shift each row compared to the
preceeding row. This includes the median difference levelling.
In this case we only know how to compose the relative shifts within
contiguous blocks of rows. Even doing nothing with excluded rows
requires defining how we stitch these block together. The simplest
possibility seems to be not shifting the boundary rows of the block
with respect to the neighbour excluded row. This, of course, means
that the mutual shift of entire blocks can be large (and determined
by the excluded rows). I do not think the result will be useful but
if no one actually cares...
Yeti
|