Ejemplo n.º 1
0
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)
for i in range(length):
    SO1.axis[0].val.append(float(i)) 
    SO1.y.append(float(100*i))
    SO1.var_y.append(float(100*i))

SO1.axis[0].val.append(length)
Ejemplo n.º 2
0
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)
for i in range(length):
    SO1.axis[0].val.append(float(i))
Ejemplo n.º 3
0
import DST
from SOM import SOM, SO, Sample, Instrument
from nessi_list import NessiList

SOM1 = SOM()
SOM1.setDataSetType("histogram")
SOM1.setYLabel("Intensity")
SOM1.setYUnits("counts A / meV")
SOM1.setAllAxisLabels(["momentum transfer", "energy transfer"])
SOM1.setAllAxisUnits(["1/A", "meV"])
SOM1.attr_list["data-title"] = "Test S(Q,E)"
SOM1.attr_list["data-run_number"] = "1344"

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

x = NessiList()
y = NessiList()
z = NessiList()

x.extend(0,1,2,3)
y.extend(0,1,2)
z.extend(1,2,3,4,5,6)

SO1 = SO(2)
SO1.id = ("bank1", (4, 32))
SO1.y = z
SO1.var_y = z
SO1.axis[0].val = x
Ejemplo n.º 4
0
import DST
from SOM import SOM, SO, Sample, Instrument
from nessi_list import NessiList

SOM1 = SOM()
SOM1.setDataSetType("histogram")
SOM1.setYLabel("Intensity")
SOM1.setYUnits("counts A / meV")
SOM1.setAllAxisLabels(["momentum transfer", "energy transfer"])
SOM1.setAllAxisUnits(["1/A", "meV"])
SOM1.attr_list["data-title"] = "Test S(Q,E)"
SOM1.attr_list["data-run_number"] = "1344"

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

x = NessiList()
y = NessiList()
z = NessiList()

x.extend(0, 1, 2, 3)
y.extend(0, 1, 2)
z.extend(1, 2, 3, 4, 5, 6)

SO1 = SO(2)
SO1.id = ("bank1", (4, 32))
SO1.y = z
SO1.var_y = z
SO1.axis[0].val = x