-
Notifications
You must be signed in to change notification settings - Fork 28
multiple chromatograms within one res file #18
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
Comments
Hi, |
Has this resolved your issue? If not you can always provide a sample file and I can take a look at it :-) |
Thanks for your response! |
Yes a sample file would be useful. I think you can just attach it to your reply here. Or if it is confidential then send it email etc. |
I chose a meaningless example file. Its just a hetp determination but the acetone loading is not done by an injection valve. After flushing the column (chromatogram 1) a new chromatogram is created and the inlet valve switches for aceton loading (chromatogram 2) |
I had a look at the file. Each res file I had encountered so far had the entries at the beginning of the file, with the last entry always being "LogBook" (also see RES_files_layout.txt under pycorn/docs). The file you provided has multiple entries after "LogBook". At the moment the script only looks for entries until "LogBook" see line 94 of pycorn.py:
So yes it will not see the other run, I might be able to fix it on the weekend. I just have to figure out if there is a more generic solution or if the res files actually encode the number of entries somewhere. PS: You can remove the file if you want. |
Thanks! If you want I could provide more/other files for testing. |
I think it should be doable with this one - I get back to you if there are problems. |
Hello, has this problem been resolved? need the corrected script that can read all the chromatograms.. |
the fix for this is reasonably simple, it's actually a quirk of the file loader using a dictionary to read in the header offsets, the magic blocks with the same name get overridden, so the trick was to change the name: There's a line, ~ around line # 113: name = x['data_name'] change to: x['original_data_name']=x['data_name'] Then you'll get unique sensor outputs in the array based off the data_name, plus the unique address in the file, so that multiple blocks from the same sensor won't override. This then needs one additional fix, line 259: self.run_name = self['Logbook']['run_name'] just comment this out self.run_name = self['Logbook']['run_name'] |
Nice script! I used it to export a lot of curve data from unicorn res files to xlsx files, and it worked greatly! But each of my res files contains three distinct chromatograms (created by the unicorn 5.3.1. 'new_chromatogram' command). The script only exports the data from the last chromatogram, thus the extracted values start at i.e. 42 ml instead of 0 ml.
Is there a way to export the remaining chromatogramms too?
Many thanks in advance for your support!
The text was updated successfully, but these errors were encountered: