calcPI function

Calculate Preservation Index