Error with SAXSLAB data

17 views
Skip to first unread message

Thomas Cleveland

unread,
Dec 18, 2019, 2:04:24 PM12/18/19
to BioXTAS RAW
Hi, I have an error to report.

In RAW 1.6.3, when I attempt to open a file from a SAXSLAB instrument (example image and settings file attached), I get the following errors:

An unexpected error has occurred, please report it to the developers. You may need to restart RAW to continue working

Error:
Traceback (most recent call last):

  File "bioxtasraw\RAW.py", line 12665, in run_with_except_hook

  File "bioxtasraw\RAW.py", line 2601, in run

  File "bioxtasraw\RAW.py", line 2978, in _loadAndPlot

  File "bioxtasraw\SASFileIO.py", line 1040, in loadFile

  File "bioxtasraw\SASFileIO.py", line 1302, in loadImageFile

  File "bioxtasraw\SASImage.py", line 325, in getBindListDataFromHeader

KeyError: 'UV Path Length'

This occurs only after I have specified the image format and selected "Use image-header/header file for calibration and reduction parameters" under "Options->2D Reduction->Image/Header Format" as follows:
  1. Select "Image Format: SAXSLab300"
  2. Hit "Apply"
  3. Hit "Load Image"
  4. Check off "Use image-header/header file for calibration and reduction parameters"
  5. Apply the appropriate bindings to header values
  6. Hit "Apply" and "OK"
  7. Double click an image to reduce >> gives above error
Let me know if you need any additional information.

Best,
Thomas Cleveland
07573_A1-T1_PBS-SAXS_000_c.tiff
settings.cfg

Jesse Hopkins

unread,
Dec 18, 2019, 2:15:15 PM12/18/19
to bioxt...@googlegroups.com, Soren Skou
Hi Thomas,

On first glance, RAW 1.6.3 doesn’t support 'UV Path Length' as a bind key for the image header. So I suspect that’s your problem. It may be that Soren has a slightly modified version specifically for SAXSLAB instruments, (it could be that it’s a feature he’s working on that is available to SAXSLAB users but hasn’t made it into the main code yet). I’ve CCed him here. He should be able to answer your questions about this.

All the best.

- Jesse


----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

--
You received this message because you are subscribed to the Google Groups "BioXTAS RAW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioxtas_raw...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioxtas_raw/8459f060-fec3-4f07-9701-e545b0b0f29d%40googlegroups.com.
<07573_A1-T1_PBS-SAXS_000_c.tiff><settings.cfg>

Thomas Cleveland

unread,
Dec 18, 2019, 2:17:44 PM12/18/19
to bioxt...@googlegroups.com, Soren Skou
Thanks Jesse. I actually wasn't trying to bind a "UV Path Length" key, and I don't even actually see it listed anywhere (it's not one of the available bindings in the drop down). I don't quite know where that's coming from.

Tom

Jesse Hopkins

unread,
Dec 18, 2019, 2:29:55 PM12/18/19
to bioxt...@googlegroups.com, Soren Skou
Tom,

Thanks for the clarification, that helps. It looks like in RAW 1.6.3 if any header bindings are turned on it automatically looks for some UV keywords. If it doesn’t find them, it produces the error that you see. Soren can probably speak to this more, but I suspect it’s a feature he’s developing that didn’t quite make it into production for 1.6.3. I’ve fixed it, but I won’t be releasing a new version of RAW for a while (hopefully January/February). If you’re running RAW from source I can send you the fixed .py file so you can work with the data. Otherwise you may have to revert to an older version. It looks like this bug was introduced in version 1.6.1.

All the best.

- Jesse


----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

Thomas Cleveland

unread,
Dec 18, 2019, 2:36:35 PM12/18/19
to bioxt...@googlegroups.com, Soren Skou
Thanks---I can just run a prior version until the fix comes out.

Happy holidays,
Tom

Jesse Hopkins

unread,
Dec 18, 2019, 2:38:09 PM12/18/19
to bioxt...@googlegroups.com, Soren Skou
Tom,

Sounds good. If you need to re-download an installer or source code, older versions of RAW are available here:

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

Jesse Hopkins

unread,
Mar 10, 2020, 11:47:59 AM3/10/20
to BioXTAS RAW
Tom,

The version I just released, 1.6.4, fixes this bug.

All the best.

- Jesse

Thomas Cleveland

unread,
Mar 10, 2020, 11:58:20 AM3/10/20
to bioxt...@googlegroups.com
Thank you! I'll look forward to trying that out.

Tom

--
You received this message because you are subscribed to the Google Groups "BioXTAS RAW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioxtas_raw...@googlegroups.com.

Steven Swinnea

unread,
Jun 12, 2020, 12:27:00 PM6/12/20
to BioXTAS RAW
Hi!
I'm new to RAW and have been trying to read files from my SAXSLab Ganesha.  I found this thread and verified that 1.6.4 works with the data that Tom supplied as well as my tiff files.    I had been trying to use 2.0.1 and that appears to not work.  In the Advanced Options area I try to load an image and get the following message:

SAXSLab300.png

Steve S.

Soren Skou

unread,
Jun 12, 2020, 2:32:43 PM6/12/20
to bioxt...@googlegroups.com
Hi Steven,

The new version of RAW has not been properly tested with special SAXSLAB headers. You should be able to choose pilatus as the detector though and it should work, but if you send me an example file I will take a look :)

