pred_magma function

Magma prediction