{"id":4915,"date":"2026-09-14T09:04:10","date_gmt":"2026-09-14T08:04:10","guid":{"rendered":"https:\/\/lookingatnothing.com\/?p=4915"},"modified":"2026-09-14T09:04:10","modified_gmt":"2026-09-14T08:04:10","slug":"15x-faster-mcsas3-and-a-porod-slope-background-addition","status":"publish","type":"post","link":"https:\/\/lookingatnothing.com\/index.php\/archives\/4915","title":{"rendered":"15x faster McSAS3, and a Porod-slope background addition"},"content":{"rendered":"\n<p>I&#8217;ve been fixing some minor usability bugs and requests in McSAS3+GUI over the last weeks, and that has led to some dramatic improvements. <\/p>\n\n\n\n<p>Firstly, due to a change in the internal optimiser, the optimisation itself is now up to 15x faster for simple models, making it easier to process large batches of (operando\/in-situ) data. This isn&#8217;t easy to visualise for show&amp;tell here, but would be noticeable to any user familiar with the old speed. This speed increase makes it more feasible to include McSAS3 in a live data pipeline. <\/p>\n\n\n\n<p>Secondly, you can now add a Porod-slope background in addition to the standard flat background to the McSAS3 fit, making it easier to use for practical samples containing large scatterers (e.g. powders). Backgrounds are now added to the data visualisation allowing for easier assessment of impact. The Porod background is optional and can be set to &#8220;true&#8221; or &#8220;false&#8221; (default). The flat background is now also optional, and can be set to &#8220;true&#8221; (default), &#8220;positive&#8221;, or &#8220;false&#8221;. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"254\" src=\"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23-1024x254.png\" alt=\"\" class=\"wp-image-4916\" srcset=\"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23-1024x254.png 1024w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23-300x74.png 300w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23-768x191.png 768w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23-1536x381.png 1536w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-13.53.23-2048x509.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 1: the new Porod background demonstrated on a measurement of dense particles. Thanks to Glen Smales for the example data and sphere@hardsphere fit settings. <\/figcaption><\/figure>\n\n\n\n<p>At the same time, a couple of usability improvements have been made that should not be visible except that it makes the UI and backend behaviour a bit smoother. One of the biggest changes is that re-histogramming now also replaces the original information in the file (as it always should have), one of the smallest changes is that loading a configuration file will now also automatically replace the relevant configuration setting in the batch optimization and -histogramming tabs. <\/p>\n\n\n\n<p>McSAS3GUI can be downloaded from here: <a href=\"https:\/\/github.com\/BAMresearch\/McSAS3GUI\">https:\/\/github.com\/BAMresearch\/McSAS3GUI<\/a> and can be run either as an experimental binary, or from a python 3.12+ environment. By far the easiest way, however, to install and immediately launch it is using <a href=\"http:\/\/astral.sh\/uv\">Astral&#8217;s &#8220;uv&#8221;<\/a>:<\/p>\n\n\n\n<p><code><br>uvx --python 3.14 --from mcsas3gui m3gui<br><\/code><\/p>\n\n\n\n<p>The first run may take a few minutes.\u00a0<code>uvx<\/code>\u00a0creates an isolated Python environment, installs McSAS3GUI and McSAS3, and then starts the\u00a0<code>m3gui<\/code>\u00a0application. You do not need to create or activate a virtual environment.<\/p>\n\n\n\n<p>Have fun with it, and let me know if it has been useful or not. Bug reports and feature requests can be made on the GitHub page. <\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>I&#8217;ve been fixing some minor usability bugs and requests in McSAS3+GUI over the last weeks, and that has led to some dramatic improvements. Firstly, due <a class=\"mh-excerpt-more\" href=\"https:\/\/lookingatnothing.com\/index.php\/archives\/4915\" title=\"15x faster McSAS3, and a Porod-slope background addition\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":2,"featured_media":4918,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-4915","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-13-at-14.01.54.png","jetpack_shortlink":"https:\/\/wp.me\/p1gZ2v-1hh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/4915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/comments?post=4915"}],"version-history":[{"count":3,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/4915\/revisions"}],"predecessor-version":[{"id":4920,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/4915\/revisions\/4920"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/media\/4918"}],"wp:attachment":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/media?parent=4915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/categories?post=4915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/tags?post=4915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}