Error analysis and thermal expansion measurement with electron-beam moiré