Skip to main content

A refactored McSAS for analysis of X-ray and Neutron scattering data.

Project description

McSAS3 (v1.0.6)

PyPI Package latest release Commits since latest release License Supported versions PyPI Wheel Weekly PyPI downloads Continuous Integration and Deployment Status Coverage report

McSAS3 (a refactored version of the original McSAS) fits scattering patterns to obtain size distributions without assumptions on the size distribution form. The refactored version has some neat features:

  • Multiprocessing is included, spread out over as many cores as number of repetitions!
  • Full state of the optimization is stored in an organized HDF5 state file.
  • Histogramming is separate from optimization and a result can be re-histogrammed as many times as desired.
  • SasModels allow a wide range of models to be used
  • If SasModels does not work (e.g. because of gcc compiler issues on Windows or Mac), an internal sphere model is supplied
  • Simulated data of the scattering of a special shape can also be used as a McSAS fitting model. Your models are infinite!
  • 2D fitting also works.

Example results plot

Important note:

Due to an issue with sasmodels when using OpenCL: if you see problems with the fit not matching up at all to the data, disable sasmodels opencl by setting the environment variable SAS_OPENCL=none in the terminal you are launching McSAS3 from.

Current state

  1. McSAS3 now has an internal sphere model as well, and so no longer absolutely requires SasModels for normal runs.
  2. There are launchers that can work from the command line, for optimization and (separately) histogramming. These use minimal configuration files for setting up the different parts of the code. Adjust these for your output files and optimization requirements, and then you can use these to automatically provide a McSAS3 analysis for every measurement.
  3. Currently, it reads three-column ascii / CSV files, or NeXus/HDF5 files. example read configurations are provided.
  4. Observability limits are not included yet
  5. A GUI is not available (yet).
  6. Some bugs remain. Feel free to add bugs to the issues. They will be fixed as time permits.

Installation

This package can be installed by ensuring that

  1. you have SasModels (pip install sasmodels) and
  2. the most recent 21.4+ version of attrs, as well as pandas. After that, you can do git clone https://github.com/BAMresearch/McSAS3.git in an appropriate location to install McSAS3.
  3. On Windows, if you want to use the sasmodels library, it is highly recommended to run pip install tinycc so that there's a compatible compiler available.

Install McSAS3 in your Python environment by running:

pip install mcsas3

You can also install the in-development version with::

pip install git+https://github.com/BAMresearch/McSAS3.git

Usage

To run the optimizer from the command line using the test settings and test data, you can run the following command mcsas3-runner. This stores the optimization result in a file named test.nxs. This can subsequently be histogrammed and plotted using the following commmand:

mcsas3-histogrammer -r test.nxs

This is, of course, a mere test case. The result should look like the Figure shown earlier.

To do the same for real measurements, you need to configure McSAS3 by supplying it with three configuration files (two for the optimization, one for the histogramming):

Data read configuration file

This file contains the parameters necessary to read a data file. The example file for reading a three-column ASCII file, for example, contains:

    --- # configuration used to read files into McSAS3. this is assumed to be a 1D file in csv format
    # Note that the units are assumed to be 1/(m sr) for I and 1/nm for Q
    nbins: 100
    dataRange:
      - 0.0 # minimum
      - .inf # maximum. Positive infinity starts with a dot. negative infinity is -.inf
    csvargs:
      sep: ";"
      header: null # null translates to a Python "None", used for files without a header
      names: # column names
        - "Q"
        - "I"
        - "ISigma"

Here, nbins is the number of binned datapoints to apply to the data clipped to within the dataRange Q limits. We normally rebin the data to reduce the number of datapoints used for the optimization procedure. Typically 100 datapoints per decade is more than sufficient. The uncertainties are propagated and means calculated from the datapoints within a bin.

The csvargs is the dictionary of options passed on to the Pandas.from_csv function. The thus loaded columns should at least contain columns named 'Q', 'I', and 'ISigma' (the uncertainty on I).

