sasdata.file_converter.bsl_loader module¶
- class sasdata.file_converter.bsl_loader.BSLLoader(filename)¶
Bases:
object
Loads 2D SAS data from a BSL file. CLoader is a C extension (found in c_ext/bsl_loader.c)
See http://www.diamond.ac.uk/Beamlines/Soft-Condensed-Matter/small-angle/SAXS-Software/CCP13/BSL.html for more info on the BSL file format.
- property filename¶
File to load.
- load_data(frame)¶
Loads the file named in filename in 4 byte float, in either little or big Endian depending on self.swap_bytes.
- Parameters:
frame – The frame to load.
- Returns:
np array of loaded floats.
- load_frames(frames)¶
Loads all frames of the BSl file into a Data2D object.
- Parameters:
frames – Number of frames.
- Returns:
Data2D frame_data.
- property n_frames¶
Number of frames in the file.
- property n_pixels¶
Number of pixels in the file.
- property n_rasters¶
Number of rasters in the file.
- property swap_bytes¶
Whether or not the bytes are in reverse order.
- exception sasdata.file_converter.bsl_loader.BSLParsingError¶
Bases:
Exception