-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move all the examples under users/ExampleUser to the new api.
- Loading branch information
1 parent
4682010
commit f66a6bc
Showing
7 changed files
with
32 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
# Perform some algorithms | ||
LoadRaw(Filename="GEM40979.raw",OutputWorkspace="GEM40979") | ||
AlignDetectors("GEM40979","aligned",CalibrationFile="offsets_2006_cycle064.cal") | ||
mtd.deleteWorkspace("GEM40979") | ||
DiffractionFocussing("aligned","focussed","offsets_2006_cycle064.cal") | ||
mtd.deleteWorkspace("aligned") | ||
FindPeaks("focussed","peakslist") | ||
AlignDetectors("GEM40979",OutputWorkspace="aligned",CalibrationFile="offsets_2006_cycle064.cal") | ||
DeleteWorkspace("GEM40979") | ||
DiffractionFocussing("aligned","offsets_2006_cycle064.cal",OutputWorkspace="focussed") | ||
DeleteWorkspace("aligned") | ||
FindPeaks("focussed",PeaksList="peakslist") | ||
|
||
peaks = mtd.getTableWorkspace("peakslist") | ||
|
||
print "Number of Columns: " + str(peaks.getColumnCount()) + " , Number of rows: "+ str(peaks.getRowCount()) | ||
peaks = mtd["peakslist"] | ||
help(peaks) | ||
print "Number of Columns: " + str(peaks.columnCount()) + " , Number of rows: "+ str(peaks.rowCount()) | ||
|
||
colNames = peaks.getColumnNames() | ||
for i in colNames: | ||
print i | ||
|
||
for i in range(peaks.getRowCount()): | ||
print "Spectrum %d has peak at pos %f" % (peaks.getInt("spectrum",i), peaks.getDouble("centre",i)) | ||
for i in range(peaks.rowCount()): | ||
row = peaks.row(i) | ||
print "Spectrum %d has peak at pos %f" % (row['spectrum'], row['centre']) | ||
|