export_example_format_directory

petrophys.reporting.export_example_format_directory

export_example_format_directory(input_dir, output_dir, pattern='*.las', recursive=False)[source]

Rewrite every LAS file in a folder in the example delivery format.

Each file is read and rewritten by export_example_format_las(), without running an interpretation. The output folder mirrors the input folder’s layout. A file that cannot be read or written is recorded as failed and the others still run.

Parameters:
  • input_dir (str or Path) – Folder of LAS files.

  • output_dir (str or Path) – Folder for the rewritten files; created if needed.

  • pattern (str, optional) – Glob pattern selecting the input files; "*.las" by default.

  • recursive (bool, default False) – Search subfolders of input_dir as well.

Returns:

One result per input file, in sorted path order.

Return type:

list of ExampleFormatExportResult

See also

export_example_work_package_directory

Interpret each file before writing it.

Examples

>>> from petrophys.reporting import (
...     export_example_format_directory, write_example_format_report)
>>> results = export_example_format_directory("logs", "delivery")
>>> write_example_format_report(results, "delivery/report.csv")
PosixPath('delivery/report.csv')