From 676b31b863b9cb3ef85822f6bcc8653a83520e1c Mon Sep 17 00:00:00 2001 From: Alex Buts <alex.buts@stfc.ac.uk> Date: Thu, 6 Oct 2011 10:26:33 +0000 Subject: [PATCH] refs #3798 Wiki maker does not work for these files (complaining about not registered algorithms), so I have rather did reverse (partial) work filling up the wiki and copying the part of the text into the code. Though the wiki maker, if works, would be rather convenient way of building the wiki pages, current Wiki description has more information than the one, provided with the code. --- .../inc/MantidDataHandling/SavePAR.h | 20 +++++++++++++++++++ .../inc/MantidDataHandling/SavePHX.h | 19 ++++++++++++++++++ .../DataHandling/src/FindDetectorsPar.cpp | 7 ++++--- 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h index 79a4997d6ad..33fa5313ad1 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h @@ -2,6 +2,26 @@ #define SAVEPAR_H_ /*WIKI* +Saves the geometry information of the detectors in a workspace into a PAR format ASCII file. The angular positions and linear sizes of the detectors are calculated using [[FindDetectorsPar]] algorithm. + +Tobyfit PAR file is an ASCII file consisting of the header and 5 or 6 text columns. Mantid generates 6-column files. Header contains the number of the rows in the phx file excluding the header. (number of detectors). The column has the following information about a detector: + + * + * 1st column sample-detector distance (secondary flight path) + * 2nd " scattering angle (deg) + * 3rd " azimuthal angle (deg) + * (west bank = 0 deg, north bank = -90 deg etc.) + * (Note the reversed sign convention cf .phx files) + * 4th " width (m) + * 5th " height (m) + * 6th " detector ID -- Mantid specific. + *--- + + +You should expect to find column 6 to be the detector ID in Mantid-generated par files only. + + + *WIKI*/ diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h index 3cb4748d89e..a9aba0680c7 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h @@ -5,6 +5,25 @@ Saves the geometry information of the detectors in a workspace into a PHX format ASCII file. +The angular positions and angular sizes of the detectors are calculated using [[FindDetectorsPar]] algorithm. + +Mantid generated PHX file is an ASCII file consisting of the header and 7 text columns. Header contains the number of the rows in the phx file excluding the header. (number of detectors). The column has the following information about a detector: + + * 1st column secondary flightpath,e.g. sample to detector distance (m) -- Mantid specific + * 2nt 0 + * 3rd " scattering angle (deg) + * 4th " azimuthal angle (deg) + * (west bank = 0 deg, north bank = 90 deg etc.) + * 5th " angular width e.g. delta scattered angle (deg) + * 6th " angular height e.g. delta azimuthal angle (deg) + * 7th " detector ID -- Mantid specific. + *--- + + +In standard phx file only the columns 3,4,5 and 6 contain useful information. You should expect to find column 1 to be the secondary flightpath and the column 7 -- the detector ID in Mantid-generated phx files only. + + + *WIKI*/ diff --git a/Code/Mantid/Framework/DataHandling/src/FindDetectorsPar.cpp b/Code/Mantid/Framework/DataHandling/src/FindDetectorsPar.cpp index 400e284c97b..e6e525b7e10 100644 --- a/Code/Mantid/Framework/DataHandling/src/FindDetectorsPar.cpp +++ b/Code/Mantid/Framework/DataHandling/src/FindDetectorsPar.cpp @@ -25,7 +25,8 @@ Kernel::Logger& FindDetectorsPar::g_log=Kernel::Logger::get("DataHandling"); /// Sets documentation strings for this algorithm void FindDetectorsPar::initDocs() { - this->setWikiSummary("The algorithm [[FindDetectorsPar]] returns the angular parameters and second flight path for a workspace detectors (data, usually availble in par or phx file)"); + this->setWikiSummary("Calculates angular positions and sizes of detectors and groups of detectors after the workspace was grouped using ASCII or XML map file. " + "The results can be used to identify the positions of detectors in reciprocal space. Primary usage -- sub-algorithm of [[SaveNXSPE]], [[SavePAR]] or [[SavePHX]] algorithm."); this->setOptionalMessage("The algorithm returns the angular parameters and second flight path for a workspace detectors (data, usually availble in par or phx file)"); } @@ -59,8 +60,8 @@ void FindDetectorsPar::init() "If specified, will use data from file instead of the data, calculated from the instument description"); // - declareProperty("OutputParTable","","If not empty, a table workspace of that " - "name will contain the calculated par-values for the detectors"); + declareProperty("OutputParTable","","If not empty, a name of a table workspace which " + " will contain the calculated par or phx values for the detectors"); } -- GitLab