You can also directly load NeXus or HDF5 files, for example you can directly load the processed files that come out of the DAWN software package. The file read configuration for a NeXus or HDF5 file is slightly different. The reader can follow either the 'default' attributes to the data to use, or you can supply a dictionary of HDF5 paths to the datasets to fit (this is the more robust option). For example:

    --- # configuration used to read nexus files into McSAS3. this is assumed to be a 1D file in nexus
    # Note that the units are assumed to be 1/(m sr) for I and 1/nm for Q
    # if necessary, the paths to the datasets can be indicated.
    nbins: 100
    dataRange:
      - 0.0 # minimum
      - 1.0 # maximum for this dataset. Positive infinity starts with a dot. negative infinity is -.inf
    pathDict: # optional, if not provided will follow the "default" attributes in the nexus file
      Q: '/entry/result/Q'
      I: '/entry/result/I'
      ISigma: '/entry/result/ISigma'

Optimization parameters

The second required configuration file sets the optimization parameters for the Monte Carlo approach. The default settings (shown below) can be largely maintained. You might, however, want to adjust the convergence criterion 'convCrit' for datasets where the uncertainty estimate is not an accurate representation of the datapoint uncertainty. 'nrep' indicates the number of independent optimizations that are run. For tests, we recommend using a small number, from 2-10. For publication-quality averages, however, we usually increase this to 50 or 100 repetitions to improve the averages and the uncertainty estimates on the final distribution. 'nCores' defines the maximum number of threads to use, the repetitions are split over this number of threads.

    modelName: "mcsas_sphere"
    nContrib: 300
    modelDType: "default"
    fitParameterLimits:
      radius: 'auto' # automatic determination of radius limits based on the data limits. This is replaced in McHat by actual limits
      #   - 3.14
      #   - 314
    staticParameters:
      sld: 33.4 # units of 1e-6 A^-2
      sld_solvent: 0
    maxIter: 100000
    convCrit: 1
    nRep: 10
    nCores: 5

McSAS3 is set up so that if the maximum number of iterations 'maxIter' is reached before the convergence criterion is reached, the result is still stored in the McSAS output state file, and can still be histogrammed. This is done so you can use McSAS3 as a part of a data processing workflow, to give you a first result even if the McSAS settings or data has not been configured perfectly yet.

the fit parameter limits are best left to automatic, in this case the size range for the MC optimization is automatically set by the Q range of your data. This requires the data to be valid throughout its loaded data or preset data limits. Likewise a zero Q value is to be avoided for automatic size range determination.

As for models, the mcsas_sphere model is an internal sphere model that does not rely on a functioning SasModels. Other model names are discovered within the SasModel library.

Absolute intensity calculation has been lightly tested for data in input units of 1/nm for Q and 1/(m sr) for I. In this case, the SLD should be entered in units of $1e-6 1/A^2$, However, bugs in absolute volume determination may remain for a while.

Histogramming parameters

The histogramming configuration example looks like this:

    --- # Histogramming configuration:
      parameter: "radius"
      nBin: 50
      binScale: "log"
      presetRangeMin: 3.14
      presetRangeMax: 314
      binWeighting: "vol"
      autoRange: True
    --- # second histogram
      parameter: "radius"
      nBin: 50
      binScale: "linear"
      presetRangeMin: 10
      presetRangeMax: 100
      binWeighting: "vol"
      autoRange: False

Lastly, the histogramming ranges have to be configured. This can be done by adding as many entries as requiredd in the histogramming configuration yaml file. Parameter ranges can be set automatic (using the autoRange flag, thus ignoring the presetRangeMin and presetRangeMax values), or by setting fixed limits and leaving autoRange as False.

at the moment, the only bin weighting scheme implemented is the volume-weighted binning scheme, as it is the most reliable. Please leave an issue ticket if you need number-weighting to return.

For each histogramming range, histogram-independent population statistics are also calculated and provided, both in the PDF as well as in the McSAS output state file. These can be read automatically from there later on.

Documentation

https://BAMresearch.github.io/McSAS3

Development

Testing

See which tests are available (arguments after -- get passed to pytest which runs the tests):

tox -e py -- --co

Run a specific test only:

tox -e py -- -k <test_name from listing before>

Run all tests with:

tox -e py

Project template

Update the project configuration from the copier template:

copier update --trust --skip-answered

CHANGELOG

v1.0.6 (2025-07-25)

Bug fixes

  • Project Config: declare Python 3.11 compat. updates GitHub Action tests as well (eaeaae8)

Code style

  • main: reformat long lines (606fc2f)

v1.0.5 (2025-07-25)

Bug fixes

  • cli_tools: Adjustment to fix original issue (9018af6)

Unknown Scope

  • Fix(cli_tools): Cannot require extra unused parameters in histogrammer and optimizer (90dce04)

