next up previous contents index
Next: ANALYSE Language Internal Help Up: LAS Language Internal Help Previous: UPDATE   Contents   Index


        LAS\WRITE [ObsNum]

    Writes the observation in the R buffer onto the output file. If  a  ver-
    sion  of  this  observation is already in the file, a new version of the
    observation is created. A new observation number can be specified as ar-
    gument.  If  the implicit (R%HEAD%GEN%NUM) or explicit (argument ObsNum)
    value is 0, automatic numbering is used i.e. a new (unused  yet)  number
    is chosen (in pratice highest number in use plus one).

    The behaviour depends on the "File Type" (see FILE command):
    - for  files  of type MULTIPLE, a new version of the spectrum is written
      if the ObsNum already exists in the file.
    - for files of type SINGLE, the ObservationNumber is  automatically  set
      to  the  next  one available in the file. If an ObsNum is specified in
      the command, WRITE checks if it already exists. If so, it  returns  an
      error; if not, it sets the specified ObsNum to the written spectrum.
    - for  both,  the  version value (R%HEAD%GEN%VER) is always incremented,
      assuming something has changed in R between the time it has been load-
      ed in memory (or last written) and the current write.
    On  return  of the command, R%HEAD%GEN%NUM and R%HEAD%GEN%VER are set to
    the values which have been used.

    The information written depends on the operations done on  the  observa-
    tion.  Existing  fit results are written. The calibration information is
    written only if the calibration is checked  (see  SET  CALIBRATION  com-

    In the case of (old) on-the-fly data, WRITE automatically splits the da-
    ta into records with entry numbers starting at 1 unless the  observation
    number of the first record is given explicitly.

Gildas manager 2018-02-17