MechMicroMan / DefDAP

A python library for correlating EBSD and HRDIC data
Apache License 2.0
33 stars 14 forks source link

What is the number of slip bands within a grain #4

Closed AllanHarte closed 2 years ago

AllanHarte commented 7 years ago

The cubic slip trace predictions work well in my Ni superalloys. I'd like a measure of the number of slip traces within a grain. Any ideas about how to implement this? I would settle for the total length of slip traces as opposed to their number.

Currently we use the radon transform to get the grain band angle distribution between 0-180 degrees and then we use peakutils to automate the identification of the peaks to spit out the angles. We could get the peakutils function to give us the 'intensity' of those peaks, which is proportional to the amount of slip on that slip system, but I don't know if this value is relevant when comparing the amount of slip occurring between different grains. Ideally I would like a length. Ideas welcome!

mikesmic commented 7 years ago

I think an idea for counting slip traces that shouldn't be too hard to implement would be:

untitled

JQFonseca commented 7 years ago

How about using the Hough transform? I should be marking exams…

João

On 7 Jun 2017, at 13:59, Michael Atkinson notifications@github.com wrote:

I think an idea for counting slip traces that shouldn't be too hard to implement would be:

• Find the slip band angle with the radon transform and peak utils as normal • Take a line profile of strain perpendicular to this direction, see attached image. Knowing where to place the line automatically could be tricky though, maybe just through the centre of the grain would do. • Count the peaks in this profile. The peaks should be easier for peak utils to spot in your high resolution maps too.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

AllanHarte commented 7 years ago

Good idea with the line scan, I could easily implement this. It might be tricky for oddly-shaped grains as we wouldn't be able to get a single linescan to all corners.. and there could be issues in grains with multiple slip systems.

I will look into the Hough transform Joao, but my limited understanding of it is that it results in something very similar to the radon transform

mikesmic commented 7 years ago

I'm just going to try the Hough transform now on a very simplified image. I'm not sure it will pick out similar repeated features but I want to see

mikesmic commented 7 years ago

Hough transform is definitely a possibility. I just used this: http://scikit-image.org/docs/dev/auto_examples/edges/plot_line_hough_transform.html

figure_1

AllanHarte commented 7 years ago

Ok looks promising! Thanks for looking into it. In applying this on a grain basis we would have to make sure that the edge or boundary of the grain is not included in the calculation - I assume that the radon transform function we have does this already

mikesmic commented 7 years ago

No the current radon function uses the whole grain but applying binary erosion to the outline of the grain should remove a pixel from the boundary. Then use that as a mask for the grain image

JQFonseca commented 7 years ago

It might be good to do some kind of filtering to threshold slip bands away from the background and other features. I have never looked at the strain distributions within a single grain carefully but it might be possible to use them find the best threshold that preserves the bands, with maybe the help of an fft high frequency pass filter.

On 7 Jun 2017, at 15:02, Michael Atkinson notifications@github.com wrote:

No the current radon function uses the whole grain but applying binary erosion to the outline of the grain should remove a pixel from the boundary. Then use that as a mask for the grain image

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AllanHarte commented 7 years ago

I have got this working to some extent; I can detect some bands but not them all. As @JQFonseca suggested, filtering is required but I found that the FFT filter is selective in sharpness and what I need is filtering based on strain value - this highlights the bands better.

The images below show with and without a minimum limit on the strain value in the input image. The example is made by slicing the data so as to look in the grain centre - I have not been able to degrade the boundaries as @mikesmic suggested. Michael, can you point me towards where the radon transform does this so that I might imitate it? I couldn't find it in the hrdic grain class.

You'll notice that I'm still not getting all of the bands, not sure why at the moment

Without filtering

With filtering

mikesmic commented 7 years ago

Looks good. Could you create a new branch and I'll try and add to what you have done?

JQFonseca commented 7 years ago

Nice. Can you upload to GitHub and point us to the repository?

On 7 Jun 2017, at 17:52, Michael Atkinson notifications@github.com wrote:

Looks good. Could you create a new branch and I'll try and add to what you have done?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

AllanHarte commented 7 years ago

I have created a branch from the master and then committed a change to hrdic.py. I have not used GitHub like this before so I'd appreciate feedback as to whether that's the right thing to do! Thanks

JQFonseca commented 7 years ago

Thanks, Allan. This should work. Can you add the notebook with your example to the repository as well?

João

On Wed, 2017-06-07 at 10:58 -0700, AllanHarte wrote:

I have created a branch from the master and then committed a change to hrdic.py. I have not used GitHub like this before so I'd appreciate feedback as to whether that's the right thing to do! Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

AllanHarte commented 7 years ago

I have now added a notebook for the Hough transform work in my repository. There is example ebsd data in example_data_AH but the hrdic data was too large for the repository (85 MB and the limit is 25MB). I have added a dropbox link to the hrdic data in the notebook. It will need to be downloaded and moved into the example_data_AH directory.

I tried using Michael's example_data but the Hough transform didn't seem to work as well - the slip traces in gamma prime strengthened alloys are much sharper.