= Exercise 9 - SANS Data Analysis using !SasView = [[PageOutline]] == Introduction == This exercise will introduce you to analysing SANS data using geometrical models in !SasView. You will first look at how different shapes produce different scattering patterns, and how the model parameters affect the scattering pattern. You will then load some real SANS data and attempt to fit models to the data in !SasView. The exercise is divided into 3 sections: 1. [#section1 Familiarisation with SasView] 2. [#section2 Exploring geometrical models] 3. [#section3 Fitting SANS data] Before beginning the exercise, you must first ensure that !SasView is installed. If you have not done so already, follow [wiki:TartuSchoolSasViewInstall these installation instructions]. Tasks you should perform are show as: {{{ #!div style="background: lightblue" **TASK:** Do this thing }}} == [=#section1 1.] Familiarisation with !SasView == {{{ #!div style="background: lightblue" **TASK:** Start !SasView. The application should open and look something like the images below. }}} The !SasView user interface contains 4 main areas: * The Data Explorer * This is where data is loaded and can then be plotted or sent to the various types of analysis. * Models not associated with data (called "Theories" in !Sasview) can be plotted and converted to datasets. * The Analysis Panel (which defaults to showing Fitting) * This is where you do the work of analysing data or generating theories * !SasView currently supports four analysis tools: * Fitting - for theory generation or model fitting to 1D and 2D SANS, SAXS, or SESANS data * P(r) Inversion - for converting I(Q) to P(r) * Invariant - for calculating the scattering invariant from a 1D data set * Correlation Function - for performing a correlation function analysis of a 1D data set * The plot windows (which appear when something is plotted) * The menus, toolbar, and status area. The capabilities of !SasView are described in more detail in the [http://www.sasview.org/docs/user/user.html application documentation] with links to the relevant parts of the documentation available as "Help" buttons in each part of the GUI. {{{ #!div style="background: lightblue" **TASK:** Briefly familiarise yourself with !SasView panels, menus and documentation. Try changing to different analysis tools. }}} == [=#section2 2.] Exploring geometrical models == == [=#section3 3.] Fitting SANS data == This part of the exercise will use real SANS data taken from a study of surfactant self assembly in deep eutectic solvents (DES). {{{ #!div style="background: lightblue" **TASK:** Restart !SasView Before starting this part of the exercise, you should have a clean !SasView instance. Quit !SasView and restart it. }}} === Background information === Deep eutectic solvents are a class of ionic liquids formed from a hydrogen bond donor and a halide salt. At a certain mixture ratio, the eutectic mixture, the melting point is significantly depressed to values below room temperature. Here we will examine the self-assembly of a [https://en.wikipedia.org/wiki/Surfactant surfactant], [https://en.wikipedia.org/wiki/Sodium_dodecyl_sulfate sodium dodecyl sulfate (SDS)] in the deep eutectic solvent formed from a 1:2 molar ratio mixture of [https://en.wikipedia.org/wiki/Choline_chloride choline chloride] and [https://en.wikipedia.org/wiki/Urea urea]. ||Sodium Dodecyl Sulfate||Choline Chloride||Urea|| ||[[Image(tartu_sds.png)]]||[[Image(tartu_choline.png)]]||[[Image(tartu_urea.png)]]|| {{{ #!div style="background: lightblue" **TASK:** Download the SANS data : [attachment:TartuSasViewTutorialData.zip​] and unzip the file in a known location on your filesystem. Note where you have placed the data. }}} === Loading and Plotting the data === You will now load the data into !SasView and make a plot in order to visually inspect the scattering curves. {{{ #!div style="background: lightblue" **TASK:** Click on the "Load Data" button in the Data Explorer Locate the folder where you placed the data, select all the files in that folder and click "Open" in the dialog. }}} The Available Data section of the Data Explorer should look something like: [[Image(tartu_loaddata.png)]] {{{ #!div style="background: lightblue" **TASK:** Plot the loaded data Make sure that all the datasets have check marks next to them in the Available Data section of the Data Explorer, as shown above. Click the "New Plot" button in the Data Explorer. }}} A new window should appear with a plot of the data that looks something like: [[Image(tartu_dataplot.png)]] {{{ #!div style="background: lightblue" **TASK:** Examining the Data. Visually inspect the data, zooming in and making additional plots as needed. * What trends do you notice? * What can you say about the possible solution structure from looking at the data? }}} === Fitting the data === {{{ #!div style="background: lightblue" **TASK:** Fitting the lowest concentration data. Select the lowest concentration data only in the data explorer by ensuring only 0p2hSDS_dChCldUrea_sub.txt has a check mark next to it and click “Send to" fitting. * Select the model for the structure you predicted for this dataset. * How does it compare to the data? * Fill in parameters you know and adjust the others to see how close you get to the data. * Select parameters to fit and run the fit by clicking "Fit" at the bottom of the fitting panel. * Do you get a good fit? * Are the parameters you get physically reasonable? }}}