Ejemplo n.º 1
0
Archivo: run.py Proyecto: nscherf/linus
    if svfPath is not None:
        print("Load from SVF...")
        loader = dc.SvfLoader(svfPath,
                              resampleTo=resampleTo,
                              minTrackLength=skipSmallerThan,
                              csvSeparator=csvSep)
        if addState2 is not None:
            loaderState2 = dc.SvfLoader(addState2,
                                        resampleTo=resampleTo,
                                        minTrackLength=skipSmallerThan,
                                        csvSeparator=csvSep)

    tracks, attributes, names = loader.get()

    # Start the track modifier that adjusts the data or adds attributes
    tm = dc.TrackModifier(tracks, attributes, names)

    scale = 1.
    if scaleToUnit is not None:
        extent = tm.getExtent()
        scale = 1. / extent
        tm.scale(scale)

    bary = [0., 0., 0.]
    if moveToCenter is not None:
        bary = tm.getBarycenter()
        print("New center is at:", bary)
        tm.translate(-bary[0], -bary[1], -bary[2])

    # Add optional auto-generated attributes
    if addTime is not None: