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!

1 Trackback / Pingback

  1. Papers! One of mine and one on detector data read-in | Looking At Nothing - A SA(X)S Weblog

Leave a Reply

Your email address will not be published.


*


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.