\(\renewcommand\AA{\unicode{x212B}}\)

SaveIsawDetCal v1

Summary

Saves an instrument with RectangularDetectors to an ISAW .DetCal file.

See Also

LoadIsawDetCal

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

Workspace

Mandatory

An input workspace.

Filename

Input

string

Mandatory

Path to an ISAW-style .detcal file to save. Allowed extensions: [‘.detcal’]

TimeOffset

Input

number

0

Offsets to be applied to times

BankNames

Input

str list

Optional: Only select the specified banks

AppendFile

Input

boolean

False

Append to file if true. If false, new file (default).

Description

Saves an instrument with RectangularDetectors to an ISAW .DetCal file.

This algorithm will fail on instruments without RectangularDetectors. Additionally, the banks should be named “bankXX” where XX is the bank index. Other names will fail or create an invalid .DetCal file.

Example file:

# NEW CALIBRATION FILE FORMAT (in NeXus/SNS coordinates):
# Lengths are in centimeters.
# Base and up give directions of unit vectors for a local
# x,y coordinate system on the face of the detector.
#
#
# Sat Apr 05 13:47:05 EDT 2014
6         L1     T0_SHIFT
7  1803.2456        1.672
4 DETNUM  NROWS  NCOLS    WIDTH   HEIGHT   DEPTH   DETD   CenterX   CenterY   CenterZ    BaseX    BaseY    BaseZ      UpX      UpY      UpZ
5     16    256    256  15.8190  15.9600  0.2000  46.23  -22.9051  -24.6398  -31.7036  0.35194  0.60487 -0.71434 -0.80273  0.58755  0.10202
5     17    256    256  15.8190  15.8004  0.2000  45.89  -36.9397  -24.4596  -11.9614 -0.13647  0.59956 -0.78861 -0.57552  0.59996  0.55572
5     18    256    256  15.8190  15.7432  0.2000  45.96  -36.9982  -24.4046   12.1779 -0.57028  0.60175 -0.55918 -0.13908  0.60016  0.78769
5     19    256    256  15.8190  15.8439  0.2000  46.18  -22.9210  -24.4484   31.7708 -0.79476  0.59661 -0.11139  0.35048  0.60100  0.71831
5     23    256    256  15.8190  15.9854  0.2000  43.43   33.9898  -11.9805  -24.2403  0.56320  0.68289  0.46526 -0.25303  0.67853 -0.68962
5     26    256    256  15.8190  15.7207  0.2000  42.59  -33.0834  -11.8416  -24.0655  0.25991  0.67612 -0.68942 -0.55962  0.68731  0.46307
5     27    256    256  15.8190  15.8852  0.2000  42.95  -41.2664  -11.9133    0.1131 -0.19398  0.67968 -0.70739 -0.19593  0.67972  0.70682
5     28    256    256  15.8190  15.8344  0.2000  42.88  -33.2716  -11.8225   24.3349 -0.59100  0.67121 -0.44744  0.26024  0.68366  0.68183
5     29    256    256  15.8190  15.7846  0.2000  43.07  -12.6857  -11.8127   39.4263 -0.72950  0.68246 -0.04558  0.60781  0.67738  0.41438
5     33    256    256  15.8190  15.9602  0.2000  40.38   38.4929    0.0224  -12.1887  0.19968  0.70793  0.67747 -0.23231  0.70589 -0.66915
5     36    256    256  15.8190  15.9188  0.2000  39.80  -23.3198   -0.0197  -32.2481  0.55965  0.70602 -0.43397 -0.55676  0.70819  0.43415
5     37    256    256  15.8190  15.7415  0.2000  39.68  -37.7483   -0.0333  -12.2191  0.21937  0.70678 -0.67256 -0.21816  0.70743  0.67227
5     38    256    256  15.8190  15.7490  0.2000  39.89  -37.9011   -0.0078   12.4269 -0.21892  0.70732 -0.67214  0.22111  0.70689  0.67187
5     39    256    256  15.8190  15.8073  0.2000  39.94  -23.3827    0.0471   32.3765 -0.57072  0.70572 -0.41981  0.56719  0.70849  0.41992
5     46    256    256  15.8190  15.8546  0.2000  42.65  -33.1415   11.8100  -24.1040  0.57102  0.68156 -0.45762 -0.26014  0.67893  0.68657
5     47    256    256  15.8190  15.7332  0.2000  42.72  -41.0597   11.8055    0.0941  0.22689  0.66947 -0.70735  0.19333  0.68087  0.70642
5     48    256    256  15.8190  15.8637  0.2000  42.97  -33.3467   11.8763   24.3520 -0.25790  0.68002 -0.68634  0.57475  0.67899  0.45677
5     49    256    256  15.8190  15.8240  0.2000  42.88  -12.6398   11.8383   39.2278 -0.60890  0.67804 -0.41171  0.73035  0.68174  0.04259
5     58    256    256  15.8190  15.9019  0.2000  46.09  -37.1034   24.4895   12.1518  0.14449  0.59693 -0.78918  0.58774  0.58984  0.55376

Categories: AlgorithmIndex | Diffraction\DataHandling | DataHandling\Isaw

Source

C++ header: SaveIsawDetCal.h

C++ source: SaveIsawDetCal.cpp