These instructions will take you through the steps needed to identify the correct window radius to use in the surface fitting routines, following the techniques published in Roering et al. (2010) and Hurst et al. (2012).
Here is a quick overview of how to set up and run the code, if you have done it before:
This driver file will run the surface fitting routines at a range of window sizes up to 100 meters. It then calculates the inter quartile range, standard devaiation and for each surface and outputs these data as a text file.
This code will produce:
This code is for research purposes and is under continuous development, so we cannot guarantee a bug-free experience!
See the other docs on this site for help with loading data into the correct format and general help with using this suite of software: Getting data into LSDTopoToolbox
The code is compiled using the provided makefile, PolyFitWindowSize.make and the command:
make -f PolyFitWindowSize.make
Which will create the binary file, PolyFitWindowSize.out to be executed.
The driver is run with three arguments:
The syntax on a unix machine is as follows:
./PolyFitWindowSize.out <path to data files> <Prefix> <file format>
And a complete example (your path and filenames may vary):
./PolyFitWindowSize.out /home/s0675405/DataStore/Final_Paper_Data/NC/ NC_DEM flt
The final outputs are stored in a plain text file, which is written to the data folder supplied as an argument.
<prefix>_Window_Size_Data.txt
This file contains the data needed to select the correct window size. The file is in the following format:
Length_scale Curv_mean Curv_stddev Curv_iqr
These files can be analysied using a series of python routines detailed below and located here.
The latest version of the python scripts which accompany this analysis driver can be found here and provide a complete framework to select a window size for surface fitting.
Set the path, filename and outpath variables on lines 29-31 to point to your data, generated from the c++ driver. If you want to save the figure, toggle the commented lines:
Run the code and look at the generated graph. Using Roering et al (2010) Figure 1 and Hurst et al. (2012) Figure 4 for guidance on how to interpret the results.