Skip to content

get_header().data removed in newer versions #47

@Ozcifci

Description

@Ozcifci

Hi,

I have used tttrlib in 2022 to retrieve the measurement time within the header (PicoHarp 300).
It was working very well with the following code:

data = tttrlib.TTTR('measurement.ptu', 'PTU')
headerdict = data.get_header()
header = pd.DataFrame.from_dict(headerdict.data, orient='index')
time = datetime.datetime(1970,1,1) + datetime.timedelta(0, float(header.loc['File_CreatingTime'][0]))

Unfortunately, in the newer versions (0.24.4) of tttrlib the data.get_header().data function has been removed.
I have installed 0.23.9, but I still get the same error message.

headerdict = json.loads(data.header.json) gives 3 columns with no information, and headerdict = data.header.tags is also empty.
Could you add the data.get_header().data function back to the library? It was very useful and I could retrieve all the meta-data as I do remember.
Thanks a lot in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions