Identifier get_unit Purpose extract the unit(s) of one or several tags in the data part of a given structure (normally AAR) Synopsis unit = get_unit(strucin, tag, stat) Arguments Name I/O Type Description ----------------------------------------------------- strucin I struct (AAR) Sectrum to be checked tag I string/ name of the tag(s) for which the unit strarr shall be checked stat O int error status 0 if ok, 1 if fatal error Returns unit = lower case strarr containing the value(s) of the TUNIT keyword(s) corresponding to the given tag(s) 0 if fatal error occured Description Finds index n of tag in the data part. Reads value of corresponding TUNITn. Returns values. Comment 'microns' (LWS) is treated as 'um' Example units = get_unit(saar,'wave',stat) units = get_unit(saar,['wave', 'flux', 'stdev'],stat) Dependencies CALLS: get_hdrkey, is_struct, sap_error CALLED FROM: arithm, dered (general auxillary routine) Category ISAP Filename get_unit.pro Author E. Sturm (--> ES) Version 1.2 History 0.1 11-10-95 ES first version 1.0 30-11-95 ES V1 delivery 1.1 29-01-96 ES new call to is_struct, replace read_fits_key with get_hdrkey 29-02-96 ES error status added 1.2 26-07-96 ES treat 'microns' as 'um' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Copyright (C) 1995, Max-Planck-Institut fuer extraterrestrische Physik (MPE); Garching, Germany ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;