pysgems.algo package
Submodules
pysgems.algo.sgalgo module
- class pysgems.algo.sgalgo.XML(project, algo_dir=None)[source]
Bases:
Package- auto_fill()[source]
Ensures binary file of point set are properly generated. In case of kriging, cokriging… ensures proper xml attribute names for feature and feature grid. This is still quite specific and lots of nested loops, ideally parse all Sgems default XML and build proper ‘auto_fill’ method.
- show_tree()[source]
Displays the structure of the XML file, in order to get the path of updatable variables.
- xml_reader(algo_name)[source]
Reads and parse XML file. It assumes the algorithm XML file is located in the algo_dir folder. :param algo_name: Name of the algorithm, without any extension, e.g. ‘kriging’, ‘cokriging’…
- xml_update(path: str, attribute_name: Optional[str] = None, value: Optional[str] = None, new_attribute_dict: Optional[dict] = None, show: bool = 1)[source]
Given a path in the algorithm XML file, changes the corresponding attribute to the new attribute :param path: object path :param attribute_name: name of the attribute to modify :param value: new value for attribute :param new_attribute_dict: dictionary defining new attribute :param show: whether to display updated xml or not