On the measurement of dislocation core periods by nanodiffraction