Defect density and carrier lifetime in nitrogen doped ultrananocrystalline and polycrystalline diamond