Uncovering delayed patterns in noisy and irregularly sampled time series: An astronomy application