Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to graph class (px2ang and max_neighbors are added) #66

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

saimani5
Copy link

--Added px2ang argument for the graph class.
For finding the neighbors, coordinates in Angstroms are used, and for making nx_graph, coordinates in pixel units are used so that the plots make sense.

--Added max_neighbors as a kwargs argument to the find_neighbors method in the graph class.
When set to -1 (default value), the method works like the one in the previous version.
When set to any other values, the number of neighbors for each node is cut off at the 'max_neighbors.'
Additional care is also taken to avoid unidirectional edges. An edge is formed only when the nodes are connected to each other after satisfying the 'max_neighbors' argument from both sides.

Added max_neighbors argument to find_neighbors method
Turned on return_sorted to cKDTree
Added max_neighbors as an argument to get_neighbors
Made the graph symmetric when max_neighbors is used
Added px2ang as an argument for the graph class. Right now, self.coordinates_ang is used for finding the neighbors but uses self. coordinates to form the nx_graph and to plot so that the plots are made in pixel units.
@codecov-commenter
Copy link

Codecov Report

Merging #66 (bc503f3) into master (9a528f2) will decrease coverage by 0.21%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   74.86%   74.64%   -0.22%     
==========================================
  Files          63       63              
  Lines        6474     6493      +19     
==========================================
  Hits         4847     4847              
- Misses       1627     1646      +19     
Flag Coverage Δ
unittests 74.64% <0.00%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
atomai/utils/graphx.py 9.68% <0.00%> (-0.78%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Added n_channels argument for the ResHedNet which now incorporates the images with multiple channels
Added n_channels (number of input channels) to all the nets in the fcnn.py file
Added n_channels argument to the method init_fcnn_model
@ziatdinovmax ziatdinovmax self-requested a review February 15, 2023 15:15
@ziatdinovmax
Copy link
Collaborator

@saimani5 Thank you for these updates! Can you please also add a few simple unit tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants