pastas.utilsΒΆ

This module contains utility functions for working with Pastas models.

Functions

add_file_handlers

Method to add file handlers in the logger of Pastas

datenum_to_datetime

Convert Matlab datenum into Python datetime.

datetime2matlab

excel2datetime

Method to convert excel datetime to pandas timetime objects.

frequency_is_supported

Method to determine if a frequency is supported for a Pastas model.

get_sample

Sample the index so that the frequency is not higher than the frequency

get_stress_tmin_tmax

Get the minimum and maximum time that all of the stresses have data

initialize_logger

Internal method to create a logger instance to log program output.

remove_console_handler

Method to remove the console handler to the logger of Pastas.

remove_file_handlers

Method to remove any file handlers in the logger of Pastas.

set_console_handler

Method to add a console handler to the logger of Pastas.

set_log_level

Set the log-level of the console.

show_versions

Method to print the version of dependencies.

timestep_weighted_resample

Resample a timeseries to a new tindex, using an overlapping period weighted average.

timestep_weighted_resample_fast

Resample a time series to a new frequency, using an overlapping period weighted average.

to_daily_unit

Experimental method, use wth caution!

validate_name

Method to check user-provided names and log a warning if wrong.