ContactEngineering / topobank

Create, visualize, analyze, share, and publish digital surface twins
https://contact.engineering
MIT License
8 stars 3 forks source link

Test files with different sizes and resolutions in x and y direction. #260

Closed sannant closed 9 months ago

sannant commented 5 years ago

This enables to check if the width and heights are attributed correctly to x and y (and a sphere apears as a sphere and not as an ellipse).

sannant commented 5 years ago

@tdbjacobs , @lthimons , @abg30 do you have some files in different file formats for which you can upload them and check easily the orientations and the lateral dimensions ?

abg30 commented 5 years ago

I saw you posted in the previous issue that .opdx doesn't work. I have optical files in text format that I might upload. They have different x and y resolutions.

sannant commented 5 years ago

I shared the Topography x_y_testing with you guys so we can collect all these examples at the same place

abg30 commented 5 years ago
Screen Shot 2019-07-12 at 13 24 56

Uploaded 'UNCD_as_recieved_5x_1.txt' looks good to me. I had to manually put in x and y sizes, but that is because the file has no meta data.

abg30 commented 5 years ago

Orientation is ok, but height units are wrong. They should be in m

Screen Shot 2019-07-18 at 15 13 07

and not nm.

sannant commented 4 years ago

Optical Data

We have two _vsi (optical ) of a sphere where the aspect ratio looks ok, so the width and heights match correctly the x and y directions.

AFM text format

We have AFM data with same x and y direction where the scan direction seem to be missinterpreted (example: gain_control_uncd_dlc_5.002).

we have AFM data with different pixel spacing in fast and slow scan direction but same scan size in each direction (see uncd_12_2to1_aspratio.001). Again the fast scan direction seems to be missinterpreted. I wonder where the vertical scars come from.

grafik

@abg30, can you check if everything is correct ?

sannant commented 4 years ago

The orientations of the fast scan direction of AFM looks ok now: Examples:

sannant commented 4 years ago

The width and heights of optical data do not match x and y anymore.

The two topographies look the same, meaning that the readers are consistent.

I think the the problem is in PyCo

In [1]: from PyCo.Topography import read_topography                             

In [2]: topOPDX = read_topography("20181205_500um_unpolished_100x_vsi.OPDx")    
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
  return f(*args, **kwds)

In [3]: topOPDX.pixel_size                                                                                                                                         
Out[3]: array([0.0498119 , 0.02801189])

In [4]: import matplotlib.pyplot as plt                                                                                                                            

In [5]: plt.pcolormesh(*topOPDX.positions_and_heights())                                                                                                           
Out[5]: <matplotlib.collections.QuadMesh at 0x123f05490>

In [6]: plt.show()                                                                                                                                                 

OPDx_sphere_problem

The reader provides unequal pixel sizes ! @abg30 , @lthimons can you confirm that this shouldn't be for this data ?

@StandartKai we should probably use this data with different width and hights for our tests.

lthimons commented 4 years ago

sorry for the late reply, I am just seeing this. The pixel sizes certainly should be the same. If i recall, I have had a similar issue in the past that was resolved by rotating the substrate prior to uploading. Perhaps that tells you something. I have avoided this issue in recent uploads by simply cropping the data into a square prior to uploading.