geonaut / Matrix-interpolation-tool-NumPy-SciPy-Nose-tests-

A tool for interpolating missing values in a 2D matrix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tool for interpolating missing data in a matrix

This tool will use a specified interpolation method to fill in missing values in a matrix. The interpolated values are a function of the neighbouring values.

It is based on Python 3.6. I have put the file in a Python 3 venv, so the Python version is controlled.

Using the code:

  • Activate the venv: source venv/bin/activate
  • Run the code: python run.py
  • Run the tests: nosetests
  • Run the tests with coverage: nosetests --with-coverage --cover-erase --cover-package=interpolation_tool --cover-html

Notes:

  • The core interpolation function has a flaw - the interpolation doesn't work where there are <3 adjacent values i.e. at the corners of the matrix.
  • The output of the interpolation function is a .csv file
  • The tool can handle adjacent NaNs

To Do:

  • Investigate the 'corner problem', to see if the interpolation can take place for fewer (<3) adjacent values. This is a limitation of the numpy module, and may even be the preferred behaviour.

About

A tool for interpolating missing values in a 2D matrix


Languages

Language:Python 97.1%Language:C 1.3%Language:C++ 0.6%Language:HTML 0.4%Language:JavaScript 0.3%Language:Roff 0.1%Language:Fortran 0.1%Language:CSS 0.1%Language:MATLAB 0.0%Language:Shell 0.0%Language:Objective-C 0.0%Language:Makefile 0.0%