Add documentation of reduction interface and allow skipping file saving.#172
Add documentation of reduction interface and allow skipping file saving.#172YooSunYoung merged 14 commits intotof-sim-configfrom
Conversation
| return [self.inputs, self.workflow, self.output] | ||
|
|
||
|
|
||
| def to_command_arguments( |
There was a problem hiding this comment.
I moved this interface to the configurations module so that users can use it.
|
|
||
| """ | ||
| _check_file(output_file, overwrite=True) | ||
| _check_file(output_file, overwrite=overwrite) |
There was a problem hiding this comment.
Rest of the nxlauetof writing is done in the append mode to make sure they are called on top of this function.
03941fb to
4a14ee6
Compare
d4cebb8 to
814cc35
Compare
4a14ee6 to
39aeba2
Compare
7863388 to
c193434
Compare
77b3177 to
7fa21cb
Compare
c193434 to
9a21d37
Compare
| "The `essnmx-reduce` interface will reduce `nexus` file <br>\n", | ||
| "and save the results into `NXlauetof`(not exactly but very close) format for `dials`.<br>\n", | ||
| "\n", | ||
| "Argument options could be exhaustive therefore we wrapped them into a nested pydantic model.<br>\n", |
There was a problem hiding this comment.
"Argument options could be exhaustive"
Not sure I understand what is meant here...
There was a problem hiding this comment.
I meant, if we pass them as individual arguments to the function... it could be exhaustive and not so easy to know which one to change etc. We can change it to ... For conveniences and safety, we wrapped...
| " input_file=[\"PATH_TO_THE_NEXUS_FILE.hdf\"],\n", | ||
| " detector_ids=[0, 1, 2], # Detector index to be reduced in alphabetical order.\n", | ||
| " ),\n", | ||
| " output=OutputConfig(output_file=\"scipp_output.hdf\", skip_file_output=True),\n", |
There was a problem hiding this comment.
Instead of having both output_file and skip_file_output, can we say that if output_file is None, we skip file output? I don't know if that is better API, but it feels like if we are skipping file output, then we shouldn't need to define output_file?
There was a problem hiding this comment.
It's because there is already a default output file name, which is not None.
For users, or developers, it'll be easier to figure out how to skip writing a file if there's a dedicated flag, rather than having to know you should set the output file to None.
What do you think...?
Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
No description provided.