fredericjs/surfalize

Batch Execution of fill_nonmeasured() after remove_outliers()

alaliberte64 opened this issue · 1 comments

Hello,

I have been trying to use your library for some batch analysis of some CLSM data, and in order to do so effectively, I have been trying to use the remove outliers function in order to help reduce some of the noise appearing due to my samples' transparency. The functions works fine on single surfaces that I import, but when I try to use remove_outliers() followed by fill_nonmeasured() on a batch of files, it does not replace the NaN values, and thus any measurement with at least one removed outlier returns NaN for the calculated roughness statistics. Am I doing something wrong? Thank you for your time.

Here is the section of code I am trying to run. It works fine without the outlier removal, but not as it is below:

batch = Batch(filepaths).center().level().remove_outliers().fill_nonmeasured().filter(filter_type='lowpass', cutoff = 3).roughness_parameters(['Sa', 'Sz', 'Sku', 'Ssk'])

dataset = batch.execute(ignore_errors=False)

Hi,

thanks for letting me know. I found the issue and fixed it. It had to do with the inplace execution of remove_outliers by the batch, where the attribute that checks if the surface has nonmeasured points was not updated. Therefore, fill_nonmeasured did not execute because it wrongly assumed there were no nonmeasured points.

The bugfixes are now available with a new version. Simply run pip install --upgrade surfalize.

Best,
Frederic