Skip to content

Commit

Permalink
Update docstrings for release 0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Carnis committed Aug 11, 2020
1 parent b71b5fa commit 7849419
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
12 changes: 4 additions & 8 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Version 0.0.9
-------------

* Feature: implement support for MAX IV NANOMAX beamline
* Feature: implement support for MAXIV NANOMAX beamline

* Feature: implement rocking_curves.py to follow the evolution of the Bragg peak between several rocking curves

Expand All @@ -11,11 +11,9 @@ Version 0.0.9

* Feature: implement view_ccf.py and view_ccf_map.py to plot the cross-correlation function output

* Remove preprocess_bcdi_sequential.py, which was not maintained anymore. Use preprocess_bcdi_combined.py instead

* Feature: implement the 3D angular X-ray cross-correlation analysis

* Refactor: allow the reloading of binned data and its orthogonalization in preprocess_cdi_combined.py and preprocess_bcdi_combined.py
* Refactor: allow the reloading of binned data and its orthogonalization in preprocess_cdi.py and preprocess_bcdi.py

* Feature: implement crop_npz.py to crop combined stacked data to the desired size

Expand All @@ -25,7 +23,7 @@ Version 0.0.9

* Refactor: when gridding forward CDI data, reverse the rotation direction to compensate the rotation of Ewald sphere

* Refactor: converted /postprocessing/scripts/extract_bulk_surface.py
* Refactor: updated extract_bulk_surface.py to use module functions

* Bug: treat correctly the case angle=pi/2 during the interpolation of CDI data onto the laboratory frame

Expand All @@ -39,9 +37,7 @@ Version 0.0.9

* Feature: add the option of restarting masking the aliens during preprocessing, not back compatible with previous versions

* Refactor: rename prepare_(b)cdi_mask.py preprocess_(b)cdi_sequential.py

* Feature: implement simultaneous masking over the 3 axes in two new preprocessing scripts preprocess_(b)cdi_combinedl.py
* Feature: implement simultaneous masking over the 3 axes in two new preprocessing scripts preprocess_bcdi.py and preprocess_cdi.py

* Feature: implement domain_orientation.py to find the orientation of domains in a 3D forward CDI dataset of mesocrystal

Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Introduction

BCDI stands for *Bragg coherent X-ray diffraction imaging*. It can be used for:

* pre-processing BCDI and forward CDI data (masking aliens, detector gaps...) before phase retrieval
* pre-processing BCDI and forward CDI data (masking aliens, detector gaps ...) before phase retrieval

* post-processing phased data (phase offset and phase ramp removal, averaging, apodization, ...)

* data analysis on diffraction data (stereographic projection, angular cross-correlation analysis)
* data analysis on diffraction data (stereographic projection, angular cross-correlation analysis, domain orientation fitting ...)

* data analysis on phased data (resolution calculation, statistics on the retrieved strain...)
* data analysis on phased data (resolution calculation, statistics on the retrieved strain ...)

* simulation of diffraction intensity (including noise, detector gaps, displacement fields...)
* simulation of diffraction intensity (including noise, detector gaps, displacement field ...)

* creating figures for publication using templates

Expand Down Expand Up @@ -43,7 +43,7 @@ BCDI can be used as a python library with the following main modules:

8) :mod:`bcdi.utils`: data loading, fitting functions ...

8) :mod:`bcdi.xcca`: X-ray cross-correlation analysis related methods
9) :mod:`bcdi.xcca`: X-ray cross-correlation analysis related methods

Acknowledgment and third party packages
=======================================
Expand Down Expand Up @@ -102,7 +102,7 @@ Changelog
=========

.. include:: ../HISTORY.rst
:end-before: Version 0.0.6
:end-before: Version 0.0.8

See the full :doc:`Changelog<changelog>`

