Advanced signal processing and machine learning tools for non-invasive foetal electrocardiography and intracardiac electrophysiology