Identifier write_hdrkey Purpose Write a keyword value and optionally the corresponding comment into the header of an ISAP structure Synopsis write_hdrkey, header, keyword, value, status [,comment=comment] [,pos=pos] [,second=second] [,errstat=errstat] Arguments Name I/O Type Description ----------------------------------------------------- header I string The input header keyword I string Keyword to write into header value I varies The value of the keyword. Allowed values: integer or long, float or double, string, and 0B for logical false or 1B for logical true. status O integer status code 0 keyword inserted as a new header line 1 keyword existed, overwritten 2 like 1, but old and new type differ comment I string The comment for the keyword pos The position at which the new keyword shall be inserted. Ignored if keyword already exists second If set the new keyword is written directly before the END line of the secondary header, else directly before the END line of the primary header (default). Ignored if pos is set or if keyword is found in primary header errstat I/O integer error status, 0 if ok, 1 if fatal Returns Description Writes a keyword into a header either before the end of the primary header (default) or before the end of the secondary header (if /second is set) or at the given position (if pos is given). If the keyword is already present, it is overwritten At the moment the first occurence of the keyword is taken. So the primary and secondary MUST NOT HAVE IDENTICAL KEYWORDS! Ensures that the product has correct length (blocks of 2880 characters) according to the fits standard. In case of a failure the program returns to the calling level and the header is not overwritten Comment Example 1) header = aar.header write_hdrkey, header, 'TUNIT1', 'cm', stat if stat eq 1 then aar.header = header This will overwrite the TUNIT1 value in the secondary header Dependencies CALLS: get_hdrkey, sap_error, sap_keyword_set CALLED FROM: ascii2yaaar, spect_form, wave_form, wav_dop Category ISAP Filename write_hdrkey.pro Author E. Sturm (--> ES) Version 1.1 History 1.0 25-01-96 ES First version 1.1 10-07-96 ES errstat added ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Copyright (C) 1995, Max-Planck-Institut fuer extraterrestrische Physik (MPE); Garching, Germany ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;