libpyvinyl.Parameters.Collections.CalculatorParameters

libpyvinyl.Parameters.Collections.CalculatorParameters

class libpyvinyl.Parameters.Collections.CalculatorParameters(parameters=None)

Collection of parameters related to a single calculator

Parameters are stored in a dict using their name as key

__init__(parameters=None)

Creates a Parameters object, optionally with list of parameter objects

Methods

__init__([parameters])

Creates a Parameters object, optionally with list of parameter objects

add(parameter)

Adds parameters to this parameters object, either single or list

check_list_type(parameter_list)

Checks given list of parameters is a list and contains only parameter objects

check_type(parameter)

Checks given parameter is of type Parameter

from_dict(params_dict)

Initialize an instance from a dict.

from_json(fname)

Initialize an instance from a json file.

new_parameter(*args, **kwargs)

Creates a new parameter with given arguments and adds to this Parameters object

print_indented(indents)

returns string describing this object, can optionally be indented

to_dict()

to_json(fname)

Save this parameters class to a human readable json file.

add(parameter)

Adds parameters to this parameters object, either single or list

check_list_type(parameter_list)

Checks given list of parameters is a list and contains only parameter objects

check_type(parameter)

Checks given parameter is of type Parameter

classmethod from_dict(params_dict: dict)

Initialize an instance from a dict.

Parameters

fname (str) – The filename (path) of the json file.

classmethod from_json(fname: str)

Initialize an instance from a json file.

Parameters

fname (str) – The filename (path) of the json file.

new_parameter(*args, **kwargs)

Creates a new parameter with given arguments and adds to this Parameters object

print_indented(indents)

returns string describing this object, can optionally be indented

to_json(fname: str)

Save this parameters class to a human readable json file.

Parameters

fname (str) – Write to this file.