Correction to: Nature Methods https://doi.org/10.1038/s41592-022-01426-1, published online 4 April 2022.

In the version of this article initially published, there were errors in the affiliations shown for John D’Uva. The correct affiliations should read: 1Princeton Neuroscience Institute, Princeton University, Princeton, NJ, USA; 2Department of Molecular Biology, Princeton University, Princeton, NJ, USA; and 9Present address: Department of Biomedical Engineering, Johns Hopkins University School of Medicine, Baltimore, MD, USA. Further, the source data files for Extended Data Figs. 5 and 6 were initially listed as source data for Extended Data Figs. 4 and 5. The files have been revised online and the errors corrected in the HTML and PDF versions of the article.