palantir.alignment.alignDatasets
- palantir.alignment.alignDatasets(dfRef, dfTo, dtRef=None, dtTo=None, diffMax=None)
Returns a tuple of
pandas.DataFrame
with aligned rowsFor each mjd value in dfTo, this procedure tries to find a value in mjdRef that is considered ‘alignable’, and picks up its corresponding index.
If an mjdTo element cannot be aligned with any mjdRef element, an index is set to -1 at its position
- Parameters
dfRef (
pandas.DataFrame
) – Must have an mjd column sorted ascendantly.dfTo (
pandas.DataFrame
) – Must have an mjd column sorted ascendantly.dtRef (
int
, optional) – If dfRef has regular data interval between consecutive rows, None otherwise.dtTo (
int
, optional) – If dfTo has regular data interval between consecutive rows, None otherwise.diffMax (
float
, optional) – Maximal difference (in seconds) under which we can consider two timestamps alignable.
- Returns
A tuple of DataFrame objects with the alignable rows only
- Return type