Table of Contents
Loads set of VULCAN’s offset files into up to 3 workspaces: a GroupingWorkspace, OffsetsWorkspace and/or MaskWorkspace.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
OffsetFilename | Input | string | Mandatory | Path to the VULCAN offset file. Allowed extensions: [‘.dat’] |
Grouping | Input | string | 6Modules | Choices to output group workspace for 1 bank, 2 banks or 6 modules. Allowed values: [‘6Modules’, ‘2Banks’, ‘1Bank’] |
BadPixelFilename | Input | string | Path to the VULCAN bad pixel file. Allowed extensions: [‘.dat’] | |
WorkspaceName | Input | string | The base of the output workspace names. Names will have ‘_group’, ‘_offsets’, ‘_mask’ appended to them. | |
BankIDs | Input | int list | Bank IDs for the effective detectors. Must cover all banks in the definition. | |
EffectiveDIFCs | Input | dbl list | DIFCs for effective detectors. | |
Effective2Thetas | Input | dbl list | 2 thetas for effective detectors. | |
EventWorkspace | InOut | EventWorkspace | Optional input/output EventWorkspace to get aligned by offset file. It serves as a verifying tool, and will be removed after test. |
This algorithm loads a set of VULCAN’s calibration files, including detector offset file and bad pixel file, and convert VULCAN’s offset on time-of-flight to Mantid’s offset on d-spacing.
By this algorithm, Vulcan’s calibration file can be converted to the standard calibration file for SNSPowderReduction.
There are () rows in the offset file. In each row, the first value is the pixel ID; and the second is inner-module offset.
For each module, it starts from row , where is the module ID starting from 0.
In bad pixel file, each line contains one and only one integer corresponding to the detector ID of a bad pixel. The bad pixels will be masked in the output MaskWorkspace.
With VULCAN’s offsets in TOF, the calibration is done as the following.
where (1) is the inner-bank correction, (2) is the inner module (inter-bank) correction, and (3) is the inter-module (inner-pack) correction.
Be noticed that the correction factor recorded in VULCAN’s offset file is . Thus if we define , then time focussing formula used by VUCLAN’s IDL code is
Therefore, by defining as the VULCAN’s offset, and as the Mantid’s offset, then we can convert VULCAN’s offset to Mantid’s as
VULCAN uses effective DIFC and for the effective detector to be focussed on. It follows the Bragg rule for time-of-flight, i.e.,
# Load Vulcan calibration files
LoadVulcanCalFile(OffsetFilename='pid_offset_vulcan_new.dat',
BadPixelFilename='bad_pids_vulcan_new_6867_7323.dat',
WorkspaceName='Vulcan_idl', BankIDs='21,22,23,26,27,28',
EffectiveDIFCs='16372.6,16377,16372.1,16336.6,16340.8,16338.8',
Effective2Thetas='90.091,90.122,90.089,89.837,89.867,89.852')
# Print
offsetws = mtd["Vulcan_idl_offsets"]
groupws = mtd["Vulcan_idl_group"]
for iws in [0, 100, 1000, 3500, 7000]:
print "Spectrum %-5d Offset = %.5f of Group %d" % (iws, offsetws.readY(iws)[0], groupws.readY(iws)[0])
maskws = mtd["Vulcan_idl_mask"]
print "Size of mask workspace = %d" % (maskws.getNumberHistograms())
Output:
Spectrum 0 Offset = -0.00047 of Group 1
Spectrum 100 Offset = -0.00096 of Group 1
Spectrum 1000 Offset = -0.00060 of Group 1
Spectrum 3500 Offset = -0.00036 of Group 3
Spectrum 7000 Offset = 0.00058 of Group 6
Size of mask workspace = 7392
Categories: Algorithms | DataHandling\Text | Diffraction\DataHandling