How to use the nptdms.base_segment.RawChannelDataChunk function in npTDMS

To help you get started, we’ve selected a few npTDMS examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adamreeve / npTDMS / nptdms / reader.py View on Github external
def _trim_channel_chunk(chunk, skip=0, trim=0):
    if skip == 0 and trim == 0:
        return chunk
    data = None
    scaler_data = None
    if chunk.data is not None:
        data = chunk.data[skip:len(chunk.data) - trim]
    if chunk.scaler_data is not None:
        scaler_data = {
            scale_id: d[skip:len(d) - trim]
            for (scale_id, d) in chunk.scaler_data.items()}
    return RawChannelDataChunk(data, scaler_data)
github adamreeve / npTDMS / nptdms / base_segment.py View on Github external
def channel_data(data):
        channel_chunks = {
            path: RawChannelDataChunk.channel_data(d)
            for (path, d) in data.items()
        }
        return RawDataChunk(channel_chunks)
github adamreeve / npTDMS / nptdms / base_segment.py View on Github external
def scaler_data(data):
        channel_chunks = {
            path: RawChannelDataChunk.scaler_data(d)
            for (path, d) in data.items()
        }
        return RawDataChunk(channel_chunks)
github adamreeve / npTDMS / nptdms / base_segment.py View on Github external
def scaler_data(data):
        return RawChannelDataChunk(None, data)
github adamreeve / npTDMS / nptdms / base_segment.py View on Github external
def channel_data(data):
        return RawChannelDataChunk(data, None)
github adamreeve / npTDMS / nptdms / base_segment.py View on Github external
def empty():
        return RawChannelDataChunk(None, None)