Data structures#

Locan provides LocData as the one data class to deal with the following data structures:

  1. localization data

  2. selections of localization data

  3. collections of selections

Comments on LocData:#

  1. Properties:

    Localization data consists of a list of individual localizations with spatial coordinates and several other properties (detailed list in Properties) like

    • coordinates

    • intensity

    • frame

    There is no fundamental difference between 2D and 3D localization data.

    Multiple sets of localization data like two-color localizations will be represented by independent LocData objects.

    The unit for length throughout the project is given by the input unit for localization coordinates, unless specified in the metadata. In most cases the unit will be nanometre.

  2. Dataset:

    A LocData object is typically instantiated from an experimental or simulated localization dataset. The list of localizations is represented in a pandas.DataFrame under the attribute LocData.data. In addition LocData has some single-number-properties describing the dataset as a whole. Such properties could be (detailed list in Properties):

    • total number of localizations

    • centroid

    • total emission strength

    • area/volume (for all possible hulls)

  3. Selection:

    A LocData object can also be instantiated from a selection of localizations. Selections carry a reference to another LocData object and a list of selected indices to not copy the original dataset with all localization properties for each selection. This way a large set of selections can be created with minimal memory requirements.

  4. Collection:

    A LocData object can also represent a list of selections as e.g. generated by clustering the localization data. The LocData.data of a collection consists of the list of all properties from the collected LocData (e.g. selections).

  5. Hulls:

    For the spatial coordinates in each LocData object there are various hulls that might be of interest:

    1. minimal bounding box

    2. convex hull

    3. alpha complex or alpha shape

    4. minimal oriented bounding box

    These hulls are provided from stand-alone methods or through LocData attributes. Hull objects expose attributes such as LocData.region_measure (among others) that are also added as LocData properties.

  6. Additional properties:

    Other LocData properties might be provided by independent methods.