Skip to content

merge.py

LinearizedPositionOutput

Bases: _Merge, SpyglassMixin

Source code in src/spyglass/linearization/merge.py
@schema
class LinearizedPositionOutput(_Merge, SpyglassMixin):
    definition = """
    merge_id: uuid
    ---
    source: varchar(32)
    """

    class LinearizedPositionV0(SpyglassMixin, dj.Part):  # noqa: F811
        definition = """
        -> LinearizedPositionOutput
        ---
        -> LinearizedPositionV0
        """

    class LinearizedPositionV1(SpyglassMixin, dj.Part):  # noqa: F811
        definition = """
        -> LinearizedPositionOutput
        ---
        -> LinearizedPositionV1
        """

    def fetch1_dataframe(self):
        """Fetch a single dataframe from the merged table."""
        return self.fetch_nwb(self.proj())[0]["linearized_position"].set_index(
            "time"
        )

fetch1_dataframe()

Fetch a single dataframe from the merged table.

Source code in src/spyglass/linearization/merge.py
def fetch1_dataframe(self):
    """Fetch a single dataframe from the merged table."""
    return self.fetch_nwb(self.proj())[0]["linearized_position"].set_index(
        "time"
    )