The posterior samples output from the code should be clustered to separate out the modes (particular signals can be shared between multiple model components). This would cluster e.g. sinusoids with the same periods and amplitudes, and flares with the same/overlapping start times. One way of doing this might be to use an infinite Gaussian Mixture Model, e.g. as implemented in scikit-learn.