nodespec function

Calculates the node-based specialisation index