gssa.comparator package

Submodules

gssa.comparator.comparator module

class gssa.comparator.comparator.Comparator(left_text, right_text)[source]

Bases: object

diff()[source]
equal()[source]
left_text = None
right_text = None

gssa.comparator.parse module

gssa.comparator.parse.gssa_xml_to_definition(root, label)[source]

gssa.comparator.simulation_definition module

class gssa.comparator.simulation_definition.SimulationDefinition(name)[source]

Bases: object

Abstract definition of a GSSA simulation.

Ideally, this would be incorporated into GSSA itself as a nicer way of representing the GSSA-XML content for processing. It also contains an understanding of diffing. TODO: incorporate SimulationDefinition into server code This represents an argument to an algorithm (more generally, DB-defined lambda function) [see CDM]

class Algorithm(result, arguments, content)[source]

Bases: object

An algorithm is a DB-defined lambda function that takes simulation-time arguments, such as Time or CurrentNeedleLength, and returns a Parameter-like value. In the GSSF case, these are generally MATC functions [see CDM].

arguments = None
content = ''
diff(other)[source]

An Algorithm is defined by its result (parameter), arguments (above) and content (textual).

result = ''
class SimulationDefinition.Argument(name)[source]

Bases: object

diff(other)[source]
name = ''
class SimulationDefinition.Needle(index, cls, file, parameters)[source]

Bases: object

A percutaneous needle.

More generally, one of a set of possible implements used in a procedure, possibly with repetition) [see CDM]

cls = ''
diff(other)[source]

Needles are defined by their class, ID/file and their parameters (inc. location) [see CDM]

file = ''
index = ''
parameters = None
class SimulationDefinition.NumericalModel(definition, regions, needles)[source]

Bases: object

The Numerical Model is a template or, say, a Python code using the helper Go-Smart module to define run-time GSSA parameters. The code is its definition, along with the regions, needles, parameters and so forth needed to complete it [see CDM].

definition = ''
diff(other)[source]
needles = None
regions = None
class SimulationDefinition.Parameter(name, value, typ)[source]

Bases: object

This is the fundamental class representing an arbitrary-type attribute of a simulation [see CDM].

diff(other)[source]
name = ''
typ = ''
value = None
class SimulationDefinition.Region(id, name, format, input, groups)[source]

Bases: object

Regions are geometric subdomains (2D/3D) [see CDM].

diff(other)[source]

A region’s definition is, strictly, in the separate geometry file describing it (usually), but the GSSA-XML should be able to provide enough information to tie it down.

format = ''
groups = None
id = ''
input = ''
name = ''
class SimulationDefinition.Transferrer(cls, url)[source]

Bases: object

This is not part of the CDM, being a setting indicating how the simulation server should receive or send separate files, however it is a key component of GSSA-XML.

cls = ''
diff(other)[source]
url = ''
SimulationDefinition.add_algorithm(result, arguments, content)[source]
SimulationDefinition.add_parameter(name, value, typ)[source]
SimulationDefinition.algorithms = None
SimulationDefinition.diff(other)[source]

Produce a series of human-readable messages describing the non-equivalences between this and another (“that”) definition.

SimulationDefinition.name = 'This'
SimulationDefinition.numerical_model = None
SimulationDefinition.parameters = None
SimulationDefinition.set_numerical_model(definition, regions, needles)[source]
SimulationDefinition.set_transferrer(cls, url)[source]
SimulationDefinition.transferrer = None

Module contents