Expand Down
14 changes: 7 additions & 7 deletions bcdi/graph/graph_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,8 @@ def mlab_contour3d(x, y, z, scalars, contours, extent, nb_labels, fig_size=(400,
:param scalars: scalar field at each voxel.
:param contours: integer/list specifying number/list of contours. Specifying a list of values will only give the
requested contours asked for.
:param extent:[xmin, xmax, ymin, ymax, zmin, zmax] Default is the x, y, z arrays extent.
Use this to change the extent of the object created.
:param extent: [xmin, xmax, ymin, ymax, zmin, zmax] Default is the x, y, z arrays extent. Use this to change
the extent of the object created.
:param nb_labels: the number of labels along each direction.
:param fig_size: the size of the scene created, in pixels.
:param azimuth: the azimuthal angle (in degrees, 0-360), i.e. the angle subtended by the position vector on a sphere
Expand All @@ -1055,7 +1055,7 @@ def mlab_contour3d(x, y, z, scalars, contours, extent, nb_labels, fig_size=(400,
and the z-axis. It can be a list of angles for several plots.
:param distance: a positive floating point number representing the distance from the focal point to place the
camera. It can be a list of the same length as aimut. If ‘auto’ is passed, the distance is computed to have a best
fit of objects in the frame.
fit of objects in the frame.
:param roll: absolute roll angle of the camera. It can be a list of angles for several plots.
:param vmin: vmin is used to scale the colormap. If None, the min of the data will be used.
:param vmax: vmax is used to scale the colormap. If None, the max of the data will be used.
Expand Down Expand Up @@ -1144,8 +1144,8 @@ def mlab_points3d(x, y, z, scalars, extent, nb_labels, fig_size=(400, 350), azim
:param y: y position of voxels (numpy.mgrid)
:param z: z position of voxels (numpy.mgrid)
:param scalars: scalar field at each voxel.
:param extent:[xmin, xmax, ymin, ymax, zmin, zmax] Default is the x, y, z arrays extent.
Use this to change the extent of the object created.
:param extent: [xmin, xmax, ymin, ymax, zmin, zmax] Default is the x, y, z arrays extent. Use this to change the
extent of the object created.
:param nb_labels: the number of labels along each direction.
:param fig_size: the size of the scene created, in pixels.
:param azimuth: the azimuthal angle (in degrees, 0-360), i.e. the angle subtended by the position vector on a sphere
Expand All @@ -1154,11 +1154,11 @@ def mlab_points3d(x, y, z, scalars, extent, nb_labels, fig_size=(400, 350), azim
and the z-axis. It can be a list of angles for several plots.
:param distance: a positive floating point number representing the distance from the focal point to place the
camera. It can be a list of the same length as aimut. If ‘auto’ is passed, the distance is computed to have a best
fit of objects in the frame.
fit of objects in the frame.
:param roll: absolute roll angle of the camera. It can be a list of angles for several plots.
:param mode: the mode of the glyphs. Available modes are: ‘2darrow’, ‘2dcircle’, ‘2dcross’, ‘2ddash’, ‘2ddiamond’,
‘2dhooked_arrow’, ‘2dsquare’, ‘2dthick_arrow’, ‘2dthick_cross’, ‘2dtriangle’, ‘2dvertex’, ‘arrow’, ‘axes’, ‘cone’,
‘cube’, ‘cylinder’, ‘point’, ‘sphere’
‘cube’, ‘cylinder’, ‘point’, ‘sphere’
:param vmin: vmin is used to scale the colormap. If None, the min of the data will be used.
:param vmax: vmax is used to scale the colormap. If None, the max of the data will be used.
:param opacity: the overall opacity of the vtk object. Must be a float. Default: 1.0
Expand Down
6 changes: 3 additions & 3 deletions bcdi/preprocessing/preprocessing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,7 @@ def center_fft(data, mask, detector, frames_logical, centering='max', fft_option
def check_cdi_angle(data, mask, cdi_angle, frames_logical, debugging=False):
"""
In forward CDI experiment, check if there is no overlap in the measurement angles, crop it otherwise. Flip the
rotation direction to convert sample angles into detector angles.
Update data, mask and frames_logical accordingly.
rotation direction to convert sample angles into detector angles. Update data, mask and frames_logical accordingly.
:param data: 3D forward CDI dataset before gridding.
:param mask: 3D mask
Expand Down Expand Up @@ -2291,6 +2290,7 @@ def load_nanomax_data(logfile, detector, flatfield, hotpixels, background, norma
debugging=False):
"""
Load Nanomax data, apply filters and concatenate it for phasing.
:param logfile: path of the . fio file containing the information about the scan
:param detector: the detector object: Class experiment_utils.Detector()
:param flatfield: the 2D flatfield array
Expand All @@ -2303,7 +2303,7 @@ def load_nanomax_data(logfile, detector, flatfield, hotpixels, background, norma
- the 3D data array in the detector frame and the 3D mask array
- the monitor values for normalization
- frames_logical: array of initial length the number of measured frames. In case of padding the length changes.
A frame whose index is set to 1 means that it is used, 0 means not used, -1 means padded (added) frame.
A frame whose index is set to 1 means that it is used, 0 means not used, -1 means padded (added) frame.
"""
import hdf5plugin # should be imported before h5py
import h5py
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
BCDI stands for *Bragg coherent X-ray diffraction imaging*. It can be used for:\n\n\
1. Pre-processing BCDI and forward CDI data (masking aliens, detector gaps...) before phase retrieval.\n\
2. Post-processing phased data (phase offset and phase ramp removal, averaging, apodization...).\n\
3. Data analysis on diffraction data (stereographic projection, X-ray cross correlation analysis, domain orientation fitting ...).\n\
3. Data analysis on diffraction data (stereographic projection, angular cross correlation analysis, domain orientation fitting ...).\n\
4. Data analysis on phased data (resolution calculation, statistics on the retrieved strain...).\n\
5. Simulation of diffraction intensity (including noise, detector gaps, displacement...).\n\
6. Making figures for publication using templates.\n\n",
Expand Down

0 comments on commit 7849419

Please sign in to comment.