Following on from yesterday's Geolunch, here's the first Applied Geophysical ArchaeoPy challenge:
Load XYZ .CSV file and plot the data within python
You can do this in any way you want but some hints and tips are given below:
- Download the data from http://www.archaeopy.org/wp-content/uploads/2014/04/xyz.csv
- Numpy.loadtxt to load in a CSV file
- Matplotlib.mlab.griddata to grid the XYZ data
- Matplotlib.pyplot to plot the data
- If you get stuck, google is your friend!
Its not very often that we use completely raw geophysical data. Usually we'll have to apply some processing steps to make the data more usable.
A simple initial processing step is a Zero Mean Traverse. We don't need any extra software packages to do this.
Numpy.mean can be used to calculate the mean of a group of values, or more usefully return the means of rows/columns in an array.
Numpy.subtract can be used to remove that value from rows/columns.
You might want to use loops and array indexing to do this but you shouldn't have to.
Upload your example to the ArchaeoPY Bitbucket (details here).
Prize for the most readable and well documented code.