Calculations of pseudo magnetic fields from strain fields