Free Code! McSAS: A Monte-Carlo way for retrieving particle size distributions.

Good news for those of you on the hunt for a way to get polydispersity (size distribution) information from your scattering patterns. Two pieces of good news, to be precise!

A combined dataset (left) fitted using a Monte-Carlo method for size distribution retrieval. The volume-weighted size distribution is shown on the right on arbitrary scale.

A combined dataset (left) fitted using the Monte-Carlo method for size distribution retrieval. The volume-weighted size distribution is shown on the right on arbitrary scale.

Firstly, the paper that describes my implementation of the method that does exactly this has just been accepted earlier this month for publication in J. Appl. Cryst, though it will probably not make it into the February issue. With a bit of luck, I will be able to make it open access, though! I have talked about the method before (e.g. here) so I will not spend more words on it.

The second news is that the Python code with the fitting procedure is now available in an online repository here, thanks to Pawel Kwasniew at ESRF for his efforts in setting up the repository. The code comes complete with a quickstart guide with several pictures and some test data. If you are reasonably familiar with Python, why not grab a copy and try the method on your data? Reports from early testers have been positive, and everyone is encouraged to comment or send me an e-mail so it can be improved. License-wise, the code is released under a creative-commons-attribution-sharealike license.

Lastly, if you want to contribute to the code you are more than welcome to. Currently, the code is being recoded in object-oriented form to improve flexibility, with the first release of the OO version expected later this month. Afterwards, a smearing function will be implemented for directly fitting slit-smeared data, and more shape functions should be included. As it is intended to be integrated in existing SAS analysis GUI’s (of which there are quite a few), there is no graphical user interface, and as such the focus is on getting the base functionality implemented right.

As usual, drop me a line or leave a comment!

Share

A new year, seven publications to write and a short movie

Dear scatterers,

First of all, allow me to wish you a very happy 2013, wishing you much comfort, many good meetings and world peace.

With that out of the way, this year might be different from others on this weblog, as I have to spend oodles of time on my “favourite” activity: trying to publish. Since there were hardly any publications last year, this year must be better (or I will “perish”, as the saying goes). There are seven publications in the pipeline as indicated by the title, though only three with me as first author. So please check the website’s “publications” section by the end of this year, and you will see how far I’ve managed to come with that by then.

One of the publications that hopefully will come out first is on the 1D Monte-Carlo method, which will allow for the retrieval of form-free size distributions after assuming an elementary shape (spheres are the prime choice, but it also works with isotropic cylinders). On top of that, it will give you uncertainties on the size distributions the quality and reliability of which are directly related to the uncertainties on your measured intensities. Anyway, once that is published, rest assured that I will announce it here (it has been one hurdle for me, so I will be very happy to see it out there).

The Python code used for this is freely available, currently the final touches are being put on a good, clean variant which should be available very soon. For the restless, please drop me a line and the code can be sent your way.

Other publications will be about (amongst others) the 2D Monte-Carlo method for anisotropic scattering patterns, as presented at the SAS2012 conference, and a paper applying the 1D Monte-Carlo method to precipitate growth in magnesium alloys (the ArXiv link to an early draft was posted a few weeks ago here: arXiv:1210.5366). So all in all, this will be a busy year when it comes to paperwork.

Anyway, I do not want to remain in the shadows for the entire year, so I decided to upload some more videos this year. I started the series off with a short explanation on the “classical” way of fitting scattering patterns, in a short demonstration that I used at SAS2012. This recording (shown below, or on youtube here) was simple and quick, and your host was suffering from an allergy attack, so please forgive the movie its faults. I hope it is fun nonetheless, and with this, I will sign off on this blog post. Another post will be ready in a few weeks!

Share

Monte-Carlo fitting of isotropic scattering and observability on arXiv

We have now entered the final two weeks before the Scattering-Bonanza that is SAS2012… Are you feeling the pressure yet? With many good talks lined up for that conference, and many good people attending, I am honestly quite excited! I too will be giving my small contribution in the form of two talks, one at the Bonse-Hart satellite meeting, and another at the SAS2012 conference itself (Tuesday, 16:00 at the D4 session).

While there are many good things being prepared (publications, presentation preparations and the likes), also for this website, none of them are quite ready yet. To give you a taste of the upcoming publications, there are two pre-publications of mine available on arXiv.

The first considers the 1D Monte-Carlo model I have been talking about every now and then. Development on the analysis method has been ongoing for quite some time, and it is now in a very useable form. While not all of the latest modifications are in this pre-submission version of the manuscript, some details can be gleaned. It is available here: arXiv:1210.5304

The second paper applies this Monte-Carlo model to study the ageing-induced growth of rod-like precipitates in MgZn alloys, comparing the resulting radii distributions to the distributions found using TEM. This collaborative work between dr. Julian Rosalie (TEM expert) and me shows the symbiotic relation between the two technique very well. In other words, TEM provides morphological details so that the Monte-Carlo method can be applied to extract a size distribution. A very young version of that manuscript can be found here: arXiv:1210.5366

I hope you enjoy some of the results in there, and please talk to me at the SAS2012 conference!

Share

Movie: Monte-carlo fitting of anisotropic scattering

I have worked on monte-carlo procedures for a while now. Initially (while working for Aarhus University), I managed to make these work to extract the particle size distribution from isotropic scattering patterns, and it works fine and quick.

Now though, I managed to get this trial-and-error procedure to work for whole 2D pattens as well! The added dimension adds some coolness to the whole thing, and carries extra information to boot. I will be showing the details and results in my upcoming talks (hopefully at SAS2012 as well), but for now, please enjoy the short movie where the new method is applied to a measurement of PPTA fibre:

Share

New video online- presenting observability

Dear readers,

First of all, a merry end-of-year thingie (insert name here) to all of you.

Last week, I presented a short 15-minute talk at the MRS-J conference in Yokohama. While it was a nice opportunity to present and meet people, it is a relatively small conference. With that in mind, I decided to re-record the presentation and post in online so you can take what you want from it. I was slightly ill when re-recording so the edit is a bit choppy (after removing the sneezes).

It is available on Youtube here (and embedded below). Please leave comments and/or thumbs up if you like, and follow me on twitter @drheaddamage if you want to hear more ramblings from this side.

Lastly, the next video definitely should be a custom one explaining the monte-carlo method we’ve developed referred to in the video.

Share

More statistics and change of job

Hello dear readers,

As a followup on my previous story, a colleague of mine sent me this paper that helps explain the standard deviation, standard error and confidence intervals. A useful, and funny read: Click here.

The second noteworthy item is that I have, as of November 1st, started working at the National Institute for Materials Science (NIMS) as a (limited time) independent researcher. From now on, I will be working on a variety of stuff, which revolves around developing anisotropic SAS analysis methodologies. Naturally, I will post items of interest on this site as always, so keep checking in!. Also, don’t hesitate to leave a comment!

B.

Share

Everybody hates statistics…

Everybody hates statistics [1]…

 

… but it can be of major importance in our small angle world. While very few papers on small-angle scattering discuss statistics, they can tell you whether your observations are real or just imaginary. In addition, statistics will let you know whether you have been able to describe your scattering pattern with your model or not. All in all, nice to have.

 

I will briefly discuss two statistical concepts which could be of great use, as they have been for me. While I never really could understand all the concepts during statistics lectures at university (a situation which may sound familiar), I can try to explain some simple concepts. By the by, if you (dear reader) are a statistician, I would be happy to get in touch with you. The first concept is the most straightforward, and involves the uncertainties on fitting parameters. Secondly I will discuss statistics on collected intensity and how to retrieve them for a variety of detectors.

Read More

Share