Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L....

18
http://wiki.cacr.caltech.edu/dan DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University

Transcript of Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L....

Page 1: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

DANSE Diffraction Software for the SNS: DiffDANSE

S.J.L. BillingeDept. Physics and Astronomy

Michigan State University

Page 2: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

Outline

• “Local” Goals of DiffDANSE

• Proposed scope and tasks

• Preliminary work

• Communications

Page 3: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

DiffDANSE goals

• Make diffraction data analysis software that SNS users (and other people) want to use!

• Make sure that it has a long life

Page 4: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

DiffDANSE goals

• Make diffraction data analysis software that people want to use!

– Solves people’s scientific problems, opens new scientific horizons

– Shortens time to publication– Flexible– Easy to use

• Good user documentation– Robust and Stable

Page 5: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

DiffDANSE goals

• Make sure that it has a long life– Maintainable (esp. by others, i.e., SNS!)

• Good developer documentation• Requirements/use cases/tests stored with the code

– Extensible• modular

– Scalable• Dynamic memory allocation• Distributable/parallelizable

– Quality controlled– Open source

Page 6: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

Scope

6.1.1 Structure functions from powder diffractometers Michigan State

6.1.2 Bragg-peak intensities from single-crystal diffractometers Michigan State

6.1.3 Instrument specific tasks Michigan State

6.2.1 Full profile model refinement in real and reciprocal space Michigan State

6.2.2 Plug in architecture for carrying out joint refinements Michigan State

6.2.3 Model independent peak fitting Michigan State

6.2.4 Rietveld and PDF modeling extensions Michigan State

6.2.5 Constraint/restraint plug-ins Michigan State

6.2.6 Post modeling analysis tools Michigan State

6.2.7 Graphical applications Michigan State

6.2.8 Refinement control toolkit Michigan State

6.3.1 Simulation of experiments Michigan State

6.3.2 Simulation Research Project Michigan State

Page 7: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

Common tasks

5.4.5.1 cctbx Michigan State

5.4.5.2 FOX Michigan State

5.4.5.3 CrysFML Michigan State

5.4.5.4 PowderCell Michigan State

5.4.5.5 ObjCryst++ Michigan State

5.4.6.3 PyMol Michigan State

5.4.6.4 ViewMol Michigan State

5.4.6.5 DRAWxtl Michigan State

5.4.6.7 Additional CIF reader Michigan State

11.2.1.2"Hands-On" Nanotechnology and Curriculum Development

Michigan State

Education/outreach

Libraries/common utilities

Page 8: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

DiffDANSE development team

?

Page 9: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

• Prototype: Dream-desktop for local-structure studies using the atomic pair distribution function (PDF)

Page 10: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

Prototype application: PDFgui

• Goals:1. PDF is a great technique for studying local structure, but our

programs are clunky and hard to use…ok for hard-core physicists but not for wider adoption. Give it an easy-to-use interface

2. Often we want to refine multiple datasets as a function of temperature/pressure/composition, etc.. Make a program that is straightforward to automate for multiple datasets but flexible enough to give the user control over this process

3. Users are interested in structure, not scattering data. Allow them to interact with the structure straightforwardly in the same program in real time

4. Make it sufficiently fast that people want to use it

5. Use it as a prototype to learn how the DANSE software development process is going to go

Page 11: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

PDFgui

• Solution:– Write Python bindings into our existing PDFFIT2 C++ code to

access variables at the python layer at run-time– Wrap an existing plotting program, matplotlib, for 1D plots which

support user interactions (zoom, explore, etc.)– Wrap an existing structure visualization program, ATOMEYE, for

simple structure visualization– Build a GUI front-end– We want real-time interactivity so…– Graphics can eat up system resources => build in distributed

functionality. Have PDFFIT2 running on a remote computer but keep the real-time interactivity

Page 12: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

PDFgui component structure

GUI

Control Center

PDFFIT2

Plot Control Matplotlib

StruVis Control Pymol

Page 13: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

Configuring a set of fits for a T-series on LaMnO3 data.

Page 14: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/Plotting pane of PDFgui

Page 15: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

PDFgui

• Make code people want to use– Careful design of the structure of the GUI. This went through

several iterations and ultimately a complete refactoring as we struggled with how people will use it for different tasks.

– User input:• Rapid development cycle was just a few months from

inception to the alpha-0 release (local release with a single installation). Now working on alpha-1 (wider release, some feature improvements)

• (already expert PDF) Users were up to speed after one tutorial session with no documentation (will address at beta release)

• Software control on TRAC and svn allows users to post bug-reports and feature requests that won’t get lost.

Page 16: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

PDFgui

• Make sure that it has a long life

– Modular

– Clear separation of gui from program logic. Interaction between

the program and the gui through proxies

– Team development results in code that is readable by more than

one human being

– Coding standards for docstrings and basic syntax structure

– Project under subversion control under TRAC

Page 17: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

Page 18: Http://wiki.cacr.caltech.edu/danse/ DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.

http://wiki.cacr.caltech.edu/danse/

Summary

• Make codes people want to use

– Open Source

– Community engagement – what do you want to have?

– Community involvement – what do you want to do?

• Now beginning to develop the detailed software

requirements. Please tell us what you need!