SasView Code Camp-IV

(Last edited: 05-Jan-2016)

Introduction

The fourth SasView Code Camp was held from March 15th to 22nd 2016, hosted by the Reactor Institute Delft at TU Delft in The Netherlands.

Local arrangements were made by Wim Bouwman with details on the planning page.

Initial Goals

The primary goals of this code camp were those from the roadmap, namely:

  • Move models to new independent sasmodels package
  • Review all model documentation for accuracy
  • Begin refactoring tutorial documentation to "getting started" tutorial
  • Redesign model framework to use the new sasmodels package
  • Enable OpenCl GPU utilization for models and work on simplifying access for all users
  • Begin work on integrating SESANS into the SasView GUI
  • Usual bug fixes and other minor improvements as time and interest permit

These items built on the work done at the previous code camp and are focussed on the goal of delivering v4.0 of SasView, as per the roadmap.

The major task for this release will be the separation of the model calculation code from the GUI. This work is currently underway with the model package in a separate repository (sasmodels) and models being gradually migrated to the new framework. This project will significantly clean up the code base and start disentangling the computational code from the GUI code which has crept in over the years. Importantly, it will also hugely simplify the process of implementing new models, provide the ability for users to drop in either a C or python SasView discoverable model and provide access to the built-in polydispersity functions. This has been identified as the biggest stumbling block for further uptake by the community: it is both a frustration to current users and is preventing many power users from embracing SasView more fully.

Additionally, it will enable transparent access to multiprocessing and GPU support for many users. On most macs this could provide native speedups of 10 to 100 for complex fitting, while windows machines should see a modest speedups but will require the installation of OpenCl by most users to take full advantage of the GPU speedup. This process will be simplified as much as possible for the user. The sasmodels package will incorporate calculation of SESANS curves from SANS models as well as native SESANS models. This will enable the use of sasmodels with BUMPS in scripts to fit SESANS data and prepare for the integration of SESANS fitting into the SasView GUI. Finally, subject to the availability of sufficient resources, all the model documentation will be reviewed and the tutorial documentation will begin to be redone.

Participants

Paul Butler (NIST) Steve King (ISIS) Andrew Jackson (ESS)
Jeff Krzywon (NIST) Richard Heenan (ISIS) Torben Nielsen (ESS)
Paul Kienzle (NIST) Wim Bouwman (DUT) Piotr Rozyczko (ESS)
Adam Washington (Sheffield) Jurrian Bakker (DUT) Wojciech Potrzebowski (ESS)
Miguel Gonzales (ILL) Steven Parnell (DUT)

Progress and Outcomes

This code camp brought together 14 developers working for 7 days on the SasView and sasmodels code. Amongst the group were two new developers from ESS, Piotr Rozyczko and Wojciech Potrzebowski, and two new SESANS developers, Steven Parnell and Adam Washington.

The camp began with updates from all the partner labs. ESS presented the planned work that will be done under the SINE2020 EU funded project. The goals for SINE2020 are aligned with the SasView roadmap and focus on the separation of UI code from computational code, development of new UIs (CLI and GUI), and on optimisation of algorithms to enable real-time analysis during experiments. This funded effort will allow some tasks that had been foreseen for further along in the roadmap (new GUI work) to be brought forward. The advent of this new SasView targeted funding was welcomed as an exciting development in the evolution of the project.

The focus of this code camp was getting the code base ready for a v4.0 release where the primary focus is on delivering a simpler way for users to add their own scattering models and accelerating the calculations so that 2D fitting becomes more readily usable. Development of the SESANS code to a point where it is available for users of the instruments in Delft and ISIS was another key goal.

To achieve this, the development team was broken into working groups focusing on:

  • Implementation of SESANS fitting
  • Development of the sasmodels package
  • Integration of sasmodels and build/release systems
  • Documentation

As the week progressed, individual developers lent their time to other groups as needs arose.

Prior to the code camp, the developers had implemented the majority of models from SasView into the new sasmodels package. During the camp, time was spent checking the documentation and correctness of these models, including making sure they matched the previous output of SasView. The sasmodels package itself was worked on to enhance the performance of polydispersity and orientation distribution calculations, replace some core mathematical functions with faster routines, and begin to enable the use of the multi-level models (such as multi-shell and RPA models) from SasView. There had already been work, prior to the camp, to separate GUI from calculation and one of the first changes at the camp was the merging of this new structure - separation of code into sasgui and sascalc sub-modules - into the code base.

