Skip to content

Commit 49af3ef

Browse files
authored
Merge pull request #93 from yucongalicechen/fix
minor fixes
2 parents 5dc5ae5 + 8d83026 commit 49af3ef

File tree

3 files changed

+8
-20
lines changed

3 files changed

+8
-20
lines changed

src/diffpy/labpdfproc/functions.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ def _get_grid_points(self):
2727
self.grid = {(x, y) for x in xs for y in ys if x**2 + y**2 <= self.radius**2}
2828
self.total_points_in_grid = len(self.grid)
2929

30-
# def get_coordinate_index(self, coordinate): # I think we probably dont need this function?
31-
# count = 0
32-
# for i, target in enumerate(self.grid):
33-
# if coordinate == target:
34-
# return i
35-
# else:
36-
# count += 1
37-
# if count >= len(self.grid):
38-
# raise IndexError(f"WARNING: no coordinate {coordinate} found in coordinates list")
39-
4030
def set_distances_at_angle(self, angle):
4131
"""
4232
given an angle, set the distances from the grid points to the entry and exit coordinates

src/diffpy/labpdfproc/labpdfprocapp.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ def get_args(override_cli_inputs=None):
1414
"input",
1515
nargs="+",
1616
help="The filename(s) or folder(s) of the datafile(s) to load. "
17-
"Required.\nSupply a space-separated list of files or directories."
17+
"Required.\nSupply a space-separated list of files or directories. "
1818
"Long lists can be supplied, one per line, in a file with name "
1919
"file_list.txt. If one or more directory is provided, all valid "
2020
"data-files in that directory will be processed. Examples of valid "
2121
"inputs are 'file.xy', 'data/file.xy', 'file.xy, data/file.xy', "
22-
"'.' (load everything in the current directory), 'data' (load"
23-
"everything in the folder ./data), 'data/file_list.txt' (load"
24-
" the list of files contained in the text-file called "
22+
"'.' (load everything in the current directory), 'data' (load "
23+
"everything in the folder ./data), 'data/file_list.txt' (load "
24+
"the list of files contained in the text-file called "
2525
"file_list.txt that can be found in the folder ./data), "
2626
"'./*.chi', 'data/*.chi' (load all files with extension .chi in the "
2727
"folder ./data).",
@@ -45,7 +45,7 @@ def get_args(override_cli_inputs=None):
4545
"-o",
4646
"--output-directory",
4747
help="The name of the output directory. If not specified "
48-
"then corrected files will be written to the current directory."
48+
"then corrected files will be written to the current directory. "
4949
"If the specified directory doesn't exist it will be created.",
5050
default=None,
5151
)
@@ -64,7 +64,6 @@ def get_args(override_cli_inputs=None):
6464
action="store_true",
6565
help="The absorption correction will be output to a file if this "
6666
"flag is set. Default is that it is not output.",
67-
default="tth",
6867
)
6968
p.add_argument(
7069
"-f",

src/diffpy/labpdfproc/tools.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,12 @@ def set_wavelength(args):
110110
args argparse.Namespace
111111
the arguments from the parser
112112
113+
we raise a ValueError if the input wavelength is non-positive
114+
or if the input anode_type is not one of the known sources
115+
113116
Returns
114117
-------
115118
args argparse.Namespace
116-
117-
we raise an ValueError if the input wavelength is non-positive
118-
or if the input anode_type is not one of the known sources
119-
120119
"""
121120
if args.wavelength is not None and args.wavelength <= 0:
122121
raise ValueError(

0 commit comments

Comments
 (0)