adamspy package¶
Subpackages¶
- adamspy.acar package
- adamspy.adripy package
- Submodules
- adamspy.adripy.constants module
- adamspy.adripy.database module
- adamspy.adripy.drillsim module
- adamspy.adripy.event module
- adamspy.adripy.hole module
- adamspy.adripy.solver_settings module
- adamspy.adripy.string module
- adamspy.adripy.tool module
- adamspy.adripy.utilities module
- Module contents
- adamspy.aviewpy package
- adamspy.postprocess package
- adamspy.waterfall package
Submodules¶
adamspy.adamspy module¶
Functions for manipulating adams files and data
-
exception
adamspy.adamspy.AviewError[source]¶ Bases:
ExceptionRaise this error to if a known error occurs in the log file.
-
adamspy.adamspy.get_log_errors(log_file)[source]¶ Checks the log file for errors of the type AviewError.
Parameters: log_file (str) – Filename of aview log file (usulally aview.log)
-
adamspy.adamspy.get_mdi()[source]¶ Determine the command used to launch Adams MDI.
This function resolves the Adams MDI launcher using the following priority: 1. If the environment variable
ADAMS_LAUNCH_COMMANDis set and refers toan executable found on the system PATH, that value is used.- If
ADAMS_LAUNCH_COMMANDis set but invalid, the default MDI launcher is used if available, and a warning is issued. - If
ADAMS_LAUNCH_COMMANDis not set, the default MDI launcher is used if available. - If neither the environment variable nor the default launcher can be resolved, an exception is raised.
The function never returns an empty string and will fail fast if no valid MDI launcher can be found.
Returns: Command used to launch Adams MDI (e.g., mdiormdi.bat).Return type: str Raises: FileNotFoundError– IfADAMS_LAUNCH_COMMANDis set but invalid and the default MDI launcher is not available, or if neither option can be resolved.- If
-
adamspy.adamspy.get_n_threads(adm_file)[source]¶ Searches adm_file for the NTHREADS statement and returns its value.
Parameters: adm_file (str) – Path to an Adams Dataset (.adm) file Returns: Number of threads set adm_file Return type: int
-
adamspy.adamspy.get_simdur_from_acf(acf_file)[source]¶ Reads an Adams command file (.acf) and returns the total duration of the simulation.
Parameters: acf_file (str) – Filepath to an Adams message file (.msg) Raises: RuntimeError– Returned if no simulation end time was found in the specified message fileReturns: Total duration of the simulation Return type: float
-
adamspy.adamspy.get_simdur_from_msg(msg_file)[source]¶ Reads an Adams message file (.msg) and returns the total duration of the simulation.
Parameters: msg_file (str) – Filepath to an Adams message file (.msg) Raises: RuntimeError– Returned if no simulation end time was found in the specified message fileReturns: Total duration of the simulation Return type: float