Angular-dependent vortex pinning mechanisms in YBa2Cu3O7 coated conductors and thin films