Change tr() to transformation() and add python binding. Make datum_shift db update in a transaction