Diagnose

From LIBISIS
Revision as of 15:12, 30 January 2008 by Dickon Champion (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

[Diagnostic tools for homer]

The main diagnostic tool for homer is the DIAG function. DIAG creates an [IXTmask] object with optional file output (nexus or ascii) for a given monochromatic [IXTrunfile], using the data in one (optionally two) white beam vanadium integral [IXTrunfile], and the integrals of the background for the monochromatic run, this background integration needs to be carried out in a separate process using spec or homer. It also outputs a matlab structure 'cause' detailing information on which files contributed to the exclusion of which spectra and the reason for their exclusion, and if appropriate the value which failed the test applied.

DIAG will optionally load a hard mask file, an [IXTmask] object or file (nexus or ascii), that is a list of spectra that are to be masked regardless of any diagnostic operations. Sometimes it is desirable to consider banks of spectra separately such as those connected to psd and non-psd detectors. If this is the case then an [IXTmap] object or file (nexus or ascii) may be supplied as an argument to the DIAG routine, defining these groups of spectra.

There are also arguments to DIAG which set certain limits and tolerances in the diagnostic process of DIAG, all of which have default values. Some of these values bear relation to VMS DIAG input, in each case this has been defined below.

An simple example function call to DIAG might be as follows:

>> maps_bank=IXTmap({~[1:17280],~[17281:18432],~[18433:32256],~[32257:41472]});
>> monosam=read_nxs('monosam.nxs',IXTrunfile,'mono_sam');
>> ~[mask,cause]=diagnose(monosam,'rf_v1','wbrf.nxs','rf_v1_entry','whitebeam','bank',maps_bank,'hmask','4to1_022.msk','nomess');

<?plugin OldStyleTable caption="Keyword arguments for DIAG input" border||=2 |< *Keyword* |^ *Parameter Type* |^ *Brief Description* |< 'rfile' |^ '{file}.nxs' or [IXTrunfile] |< monochromatic sample background integral [IXTrunfile], can be loaded from a nexus file or a matlab object |< 'rf_v1'|^ '{file}.nxs' or [IXTrunfile] |< white beam vanadium integral [IXTrunfile], can be loaded from a nexus file or a matlab object, /V1 argument from VMS DIAG |< 'rf_v2'|^ '{file}.nxs' or [IXTrunfile] |< second white beam vanadium integral [IXTrunfile], can be loaded from a nexus file or a matlab object ~[default: empty object with false validity], /V2 argument from VMS DIAG |< 'rf_ZC' |^ '{file}.nxs' or [IXTrunfile] |< zero count integral [IXTrunfile], can be loaded from a nexus file or a matlab object. a runfile in which there has been an integral over the whole time range to spot zero counts |< 'hardmask'|^ '{file}.msk', '{mask}.nxs' or [IXTmask] |< file (nexus or ascii) or [IXTmask] object defining the hard mask ~[default: empty object with false validity], /HARD argument from VMS DIAG |< 'bank' |^ '{file}.map', '{map}.nxs' or [IXTmap] |< file (nexus or ascii) or [IXTmap] object defining the spectra banks of the instrument ~[default: empty object with false validity] |< 'tiny'|^ numeric |< |< 'huge'|^ numeric |< |< 's_zero'|^ logical |< /ZERO_BKGD from VMS DIAG |< 's_out_lo'|^ numeric |< low outlier limit for monochromatic sample background integral |< 's_out_hi'|^ numeric|< high outlier limit for monochromatic sample background integral |< 'sv_lo' |^ numeric |< desc |< 'sv_hi'|^ numeric |< /FACTOR argument from VMS DIAG |< 'sv_sig' |^ numeric |< desc |< 'v_zero'|^ logical |< desc |< 'v_out_lo'|^ numeric |< low outlier limit for vanadium integral |< 'v_out_hi'|^ numeric|< high outlier limit for vanadium integral |< 'vv_lo' |^ numeric |< /VLOW argument from VMS DIAG |< 'vv_hi'|^ numeric |< /VHIGH argument from VMS DIAG |< 'vv_sig' |^ numeric |< desc |< 'r'|^ numeric |< /STABILITY argument from VMS DIAG |< 'r_sig' |^ numeric |< desc |< 'rfile_entry'|^ 'string' |< nexus file entry_name for monochromatic sample background ~[default: ] |< 'rf_v1_entry'|^ 'string' |< nexus file entry_name for first whitebeam vanadium integral ~[default: ] |< 'rf_v2_entry'|^ 'string |< nexus file entry_name for second whitebeam vanadium integral ~[default: ] |< 'hmask_entry'|^ 'string |< nexus file entry_name for hard mask ~[default: ] |< 'bank_entry'|^ 'string |< nexus file entry_name for bank specification~[default: ] ?>

<?plugin OldStyleTable caption="Keyword arguments for DIAG output" border||=2 |< 'out_nex'|^ '{file}.nxs |< nexus output mask filename specification ~[default: 'out.nxs'] |< 'out_nex_entry'|^ 'string' |< out nexus mask file entry_name ~[default: ] |< 'out_asc'|^ '{file}.msk' |< ascii output mask filename specification ~[default: 'out.msk'] |< 'summary'|^ logical |< flag stipulating text output summary of reasons for spectrum exclusion ~[default: true] |< 'messages'|^ logical |< flag stipulating text output of numerical values calculated for spectrum exclusion ~[default: false] ?>