Geomagnetic field models covering past millennia rely on two main data sources: archaeomagnetic data, that provide snapshots of the geomagnetic field at specific locations, and sediment records, that deliver time series of the geomagnetic field from individual drill cores. The limited temporal and spatial global coverage with archaeomagnetic data necessitates use of sediment data, especially when models go further back in time. However, the accurate preprocessing and interpretation of sediment data is crucial. Unlike archaeomagnetic data, sediment data does not provide absolute values for intensities and declinations; instead, it represents relative variations. The detrital remanent magnetization (DRM) of sediment records is influenced by various depositional (dDRM) effects that can result in inclination shallowing, as well as post-depositional (pDRM) processes that cause a delayed and smoothed signal. To address the distortion associated with the pDRM effects, a novel class of flexible parameterized lock-in functions has been proposed. These lock-in functions involve four parameters, which are estimated using a Bayesian modeling technique and archaeomagnetic data. By extending the space of hyperparameters to include the calibration factor for intensities, the declination offsets and the inclination shallowing factor, we present a fully Bayesian preprocessing method for sediment records in form of a Python package, called extit{sedprep}. By applying the estimated parameters to the raw sediment data extit{sedprep} is able to provide a calibrated and preprocessed palaeomagnetic record.