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

minor fixes #93

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 0 additions & 10 deletions src/diffpy/labpdfproc/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ def _get_grid_points(self):
self.grid = {(x, y) for x in xs for y in ys if x**2 + y**2 <= self.radius**2}
self.total_points_in_grid = len(self.grid)

# def get_coordinate_index(self, coordinate): # I think we probably dont need this function?
# count = 0
# for i, target in enumerate(self.grid):
# if coordinate == target:
# return i
# else:
# count += 1
# if count >= len(self.grid):
# raise IndexError(f"WARNING: no coordinate {coordinate} found in coordinates list")

def set_distances_at_angle(self, angle):
"""
given an angle, set the distances from the grid points to the entry and exit coordinates
Expand Down
11 changes: 5 additions & 6 deletions src/diffpy/labpdfproc/labpdfprocapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def get_args(override_cli_inputs=None):
"input",
nargs="+",
help="The filename(s) or folder(s) of the datafile(s) to load. "
"Required.\nSupply a space-separated list of files or directories."
"Required.\nSupply a space-separated list of files or directories. "
"Long lists can be supplied, one per line, in a file with name "
"file_list.txt. If one or more directory is provided, all valid "
"data-files in that directory will be processed. Examples of valid "
"inputs are 'file.xy', 'data/file.xy', 'file.xy, data/file.xy', "
"'.' (load everything in the current directory), 'data' (load"
"everything in the folder ./data), 'data/file_list.txt' (load"
" the list of files contained in the text-file called "
"'.' (load everything in the current directory), 'data' (load "
"everything in the folder ./data), 'data/file_list.txt' (load "
"the list of files contained in the text-file called "
"file_list.txt that can be found in the folder ./data), "
"'./*.chi', 'data/*.chi' (load all files with extension .chi in the "
"folder ./data).",
Expand All @@ -45,7 +45,7 @@ def get_args(override_cli_inputs=None):
"-o",
"--output-directory",
help="The name of the output directory. If not specified "
"then corrected files will be written to the current directory."
"then corrected files will be written to the current directory. "
"If the specified directory doesn't exist it will be created.",
default=None,
)
Expand All @@ -64,7 +64,6 @@ def get_args(override_cli_inputs=None):
action="store_true",
help="The absorption correction will be output to a file if this "
"flag is set. Default is that it is not output.",
default="tth",
)
p.add_argument(
"-f",
Expand Down
7 changes: 3 additions & 4 deletions src/diffpy/labpdfproc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ def set_wavelength(args):
args argparse.Namespace
the arguments from the parser

we raise a ValueError if the input wavelength is non-positive
or if the input anode_type is not one of the known sources

Returns
-------
args argparse.Namespace

we raise an ValueError if the input wavelength is non-positive
or if the input anode_type is not one of the known sources

"""
if args.wavelength is not None and args.wavelength <= 0:
raise ValueError(
Expand Down
Loading