LehighInfolab / Infolab-Utils

GNU General Public License v3.0
0 stars 2 forks source link

Make replace_nans.py available to the entire lab #2

Open G-Armstrong opened 1 year ago

G-Armstrong commented 1 year ago

replace_nans.py is a script that replaces NaN vertex values in the triangular mesh described in .SURF files. In the place of NaN values, the script calculates the mean coordinate value for all intersecting vertices for the NaN vertex. This script was conceived as temporary fix to the deep rooted NaN production problem in genSurf, and remains the best available option.

There are three useful functions in replace_nans.py. The first two, obtain_adjacency( ) and obtain_coord( ), work together to create an undirected hashmap of the triangle vertices in the mesh. To make these 2 functions more modular, extract them into a new script and write documentation that explains that this script is intended to parse .SURF files and create this particular hashmap.

In addition, modify replace_nans.py with descriptive comments that explain the purposes, inputs, and outputs of each of the 3 functions with docstrings. Once the file has been updated, push both files to the Infolab-Utils repository.