コード例 #1
0
(options, args) =  parser.parse_args()

filename_SOM1 = "stuff1.dat"

SOM1 = SOM()
SOM1.attr_list["filename"] = filename_SOM1
SOM1.attr_list["username"] = "******"
SOM1.setAllAxisLabels(["TOF"])
SOM1.setAllAxisUnits(["microseconds"])
SOM1.setYLabel("Counts")
SOM1.setYUnits("counts")
SOM1.setDataSetType("histogram")

if options.extraSom:
    SOM2 = SOM()
    SOM2.copyAttributes(SOM1)
    SOM2.setAllAxisLabels(["Wavelength"])
    SOM2.setAllAxisUnits(["Angstroms"])
    SOM2.setYLabel("Counts")
    SOM2.setYUnits("counts")
    SOM2.setDataSetType("histogram")
else:
    SOM2 = None

for i in range(2):
    SO1 = SO(construct=True, withVar=options.withXvar)
    if options.extraSom:
        SO2 = SO(construct=True)
    for j in range(10):
        SO1.id = i
        SO1.axis[0].val.append(j+1)