sampling_period function

Extract sampling period