Activity for Antonio Sferruzza

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    I found another memory leak. When a container is added to the data browser, it must be removed after the use. If it isn't, of course the script will crash with multiple iterations. The problem is that if you use the function to get the added containers. the script will crash even if you remove the container from the data browser. The error message is exactly the same as the other problem. It is also for gwy files. This is the code that raises it. while True: main_container = gwy.gwy_file_load("test.gwy")...

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Yes, the latest snapshot work perfectly! Can I use it without problems?

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    I have noticed that it seems to depend on the number of data fields in the file. In the one that I am attaching, it even crashes after around 215 loops, as it has 5 data fields. 400 loops was the number for a file with 2 data fields.

  • Antonio Sferruzza Antonio Sferruzza modified a comment on discussion Pygwy

    You are right, the issue is not in the RAM memory amount raising. The problem does not occur when opening standard ".gwy" files, but with ".lext" files. This are acquired from an Olympus confocal LSM. The problem raises without memory leak after around 400 loops. I used this code: import sys sys.path.append(r'C:\Program Files (x86)\Gwyddion\bin') import gwy while True: c = gwy.gwy_file_load("test.lext") The Exception thrown is not Python's. The error when opening the file from Windows PowerShell...

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    You are right, the issue is not in the RAM memory amount raising. The problem does not occur when opening standard ".gwy" files, but with ".lext" files. This are acquired from an Olympus confocal LSM. The problem raises without memory leak after around 400 loops. I used this code: import sys sys.path.append(r'C:\Program Files (x86)\Gwyddion\bin') import gwy while True: c = gwy.gwy_file_load("test.lext") The Exception thrown is not Python's. The error when opening the file from Windows PowerShell...

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Hi, I am writing a script for batch processing of files. The problem is that no file is closed even when using gwy_app_data_remove(container). This means that there is a limit in the amount of files that can be processed. Is there a better way to clean up the memory? The files are opened with gwy.gwy_file_load("path", gwy.RUN_NONINTERACTIVE)

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Ok, by the way I am interested in the processing without resampling/interpolation, without any masking. Could you link me the source code download?

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    I am sorry but I was not clear in the second question. My question was on the procedure behind the tool, as there are different ways to calculate the PSDF. I just need to know the process for reference. So: what calculations does the tool do when processing the images? Is the following what the tool does? - line by line (rows or columns): - 1DACF - 1DFFT - averaging all the lines. Thank you for your help!

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Hi, I have the same question and as this is an old topic, I do not know if this was ever implemented. Is it possible to create some 3D views and save it as images, all in a python script?

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Also, which is the process for the horizontal and vertical PDSF iìof the tool? I assumed it is: line by line (rows or columns): 1DACF 1DFFT then averaging all the lines. Is it correct?

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Hi, I need to know the informations on the parameters to use for the methods DataField.rpdsf() and DataField.pdsf() to match the results obtained with the tool "Statistical Functions". Is there any preprocessing or postprocessing required, that is already done by the tool? Thank you in advance.

  • Antonio Sferruzza Antonio Sferruzza modified a comment on discussion Pygwy

    Hi David, Thank you for your suggestion. I corrected the script, as you need to divide each element of the kernel by the sum and not by the average. I checked now and the result is exactly the same as the tool. Edit: I checked and this works as the tool only with odd-sized neighbourhoods. from __future__ import division # In this script I am using the new division, that works like the one of Python 3. This import must stay at the start of the file. def filter_mean_round(data_field, size): """ It...

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Hi David, Thank you for your suggestion. I corrected the script, as you need to divide each element of the kernel by the sum and not by the average. I checked now and the result is exactly the same as the tool. from __future__ import division # In this script I am using the new division, that works like the one of Python 3. This import must stay at the start of the file. def filter_mean_round(data_field, size): """ It averages each pixel with the mean value with a circular filter. The filter is done...

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Thank you very much, everything worked!

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Hi everyone, as from topic, I performed on the same initial data field the two operation below: - with a script: data_field.filter_mean(5) - with the program: "basic filter"->mean, with size = 5 pixels. Of course, I did the operation separately, opening the file twice, without saving, so the starting image was the same. The result, though, is different, as I found out by subtracting the 2 images pixel by pixel. How can this be fixed? Am I doing anything wrong? Thank you for your time, Antonio

  • Antonio Sferruzza Antonio Sferruzza modified a comment on discussion Pygwy

    Hi everyone, I am sorry to write in such an old thread, but my question is very related to this and I thought that it would be a good idea to keep all the information in the same place. Is there a way to set the color mapping directly from the script? I could not find it in the documentation. Thank you for your time! Antonio

  • Antonio Sferruzza Antonio Sferruzza posted a comment on discussion Pygwy

    Hi everyone, I am sorry to write in such an old topic, but my question is very related to this and I thought that it would be a good idea to keep all the information in the same place. Is there a way to set the color mapping directly from the script? I could not find it in the documentation. Thank you for your time! Antonio

1
MongoDB Logo MongoDB