v1.0.4 (2025-07-24)

Bug fixes

  • GHA: don't run optimizer tests, takes too long (2632265)

  • mc_plot: figure out available monospace font once before using it for the result card (5bc2721)

  • main: show Error type name instead of the generic ERROR (bc8643e)

  • main: show usage with no cmdline args or on error, move example file paths to argument help (f05d00a)

  • cli_tools: dummy attributes added to be compatible with the same kwargs supplied at the end of main (a5e8989)

  • Project: dependencies to install when installing this package (6e3ecd6)

Code style

  • mc_plot: reformatting (6b637d7)

  • mc_plot: remove disables imports (851ae43)

  • imports: isort'd (de09bd4)

  • formatting: accepted by flake8 now, isort+black applied (ead1388)

Continuous integration

  • templates: remove old templates and postprocessing from obsolete cookiecutter cfg (d52e29b)

Documentation

  • readme: merging artifact removed (997da1b)

  • changelog: unknown section renamed, due to template update (fe818f0)

  • readme: notes on updating from project template (aa08975)

  • changelog: unknown section renamed, due to template update (59af50a)

  • readme: move description after batches, due to template update (75918f9)

  • authors: updated (af34b16)

Refactoring

  • mc_plot: imports isort'd (f1ad72a)

  • McModel: common dict for composed parameters (255c52c)

Testing

  • Notebook: update to current messages returned from McSAS3 (92de43c)

  • optimizer_integraltest: correct model parameter is scale now, instead of scaling (b060136)

  • Notebook: update and fixes (7488477)

  • setup: attempt to fix PytestRemovedIn9Warning (ad010bc)

Unknown Scope

  • doc(main): note on incompatible default path for installed package (37f7e1d)

  • overlooked unit (0f1fa7d)

  • adjustments break quickstartdemo speed.. reverting (88ff90f)

  • optimizing the auto-limit modification (988583e)

  • A little improvement in the automatic sizing, particularly useful for powders and samples with strong large-structure scattering contributions (986ee40)

  • Small fix (b8a7e9e)

  • fix (40f74ae)

  • Beta-testing a logRandom flag for log-transforming the random number generator (376a216)

  • Reduce debug output (f8e6c91)

  • Update README.rst (7ea1115)

  • cli tools now installed with pip install (dfcb380)

  • small fix (6e0c4ca)

  • Reorganize to enable command-line tools via pip install (473b250)

  • Add warnings in case MixtureModels are attempted (4a9d86e)

  • test IEmin (10de982)

  • Small change to prevent issues when loading Nones (b72d791)

  • all tests passing (a39395b)

  • small fixes in unit tests (fdef730)

  • Fix to McData for actually loading rawData from a prior run. (8b58966)

  • adjustments to mc_hdf (af28623)

  • Consistent file naming and an improved McHDF class (a8e2117)

  • Fixing FutureWarning (deef924)

  • addressing FutureWarning error (a84f907)

  • Update README.rst (49f262f)

  • Adding an option to adjust IEmin (b4d5d08)

v1.0.4-dev.3 (2023-06-28)

Unknown Scope

  • Addressing a FutureWarning (eb80404)

v1.0.4-dev.1 (2023-06-02)

Unknown Scope

  • added an .env file to simplify execution from CLI (32e0a83)

v1.0.3 (2023-04-20)

Bug fixes

  • McHDF: Add info output for a failing key/value pair (b301c36)

Documentation

  • readme: Project URLs updated (6fb4d42)

  • index: placeholder removed (a6ee36f)

  • general: config update (a164332)

Refactoring

v1.0.3-dev.12 (2023-03-24)

Documentation

  • readme: updated install instruction (bb88244)

v1.0.3-dev.9 (2023-03-23)

Documentation

  • Changelog: moving to markdown format consistently (083d67e)

v1.0.3-dev.3 (2023-03-22)

Documentation

v1.0.3-dev.2 (2023-03-21)

Code style

  • Documentation: whitespace removed (ebab058)

v1.0.3-dev.1 (2023-03-21)

Documentation

  • changelog: markdown changelog in pckg manifest as well (4d2b1c6)

v1.0.2 (2023-03-21)

Bug fixes

  • Documentation: case-sensitive GitHub Pages URL (2) (42352dc)

  • Documentation: case-sensitive GitHub Pages URL (c7ba4b6)

