OHBA-analysis / osl

OHBA Software Library - MEG/EEG Analysis Tools
https://osl.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
37 stars 8 forks source link

report improvements #310

Open matsvanes opened 4 days ago

matsvanes commented 4 days ago

Keep track of some small improvements in the report functions.

[x] Save the "extra_funcs" as text in the data.pkl file, rather than in a .txt file (i.e., display it the same way we're displaying the logs right now). [x] The raw/src summary reports contain interactive tables (from pandas dataframe). Make them start counting at index 1 (rather than 0) for correspondence with the subject reports [x] Summary report: add tab for all error log files (might have to explicitly delete old files when starting a log) [x] Add date+time to error reports [] Navigation: fix navigating using arrow keys [] Navigation: fix saving the current tab when going to a different session [] Soure report: In sign flipping, rather than showing the table with values of different iterations, show the best value over iterations for each session

cgohil8 commented 3 days ago

Do we have some example data (e.g. on hbaws) to test the report generation with?

matsvanes commented 3 days ago

Do we have some example data (e.g. on hbaws) to test the report generation with?

I have some in /ohba/pi/mwoolrich/mvanes/enh/ (can you access that?), but not yet for the subject source report.

Note that I already did quite a bit of the above - I'll push that branch to here shortly

matsvanes commented 3 days ago

Summary report: add tab for all error log files (might have to explicitly delete old files when starting a log)

I chose to not remove old error files, because I don't think removing files as a default option is a good idea. But it would be helpful if the error logs have a date/time in there the way other log files have, e.g. [2024-07-03 17:19:43] - INFO - osl.logger:122 : OSL osl_logger: handler 'console' level set to 'INFO' That way it's easy to recognise when an error log is older than the latest preproc/src log. Another option is to - in case an error log already exists and we rerun the preproc/src proc chain, something is added to the error log indicating that it's not about the latest process. What do you think @cgohil8 ?

EDIT: I've added the date+time to the error log

matsvanes commented 3 days ago

Also, if @cgohil8 could test the src report, that'd be great :)