Presentation is loading. Please wait.

Presentation is loading. Please wait.

中国散裂中子源小角谱仪 的实验数据格式与处理算法 报告人:张晟恺 中国科学院高能物理研究所 SCE 年8月18日

Similar presentations


Presentation on theme: "中国散裂中子源小角谱仪 的实验数据格式与处理算法 报告人:张晟恺 中国科学院高能物理研究所 SCE 年8月18日"— Presentation transcript:

1 中国散裂中子源小角谱仪 的实验数据格式与处理算法 报告人:张晟恺 中国科学院高能物理研究所 SCE2015 2015年8月18日

2 目 录 1)中国散裂中子源简介 2)小角散射谱仪介绍 ——小角谱仪的物理设计 3)SANS实验数据格式 ——SANS原始数据格式
目 录 1)中国散裂中子源简介 2)小角散射谱仪介绍 ——小角谱仪的物理设计 3)SANS实验数据格式 ——SANS原始数据格式 ——NeXus数据格式 ——NeXus实验数据处理流程 4)SANS数据处理算法 ——Mantid源码分析 ——SANS数据处理算法 ——SANS实验数据归约 5)SANS数据接口开发 ——SANS虚拟实验接口开发 ——SANS控制系统接口开发 ——SANS控制用户界面

3 1、中国散裂中子源(CSNS)简介 CSNS系统构成:一台H-直线加速器、一台快循环同步加速器、一个靶站和3台谱仪(一期)。CSNS一期3台谱仪分别是:小角散射谱仪、多功能反射仪和高通量粉末衍射仪。 2

4 2、小角散射谱仪(SANS)介绍 SANS用于探测物质体系在1~100nm尺度内的微观和介观结构。可用于材料内部的微结构表征、聚合物和生物大分子的链团构型分析、合金的相分离、磁性物质的磁畴、固体材料中的孔洞和缺陷的测试和研究等等。

5 2、小角谱仪(SANS)物理设计 屏蔽 散射腔 探测器 靶站内准直 中子垃圾桶 样品前准直 样品室

6 3、SANS原始数据格式 原始数据是所有实验数据分析的起点,设计良好的原始数据格式对数据分析有重要的作用。SANS的原始数据采用基于事例的原始数据记录格式,这种形式的原始数据会保存探测器探测到的中子击中事例信息。利用基于事例的原始数据,给予我们在刻度、Q值归约等方面极大的灵活性。但与此同时,采用基于事例的原始数据增加了数据处理的步骤,导致我们必须对数据预先后,才能分析和显示实验数据,增加了数据处理的复杂度。 SANS原始数据的击中数据格式 SANS原始数据的探测器数据格式 名字 说明 event_id 中子击中的像素点编号 event_index 中子击中的脉冲编号 event_time_zer o 脉冲起始时间 event_time_offs et 中子击中时间 名字 说明 Layout 探测器排列 detector_number 像素点编号 x_pixel_offset 像素点X位置 y_pixel_offset 像素点Y位置 x_pixel_size 像素点X大小 y_pixel_size 像素点Y大小 Efficiency 探测效率(x,y,λ) Distance 距离

7 3、NeXus数据格式 最近几十年,由于射线装置实验设备的发展与实验规模的扩大,分布在世界各地的科学家、实验小组和实验室,迫切需要一种通用的数据格式,方便实验数据的交换和管理,以达成分析方法的共享和校验。同时通用数据格式的定义也可以促进数据处理分析软件的协作开发。基于这样的考虑,来自全世界的科学家和技术人员一起提出了NeXus数据格式标准,并开发了相应的代码库和工具。NeXus数据格式现已被世界上主要的相关实验室接受,目前处于确定标准和实施推广阶段。其中ISIS的谱仪实验数据正从本地的原始运行格式(ISIS RAW File)升级为 NeXus 格式;而 SNS 和 J-Parc的很多谱仪的实验数据都已经采用 NeXus 数据格式存储。

8 3、NeXus实验数据处理流程 1 Initial Setup 2 Basic Reduction
LOQ74044.nxs - sample run LOQ74024.nxs - transmission of the sample LOQ74014.nxs - direct scattering of sample LOQ74019.nxs - scattering of can LOQ74040.nxs - scattering of can LOQ74020.nxs - transmission of can LOQ74014.nxs - direct scattering of can MANTID_FLAT_CELL Flood correction file for Main detector DIRECT Efficiency correction for main detector DIRECTHAB Efficiency correction for HAB detector MaskFile.txt - Settings for the execution of the reduction batch_mode_reduction.csv - File for running batch mode NeXus实验数据处理流程: 1 Initial Setup 2 Basic Reduction 3 Improving the Reduction Results 3.1 Removing the background and Can influence 3.2 Merging data collected in both detectors 3.3 Performing 2D Reduction 4 Speeding up the reduction Process 5 Geometry Settings 6 Adding Runs