At the end of the camp, all of the SasView model code was removed and all model calculations were now called from sasmodels. Some vestiges remain - in particular the easy sum/multi model framework is still from the old code - but this should be weeded out over the coming months.

Code Stats

Over the camp 30 tickets related to the release 4.0 milestone were closed.

Over the period of the camp, nine developers contributed to the SasView code repository. There were 141 commits to all branches and master had 2,364 files changed with 13,351 additions and 201,308 deletions.

There were contributions from 11 developers to the sasmodels code repository. There were 244 commits to all branches and master had 201 commits, with 301 files changed and 11,538 additions and 7,489 deletions.

Next Steps

We expect to produce an alpha release of 4.0 relatively soon to allow user testing of the new build using sasmodels. This will contain simple models (no multi-level and no magnetism) but will otherwise have all the features of v3.1.2. It will support users adding models using the new framework, which was the key goal for a v4.0. Once multi-level and magnetic models are implemented there will be a beta release, which can then be tested prior to a full v4.0 release. This will expose the users to the new functionality and enable faster feedback on problems.

The ESS developers will be following the SINE2020 project plan, with the next step being a redesign of the SasView-sascalc API as a first step to full separation of UI and calculation codes.

Photos

All photos from the code camp on Flickr

https://farm2.staticflickr.com/1570/25886176391_4fdc8fc3d6_n.jpg https://farm2.staticflickr.com/1683/25348441694_9f093a9ecc_n.jpg https://farm2.staticflickr.com/1694/25680359950_9e12bfe165_n.jpg

Ticket Summary

Milestone 4.0 Tickets Closed

Milestone: SasView 4.0.0 (30 matches)

Ticket Resolution Summary Owner Reporter
#556 fixed 4.0 Windows local build is broken smk78
#547 fixed Selecting an S(Q) causes SasView 4.0-alpha to hang smk78
#545 fixed Integrated documentation tocs need manual updating when new models are added smk78 smk78
#544 fixed control order in which fit parameters appear in gui for user supplied models ajj
#538 fixed Need to clean out old sasmodels infrastructure from SasView krzywon butler
#533 fixed Make polydispersy work in sasview with sasmodels ajj
#532 fixed Handling of custom models via sasmodels gonzalezm ajj
#531 invalid What's going on with fit threads? piotr
#515 fixed SasView Menu bar clarity butler
#511 fixed Restructure Document tree in User Documentation butler
#509 fixed Replace J1.c with cephes implementation wojciech wojciech
#506 fixed Fix loading of models in models.py and autodiscovery ajj butler
#505 fixed List modules needing changing to accommodate sasmodels new structure butler
#498 fixed $HOME/.matplotlib conflicts ajj pkienzle
#484 fixed lamellarPC is precision limited richardh pkienzle
#476 fixed autogenerate theory curves for sasmodels documentation pkienzle
#471 fixed Remove welcome menu item from help menu butler butler
#456 fixed Provide DREAM Results Panel with something to identify data and age of results shown smk78
#439 fixed Hayter Penfold MSA code needs checking richardh butler
#434 fixed Display which Fit Option (optimizer) is in use on the FitPage smk78
#411 fixed No stop button on simultaneous fit piotr pkienzle
#410 fixed error with raspberry model ajj butler
#377 fixed HayterMSAsq erratic results at very small Q and needs test on Mac pkienzle richardh
#364 fixed Possible inconsistency in Poly_GaussCoil model smk78 gonzalezm
#361 fixed Check all models for order of parameters being passed richardh ajj
#348 fixed control order in which fit parameters appear in gui richardh richardh
#347 fixed lamellarFFHG investigate polydisp integration richardh richardh
#319 fixed sasmodels unit testing ajj
#318 fixed Integration of sasmodels documentation with SasView smk78 ajj
#270 wontfix Verify that BUMPS is computing reduced chisq correctly smk78

Last modified 7 years ago Last modified on Oct 29, 2017 1:45:37 PM