viktor.external.dstability
DStabilityAnalysis
- class viktor.external.dstability.DStabilityAnalysis(input_file)¶
Bases:
ExternalProgram
DStabilityAnalysis can be used to perform an analysis using D-Stability on a third-party worker. To start an analysis call the method
execute()
, with an appropriate timeout (in seconds). To retrieve the results call the methodget_output_file()
, afterexecute()
.Example usage:
file = File() # create a writable File object path = Path(file.source) # request its path dstability_model.serialize(path) # let GEOLIB write to the file analysis = DStabilityAnalysis(input_file=file) # pass the file with content to DStabilityAnalysis analysis.execute(timeout=10) output_file = analysis.get_output_file()
Exceptions which can be raised during calculation: -
viktor.errors.ExecutionError
: generic error. Error message provides more information- Parameters
input_file (
File
) – File object with the body of the .stix input file.
- get_output_file(extension='.stix')¶
Method can be used to retrieve the results generated by running an external analysis. Call method
execute()
first andget_output_file()
afterwards.- Parameters
extension (
str
) – extension of the file you want to return; ‘.stix’- Return type
Optional
[File
]