sardine.inputs package

Submodules

sardine.inputs.excel_interface module

sardine.inputs.inputs_validator module

class sardine.inputs.inputs_validator.InputsValidator[source]

Bases: object

static validate_sequence(source_lines, source_sequence, receiver_lines, receiver_sequence)[source]

This function’s purpose is to check the logical consistency between the expected and actual sequences of source and receiver operations Creates an empty list of errors found Gets the source lines available by removing the suffixes “A”/”B” (if there are) from the given source lines, creates a set with the resulting list Gets the shot lines by removing the suffixes “A”/”B” (if there are) from the given source sequence, creates a set with the resulting list If the source lines set and the shot lines set have different lengths, it prints a Warning message and appends an error to the errors found list Gets the receiver lines set with the list of the given receiver lines Gets the deployment lines by looking for the action=’LO’ items in the given receiver sequence, creates a set with the resulting list Gets the recovery lines by looking for the action=’PU’ items in the given receiver sequence, creates a set with the resulting list If the receiver lines set and the deployment lines set have different lengths, it prints a Warning message and appends an error to the errors found list If the receiver lines set and the recovery lines set have different lengths, it prints a Warning message and appends an error to the errors found list

Explains logic:

For each line in the receiver sequence:
    If the action is pick up (PU):
    - Gets a list of the lines previously deployed, as a list of the lines prior to the current with action=LO
    - Gets a list of the lines not previously deployed, as a list of the lines that are not in the previously deployed list
    - If the list of lines not previously deployed is not empty, it prints a Warning message and appends an error to the errors found list

Returns the list of errors found

sardine.inputs.parameters_interpreter module

Module contents