Title: Determining Number of Grains and Grain Boundary Length/Area · kip-hart/MicroStructPy · Discussion #79 · GitHub
Open Graph Title: Determining Number of Grains and Grain Boundary Length/Area · kip-hart/MicroStructPy · Discussion #79
X Title: Determining Number of Grains and Grain Boundary Length/Area · kip-hart/MicroStructPy · Discussion #79
Description: Determining Number of Grains and Grain Boundary Length/Area
Open Graph Description: When generating large enough domains I see that some seeds are removed with the following error: "RuntimeWarning: Seeds were removed from the seed list during positioning. Their data has been writt...
X Description: When generating large enough domains I see that some seeds are removed with the following error: "RuntimeWarning: Seeds were removed from the seed list during positioning. Their data has been ...
Opengraph URL: https://github.com/kip-hart/MicroStructPy/discussions/79
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Determining Number of Grains and Grain Boundary Length/Area","text":"\u003cp dir=\"auto\"\u003eWhen generating large enough domains I see that some seeds are removed with the following error: \"RuntimeWarning: Seeds were removed from the seed list during positioning. Their data has been written to seed_position_reject.log and their indices were [891, 895, 900, 970, 953, 955, 958, 963, 967, 968, 929, 938, 930, 931, 933, 935, 937, 941, 942, 944, 945, 946, 947].\" Is this because there is a minimum size where the grains are deleted due to overlap of seeds? It would then seem that len(seeds) is not representative of the total number of grains in the final image. When I tried to access the data from seed_position_reject it stated NameError: name 'seed_position_reject' is not defined. Is there a more straightforward way to access this information?\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eAdditionally, I eventually want to determine the total length of the grain boundaries or perhaps just the area of the grain boundaries . Any thoughts on the best approach to this?\u003c/p\u003e","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eHi \u003ca class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/dpd5121/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/dpd5121\"\u003e@dpd5121\u003c/a\u003e That warning comes up when not every seed can be positioned in a domain. There's a heuristic that determines how many seeds to sample, then those seeds are positioned in the domain from largest to smallest volume. If the positioning algorithm tries over 10k times to place a seed but fails, it moves on to the next seed. These rejected seeds get added to a file called \u003ccode class=\"notranslate\"\u003eseed_position_reject.log\u003c/code\u003e in the working directory.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor the length (2D) and area (3D) of grain boundaries, I would start with the facet list. The facets associated with the domain boundaries could be filtered out (neighbor = -1) as well as the facets internal to grains (same seed number on both sides). The 2D length of each facet can be found from differencing the positions of the endpoints and taking the norm. For 3D it gets a bit more interesting. The facets are ordered lists of points, so from the first three points in the facet you can define a plane. The set of points can then be mapped to 2D points in that plane (first point is the origin, second point is on the x-axis for example). From there, there's an algorithm to determine the area enclosed by a polygon in 2D based on the (x,y) coordinates of the vertices.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe last step would be to check if a grain boundary has multiple facets. All the lengths/areas of facets between grain i and grain j should be summed up to get the grain boundary length/area. From there you can sum over all grain boundaries, take statistics on min/mean/max grain boundary, etc.\u003c/p\u003e","upvoteCount":1,"url":"https://github.com/kip-hart/MicroStructPy/discussions/79#discussioncomment-4195423"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:e3765396-b76a-53ea-b69e-4097bc102e5d |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | C65C:C3FF9:D00E27:12E5F67:6A4B9EDA |
| html-safe-nonce | 631c9d7ae33c364f0f39d26e4fe94030a7a84f8810afcc4cae03b5f78a0dcb53 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjVDOkMzRkY5OkQwMEUyNzoxMkU1RjY3OjZBNEI5RURBIiwidmlzaXRvcl9pZCI6Ijg2ODM0NDk3NDg4MTMwMDE4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 493453652c110b5905caca229352cf45fdeb2fd14c0822cff59b27f95b2fedeb |
| hovercard-subject-tag | discussion:4556263 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/kip-hart/MicroStructPy/79/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/9aba051b2be7ed16524f103652e72f50c7a5b253349a9c4a91c46dd8b7184834/kip-hart/MicroStructPy/discussions/79 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9aba051b2be7ed16524f103652e72f50c7a5b253349a9c4a91c46dd8b7184834/kip-hart/MicroStructPy/discussions/79 |
| og:image:alt | When generating large enough domains I see that some seeds are removed with the following error: "RuntimeWarning: Seeds were removed from the seed list during positioning. Their data has been writt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a7e470aeb8fedd833ae331b0a162f6c5a72c09b899dd94a7cd531e5e0e3a93d5 |
| turbo-cache-control | no-preview |
| go-import | github.com/kip-hart/MicroStructPy git https://github.com/kip-hart/MicroStructPy.git |
| octolytics-dimension-user_id | 41959581 |
| octolytics-dimension-user_login | kip-hart |
| octolytics-dimension-repository_id | 206468500 |
| octolytics-dimension-repository_nwo | kip-hart/MicroStructPy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 206468500 |
| octolytics-dimension-repository_network_root_nwo | kip-hart/MicroStructPy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ad79fae8b165db9a62b2142d969fa7b21eedcf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width