next up previous contents
Next: About this document ... Up: The Python API Previous: Python demonstration script   Contents


API description

ClassFileOut.open(file,new,over,size,single)

    Open a Class output file. There must be only one output file opened
    at the same time.

    Parameters
    ----------
    file: the file name
    new: can the file already exist, i.e. reopen it for appending (False),
          or should it be new (True)?
    over: overwrite (True) the previous version of the file, if 'new' is
          requested?
    size: the maximum number of observations the file will store (V1 Class
          files, obsolescent parameter)
    single: if True, there can be only one version of each observation
          in the file.

ClassFileOut.close()

    Close a Class output file.

    Parameters
    ----------
    None

ClassObservation.write()

    Write the observation to the output file currently opened (see
    ClassFileOut.open). Sections present must have been declared and
    and filled before, they must be at least the General, Position,
    and Spectroscopy or Continuum Drift sections.

    If obs.head.gen.num is 0, Class will automatically give the next
    available (unused) number in the file.



Gildas manager 2023-06-01