Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chimera Files are not read in correct order #92

Closed
Silberbaer opened this issue Jan 27, 2017 · 4 comments
Closed

Chimera Files are not read in correct order #92

Silberbaer opened this issue Jan 27, 2017 · 4 comments
Labels

Comments

@Silberbaer
Copy link

When loading up data files generated by the Chimera VC100, the files are not loaded in the same order as they were generated. This messes up the time ordering in the overall current trace.

@shadowk29
Copy link
Collaborator

Possible solution here: http://stackoverflow.com/questions/6773584/how-is-pythons-glob-glob-ordered

import os
sorted(glob.glob(filter), key=os.path.getmtime)

@abalijepalli
Copy link
Member

Should we sort by mod time or filename, i.e. assume there is some chronological ordering of filenames as they are generated? Would relying on mod time cause issues if the files were moved on some OSes?

@shadowk29
Copy link
Collaborator

shadowk29 commented Jan 27, 2017

You're probably correct that we should sort by name. The default format for chimera files is [basename]_yyyymmdd_hhmmss.log. If sorting by name matches chronological order that will work.

EDIT: some quick testing confirms that sorting by name works for this file type

@abalijepalli
Copy link
Member

Commit 877486d adds a lexical sort to the globbed files. Let me know if that fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants