Array-based convolutional neural networks for automatic earthquake detection and 4D localization