Documentation

  • changelog: fix rendering by using myst_parser for markdown (2203914)

  • General: Fix parameters documentation format (b680822)

v1.0.2-dev.3 (2023-03-21)

Code style

  • General: fix long lines and other complaints of black formatter (554db3a)

  • General: let isort keep empty lines before comment blocks (0f7faff)

  • General: black reformat (3463776)

  • General: whitespace fix and quoting normalization (b06e61b)

  • formatter: exchanged blue by black which is more common (0187120)

  • cli: applying isort and blue on toplevel cli scripts as well (190b6d9)

  • tests: blue reformatter (65e37c9)

  • tests: isort (760ba21)

  • General: reformatting code with blue (a black variant) (1f09cb0)

Refactoring

  • imports: sorted by isort (34dbe0e)

v1.0.2-dev.2 (2023-03-20)

Unknown Scope

  • minor edit, triggering rebuild (f3c0522)

v1.0.2-dev.1 (2023-03-20)

Bug fixes

  • Notebook: platform independent fixed with fontname (64fd823)

  • Notebook: set DPI of plot graphs to have same size on all platforms (fef5d66)

Documentation

  • *: set up autosummary (01eaf83)

  • readme: format fix (35af983)

  • syntax: fix syntax issues with sphinx (de2f5b7)

  • notebook: how to install missing packages (222197a)

Refactoring

  • Package: applied cookiecutter template renderer (WIP) (5271ee5)

  • Notebook: use all available cores by default, finish earlier (7d49345)

  • Notebook: mcsasPath is just the parent dir (2ddfa90)

  • Notebook: disabled sasviewPath, having sasmodels from pypi install should be sufficient (fe32dd5)

  • example: whitespace removed from notebook (6a315fc)

Testing

  • GitHubAction: exclude testOptimizer on GitHub, also in template (0cdec4e)

  • GitHubAction: Install latest sasmodels to newer than from pypi in tests/requirements.txt (03d1e8c)

  • GitHubAction: tox syntax fix (4bcf509)

  • GitHubAction: exclude testOptimizer on GitHub (546a79c)

  • Notebook: test it but exclude from coverage (9835076)

  • Notebook: fix windows paths format to unix ones in cell outputs by cell metadata (d6ce157)

  • Notebook: make sure ipykernel and ipython is installed (42a1934)

  • osb: converted doctest to code block, wasn't complete, did not run (0eaf993)

  • Notebook: removed ipykernel spec, seems to break test runner on GitHub (ce443b0)

  • Notebook: config for testing notebooks (16e9626)

  • Notebook: outputs added, for testing and illustration (5a86ebc)

  • Notebook: disable interactive prompt when testing (576dd68)

  • Notebook: removed defunct (2D) code, makes tests fail, impossible to exclude from tests (c449ff7)

Unknown Scope

  • 1.0.0 (b7734b1)

  • HDF: use PurePosixPath for / separators on Windows (a1e7ce7)

  • pytest config to suppress DeprecationWarnings (4bcc3ff)

  • updated requirements for unit support (977415f)

  • preparing for packaging (1cfd9f7)

  • GH Action needs to install the pint module (daa8d3e)

  • McHDF: store unit string along with the data, if provided (b8b3a6d)

  • McHDF: minor reformatting if condition (a724085)

  • McHDF.storeKV: removed redundant key parameter (e8dece9)

  • McHDF: using PurePath for hdf5 path, to work on Windows too (hopefully) (4d0ba84)

  • McHDF: using PurePosixPath for hdf5 path not being filesystem related (74360ed)

  • McHDF.storeKV: handle pandas.Timestamp (b5af524)

  • McHDF.storeKV: recursive traversal of hierachical maps in short (98c30e0)

  • cleaning up obsolete code remainings (74bdde6)

  • McHDF refactored to composition instead of inheritance (926fad7)

  • McHat: Print exception messages in subthreads (ee19ce4)

  • mcopt: minor reformatting comments (d915990)

  • mcopt: sorted loadKeys same as storeKeys for comparability (d354d38)

  • added Testing badge to readme (215f044)

  • omit testOptimizer in testing workflow (4a634f7)

  • disabled more tests in testing workflow (f4eb565)

  • run testing workflow with py310 only (39f9cd6)

  • Exclude computation extensive case in testing workflow (c9a57bb)

  • Run testing workflow on Python 3.9 and 3.10 (f58385c)

  • renamed test methods to run in certain order (75bfbfd)

  • Adjusting PYTHONPATH in testing workflow (b86aea1)

  • Adjusting PYTHONPATH in testing workflow (c346ebe)

  • Adjusting PYTHONPATH in testing workflow (1e9ca50)

  • Adjusting PYTHONPATH in testing workflow (dcfe6a1)

  • reenabled time-consuming apt update in testing workflow (26417ca)

  • forgot sasmodels repo path in testing workflow (254e811)

  • more info on dir structure in testing workflow (a09e373)

  • Python 3.10 in testing workflow (05fb6cd)

  • Python 3.10 in testing workflow (50be71e)

  • do not test sasmodels in testing workflow (1ab0dd1)

  • missing python module added to testing workflow (d60ad6e)

  • Looking for possibly existing .h5 file from previous tests (ed1cea1)

  • missing python module added to testing workflow (669f094)

  • figure out dir structure in testing workflow (3c651bf)

  • fix syntax err in testing workflow (8a8e871)

  • fix syntax err in testing workflow (6bc078d)

  • updated testing workflow (b154123)

  • GitHub Action workflow for testing with sasmodels (b97fab8)

  • cli_runner: number of threads command line options (8f1b292)

  • let git ignore macOS meta data (f386566)

  • py3 shabang to CLI scripts added (2d93049)

