コード例 #1
0
ファイル: test_cansas1d.py プロジェクト: ornl-ndav/DOM
# $Id$

import DST
from SOM import SOM, SO, Sample, Instrument

SOM1 = SOM()
SOM1.setDataSetType("histogram")
SOM1.setYLabel("Intensity")
SOM1.setYUnits("counts A")
SOM1.setAllAxisLabels(["Q"])
SOM1.setAllAxisUnits(["1/A"])
SOM1.attr_list["data-title"] = "Test File"
SOM1.attr_list["data-run_number"] = "1344"

DSample = Sample()
DSample.name = "Test Sample"
DSample.nature = "K3NO+"
SOM1.attr_list.sample = DSample

DInst = Instrument(instrument="SANS",
                   primary=(15.0, 0.0),
                   det_secondary=(2.0, 0.0),
                   x_pix_offset=[
                       (),
                       (),
                   ])
SOM1.attr_list.instrument = DInst

length = 10
SO1 = SO(construct=True, withXVar=True)