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

DIALS 3.17.1 #193

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7d4f95b
Add format class to understand Jungfrau4M serial data from ID29, ESRF
jbeilstenedmands Sep 1, 2023
e7dd338
Rename newsfragments/XXX.feature to newsfragments/659.feature
DiamondLightSource-build-server Sep 1, 2023
2562aa7
Bump version: 3.17.dev → 3.18.dev
DiamondLightSource-build-server Nov 3, 2023
4c59ebc
Clean Clutter
DiamondLightSource-build-server Nov 5, 2023
27f168c
Update removed datablock module and warning (#665)
ndevenish Nov 6, 2023
6883714
Add properties table to Scan (#620)
toastisme Nov 15, 2023
5851627
Add oscillation fix for Scan.set_image_range. (#667)
toastisme Nov 20, 2023
31f73a5
Fix scan comparison when slicing imagesets (#669)
jbeilstenedmands Nov 24, 2023
dbd7ede
Update FormatCBFFull test following scan changes (#670)
jbeilstenedmands Nov 24, 2023
f903a3c
`FormatMRC`: more robust handling of extended headers. (#679)
dagewa Jan 18, 2024
5179420
Add spectrum_required=False to FormatXTC (#674)
phyy-nx Jan 19, 2024
33a7202
Formats for the ELDICO ED-1 (#682)
dagewa Jan 26, 2024
3e5ac9b
`FormatSMVTimePix_SU` mask out central cross of virtual pixels (#683)
dagewa Jan 26, 2024
03e7ee0
New file writer image dimensions (#676)
graeme-winter Feb 5, 2024
80f81f5
Fix incorrectly parsed properties in Scan.from_dict (#688)
toastisme Feb 12, 2024
65c53c3
Added helper module for time-of-flight experiments (#691)
toastisme Feb 12, 2024
0046002
Add FormatISISSXD to read ISIS SXD images. (#687)
toastisme Feb 12, 2024
300f4fe
Ensure time-of-flight does not classify as Scan.is_still() (#689)
toastisme Feb 12, 2024
071947d
Revert "Fix incorrectly parsed properties in Scan.from_dict (#688)"
ndevenish Feb 12, 2024
39e463e
Allow negative rotation angles in Scans (#690)
graeme-winter Feb 12, 2024
f901366
Invert rotation axis for negative scans (#694)
graeme-winter Feb 13, 2024
8bf5dad
Reduce comparison precision in `test_FormatISISSXD.py` (#696)
dagewa Feb 18, 2024
e684c41
Scan from dict fix (#693)
toastisme Feb 20, 2024
f3f9963
Add natural sorting (#697)
graeme-winter Feb 22, 2024
45c945e
Merge remote-tracking branch 'origin/main' into ESRF_SMX
jbeilstenedmands Feb 23, 2024
2f6edf3
Updates to handle master file updates
jbeilstenedmands Feb 23, 2024
0081506
Correctly use instrument name in format class
jbeilstenedmands Feb 23, 2024
d18fde1
Clean Clutter
DiamondLightSource-build-server Feb 25, 2024
557fbc6
Add comment
jbeilstenedmands Feb 26, 2024
8f53e56
Allow distance override for multi-panel detectors (#698)
dagewa Feb 26, 2024
ff658e8
The xia2 tests show that single panel detectors can have a hierarchy …
dagewa Feb 26, 2024
531dfd5
news
dagewa Feb 26, 2024
babbcc3
Rename newsfragments/xxx.bugfix to newsfragments/699.bugfix
DiamondLightSource-build-server Feb 26, 2024
4251b75
Merge pull request #699 from dials/set-distance-for-single-panel-dete…
jbeilstenedmands Feb 26, 2024
152fdb8
Merge pull request #659 from cctbx/ESRF_SMX
jbeilstenedmands Mar 1, 2024
7964d4b
Relax conditions when interpolating between frames and time of flight…
toastisme Mar 5, 2024
1da5d45
Add format class for MANDI (#703)
toastisme Mar 11, 2024
78147cc
Fix recently added ESRFJF4M format class (#707)
jbeilstenedmands Mar 11, 2024
7615301
Improve specificity for simulated SMV format readers (#708)
dagewa Mar 13, 2024
080b599
`FormatSMVJHSim` `AttributeError` bugfix (#710)
dagewa Mar 15, 2024
48c03a8
Add wavelength range to polychromatic beams. (#704)
toastisme Mar 20, 2024
7242bb3
Add getstate and setstate for PolychromaticBeam. (#711)
toastisme Mar 20, 2024
85462c3
Add missing argument in PolychromaticBeamPickleSuite. (#714)
toastisme Mar 21, 2024
6818056
Add tof_helpers.tof_from_wavelength. (#713)
toastisme Mar 21, 2024
bb93372
Add versatility to Rayonix XTC class (#723)
dermen Apr 8, 2024
d15ff8c
dxtbx 3.19.0 Changelog
DiamondLightSource-build-server Apr 17, 2024
5f7ae58
Ignore trusted-range in dxtbx.average test
ndevenish Jan 23, 2023
2ce1b95
Bump version: 3.18.dev → 3.18.0
DiamondLightSource-build-server Apr 17, 2024
713ce93
Fix old I03 data not processing (#737)
ndevenish May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .azure-pipelines/ci-conda-env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ conda-forge::hdf5>=1.12,<1.13
conda-forge::jpeg
conda-forge::matplotlib-base
conda-forge::mrcfile
conda-forge::natsort
conda-forge::numpy
conda-forge::nxmx
conda-forge::orderedset
Expand Down
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.17.dev
current_version = 3.18.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<release>[a-z]+)?(?P<patch>\d+)?
Expand Down
39 changes: 39 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
dxtbx 3.19.0 (2024-04-17)
=========================

Features
--------

- Add format reader for Jungfrau4M serial images from beamline ID29 at ESRF. (`#659 <https://github.com/cctbx/dxtbx/issues/659>`_)
- Better handle spectra calibration for bad data in XTC format using new parameter: ``spectrum_required=``. (`#674 <https://github.com/cctbx/dxtbx/issues/674>`_)
- Add Bruker and miniCBF format readers for the ELDICO ED-1 electron diffractometer with DECTRIS QUADRO detector. (`#682 <https://github.com/cctbx/dxtbx/issues/682>`_)
- ``FormatSMVTimePix_SU``: Always mask out the central cross of virtual pixels. (`#683 <https://github.com/cctbx/dxtbx/issues/683>`_)
- Add format reader for ISIS SXD detector. (`#687 <https://github.com/cctbx/dxtbx/issues/687>`_)
- Detector distance can now be manually overridden for multi-panel detectors. (`#698 <https://github.com/cctbx/dxtbx/issues/698>`_)
- Add format reader to read time of flight Laue data from MANDI. (`#703 <https://github.com/cctbx/dxtbx/issues/703>`_)
- Additional features for `FormatXTCRayonix` (`#723 <https://github.com/cctbx/dxtbx/issues/723>`_)


Bugfixes
--------

- Importing the (deprecated and removed) ``dxtbx.datablock`` module failed to display warning properly. (`#665 <https://github.com/cctbx/dxtbx/issues/665>`_)
- Fix scan comparison for scan properties changes (`#669 <https://github.com/cctbx/dxtbx/issues/669>`_)
- Eiger Support: Invert the module dimensions, only for older firmware versions. See https://media.dectris.com/230203-Release_Notes-DECTRIS_EIGER2.pdf for reference. (`#676 <https://github.com/cctbx/dxtbx/issues/676>`_)
- ``FormatMRC``: Better handling of extended headers. (https://github.com/ccpem/mrcfile/issues/50), and extended headers are ignored if they contain junk values. (`#679 <https://github.com/cctbx/dxtbx/issues/679>`_)
- Fixed some properties not being correctly parsed in `Scan.from_dict`. (`#688 <https://github.com/cctbx/dxtbx/issues/688>`_)
- Negative rotation angles are now allowed, the goniometer axis will be inverted if necessary. (`#690 <https://github.com/cctbx/dxtbx/issues/690>`_)
- ``dials.import`` now uses natural sorting on input data, instead of strict sorting. (`#697 <https://github.com/cctbx/dxtbx/issues/697>`_)
- Fix setting detector distance for single panel detectors that have a hierarchy. (`#699 <https://github.com/cctbx/dxtbx/issues/699>`_)
- Better recognition for SMV images from MLFSOM and other simulators from James Holton. (`#708 <https://github.com/cctbx/dxtbx/issues/708>`_)
- Fix error introduced in ``FormatSMVJHSim`` causing test failures. (`#710 <https://github.com/cctbx/dxtbx/issues/710>`_)
- `PolychromaticBeam` can now be copied with `copy.deepcopy`. (`#711 <https://github.com/cctbx/dxtbx/issues/711>`_)
- Add missing argument to `PolychromaticBeamPickleSuite.getinitargs`. (`#714 <https://github.com/cctbx/dxtbx/issues/714>`_)


Misc
----

- `#620 <https://github.com/cctbx/dxtbx/issues/620>`_, `#667 <https://github.com/cctbx/dxtbx/issues/667>`_, `#670 <https://github.com/cctbx/dxtbx/issues/670>`_, `#689 <https://github.com/cctbx/dxtbx/issues/689>`_, `#691 <https://github.com/cctbx/dxtbx/issues/691>`_, `#694 <https://github.com/cctbx/dxtbx/issues/694>`_, `#696 <https://github.com/cctbx/dxtbx/issues/696>`_, `#701 <https://github.com/cctbx/dxtbx/issues/701>`_, `#704 <https://github.com/cctbx/dxtbx/issues/704>`_, `#707 <https://github.com/cctbx/dxtbx/issues/707>`_, `#713 <https://github.com/cctbx/dxtbx/issues/713>`_


dxtbx 3.17.0 (2023-11-03)
=========================

Expand Down
3 changes: 2 additions & 1 deletion SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ if not env_etc.no_boost_python and hasattr(env_etc, "boost_adaptbx_include"):
LIBS=env_etc.libs_python
+ env_etc.libm
+ env_etc.dxtbx_libs
+ env_etc.dxtbx_hdf5_libs,
+ env_etc.dxtbx_hdf5_libs
+ env["LIBS"],
)

dxtbx_format_image_ext_sources = [
Expand Down
1 change: 1 addition & 0 deletions newsfragments/737.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix case where old I03 Eiger nexus data (pre-2020) would fail to process.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Static version number which is updated by bump2version
# Do not change this manually - use 'bump2version <major/minor/patch/release>'
__version_tag__ = "3.17.dev"
__version_tag__ = "3.18.0"

setup_kwargs = {
"name": "dxtbx",
Expand Down
2 changes: 1 addition & 1 deletion src/dxtbx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Python_add_library( dxtbx_format_nexus_ext MODULE format/boost_python/nexus_ext.
target_link_libraries( dxtbx_format_nexus_ext PRIVATE Boost::python CCTBX::scitbx hdf5::hdf5 )

Python_add_library( dxtbx_imageset_ext MODULE boost_python/imageset_ext.cc )
target_link_libraries( dxtbx_imageset_ext PUBLIC Boost::python CCTBX::scitbx )
target_link_libraries( dxtbx_imageset_ext PUBLIC Boost::python CCTBX::scitbx CCTBX::scitbx::boost_python )

Python_add_library( dxtbx_format_image_ext
MODULE
Expand Down
90 changes: 90 additions & 0 deletions src/dxtbx/array_family/flex_table_suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,80 @@ namespace dxtbx { namespace af { namespace flex_table_suite {
}
};

struct column_range_to_string_visitor : public boost::static_visitor<std::string> {
template <typename U>
std::string operator()(const U &column) const {
std::ostringstream os;
os << column[0] << " - " << column[column.size() - 1] << "\n";
return os.str();
}
};

template <typename T>
struct compare_column_visitor : public boost::static_visitor<bool> {
T &self;
typename T::key_type key;
compare_column_visitor(T &self_, typename T::key_type key_)
: self(self_), key(key_) {}

template <typename U>
bool operator()(const U &other_column) const {
U self_column = self[key];
DXTBX_ASSERT(self_column.size() == other_column.size());
for (std::size_t i = 0; i < self_column.size(); ++i) {
if (self_column[i] != other_column[i]) {
return false;
}
}
return true;
}

bool operator()(const scitbx::af::shared<double> &other_column) const {
scitbx::af::shared<double> self_column = self[key];
double eps = 1e-7;
DXTBX_ASSERT(self_column.size() == other_column.size());
for (std::size_t i = 0; i < self_column.size(); ++i) {
if (std::abs(self_column[i] - other_column[i]) > eps) {
return false;
}
}
return true;
}

bool operator()(const scitbx::af::shared<vec2<double> > &other_column) const {
scitbx::af::shared<vec2<double> > self_column = self[key];
double eps = 1e-7;
DXTBX_ASSERT(self_column.size() == other_column.size());
for (std::size_t i = 0; i < self_column.size(); ++i) {
if (std::abs(self_column[i][0] - other_column[i][0]) > eps) {
return false;
}
if (std::abs(self_column[i][1] - other_column[i][1]) > eps) {
return false;
}
}
return true;
}

bool operator()(const scitbx::af::shared<vec3<double> > &other_column) const {
scitbx::af::shared<vec3<double> > self_column = self[key];
double eps = 1e-7;
DXTBX_ASSERT(self_column.size() == other_column.size());
for (std::size_t i = 0; i < self_column.size(); ++i) {
if (std::abs(self_column[i][0] - other_column[i][0]) > eps) {
return false;
}
if (std::abs(self_column[i][1] - other_column[i][1]) > eps) {
return false;
}
if (std::abs(self_column[i][2] - other_column[i][2]) > eps) {
return false;
}
}
return true;
}
};

/**
* Initialise the column table from a list of (key, column) pairs
* @param columns The list of columns
Expand Down Expand Up @@ -359,6 +433,22 @@ namespace dxtbx { namespace af { namespace flex_table_suite {
return column.apply_visitor(visitor);
}

template <typename T>
bool compare_columns(T &self, T &other) {
typedef typename T::const_iterator iterator;
// Implicitly assumed that self and other are the same size
DXTBX_ASSERT(self.nrows() == other.nrows());
bool same_column;
for (iterator it = other.begin(); it != other.end(); ++it) {
compare_column_visitor<T> visitor(self, it->first);
same_column = it->second.apply_visitor(visitor);
if (!same_column) {
return false;
}
}
return true;
}

/**
* Delete a column of data
* @param self The column table
Expand Down
2 changes: 1 addition & 1 deletion src/dxtbx/datablock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import warnings

from dxtbx.experiment_list import (
from dxtbx.model.experiment_list import (
BeamComparison,
DetectorComparison,
FormatChecker,
Expand Down
34 changes: 34 additions & 0 deletions src/dxtbx/dxtbx_model_ext.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ Vec6Float = Tuple[float, float, float, float, float, float]
Vec9Float = Tuple[float, float, float, float, float, float, float, float, float]
Vec2Int = Tuple[int, int]
Vec4Int = Tuple[int, int, int, int]
ScanPropertyTypes = Union[
flex.int,
flex.double,
flex.bool,
flex.std_string,
flex.vec2_double,
flex.vec3_double,
]

class BeamBase:
@property
Expand Down Expand Up @@ -165,6 +173,8 @@ class PolychromaticBeam(Beam):
sample_to_source_distance: float = ...,
deg: bool = ...,
) -> None: ...
def set_wavelength_range(self, wavelength_range: Vec2Float) -> None: ...
def get_wavelength_range(self) -> Vec2Float: ...
@staticmethod
def from_dict(data: Dict) -> PolychromaticBeam: ...
def to_dict(self) -> Dict: ...
Expand Down Expand Up @@ -745,6 +755,14 @@ class Scan(ScanBase):
batch_offset: int,
deg: bool = ...,
) -> None: ...
@overload
def __init__(
self,
image_range: Vec2Int,
properties_table: Dict,
batch_offset: int,
deg: bool = ...,
) -> None: ...
def append(self, other: Scan, scan_tolerance: float) -> None: ...
@staticmethod
def from_dict(data: Dict) -> Scan: ...
Expand Down Expand Up @@ -788,6 +806,22 @@ class Scan(ScanBase):
def get_oscillation_range(self, deg: bool = ...) -> Vec2Float: ...
def get_valid_image_ranges(self, i: str) -> List[Vec2Int]: ...
def set_valid_image_ranges(self, i: str, ranges: List[Vec2Int]) -> None: ...
def get_properties(self) -> dict: ...
def set_properties(self, properties: dict) -> None: ...
def has_property(self, key: str) -> bool: ...
def get_property(self, key: str) -> ScanPropertyTypes: ...
@overload
def set_property(self, key: str, value: flex.double) -> None: ...
@overload
def set_property(self, key: str, value: flex.bool) -> None: ...
@overload
def set_property(self, key: str, value: flex.int) -> None: ...
@overload
def set_property(self, key: str, value: flex.std_string) -> None: ...
@overload
def set_property(self, key: str, value: flex.vec2_double) -> None: ...
@overload
def set_property(self, key: str, value: flex.vec3_double) -> None: ...
@overload
def is_angle_valid(self, angle: float, deg: bool = ...) -> bool: ...
@overload
Expand Down
Loading
Loading