Most of this code was taken from acalib. https://github.com/ChileanVirtualObservatory/acalib/tree/master/acalib
The first version of this library can be used to replicate the results of (Araya et al., 2018) https://www.sciencedirect.com/science/article/pii/S2213133717300239