forked from cctbx/dxtbx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Don't crash handling FormatSMVADSC images with floating-point pedestal values (cctbx#216) - Allow importing filenames with special format characters like % (cctbx#214)
- Loading branch information
Showing
6 changed files
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
|
||
import dxtbx | ||
|
||
|
||
def test_noninteger_pedestal(dials_regression, tmpdir): | ||
filename = os.path.join( | ||
dials_regression, "image_examples/APS_14BMC/q315_1_001.img", | ||
) | ||
# Read this file in as data | ||
with open(filename, "rb") as f: | ||
data = f.read() | ||
|
||
# Write out with an inserted header item of a noninteger pedestal | ||
test_file = tmpdir / "test_pedestal_001.img" | ||
with test_file.open("wb") as f: | ||
f.write(data.replace(b"DIM=2;\n", b"DIM=2;\nIMAGE_PEDESTAL=42.0;\n")) | ||
|
||
# Make sure this loads | ||
dxtbx.load(test_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters