ZShape Analysis Code