Beispiel #1
0
def testGetEvents(validBidsI, imageMetadata, tmpdir):
    archive = BidsArchive(tmpdir)
    archive.appendIncremental(validBidsI)

    # Get the events from the archive as a pandas data frame
    events = archive.getEvents()[0].get_df()
    assert events is not None

    # Check the required columns are present in the events file data frame
    for column in ['onset', 'duration', 'response_time']:
        assert column in events.columns
Beispiel #2
0
def testGetEvents(validBidsI, imageMetadata, tmpdir):
    archive = BidsArchive(tmpdir)
    archive._appendIncremental(validBidsI)

    # Get the events from the archive as a pandas data frame
    events = archive.getEvents()[0].get_df()
    events = correctEventsFileDatatypes(events)
    assert events is not None

    # Check the required columns are present in the events file data frame
    for column in DEFAULT_EVENTS_HEADERS:
        assert column in events.columns

    # Check the columns are of the proper types
    for column, dtype in BIDS_EVENT_COL_TO_DTYPE.items():
        if column in events.columns:
            assert events[column].dtype == dtype