pybacktrack.convert_age_to_depth_files
- pybacktrack.convert_age_to_depth_files(input_filename, output_filename, model=pybacktrack.AGE_TO_DEPTH_DEFAULT_MODEL, *, age_column_index=0, reverse_output_columns=False)
Converts age to depth by reading age rows from input file and writing rows containing both age and depth to output file.
- Parameters:
input_filename (string) – Name of input text file containing the age values. A single age value is obtained from each row by indexing the age_column_index column (zero-based index).
output_filename (string) – Name of output text file containing age and depth values. Each row of output file contains an age value and its associated depth value (with order depending on reverse_output_columns).
model ({pybacktrack.AGE_TO_DEPTH_MODEL_RHCW18, pybacktrack.AGE_TO_DEPTH_MODEL_CROSBY_2007, pybacktrack.AGE_TO_DEPTH_MODEL_GDH1} or function, optional) – The model to use when converting ocean age to basement depth. It can be one of the enumerated values, or a callable function accepting a single non-negative age parameter and returning depth (in metres).
age_column_index (int, optional) – Determines which column of input file to read age values from.
reverse_output_columns (bool, optional) – Determines order of age and depth columns in output file. If True then output depth age, otherwise output age depth.
- Raises:
ValueError – If cannot read age value, as a floating-point number, from input file at column index age_column_index.
Notes
Changed in version 1.5: Some arguments (after
*) are now keyword-only (ie, can no longer be specified as positional arguments).