dkriegner / xrayutilities

xrayutilities - a package with useful scripts for X-ray diffraction physicists
http://xrayutilities.sourceforge.io
GNU General Public License v2.0
81 stars 29 forks source link

Loading .ras Files #171

Closed iriscl closed 12 months ago

iriscl commented 1 year ago

Hi Dominik,

Thank you for making this great software free and available to the community! I just wanted to ask you for advice with handling .ras Rigaku files, as it's been a while since I've worked in Python. I'm trying to load a file using the .RASFile() function but it keeps generating a key error that I haven't been able to get around. I'll attach a picture of the traceback below. Did I forget to import something that's preventing the file from being read correctly? For context, I'm trying to load reciprocal space maps to eventually get alloy composition.

Thanks in advance for your help!

Best, Iris

Screenshot 2023-08-29 at 12 41 45 PM
dkriegner commented 1 year ago

Dear Iris,

from the traceback you sent this looks like it can either be a problem in xrayutilities or a problem with your data file. It could be that you have a different version of the ras file which uses a feature I did not see yet. Is it possible you share the data file for me to test it locally?

If you do not want to make it public you can also send me an email (Address in the readme)

cheers

iriscl commented 1 year ago

Hi Dominik,

Just sent you an email with the files. Thanks again for the help!

Best, Iris

dkriegner commented 12 months ago

Indeed there is a missing header "motor" position in your file. I think this is a bug in your Rigaku software. I have not seen this before.

But I think the parser in xrayutiltities should handle this without an exception. I am going to propose a corresponding code change.

dkriegner commented 12 months ago

Please test if the change introduced in #172 fixes the issue for you. You might want to get the latest version of the code (ready after ~1 hour from now) for this by following the instructions here: https://sourceforge.net/p/xrayutilities/mailman/message/37188943/

iriscl commented 12 months ago

Hi Dominik,

Yes this fixed the issues, thank you so much!