Automated analysis of neural calcium imaging datasets based on robust statistics