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

AB Data read from files where "make compatible skalar" was used leads to duplicate data #13

Open
typorian opened this issue Jan 24, 2022 · 4 comments

Comments

@typorian
Copy link

I have data that was measured with OPUS 7 and OPUS 8, and in the data from OPUS 8, the AB data block is read partly in duplicate. The OPUS file itself seems fine because exporting as DPT yields good and correct results.

The data read with opusFC looks as if the first part of the spectrum is duplicate so instead of the spectrum looking like:

abcdefghijklmnop

it looks like

abcabcdefghijklm

with absorption data missing in the end and all the data after the repeating part being shifted against the wavenumbers. Unfortunately I have no option to generate comparable data with OPUS 7, but I could try to provide an OPUS 8 example file, if this is not a known issue.

@typorian
Copy link
Author

I was actually able to narrow it down. Only files where the operation "make compatible skalar" was performed are an issue. I have added sample files. The file with "comp" at the end of the name has the operation performed on it and the other one does not.
OPUS example.zip
.

@typorian typorian changed the title AB Data read from files generated with OPUS 8.5 contains double values AB Data read from files where "make compatible skalar" was used leads to duplicate data Jan 25, 2022
@stuart-cls
Copy link
Owner

Thank you for your report! I am not aware of this bug, I will look at the sample files and see if I can reproduce it.

@stuart-cls
Copy link
Owner

Thanks again for the example files. I was able to reproduce the bug. I was not able to fix it for the latest release but it's still on my radar.

@joshduran
Copy link

joshduran commented Jun 19, 2024

@typorian
I know this is old, but could you potentially provide a few more test files where you use "make compatible scalar"? My python package can correctly read and pair data blocks with their appropriate data status blocks for the one file you provided, but I would like to see it work for a wider variety of test cases to be certain the logic is sound.

@stuart-cls
You can take a look at my function that pairs data with data status blocks to see what I've done. But it looks at both the block type and ymax ymin values to pair the blocks. In the single test file provided, the last duplicate block is the one of interest, while the first duplicate block seems to be the preprocessed data (which the user might also want to access but isn't provided by OPUS software).

https://github.com/joshduran/brukeropus/blob/master/brukeropus%2Ffile%2Fblock.py

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

No branches or pull requests

3 participants