9 4、Mantid源码分析

10 第一步 分析源码 1、从Git上拿到源码 2、分析源码结构 3、建立工程 1 Installing CMake
2 Configuring your environment 3 Configuring your build 3.1 Red Hat Enterprise Linux (RHEL) 6 Special Notes 3.2 From the command line ... 3.3 From the CMake gui ... 3.4 Data Files Location 3.5 With Qt Creator ... 4 Building and working with CMake 4、修改源码 New Starter C++ introduction Unit Test Good Practice Running the unit tests Debugging Unit Tests Data and Helpers for unit tests System Tests Writing Performance Tests The Build Servers and your responsibility not to break the build! Useful Tools for Developers Working with git Directory Description Framework Top level Directory Algorithms Algorithms sub project directory (The same subdirectorires are present for all sub projects).This contains standard data reduction algorithms.     inc Code Header Files (.h)     src Code Source Files (.cpp)     test Unit test code files (.h) API API sub project directory. This contains the main classes that are exposed through the API. DataHandling DataHandling sub project directory. This contains data handling commands to load and save various data formats. DataObjects DataObjects sub project directory. This contains concrete implmentations of data objects used in Mantid. Geometry Geometry sub project directory. This code to detail the location and structure of objects within an instrument. Kernel Kernel sub project directory. This contains basic framework elements that are used by all of the sub projects. PythonAPI PythonAPI sub project directory. A specialized API for Python bindings. Properties Location of the properties files used for release purposes. UserAlgorithms UserAlgorithms sub project directory. This contains example algorithms as a starting point for users.

11 第二步 物理需求 SANS Solid Angle Correction 小角谱仪立体角修正
Objective: Performs solid angel correction on SANS 2D data 目的:对小角2D数据的立体角进行修正 Name Direction Type Default Description InputWorkspace Input MatrixWorkspace Mandatory OutputWorkspace Output DetectorTubes boolean False If true, the algorithm will assume that the detectors are tubes in the Y direction. OutputMessage string ReductionProperties __sans_reduction_properties

12 第三步 编写算法 一、目的:使SANS的数据变成国际通用数据形式。 二、工作内容: 1、目前MANTID和小角有关的算法有31种。
2、实时调整,和物理设计参数相关,需要根据工程建设不断地调整。 三、已完成(12项算法): SANSAbsoluteScale SANSMask SANSAzimuthalAverage1D SANSReduction SANSBeamFinder SANSSensitivityCorrection SANSBeamFluxCorrection SANSSolidAngleCorrection SANSBeamSpreaderTransmission SANSSubtract SANSDirectBeamTransmission SANSWideAngleCorrection

13 Inputs for the SANS LOQ example reduction
Improving the Reduction Results ——Removing the background and Can influence Inputs for the SANS LOQ example reduction Scattering Transmission Direct Sample 74044 74024 74014 Can 74019 74020

14 5、小角谱仪实验数据归约算法 SANS归约算法流程图

15 5、SANS虚拟实验接口开发 0m R=100mm 2m R=80mm 4m R=40mm 9m R=20mm

16 5、SANS控制接口开发 Data Storage Detector Online Instrument Events Data
Device Data Data Experiment Control Server Offline Online Monitor Online Analysis Device Control (EPICS) Control Client &GUI: CSS Sample Environment Database Other GUIs

17 5、SANS控制软件用户界面 基于xml的谱仪基本设置 支持通用图形界面(一般用户)和脚本编辑工具(专家用户)
EPICS Eclipse & CSS (e.g., 通过CSS SCAN实现实验自动控制运行)

18 总 结 SANS软件平台 谱仪模拟 物理设计 数据分析 1、SANS原始数据转换成NeXus文件 2、编写SANS数据处理算法
3、开发Mantid平台的SANS软件包 4、开发SANS模拟软件接口 5、开发SANS控制软件接口 SANS软件平台 数据分析 物理设计 谱仪模拟

19 The End Thanks!


Download ppt "中国散裂中子源小角谱仪 的实验数据格式与处理算法 报告人:张晟恺 中国科学院高能物理研究所 SCE 年8月18日"

Similar presentations


Ads by Google