move weights calculation to resampling
Remove weight initialization from prepare and move the weights calculation to the write step. Also moved the options for the weighting procedure into the sampling options of the preprocess config.
Closes #96 (closed)