Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 87f8075

Browse files
authored
Merge pull request #102 from carnisj/release
prepare release 0.1.4
2 parents c6afdc9 + 716f88f commit 87f8075

5 files changed

Lines changed: 52 additions & 10 deletions

File tree

HISTORY.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
Version 0.1.4
2+
-------------
3+
4+
* Feature: implement a new validation function valid_ndarray, implement tests and remove
5+
the redundant code in modules.
6+
7+
* Refactor: split the Detector class using inheritance, refactor scripts accordingly and
8+
implement tests.
19

210
* Feature: create a Beamline class with one child class for each beamline, move
3-
all beamline-dependent methods from Setup to the respective class
11+
all beamline-dependent methods from Setup to the respective class and implement some
12+
tests.
413

514
Version 0.1.3
615
-------------

README.rst

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,22 @@ The following detectors are implemented:
165165
* Merlin
166166
* Eiger2M
167167
* Eiger4M
168+
* Dummy (user-defined pixel size and pixel number)
168169

169170
The following classes are implemented:
170171

171-
* Detector
172-
* Diffractometer and corresponding child classes (one per beamline)
172+
* Beamline and corresponding child classes (one per supported beamline)
173+
* Detector and corresponding child classes (one per supported detector)
174+
* Diffractometer and corresponding child classes (one per supported beamline)
175+
* RotationMatrix: used in methods from Diffractometer to generate rotation matrices
173176
* Setup
174177

178+
In scripts, the initial step is to declare a detector instance and a setup instance with
179+
the related parameters (see the class documentation). The beamline and the
180+
diffractometer are not meant to be instantiated directly, this is done internally in
181+
Setup.
182+
183+
175184
.. bcdi.experiment end
176185
177186
BCDI.facet_recognition: automatic facet detection in BCDI 3D reconstructions
@@ -186,7 +195,9 @@ This module provides tools for plotting the stereographic projection of a diffra
186195
peak or an object. There is also a script for facet detection on a reconstructed
187196
object, and for calculating statistics on facet strain. After meshing the object,
188197
facets are found using a density estimation of mesh triangles normals, followed by
189-
watershed segmentation.
198+
,watershed segmentation.
199+
See Carnis et al. Small 17, 2007702 (2021)
200+
https://doi.org/10.1002/smll.202007702
190201

191202
.. bcdi.facet_recognition end
192203
@@ -212,7 +223,7 @@ Description
212223
-----------
213224

214225
This module provides methods used for pre-processing phased data. For example (but
215-
not limited to): hotpixels removal, filtering, masking...
226+
not limited to): centering, hotpixels removal, filtering, masking...
216227

217228
.. bcdi.preprocessing end
218229
@@ -256,6 +267,8 @@ kinematical sum. It can include a displacement field, noise, detector gaps etc..
256267
In forward CDI geometry, calculation of the Bragg peak positions in 3D for a
257268
mesocrystal, knowing the unit cell and unit cell parameter. It can be used to fit
258269
experimental data.
270+
See Carnis et al. Scientific Reports 9, 17357 (2019)
271+
https://doi.org/10.1038/s41598-019-53774-2
259272

260273
.. bcdi.simulation end
261274

bcdi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
# authors:
88
# Jerome Carnis, carnis_jerome@yahoo.fr
99
"""The main bcdi package, which contains the whole framework."""
10-
__version__ = "0.1.3"
10+
__version__ = "0.1.4"

bcdi/experiment/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
Classes
1414
-------
1515
16-
- ``Detector`` -- detector declaration
16+
- ``Detector`` -- one child class for each supported detector
1717
- ``Beamline`` -- one child class for each supported beamline
18-
- ``Diffractometer`` -- diffractometer, one child class for each supported beamline
18+
- ``Diffractometer`` -- one child class for each supported beamline
1919
- ``Setup`` -- class gathering various parameters about the setup
2020
- ``RotationMatrix`` -- rotation matrix given the rotation axis and the angle
2121

dodo.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def task_clean_doc():
5151
"""Remove the compiled documentation."""
5252

5353
def delete_dir(dirname):
54+
"""Delete the directory if it exists."""
5455
path = os.path.join(get_path(), dirname).replace("\\", "/")
5556
if os.path.isdir(path):
5657
shutil.rmtree(path)
@@ -102,6 +103,7 @@ def task_clean_coverage():
102103
"""Delete the coverage report."""
103104

104105
def delete_coverage(filename):
106+
"""Delete the file if it exists."""
105107
path = os.path.join(get_path(), filename).replace("\\", "/")
106108
if os.path.isfile(path):
107109
os.unlink(path)
@@ -129,7 +131,7 @@ def task_tests():
129131
return {
130132
"actions": ["coverage run --source=bcdi -m unittest discover"],
131133
"targets": [".coverage"],
132-
"verbosity": 2,
134+
"verbosity": 1,
133135
}
134136

135137

@@ -153,7 +155,25 @@ def task_build_distribution():
153155
}
154156

155157

156-
def task_check_description():
158+
def task_clean_build():
159+
"""Remove the build directory"""
160+
161+
def delete_dir(dirname):
162+
"""Delete the directory if it exists."""
163+
path = os.path.join(get_path(), dirname).replace("\\", "/")
164+
if os.path.isdir(path):
165+
shutil.rmtree(path)
166+
print(f"\n\tDeleted {path}\n")
167+
else:
168+
print("\n\tNo build directory to delete.\n")
169+
170+
return {
171+
"actions": [(delete_dir, ["build/"])],
172+
"verbosity": 2,
173+
}
174+
175+
176+
def task_check_long_description_pypi():
157177
"""Check whether the long description will render correctly on PyPI."""
158178
return {
159179
"actions": ["twine check dist/*"],

0 commit comments

Comments
 (0)