Dynamic variation of biaxial strain in optimally doped and underdoped YBa2Cu3O7−δ thin films