Feature/validate sample period

Fixes #452.