Commit ddd38f10 authored by Thomas Vincent's avatar Thomas Vincent

update docstring

parent c60374e3
...@@ -58,15 +58,12 @@ def merge_scan_data(output_dir, ...@@ -58,15 +58,12 @@ def merge_scan_data(output_dir,
with an (existing) image file. Existing output files will be with an (existing) image file. Existing output files will be
overwritten. overwritten.
:param output_dir: folder name into which output data (as well as :param str output_dir: folder name into which output data
temporary files) will be written. (as well as temporary files) will be written.
:type output_dir: str
:param spec_fname: path to the spec file. :param str spec_fname: path to the spec file.
:type output_dir: str
:param beam_energy: beam energy in .... :param float beam_energy: beam energy in ....
:type beam_energy: numeric
:param chan_per_deg: 2 elements array containing the number of channels :param chan_per_deg: 2 elements array containing the number of channels
per degree (v, h) (as defined by xrayutilitied, used when converting to per degree (v, h) (as defined by xrayutilitied, used when converting to
...@@ -77,15 +74,10 @@ def merge_scan_data(output_dir, ...@@ -77,15 +74,10 @@ def merge_scan_data(output_dir,
the direct beam position in the detector coordinates. the direct beam position in the detector coordinates.
:type center_chan: *optional* array_like :type center_chan: *optional* array_like
:param scan_ids: array of scan numbers to add to the merged file. If :param scan_ids: array of scan numbers to add to the merged file.
None, all valid scans will be merged. If None, all valid scans will be merged.
:type scan_ids: *optional* array of int :type scan_ids: *optional* array of int
:param master_f: name of the "master" (top level) HDF5 file.
If None, the file will be named master.h5. This file is created in the
folder pointed to by output_dir.
:type master_f: *optional* str
:param str img_dir: directory path. If provided the image files will be :param str img_dir: directory path. If provided the image files will be
looked for into that folder instead of the one found in the scan looked for into that folder instead of the one found in the scan
headers. headers.
...@@ -95,31 +87,28 @@ def merge_scan_data(output_dir, ...@@ -95,31 +87,28 @@ def merge_scan_data(output_dir,
If None, the number of processes used will be the If None, the number of processes used will be the
default config value (usually the number of cores). default config value (usually the number of cores).
:param version: version of the spec file. It is currently used to get :param int version: version of the spec file.
the offset and padding to apply to the nextNr value found in the spec scan It is currently used to get the offset and padding to apply to
headers. This nextNr is then used to generate the image file name. Set it the nextNr value found in the spec scan headers.
to 0 if you are merging data generated before April 2016 (TBC). This nextNr is then used to generate the image file name.
:type img_dir: *optional* int Set it to 0 if you are merging data generated before April 2016 (TBC).
:param nr_padding: zero padding to apply to the nextNr number found
in the SPEC file.
:type nr_padding: int
:param nr_offset: offset to apply to the nextNr number found :param int nr_padding: zero padding to apply to the nextNr number found
in the SPEC file. in the SPEC file.
:type nr_offset: int
:param int nr_offset:
Offset to apply to the nextNr number found in the SPEC file.
:param Union[str,int] compression: The HDF5 compression to use. :param Union[str,int] compression: The HDF5 compression to use.
:param bool overwrite: True to allow overwriting already existing output file :param bool overwrite: True to allow overwriting already existing output file
:param image_roi: :param Union[List[int],None] image_roi:
Detector image ROI (origin_row, origin_column, height, width) to save, Detector image ROI (origin_row, origin_column, height, width) to save,
or None (default) to save the whole image or None (default) to save the whole image
:type image_roi: Union[List[int],None]
:returns: a list of scan IDs that were merged :returns: a list of scan IDs that were merged
:rtype: *list* :rtype: List
""" """
base_spec = os.path.basename(spec_fname) base_spec = os.path.basename(spec_fname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment