DoF function

Degrees of freedom extractor