Boundary value problems with Atiyah-Patodi-Singer type conditions and spectral triples