Changes between Initial Version and Version 1 of Tutorials/Swedness/Lab1A


Ignore:
Timestamp:
Aug 22, 2018 5:18:09 AM (6 years ago)
Author:
ajj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/Swedness/Lab1A

    v1 v1  
     1= Exercise 9 - SANS Data Analysis using !SasView = 
     2 
     3||= **Table of Contents** =|| 
     4|| [#intro Introduction] || 
     5|| [#section1 1. Familiarisation with SasView] || 
     6|| [#section2  2. Exploring geometrical models] || 
     7||   [#section21 2.1 Spheres] || 
     8||   [#section22 2.2 Cylinders] || 
     9||   [#section23 2.3 Polydispersity] || 
     10||   [#section24 2.4 Resolution] || 
     11 
     12 
     13== [=#intro Introduction] == 
     14This exercise will introduce you to analysing SANS data using geometrical models in !SasView. In the first lab session you will look at how different shapes produce different scattering patterns, and how the model parameters affect the scattering pattern. In the second lab session you will then load some real SANS data and attempt to fit models to the data in !SasView. 
     15 
     16This first exercise is divided into 2 sections: 
     17 
     181. [#section1 Familiarisation with SasView] 
     192. [#section2  Exploring geometrical models] 
     20 
     21Before beginning the exercise, you must first ensure that !SasView is installed. If you have not done so already, follow [wiki:KEMM37/InstallSasView these installation instructions]. 
     22 
     23Tasks you should perform are shown thus: 
     24{{{ 
     25#!div style="background: lightblue" 
     26**TASK 0:** Install !SasView. Installation instructions can be found here: [wiki:KEMM37/InstallSasView] 
     27}}} 
     28 
     29 
     30 
     31== [=#section1 1.] Familiarisation with !SasView == 
     32{{{ 
     33#!div style="background: lightblue" 
     34[=#task1 **TASK 1:**] Start !SasView. The application should open and look something like the images below. 
     35}}} 
     36 
     37|| [[Image(kemm37_sasviewmac.png, 500px)]] || [[Image(kemm37_sasviewwin.png, 500px)]] || 
     38|| !SasView 4.1.2 on Mac OS || !SasView 4.1.2 on Windows 10 || 
     39 
     40 
     41The !SasView user interface contains 4 main areas: 
     42* The Data Explorer 
     43  * This is where data is loaded and can then be plotted or sent to the various types of analysis. 
     44  * Models not associated with data (called "Theories" in !SasView) can be plotted and converted to datasets. 
     45* The Analysis Panel (which defaults to showing Fitting) 
     46  * This is where you do the work of analysing data or generating theories 
     47  * !SasView currently supports four analysis tools: 
     48     * Fitting - for theory generation or model fitting to 1D and 2D SANS, SAXS, or SESANS data 
     49     * P(r) Inversion - for converting I(Q) to P(r) 
     50     * Invariant - for calculating the scattering invariant from a 1D data set 
     51     * Correlation Function - for performing a correlation function analysis of a 1D data set 
     52* The plot windows (which appear when something is plotted) 
     53* The menus, toolbar, and status area. 
     54 
     55The 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. 
     56 
     57{{{ 
     58#!div style="background: lightblue" 
     59[=#task2 **TASK 2:**] Briefly familiarise yourself with !SasView panels, menus and documentation. Try changing to different analysis tools.  
     60}}} 
     61 
     62 
     63 
     64== [=#section2 2.  Exploring geometrical models] == 
     65In this part of the exercise, you will plot the scattering patterns calculated using different geometrical models and explore the effect that the model parameters have on the scattering. 
     66 
     67{{{ 
     68#!div style="background: lightblue" 
     69[=#task3 **TASK 3:**] Restart !SasView 
     70 
     71Before starting this part of the exercise, you should have a clean !SasView instance. Quit !SasView and restart it. 
     72}}} 
     73 
     74 
     75=== [=#section21 2.1 Spheres] === 
     76 
     77{{{ 
     78#!div style="background: lightblue" 
     79[=#task4 **TASK 4:**] Plot the scattering from a collection of spherical particles 
     80 
     81In the Fit Panel, there should be a single tab labelled "Fitpage1". In that tab, choose the model category "Sphere" and the model "sphere". 
     82}}} 
     83 
     84The fit panel and a plot panel that appears should look like the following: 
     85 
     86[[Image(kemm37_fitpage1_1.png, 500px)]] [[Image(kemm37_sphere.png, 500px)]] 
     87 
     88{{{ 
     89#!div style="background: lightblue" 
     90[=#task5 **TASK 5:**] Change the parameters and note the changes in the scattering pattern. 
     91 
     92In the "Fitpage1" tab, scroll down to the bottom and: 
     93 * Increase "Npts" to 200 
     94 * Check the "Log" box 
     95 
     96Next, click "Compute" 
     97 
     98This will improve the fidelity of the modelled curve. 
     99 
     100Now 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. 
     101 
     102What effect do the each of the parameters have on the scattering curve? 
     103* scale 
     104* background 
     105* sld and sld_solvent 
     106* radius 
     107}}} 
     108 
     109 
     110=== [=#section22 2.2 Cylinders] === 
     111 
     112{{{ 
     113#!div style="background: lightblue" 
     114[=#task6 **TASK 6:**] Plot the scattering from a collection of cylindrical particles 
     115 
     116From the "Fitting" menu, select "New Fit Page". 
     117 
     118In the Fit panel, a new tab labelled "Fitpage2" should appear. In that tab, choose the model category "Cylinder" and the model "cylinder". 
     119}}} 
     120 
     121The fit panel and a plot panel that appears should look like the following: 
     122 
     123[[Image(kemm37_fitpage2_1.png, 500px)]][[Image(kemm37_cylinder.png, 500px)]] 
     124 
     125{{{ 
     126#!div style="background: lightblue" 
     127[=#task7 **TASK 7:**] Change the parameters and note the changes in the scattering pattern. 
     128 
     129In the "Fitpage2" tab, scroll down to the bottom and: 
     130 * Increase "Npts" to 200 
     131 * Check the "Log" box 
     132 
     133Next, click "Compute" 
     134 
     135This will improve the fidelity of the modelled curve. 
     136 
     137Now 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. 
     138 
     139What effect do the each of the parameters have on the scattering curve? 
     140* scale 
     141* background 
     142* sld and sld_solvent 
     143* radius 
     144* length 
     145}}} 
     146 
     147 
     148=== [=#section23 2.3 Polydispersity] === 
     149 
     150{{{ 
     151#!div style="background: lightblue" 
     152[=#task8 **TASK 8:**] Apply polydispersity to model parameters 
     153 
     154Select the "Fitpage1" tab that contains the sphere model. 
     155 
     156Find the section labelled "Polydispersity and Orientational Distribution" 
     157 
     158- Click the "On" radio button and a new section should appear labelled "Distribution of radius". 
     159 
     160- Enter a value for "PD[ratio]" between 0.0 and 1.0 - this is the polydispersity defined as sigma_r/r. 
     161 
     162What effect does varying the polydispersity have on the scattering curve? 
     163 
     164Repeat the exercise for the cylinder model in "Fitpage2" 
     165 
     166}}} 
     167 
     168 
     169=== [=#section24 2.4 Resolution] === 
     170{{{ 
     171#!div style="background: lightblue" 
     172[=#task9 **TASK 9:**] Apply resolution functions to your model 
     173 
     174Select the "Fitpage1" tab that contains the sphere model. 
     175 
     176Find the section labelled "Polydispersity and Orientational Distribution" 
     177 
     178- Click the "Off" radio button and the polydispersity section should disappear 
     179 
     180Find the section labelled "Set Instrumental Smearing" 
     181 
     182- Click on the "Custom Pinhole Smear" radio button and a data entry box should appear. 
     183 
     184- Enter a value for the percentage dQ/Q that is applied to the model - start with a value of 10.  
     185 
     186- Try various values of dQ/Q ranging from 1% to 50%. 
     187 
     188What effect does this have on the scattering curve? 
     189 
     190}}} 
     191 
     192 
     193== [=#section3 3. Handling SANS data] == 
     194 
     195This part of the exercise will use real SANS data taken from a study of surfactant self assembly in deep eutectic solvents (DES).  
     196 
     197{{{ 
     198#!div style="background: lightblue" 
     199[=#task10 **TASK 10:**] Restart !SasView 
     200 
     201Before starting this part of the exercise, you should have a clean !SasView instance. Quit !SasView and restart it. 
     202}}} 
     203 
     204=== [=#section31 3.1 Background Information] === 
     205Deep 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. 
     206 
     207Here 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]. 
     208 
     209||Sodium Dodecyl Sulfate||Choline Chloride||Urea|| 
     210||[[Image(kemm37_sds.png)]]||[[Image(kemm37_choline.png)]]||[[Image(kemm37_urea.png)]]|| 
     211 
     212{{{ 
     213#!div style="background: lightblue" 
     214[=#task11 **TASK 11:**] Download the SANS data :  [attachment:SwedNessSasViewTutorialData.zip​] and unzip the file in a known location on your filesystem. Note where you have placed the data. 
     215}}} 
     216 
     217You should now have a folder called "Subtracted" containing a set of files named as follows: 
     218 
     219[[Image(kemm37_datafileslist.png)]] 
     220 
     221The 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 with the filenames corresponding to each sample given below: 
     222 
     223|| Surfactant Concentration (wt%) || Data File || 
     224|| 0.2 || 0p2hSDS_dChCldUrea_sub.txt || 
     225|| 0.5 || 0p5hSDS_dChCldUrea_sub.txt || 
     226|| 1.0 || 1hSDS_dChCldUrea_sub.txt || 
     227|| 2.0 || 2hSDS_dChCldUrea_sub.txt || 
     228|| 5.0 || 5hSDS_dChCldUrea_sub.txt || 
     229|| 7.5 || 7p5hSDS_dChCldUrea_sub.txt || 
     230|| 10.0 || 10hSDS_dChCldUrea_sub.txt || 
     231 
     232All the data files have been processed to 1D scattering curves with the solvent background subtracted to leave only the coherent scattering signal on absolute scale. 
     233 
     234Additionally there is a folder called "Not subtracted" containing the data for task 14. 
     235 
     236=== [=#section33 3.2 Loading data and Subtracting a Solvent Background] === 
     237 
     238You will now load in the original reduced data for the 0.5 wt% concentration of SDS and subtract the solvent background from it. 
     239 
     240{{{ 
     241#!div style="background: lightblue" 
     242[=#task13 **TASK 12:**] Click on the "Load Data" button in the Data Explorer 
     243 
     244Locate the folder where you placed the data, select all the files in the "Not subtracted" folder and click "Open" in the dialog. 
     245}}} 
     246 
     247{{{ 
     248#!div style="background: lightblue" 
     249[=#task14 **TASK 13:**] Subtract the solvent background using the "Data Operation" Tool 
     250 
     251From the "Tools" menu, select "Data Operation". 
     252 
     253}}} 
     254 
     255You should have a window that looks something like this: 
     256 
     257[[Image(kemm37_dataoperation.png, 500px)]] 
     258 
     259 
     260{{{ 
     261#!div style="background: lightblue" 
     262 
     263Give your output data set a name of your choosing in the "Output Data Name" box 
     264 
     265In the "Data 1" drop down, select the sample data set "0p5hSDS_dChCldUrea.txt". 
     266 
     267In the "Operator" drop down, choose "-" (minus) 
     268 
     269In the "Data 2" drop down, select the solvent data set "dChCldUrea.txt". 
     270 
     271Click "Apply", then "Close" 
     272 
     273In the data explorer, there should now be a data set with the name you chose above. 
     274 
     275Make a plot of the original data sets and your subtracted one to compare them and check you did the subtraction correctly. Make sure that there are check marks next to "0p5hSDS_dChCldUrea.txt", "dChCldUrea.txt", and the dataset with the name you chose. Click on "New Plot" at the bottom of the Data Explorer. 
     276 
     277Does the result look reasonable? What effects have subtracting the solvent scattering from the sample scattering had on the scattering curve? What are possible sources of the background signal that you are removing? 
     278 
     279}}} 
     280 
     281 
     282 
     283=== [=#section34 3.4 Loading and Plotting the subtracted data] === 
     284 
     285You will now load the background subtracted data into !SasView and make a plot in order to visually inspect the scattering curves.  
     286 
     287{{{ 
     288#!div style="background: lightblue" 
     289[=#task15 **TASK 14:**] Restart !SasView 
     290 
     291Before starting this part of the exercise, you should have a clean !SasView instance. Quit !SasView and restart it. 
     292}}} 
     293 
     294{{{ 
     295#!div style="background: lightblue" 
     296[=#task16 **TASK 15:**] Click on the "Load Data" button in the Data Explorer 
     297 
     298Locate the folder where you placed the data, select all the files in the "subtracted" folder and click "Open" in the dialog. 
     299}}} 
     300 
     301The Available Data section of the Data Explorer should look something like: 
     302 
     303[[Image(kemm37_loaddata.png)]] 
     304 
     305 
     306{{{ 
     307#!div style="background: lightblue" 
     308[=#task17 **TASK 16:**] Plot the loaded data 
     309 
     310Make sure that all the datasets have check marks next to them in the Available Data section of the Data Explorer, as shown above. 
     311 
     312Click the "New Plot" button in the Data Explorer. 
     313}}} 
     314 
     315A new window should appear with a plot of the data that looks something like: 
     316 
     317[[Image(kemm37_dataplot.png)]] 
     318 
     319{{{ 
     320#!div style="background: lightblue" 
     321[=#task18 **TASK 17:**] Examining the Data. 
     322 
     323Visually inspect the data, zooming in and making additional plots as needed. 
     324 
     325* What trends do you notice? 
     326* What can you say about the possible solution structure from looking at the data? 
     327 
     328}}} 
     329 
     330 
     331== What's Next? == 
     332You can now move on to the second lab session looking at fitting of data : [wiki:Tutorials/Swedness/Lab1B Data Analysis II Rapid Evaluation]