Best,
Soren

--
You received this message because you are subscribed to the Google Groups "BioXTAS RAW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioxtas_raw...@googlegroups.com.


--



Søren Skou, Ph.D
Managing Director, SAXSLAB ApS

Dr Neergaardsvej 5D, 2970 Hoersholm, Denmark 
Phone: +45 31 25 02 96 
soren...@saxslab.com 

www.saxslab.com 
Saxslab_Pantone-01.png

Thomas Cleveland

unread,
Jun 12, 2020, 3:24:19 PM6/12/20
to bioxt...@googlegroups.com
Hi all,

I'm not sure if it's exactly the same problem, but I just tested opening of SAXSLAB files with my RAW 2.0.1 installation running from source using Python 3.7.7 (Anaconda) in Centos7, and can confirm that there seems to be some issue. Opening a file failed and gave an error "SASFileIO.loadFile : module 'numpy' has no attribute 'zeroes'"

In the file SASImage.py, I found a line:
bs_mask = np.zeroes(img.shape)

Changing "zeroes" to "zeros" seems to fix the error and I can open SAXSLAB files again. But because I'm running from source in Centos7, it's possible this may be related to my local python setup.

Best,
Tom


Jesse Hopkins

unread,
Jun 12, 2020, 3:31:16 PM6/12/20
to bioxt...@googlegroups.com
Hi Steven,

Unfortunately, RAW 2.0 hasn't been tested with the SAXSLAB specific features, as Soren said (I don't have SAXSLAB data available for testing). If you can send me an image or two and your settings file I will investigate.

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

--
You received this message because you are subscribed to the Google Groups "BioXTAS RAW" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioxtas_raw...@googlegroups.com.

Jesse Hopkins

unread,
Jun 12, 2020, 3:32:33 PM6/12/20
to bioxt...@googlegroups.com
Hi Tom,

I don't know if it's related, but it's definitely a bug (a typo). Thanks for catching it, I've fixed it. It will only occur if you don't have a mask for the image, so if you're expecting the image to have a mask that suggests to me that there's also another issue there.

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

Steven Swinnea

unread,
Jun 12, 2020, 6:52:43 PM6/12/20
to bioxt...@googlegroups.com
Here is a behenate tiff and the .cfg file I was using.  I dropped down to 1.6.4 from 2.0.1 and could read using a W64 install.  I have other tiffs if this is not sufficient.


setting.cfg
latest_0005362_caz.tiff

Jesse Hopkins

unread,
Jun 15, 2020, 5:35:48 PM6/15/20
to bioxt...@googlegroups.com
Hi Steven,

I found the relevant bugs and fixed them. This ended up being a pretty straightforward case of when I was redoing the radial integration code for the 2.0 release, I failed to update a couple of variable names in the SAXSLAB specific stuff, and that just never got tested.

If you want to use the latest version, you can grab the current code from the git. The fix will be included in the next released version of RAW. If it's particularly urgent, I can work on releasing a new version soon. If not, I'll wait until I have a few more bug fixes or new features, which could be a bit.

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

Steven Swinnea

unread,
Jun 15, 2020, 8:04:00 PM6/15/20
to bioxt...@googlegroups.com
Cool!  I'm good for now but may check out the files.
S. S.


Thomas Cleveland

unread,
Jun 15, 2020, 8:07:48 PM6/15/20
to bioxt...@googlegroups.com
I have verified that the current code from git now appears to work fine for reducing files from our SAXSLAB instrument (at least on my setup, running from source with Anaconda Python 3.7.7 in Centos7).

Thanks!
Tom

Jesse Hopkins

unread,
Jun 16, 2020, 12:09:09 PM6/16/20
to bioxt...@googlegroups.com
Hi Tom,

I'm glad it works for you. I just fixed another bug that fixes a problem with loading SAXSLAB images when using the latest version (7) of the pillow library. So if you do update that library at some point you'll want to update the code as well. This fix will also be included in the next release of RAW.

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

Jesse Hopkins

unread,
Jul 9, 2020, 4:56:46 PM7/9/20
to bioxt...@googlegroups.com
Hi Steven and Tom,

I've just released a new version of RAW, 2.0.2, which fixes this issue.

All the best.

- Jesse

----
Jesse Hopkins, PhD
Beamline Scientist
BioCAT, Sector 18
Advanced Photon Source

Reply all
Reply to author
Forward
0 new messages