Resampling a geophysical log to a fixed interval

Options
OMIDMahmoodi
OMIDMahmoodi Posts: 3 Calcite Rank Badge
edited February 2023 in GeoStudio
Hi,
I have a .csv file containing depth and resistivity value measured at each depth. The measurements interval is not consistent (it varies between 3 and 7 meter). How can I create a new file with consistent depth interval (say 5 m) along the hole with linearly interpolated resistivity values for new depth column?
I tried pandas functions (rolling, resampling), but they work with time-series data.

p.s. I don't have Drillhole plotting extension, so I cannot use the 'Composite database' tool.

Regards
O.

Comments

  • SeanWalker
    Options
    Hi Omid
    I read this last week and forgot about it.
    For the interpolation you can use numpy.interp (https://docs.scipy.org/doc/numpy/reference/generated/numpy.interp.html)
    You need to provide the x and y values for your data (this would be depth and resistivity) and the x values you want to interpolate onto x_interp and return the y values.

    I would suggest reading your depth and res into numpy arrays. Calculate the min and max depth and define the array for x_interp that spans the depth of the hole at the interval you want (numpy.linspace is good for this). It doesn't look like interp will extrapolate so I imagine the min and max values will have to be within the range.

    Scipy has quite a few other interpolation routines that you could try as well.

    Good luck
    Sean