viperleed.calc.files.parameters.read

viperleed.calc.files.parameters.read(filename='PARAMETERS')[source]

Return an Rparams with the raw contents read from a PARAMETERS file.

Parameters:

filename (str or Path, optional) – The file to be read. The default is ‘PARAMETERS’.

Returns:

rpars – Object storing parameters for current run. Contains the raw parameters read in this function in its .readParams attribute. The parameters read are not interpreted. For that, call parameters.interpret passing the the same rpars object.

Return type:

Rparams

Raises:
  • FileNotFoundError – If filename does not exist.

  • ParameterNotRecognizedError – If one of the parameters read from filename is not a known one, or if a parameter read has no value.