{"id":1367,"date":"2014-09-29T11:29:30","date_gmt":"2014-09-29T02:29:30","guid":{"rendered":"http:\/\/www.lookingatnothing.com\/?p=1367"},"modified":"2014-09-29T11:29:30","modified_gmt":"2014-09-29T02:29:30","slug":"preparing-for-beamtime","status":"publish","type":"post","link":"https:\/\/lookingatnothing.com\/index.php\/archives\/1367","title":{"rendered":"Preparing for Beamtime"},"content":{"rendered":"<p>One more burst of beamtime is coming up at the end of this week. This one will be with <a href=\"http:\/\/schneppgroup.wordpress.com\">Zo\u00eb<\/a>, <a href=\"http:\/\/martinhollamby.wordpress.com\">Martin<\/a> and <a href=\"http:\/\/schneppgroup.wordpress.com\/group\/profiles\/ash\/\">Ashleigh<\/a> once more, but there is one big difference: I ran out of funding, so I won&#8217;t be there! <!--more--><\/p>\n<p>Instead, for the first time, I will try to do a telepresence-kind of thing. I will be sitting here at my desk in Japan while the others toil away relentlessly filling capillaries at the beamline. My (self-appointed) task is &#8220;chief data-wrangler&#8221;: correcting the data and fitting it as best we can. So how are we preparing for beamtime (apart from loading and bringing about twice the samples you can ever measure)?<\/p>\n<p>First of all, we had a good amount of e-mail exchanges with <a href=\"http:\/\/www.diamond.ac.uk\/Beamlines\/Soft-Condensed-Matter\/small-angle\/I22\/Staff\/Andy-Smith.html\">Andrew Smith<\/a> from <a href=\"http:\/\/www.diamond.ac.uk\/Beamlines\/Soft-Condensed-Matter\/small-angle\/I22.html\">beamline I22<\/a>. we talked about a host of things, including the set-up and many of the items mentioned in the SAXS measurement checklist (see appendix of this <a href=\"http:\/\/dx.doi.org\/10.1088\/0953-8984\/25\/38\/383201\">handy open-access review paper<\/a>). This way, we can double-check the configuration and size-range we will be analyzing. Energies and calibrations have been discussed, and options for remote-access of files.<\/p>\n<p>One more thing I started with a few weeks ago was to ask for some test datafiles. Each beamline (pretty much) uses their own data format, so in order to prevent unpleasant surprises I ask for a datafile in advance. I now set up the <a href=\"https:\/\/bitbucket.org\/toQDuj\/imp2\">imp2<\/a> data correction methods to use this new format. The format used by I22 is one of the new formats, and one I very much would like to see adopted for &#8220;raw&#8221; data: the <a href=\"http:\/\/www.nexusformat.org\">NeXus<\/a> format.<\/p>\n<p>This format is set up around a very flexible <a href=\"http:\/\/www.hdfgroup.org\">HDF5<\/a> data container, which allows for the structuring of data in a logical, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Hierarchical_database_model\">hierarchical<\/a> manner. This means that we can organise a complete set of information inside the datafile, such as motor positions, (multiple) images from multiple detectors, ion chamber read-outs, temperatures&#8230; Basically we can store everything that is relevant to the experiment and the data reduction. Let me show you what the structure of the data stored in this file looks like:\u2523\u2501 entry1<br \/>\n\u2523\u2501 I0<br \/>\n\u2503 \u2523\u2501 data: [ 1.26998004e+11]<br \/>\n\u2503 \u2523\u2501 description: [ &#8216;Data scaled by 1.0000e+06 and offset by 0.0000 for gain\u2026<br \/>\n\u2503 \u2523\u2501 framesetsum: [ 1.26998004e+11]<br \/>\n\u2523\u2501 It<br \/>\n\u2503 \u2523\u2501 data: [ 2.00207001e+12]<br \/>\n\u2503 \u2523\u2501 description: [ &#8216;Data scaled by 1.0000e+07 and offset by 0.0000 for gain\u2026<br \/>\n\u2503 \u2523\u2501 framesetsum: [ 2.00207001e+12]<br \/>\n\u2523\u2501 PilatusWAXS<br \/>\n\u2523\u2501 Scalers<br \/>\n\u2503 \u2523\u2501 data: [Dataset array of shape (1, 1, 9)]<br \/>\n\u2523\u2501 TfgTimes<br \/>\n\u2503 \u2523\u2501 data: [Dataset array of shape (1, 1, 8)]<br \/>\n\u2523\u2501 detector<br \/>\n\u2523\u2501 entry_identifier: [&#8216;175549&#8217;]<br \/>\n\u2523\u2501 experiment_identifier: [&#8216;sm9612-1&#8217;]<br \/>\n\u2523\u2501 instrument<br \/>\n\u2503 \u2523\u2501 PilatusWAXS<br \/>\n\u2503 \u2503 \u2523\u2501 count_time: [ 10.]<br \/>\n\u2503 \u2503 \u2523\u2501 sas_type: [&#8216;WAXS&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 wait_time: [ 0.1]<br \/>\n\u2503 \u2503 \u2523\u2501 x_pixel_size: [ 0.000172]<br \/>\n\u2503 \u2503 \u2523\u2501 name: [&#8216;PilatusWAXS&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 y_pixel_size: [ 0.000172]<br \/>\n\u2503 \u2523\u2501 Scalers<br \/>\n\u2503 \u2503 \u2523\u2501 count_time: [ 10.]<br \/>\n\u2503 \u2503 \u2523\u2501 description: [ &#8216;Timer (10 ns)\\r\\nQBPM (I0)\\r\\nIon Chamber (Not Insta\u2026<br \/>\n\u2503 \u2503 \u2523\u2501 name: [&#8216;Scalers&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 sas_type: [&#8216;CALIB&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 wait_time: [ 0.1]<br \/>\n\u2503 \u2523\u2501 TfgTimes<br \/>\n\u2503 \u2503 \u2523\u2501 name: [&#8216;TfgTimes&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 sas_type: [&#8216;TIMES&#8217;]<br \/>\n\u2503 \u2523\u2501 detector<br \/>\n\u2503 \u2503 \u2523\u2501 sas_type: [&#8216;SAXS&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 wait_time: [ 0.1]<br \/>\n\u2503 \u2503 \u2523\u2501 x_pixel_size: [ 0.000172]<br \/>\n\u2503 \u2503 \u2523\u2501 y_pixel_size: [ 0.000172]<br \/>\n\u2503 \u2503 \u2523\u2501 beam_center_x: [ 710.67]<br \/>\n\u2503 \u2503 \u2523\u2501 beam_center_y: [ 78.33]<br \/>\n\u2503 \u2503 \u2523\u2501 distance: [ 1.26401387]<br \/>\n\u2503 \u2503 \u2523\u2501 name: [&#8216;Pilatus2M&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 count_time: [ 10.]<br \/>\n\u2503 \u2523\u2501 insertion_device<br \/>\n\u2503 \u2503 \u2523\u2501 gap: [ 6.08535]<br \/>\n\u2503 \u2523\u2501 monochromator<br \/>\n\u2503 \u2503 \u2523\u2501 energy: [ 17.99999824]<br \/>\n\u2503 \u2503 \u2523\u2501 energy_error: [ 0.002052]<br \/>\n\u2503 \u2523\u2501 name: [&#8216;i22&#8217;]<br \/>\n\u2503 \u2523\u2501 source<br \/>\n\u2503 \u2503 \u2523\u2501 current: [ 298.812]<br \/>\n\u2503 \u2503 \u2523\u2501 name: [&#8216;DLS&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 probe: [&#8216;X-ray&#8217;]<br \/>\n\u2503 \u2503 \u2523\u2501 type: [&#8216;Synchrotron X-Ray Source&#8217;]<br \/>\n\u2523\u2501 program_name: [&#8216;GDA 8.38.0&#8217;]<br \/>\n\u2523\u2501 sample<br \/>\n\u2503 \u2523\u2501 name: [[&#8216;none&#8217;]]<br \/>\n\u2503 \u2523\u2501 thickness: [ 0.]<br \/>\n\u2523\u2501 scan_command: [&#8216;static readout&#8217;]<br \/>\n\u2523\u2501 scan_dimensions: [1]<br \/>\n\u2523\u2501 scan_identifier: [&#8216;0712254c-0f97-4bc9-be55-0bb484dcd4b8&#8217;]<br \/>\n\u2523\u2501 title: [&#8216;Glassy carbon 18keV 1.2m 10s&#8217;]<br \/>\n\u2523\u2501 user01<br \/>\n\u2503 \u2523\u2501 username: [&#8216;GooglyBear&#8217;]<\/p>\n<p>First of all, compared to previous data storage formats, this one is amazing. It is full of useful information and we can derive from the structure how the experiment was set up. There are some teething issues, though: there is a mish-mash of units used (and not specified), and all data is stored as an array for some reason. Information is power, though, and this format beats the pants off anything else out there.<\/p>\n<p>There is also a lot of information in this structure we do not need right away, but is useful for future checks. This includes information on the insertion device motor positions and the synchrotron current.<\/p>\n<p>Other information we do need. This includes information on the beam centre, the distance to the detector, pixel size and so on. I am now setting up the data correction methods to use these values.<\/p>\n<p>There is some risk to relying on these values, however. For example, there is a value in the sample specification indicating the sample thickness. It is fine to have that there, but at the moment it requires input of the sample thickness by the user. Fail to set or update this, and you will be working with the wrong numbers. Beware, then, that the quality of the datafile (and subsequent processing) is reliant on the proper accounting dilligence for the values specified.<\/p>\n<p>For this experiment, we will probably forego the &#8220;thickness&#8221; field anyway, and try to estimate it from the difference in absorption (also because the samples are dry powders). I will let you know if this can be done to any reasonable accuracy.<\/p>\n<p>While progress has been booked &#8211; these data files can be read into the data reduction procedure, for example &#8211; , I am not quite ready yet. Before the beamtime, I must have a proper (semi-)automated manner for processing data in place and running. This will ensure that we can look at the data and analyse the data in place, and adjust the measurement procedure or samples accordingly. Time to get back to work!<\/p>\n<p>P.S. Look at how gorgeous GC looks on this beamline (Figure 0)!<\/p>\n<figure id=\"attachment_1368\" aria-describedby=\"caption-attachment-1368\" style=\"width: 150px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.lookingatnothing.com\/wp-content\/uploads\/2014\/09\/GC.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-1368\" src=\"http:\/\/www.lookingatnothing.com\/wp-content\/uploads\/2014\/09\/GC-150x150.png\" alt=\"Glassy carbon at I22\" width=\"150\" height=\"150\" \/><\/a><figcaption id=\"caption-attachment-1368\" class=\"wp-caption-text\"><strong>Figure 0:<\/strong> Glassy carbon at I22<\/figcaption><\/figure>\n<p>(Many thanks to Andrew Smith of I22 for his rapid and helpful responses to my barrage of questions)<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>One more burst of beamtime is coming up at the end of this week. This one will be with Zo\u00eb, Martin and Ashleigh once more, <a class=\"mh-excerpt-more\" href=\"https:\/\/lookingatnothing.com\/index.php\/archives\/1367\" title=\"Preparing for Beamtime\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":2,"featured_media":1368,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2014\/09\/GC.png","jetpack_shortlink":"https:\/\/wp.me\/p1gZ2v-m3","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/1367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/comments?post=1367"}],"version-history":[{"count":1,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/1367\/revisions"}],"predecessor-version":[{"id":1369,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/1367\/revisions\/1369"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/media\/1368"}],"wp:attachment":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/media?parent=1367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/categories?post=1367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/tags?post=1367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}