-
Notifications
You must be signed in to change notification settings - Fork 11
feat: options for estimating muD theoretically #173
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
Changes from 1 commit
f4dd476
421c8de
66cbc0c
f224f3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,13 @@ def _define_arguments(): | |
"The filename(s) or folder(s) of the datafile(s) to load. " | ||
"Required.\n" | ||
"Supply a space-separated list of files or directories. " | ||
"If a filename contains whitespace, enclose it in quotes. " | ||
"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', " | ||
"'file.xy data/file.xy', " | ||
yucongalicechen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"'.' (load everything in the current directory), " | ||
"'data' (load everything in the folder ./data), " | ||
"'data/file_list.txt' (load the list of files " | ||
|
@@ -177,29 +178,27 @@ def _add_mud_selection_group(p, is_gui=False): | |
**({"widget": "FileChooser"} if is_gui else {}), | ||
) | ||
g.add_argument( | ||
"-td", | ||
"-d", | ||
"--theoretical-from-density", | ||
yucongalicechen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
help=( | ||
"Estimate mu*D theoretically using sample mass density. " | ||
"Specify the sample composition (chemical formula), " | ||
"incident x-ray energy in keV, " | ||
"and sample mass density in g/cm^3 " | ||
"in that exact order " | ||
"and separated by commas with no whitespaces " | ||
"(e.g., 'ZrO2,2,1.2')." | ||
"Specify the chemical formula, incident x-ray energy (in keV), " | ||
"and sample mass density (in g/cm^3), in that exact order, " | ||
"separated by commas (e.g., ZrO2,20,1.5). " | ||
"If you add whitespaces, " | ||
"enclose it in quotes (e.g., 'ZrO2, 20, 1.5'). " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. allow whitespace - edits in help message There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does the parser do if there is whitespace but no quotes. Did you test that? |
||
), | ||
) | ||
g.add_argument( | ||
"-tp", | ||
"-p", | ||
yucongalicechen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"--theoretical-from-packing", | ||
help=( | ||
"Estimate mu*D theoretically using packing fraction. " | ||
"Specify the sample composition (chemical formula), " | ||
"incident x-ray energy in keV, " | ||
"and packing fraction (0 to 1) " | ||
"in that exact order " | ||
"and separated by commas with no whitespaces " | ||
"(e.g., 'ZrO2,2,0.5')." | ||
"Specify the chemical formula, incident x-ray energy (in keV), " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since this seems to be used 2x, define it in a variable and call the variable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sbillinge ready for another review. I edited the help messages according to the comments above. When there's whitespace but no quotes the CLI will raise an error saying that it doesn't recognize the command |
||
"and packing fraction (0 to 1), in that exact order, " | ||
"separated by commas (e.g., ZrO2,20,0.5). " | ||
"If you add whitespaces, " | ||
"enclose it in quotes (e.g., 'ZrO2, 20, 0.5'). " | ||
), | ||
) | ||
return p | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe mention that, as a general matter, avoid filenames with whietspaces in, but if it does, then enclose in quotes