v1.0.0 (2023-01-04)

Unknown Scope

  • Finished typing. Modified tests 2 run concurrently (a47b993)

  • Added type hints and reran unit tests. (617c44b)

  • Update README.md (a35bffe)

  • formatting (5905566)

  • fixed for SasModel's intensity - abs scaling works (b70a2ed)

  • Update mcsas3_cli_runner.py (e4199c9)

  • Correct arguments description in mcsas3_cli_runner.py (79b3523)

  • new ignore. (d98e2d5)

  • Updates to fix loading from McSAS3 result (7eb8bea)

  • bugfixes to omitQRanges functionality (e72f66e)

  • better coding in mcAnalysis. (1181015)

  • improved robustness in message formatting (cef9ace)

  • Allowing omission of Q ranges in data read. (9cb263f)

  • basic code cleanup. (bafdfc6)

  • small fix (ef8da6c)

  • Changed input args for better multi-opt behaviour (d612b71)

  • typo. (3b56ccd)

  • trying to fix ProductKernel scaling (7694700)

  • added note about installing tinycc to get sasmodels working (63428e7)

  • allow extended sasmodels (e.g. sphere@hardsphere) (395f841)

  • adding resultIndex to the lot for storing (22ccf60)

  • debug (7575c49)

  • Updates to OSB initial guesser. (8d72499)

  • removed duplication of initial guess for least sq. (b5d7fab)

  • Allow McSAS to store its state in the dataFile (1a78994)

  • Update README.md (bb8e7cc)

  • Update README.md (a8683b4)

  • Update README.md (503c9ab)

  • Update README.md (6bdfdd7)

  • assuring initial guess for scaling is in bounds (f3a0deb)

  • bugfixes and cleanup of tests (146713f)

  • Cleanup (c3a74b5)

  • bugfix (ac313c7)

  • Added auto-range option for sphere radii (d854dfd)

  • bugfix (de6344f)

  • now also histograms and plots from the commandline (8e2f3db)

  • adding a cli- histogrammer.. untested (cb2ca91)

  • conversion factor, SLD input in 1e-6 1/A^2 for abs (a9b9501)

  • changes to set the SLDs and other static pars (52fbabe)

  • intermediate fixes (50e4cd9)

  • Setting up a command-line runner for McSAS (fc0bf5d)

  • adding a standard sphere model... (d0d267c)

  • added a test for development (1fada73)

  • Added GPLv3 license (467bbde)

  • Now works with Python 3.9 (8fd2e40)

  • Adapted to changes in HDF5 loading (0b24393)

  • updated mcmodel to deal with the string-type storage (d9443a4)

  • mcmodel: bytes->string conversion fix when loading data (78651a7)

  • examples.minimal: do not ask for the mcsas3 path, error-prone (256719e)

  • examples.minimal: fixed&tested for macOS as well, detecting OS (797c4a6)

  • examples.minimal: usability fix (d5a56b9)

  • examples.minimal: added cells for using prev. installed sasview on Windows (799e1a6)

  • updated structure drawing, made in draw.io (a0f2cd1)

  • Fixed scaling issue in simulated model version (c3988a6)

  • Added an old drawing of the interdependency between the modules (a2c29a2)

  • New example notebooks (69b1ce0)

  • fixed bug in test (e0dc95b)

  • Adding test data (64162e8)

  • Absolute units implemented. (356d4a4)

  • Resetting state and tracking optimization progress (67dbd0a)

  • Resetting state in McData (72b657d)

  • Ensure resetting state (e1f948e)

  • Adding a test to debug the histogramming population statistics.. (21565cc)

  • Ensuring reset between optimizations (4015f5a)

  • test commit (313ef14)

  • updating in McPlot, nothing functional yet. (2cb8a46)

  • empty mcPlot class to hold plotter functions . (2bc7275)

  • updated sim model to allow for multiprocessing to work (i.e taken out dictionary from staticParameters, replacing by single arrays) (941964c)

  • Updates to string formatting (3c56bee)

  • Fixes for the sim-based fitting (259eb5b)

  • Moved calcModelIV to mcmodel. Now everything I should have to change is in mcmodel.. (695dab5)

  • More tests and a 2D class. (ccd22d9)

  • mcAnalysis can create a small text block stating the histogram modes.. (3cc59e0)

  • fixes and implemented a reconstruct2D function in the McData2D class to turn the list of model intensities back into 2D form matching the clipped data. (a6c08eb)

  • 2D data class largely written (still need additions for returning fitted data to shape of original), starting to fix histogram storage. (fe73d9c)

  • universal nexus data loader for 1D and 2D (3f0faa5)

  • Updated HDF5 segment to allow adaptation of the entry point into the NeXus structure. (e0c1fca)

  • minor updates (b20ef4a)

  • added test cases for nexus (bd68ddc)

  • Added test case for loading from NXsas files. improved state-restore unit test for csv data loader. (094a7fa)

  • McData can now load 1D data ffrom NeXus / DAWN processing output files. (cba7dec)

  • Updated directory structure, and updates to McData to restore state for file-loaded objects. Tests still needed for pandas-loaded data - state-restore. (55f57f6)

  • resolved an issue with HDF5 writing, occurring when rehistogramming. (592181f)

  • Added tests and updated minimal notebook example... (29796da)

  • new notebook, and an integral test for a sphere example (6f3dc5c)

  • Added test cases (9316155)

  • Updates and reformatting, also added unit tests for McData. McData can clip and rebin input data from either a dataframe, pdh file or csv file. NeXus support will come. (bccfb51)

  • Initial setup of a McData object. This can do binning and clipping if necessary. (acef444)

  • Minor change to make it run in a current version of Python (3.7). (8ebc112)

  • fixed access modes in h5py.File() calls (ac7f30a)

  • minimal NB: fixed syntax for DataFrame constructor (760b58d)

  • McHat: show more runtime info in analysis summary output line (5ca8c39)

  • updated minimal McSAS3 example with gaussian coil BSA data (dcda0ee)

  • McCore: divide volumes by nContribs too, otherwise totalValue equals nContrib (bcb884e)

  • McModel: allow seed to be None, required for multiple reps; handle None value with HDF5 (5cf5156)

  • McHDF: fixed unicode handling for other parameter names than radius (d4f6506)

  • McHat: multiprocessing works (17c34ee)

  • McCore: disabled consistence test for loaded results from HDF5 (d73b07b)

  • McHat.runOnce() for a single repetition (23f0c5e)

  • McHDF: fixed warnings about deprecated h5py API (33a9163)

  • minimal NB: calc multiple repetitions and plot distrib. histograms (bd16bce)

  • McModel: also store/load modelDType to grab the correct model dll later on (b75ac2a)

  • minor whitespace fixes (3a72f3a)

  • McModel.fillParameterSet() renamed to resetParameterSet reflects the use case better (fc85125)

  • McAnalysis.debugPlot(): forward custom keyword args to plotting (af753ac)

  • minor whitespace fixes (7d44c3e)

  • osb: using TNC minimizer by default (3f3955a)

  • McModelHistogrammer: missing assertion on histRange.nBin added (3ce9d96)

  • mcmodel: using fast mode (single precision) for models from Sasview by default (a6de348)

  • let git ignore results.h5 from minimal jupyter notebook (09bd3b1)

  • minimal.ipynb: minor formatting (e165046)

  • removed debug output (f3c3c23)

  • updated minimal jupyter notebook example (7358888)

  • Fixes. Now checked against the old McSAS output. (c5ebf01)

  • Updates to: 1) store the result in a more NeXus-compatible location, and 2) work with the updated sasmodels library method for volume calculation. (77f7191)

  • Put the core loading code in its own method. (5c3cc0d)

  • McAnalysis now draws solely from a McCore instance, allowing further analysis (observability, etc.) to take place easily. (6de7642)

  • Model intensity also averaged now, finalizing the basic functionality. For further averaging and calculation of observability limits, however, a McCore instance must be recreated. This will probably require a consistent data model to be used, so we need to work on getting McSAS3 to work with the SasData class of SasView first. Another item on the agenda is to get McHat running, so we can exploit multiprocessing... That shouldn't be too hard. (cafe7c2)

  • Optimization parameters are now also averaged... (dd26be8)

  • minor bugfix (2dd455c)

  • McAnalysis now also averages histograms and can do a debugPlot of the histograms. Scaling, observability, and cumulative distribution function not yet implemented (7b2464d)

  • McAnalysis now runs the histogrammer for every repetition and histogram range, and averages the modes from all the repetitions for each range. (a815735)

  • McModelHistogrammer now can store histogramming results of individual repetitions. (41ec032)

  • WIP: overall analysis of the results from multiple repetitions. (f87dbf4)

  • adding separate histogramming functions, need to be provided a model instance and histogramming ranges. (533a7f6)

  • nRep has moved to McHat. (4b28021)

  • minimal NB ex: error cases with SASview models discussed (e9dcb4c)

  • let git ignore any sasmodels folder in here (58b1840)

  • minimal jupyter NB example: notes for Windows added (302dbf9)

  • updated gitignore (9aac479)

  • update minimal jupyter NB example (8f1c053)

  • allow sasview model dtype to be set from outside (a5aad7c)

  • Bugfix and start on new parent function to do multiple runs. (3b4b334)

  • Cleanup and modifying parameter names to be more descriptive. Loading now working. (af5b243)

  • Loading works for McModel... onwards to McOpt (2b8dbed)

  • sasmodels integrated (2068fc5)

  • HDF storage works, next step is loading the configuration and model parameters from an HDF5 file. (8054a11)

  • storing of datasets and options implemented and tested. (0adcb45)

  • Initial functions set up for supporting storing and loading of settings and repetitions. (fed7b59)

  • Minor fixes. (dcbc1cd)

  • added minimal jupyter script for demo (7cb85cb)

  • static parameters weren't always applied. Ensuring that this is the case now. (381c7fe)

  • updated ignore (1ce88aa)

  • Updated gitignore (9c3e281)

  • Offload MC functions into their own files (584bee8)

  • added gitignore (a14e52e)

  • Initial commit, mind the mess! (7df539e)

  • README.md edited online with Bitbucket (3029cda)

  • Initial commit (db2937c)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcsas3-1.0.6.tar.gz (57.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcsas3-1.0.6-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file mcsas3-1.0.6.tar.gz.

File metadata

  • Download URL: mcsas3-1.0.6.tar.gz
  • Upload date:
  • Size: 57.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcsas3-1.0.6.tar.gz
Algorithm Hash digest
SHA256 395c9ec113b25861f77bc0802b1eadeb49d13c503aaf717cf32a10c30e090f23
MD5 526b54e30e2f5488d3f89fb39f147710
BLAKE2b-256 34da3165d84c0e14174861db2a44b9ed2e83cb7d5a620e66f0543c4da74bd8fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcsas3-1.0.6.tar.gz:

Publisher: ci-cd.yml on BAMresearch/McSAS3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcsas3-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: mcsas3-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 78.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcsas3-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a5c5c3271c90e3a761032a466b00d59bb93e4a0a71bc074f881ebbedf928db63
MD5 04ca2ccf9b4d11a5831fc7684d93c891
BLAKE2b-256 ff12caa1b7fde3100729b73aeedecbb63bb96564b7deaa1a4bb9c95cb83fff5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcsas3-1.0.6-py3-none-any.whl:

Publisher: ci-cd.yml on BAMresearch/McSAS3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page