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

Fails to open processed Omnic *.map files #805

Open
chourroutm opened this issue May 10, 2021 · 2 comments
Open

Fails to open processed Omnic *.map files #805

chourroutm opened this issue May 10, 2021 · 2 comments

Comments

@chourroutm
Copy link

Hi!
I got a problem to open my FTIR Omnic Map files after processing them (Atmospheric Suppression feature from OMNIC 9.2) with the IO module of PyMCA: I get an error because the searchedChain is not found (it is "Spectrum " as bytes in my case).

subsection not found   File "C:\Program Files\Python36\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run
  File "C:\Program Files\Python36\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
  File "build\tmp\QStackWidget.py", line 1428, in <module>
  File "C:\Program Files\PyMca 5.6.3\PyMca5\PyMcaGui\pymca\StackSelector.py", line 151, in getStack
    stack = OmnicMap.OmnicMap(filelist[0])
  File "C:\Program Files\PyMca 5.6.3\PyMca5\PyMcaIO\OmnicMap.py", line 79, in __init__
    firstByte = data.index(searchedChain)

I will try to identify another chain to use as a landmark. What I plan to do to achieve this is:

  1. Read the firstByte from a non-processed map;
  2. Set firstByte to this fixed value and try to open a processed map;
  3. Read the bytes near it and see if they correspond to a new keyword.

Otherwise, I wonder if it is possible to parse the whole file to detect some letters (e.g. "e") or if I'll get too much information...

@vasole
Copy link
Owner

vasole commented May 11, 2021

Hi, thanks for the report.

Is there a way I can get hold on an example file? It would help me a lot.

@chourroutm
Copy link
Author

Sure, there is a sample data (online until June 17th): https://filesender.renater.fr/?s=download&token=ecfc60ed-98e0-4ab8-bbce-8af6637a59d8
Files with "ATM CORR" were processed and cannot be opened in PyMCA; files without "ATM CORR" are the original files that PyMCA can open.

My investigation was unfruitful! Please tell me if I can be of any help.

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