added option for median filter to prep map script