= Exercise 9 - SANS Data Analysis using !SasView = ||= **Table of Contents** =|| || [#intro Introduction] || || [#section1 1. Familiarisation with SasView] || || [#section2 2. Exploring geometrical models] || || [#section21 2.1 Spheres]|| || [#section22 2.2 Cylinders]|| || [#section23 2.3 Polydispersity]|| || [#section3 3. Fitting SANS data] || || [#section31 3.1 Background Information]|| || [#section32 3.2 Calculating Scattering Length Density]|| || [#section33 3.3 Loading and Plotting the data]|| || [#section34 3.4 Fitting the data]|| || [#resources Resources] || == [=#intro 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 X:** Do this thing }}} == [=#section1 1.] Familiarisation with !SasView == {{{ #!div style="background: lightblue" [=#task1 **TASK 1:**] 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" [=#task2 **TASK 2:**] Briefly familiarise yourself with !SasView panels, menus and documentation. Try changing to different analysis tools. }}} == [=#section2 2. Exploring geometrical models] == In this part of the exercised, you will plot the scattering patterns calculated using different geometrical models and explore the effect that the model parameters have on the scattering. {{{ #!div style="background: lightblue" [=#task3 **TASK 2:**] Restart !SasView Before starting this part of the exercise, you should have a clean !SasView instance. Quit !SasView and restart it. }}} === [=#section21 2.1 Spheres] === {{{ #!div style="background: lightblue" [=#task4 **TASK 4:**] Plot the scattering from a collection of spherical particles In the Fit Panel, there should be a single tab labelled "Fitpage1". In that tab, choose the model category "Sphere" and the model "sphere". }}} The fit panel and a plot panel that appears should look like the following: [[Image(tartu_fitpage1_1.png, 500px)]] [[Image(tartu_sphere.png, 500px)]] {{{ #!div style="background: lightblue" [=#task5 **TASK 5:**] Change the parameters and note the changes in the scattering pattern. In the "Fitpage1" tab, scroll down to the bottom and: * Increase "Npts" to 200 * Check the "Log" box Next, click "Compute" This will improve the fidelity of the modelled curve. Now scroll back up and try adjusting the various model parameters one at a time. Pressing enter after changing a value should recalculate the scattering. If not, use the Compute button. What effect do the each of the parameters have on the scattering curve? * scale * background * sld and sld_solvent * radius }}} === [=#section22 2.2 Cylinders] === {{{ #!div style="background: lightblue" [=#task6 **TASK 6:**] Plot the scattering from a collection of cylindrical particles From the "Fitting" menu, select "New Fit Page". In the Fit panel, a new tab labelled "Fitpage2" should appear. In that tab, choose the model category "Cylinder" and the model "cylinder". }}} The fit panel and a plot panel that appears should look like the following: [[Image(tartu_fitpage2_1.png, 500px)]][[Image(tartu_cylinder.png, 500px)]] {{{ #!div style="background: lightblue" [=#task7 **TASK 7:**] Change the parameters and note the changes in the scattering pattern. In the "Fitpage2" tab, scroll down to the bottom and: * Increase "Npts" to 200 * Check the "Log" box Next, click "Compute" This will improve the fidelity of the modelled curve. Now scroll back up and try adjusting the various model parameters one at a time. Pressing enter after changing a value should recalculate the scattering. If not, use the Compute button. What effect do the each of the parameters have on the scattering curve? * scale * background * sld and sld_solvent * radius * length }}} === [=#section23 2.3 Polydispersity] === {{{ #!div style="background: lightblue" [=#task8 **TASK 8:**] Apply polydispersity to model parameters Select the "Fitpage1" tab that contains the sphere model. Find the section labelled "Polydispersity and Orientational Distribution" Click the "On" radio button and a new section should appear labelled "Distribution of radius". Enter a value for "PD[ratio]" between 0.0 and 1.0 - this is the polydispersity defined as sigma_r/r. What effect does varying the polydispersity have on the scattering curve? Repeat the exercise for the cylinder model in "Fitpage2" }}} == [=#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" [=#task9 **TASK 9:**] Restart !SasView Before starting this part of the exercise, you should have a clean !SasView instance. Quit !SasView and restart it. }}} === [=#section31 3.1 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" [=#task10 **TASK 10:**] 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. }}} You should now have a folder containing a set of files names as follows: [[Image(tartu_datafileslist.png)]] The data are SANS curves collected on SANS2D at ISIS and D22 at ILL for samples of protonated (normal) SDS in 1:2 d9-choline chloride:d4-urea. This sample was chosen to give maximum contrast and minimum background signal from incoherent scattering. There were 7 samples with 0.2 wt%, 0.5 wt%, 1.0 wt%, 2.0 wt%, 5.0 wt%, 7.5 wt% and 10 wt% of SDS in the DES. === [=#section32 3.2 Calculating Scattering Length Density] === The scattering length density is given by [[Image(tartu_sld.png, 100px)]] Scattering lengths of relevant elements: ||= **Element** =||= **Scattering Length (fm)** =|| ||C ||6.646|| ||H ||-3.739|| ||D ||6.671|| ||N ||9.36|| ||O ||5.803|| ||Cl ||9.577|| Physical properties of the DES components: ||= **Component** =||= **Chemical Formula** =||= **Molecular Volume (Å3)** =||= **Density (g/cm3)** =|| ||d9-Choline Chloride|| C5H5D9NOCl ||75.55 ||1.17|| ||d4-Urea|| CD4N2O ||210.77|| 1.41|| {{{ #!div style="background: lightblue" [=#task11 **TASK 11:**] Calculate the scattering length density (SLD) of a 1:2 mole ratio mixture of choline chloride and urea. Use the information in the table above to calculate the SLD. There are multiple ways to do so, including: * Calculating by hand * Using a spreadsheet * Using the SLD calculator built in to !SasView (in the Tools menu). * Using online calculators e.g. [https://www.ncnr.nist.gov/resources/activation/] Try multiple ways and see if you get the same answer! }}} === [=#section33 3.3 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" [=#task12 **TASK 12:** 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" [=#task13 **TASK 13:** 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" [=#task14 **TASK 14:**] 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? }}} === [=#section34 3.4 Fitting the data] === {{{ #!div style="background: lightblue" [=#task15 **TASK 15:** 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? }}} {{{ #!div style="background: lightblue" [=#task16 **TASK 15:**] Fitting the other data, starting with the 7.5 wt% data set. Repeat for other concentrations * Does the same model fit all data? * What is consistent between datasets? What is different? }}} == [=#resources Resources] == * The original [paper attachment:MicelleStructureinDeepEutecticSolvents.pdf] and [supplementary information attachment:MicelleStructureinDeepEutecticSolvents Supplementary Information.pdf​] * NIST SLD calculator [https://www.ncnr.nist.gov/resources/activation/] * NIST Scattering Length and Scattering Cross Section Database [https://www.ncnr.nist.gov/resources/n-lengths/]