Skip to content

different structure files? #9

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

Open
borondics opened this issue May 7, 2025 · 4 comments
Open

different structure files? #9

borondics opened this issue May 7, 2025 · 4 comments

Comments

@borondics
Copy link

Hi @joshduran,

Awesome work! However, I ran into a problem. I have some files that are generated during running the "Check Signal" in OPUS which I would like to process on the fly. The structure might be different because there is a "list index out of range" error.

I attached two examples here from different spectrometers.

It would be an enormous help if your package could handle them. I can send you more examples if you need!

Cheers and thanks in advance!

examples.zip

@joshduran
Copy link
Owner

Thank you for reaching out and supplying some example files. I only had time for a quick look, but so far this is what I know:

One of the files you provided is in the standard format but was missing a file block reference that has been there for every other file I've tested. That reference is not critical for reading the file contents so I fixed the code to ignore that reference if it is missing. That file only had an interferogram and parameters present.

The other files were not formatted the same as a standard opus file. At first glance it looks like it will be a substantial effort since the format did not look similar.

I'm curious what version of opus you're using that allows you to snap a spectrum from the check signal screen. My version doesn't have that feature.

For now, I just released a beta version that has preliminary support for reading reports. Despite its beta status, the rest of the code is stable and includes the fix I mentioned for the one file that is compatible. You can try it to see if it will at least help you for a subset of what you need.

@borondics
Copy link
Author

@joshduran thanks for looking into this! I tested the add_mev branch and I can now read the a5333.0 but as you said not the a354.0 file. This is actually the one I really need. :/

Recording this file doesn't involve OPUS, I did it through the instrument interface and downloaded it from the browser directly so it is the instrument (for sure because I did it on two different spectrometers) or the firmware that is different.

If you want I could send you more examples of this type with some variation. I think it would be more practical to discuss via email especially for sharing larger files. My email is ferenc.borondics--at--synchrotron-soleil.fr

Thanks for all the efforts!!!

@borondics
Copy link
Author

OK, after some more debugging it seems that a354.0 is corrupted, even my OPUS can't open it. However, here is an equivalent file, which I could open but didn't fully debug yet.

When I open this in OPUS I get the following report:

Image

Notice that there is no data block under the file name on the left but there is an IgSm/Compact field that seems to contain the interferogram I need.

Image

I attach the file here:

a.0.zip

@borondics
Copy link
Author

Doing more diagnostics today I see that I can read the file but there are some weird values in the interferogram. If I plot the whole data.y I get this:

Image

and if I go it from an arbitrarily selected point (in this case data point 100) on the IFG looks just fine.

Image

The question is how those values appear in the dataset. In this particular case it is point 74 that has a large negative value. I will record more files and check if this is a systematic thing.

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

2 participants