Identifier make_detmask Purpose make a detector mask out of the det and band switches Synopsis detmask = make_detmask(band, det, struc, detoffset, stat) Arguments Name I/O Type Description ----------------------------------------------------- band I scalar/ Detector band(s) to which operation intarr shall be limited (SWS specific) det I scalar/ Detector(s) to which operation intarr shall be limited struc I struct input spectrum detoffset I int offset for detector counting (LWS: 0-9, SWS: 1-52) stat O int error stat, 0 if ok, 1 if fatal error occured Returns detmask = intarr(52), a detector mask indicating the choosen detectors. 0 if fatal error occured Description If no band or det are given then all elements of detmask are set to 1. If det and/or band are given, they are checked for a valid range and the corresponding indices in detmask are set to 1. If det and band are conflicting a warning is issued. Comment detmask is intarr(52) even in case of LWS. This slight 'overkill' saves some case distinctions. Example detmask = make_detmask(band, det, in1, det1offset, stat) Dependencies CALLS: sap_error, sap_keyword_set CALLED FROM: arithm Category ISAP Filename make_detmask.pro Author E. Sturm (--> ES) A. Fiedler (--> AF) Version 1.0 History 0.1 14-09-95 ES (based on D. Lutz's routine) 0.2 27-09-95 AF modified bandind and check for valid detector range 1.0 30-11-95 ES V1 delivery 1.1 29-02-96 ES error stat added ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Copyright (C) 1995, Max-Planck-Institut fuer extraterrestrische Physik (MPE); Garching, Germany ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;