This is the code used to produce the hardness measures used from: