Skip to content

Commit

Permalink
Improved description when input is a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlpstsci committed Aug 16, 2023
1 parent 87f46c4 commit cbb1476
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/wfc3tools/wf3rej.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Running `wf3rej` from a Python Terminal
Displaying Output from `wf3rej` in a Jupyter Notebook
-----------------------------------------------------

When calling `wf3rej` from a Jupyter notebook, informational text output from the underlying `wf3rej.e` program will be passed through `print` as the calibration runs by default, and show up in the user's cell. This behavior can be customized by passing your own function as the `log_func` keyword argument to `wf3rej`. As output is read from the underlying program, the `wf3rej` Python wrapper will call `log_func` with the contents of each line. Note that `print` is an obvious choice for a log function, but this also provides a way to connect `wf3rej` to the Python logging system by passing the logging.debug function or similar.
When calling `wf3rej` from a Jupyter notebook, informational text output from the underlying `wf3rej.e` program will be passed through `print` as the calibration runs by default, and show up in the user's cell. This behavior can be customized by passing your own function as the `log_func` keyword argument to `wf3rej`. As output is read from the underlying program, the `wf3rej` Python wrapper will call `log_func` with the contents of each line. Note that `print` is an obvious choice for a log function, but this also provides a way to connect `wf3rej` to the Python logging system by passing the `logging.debug` function or similar.

If `log_func=None` is passed, informational text output from the underlying program will be ignored, but the program's exit code will still be checked for successful completion.

Expand All @@ -64,6 +64,7 @@ Parameters

input : str or list
Name of input files, such as
* common separated (no spaces) filenames (``iaao01k8q_flc.fits,iaao01k9q_flc.fits``)
* a Python list of filenames
* a partial filename with wildcards (``*flt.fits``)
* an at-file (``@input``)
Expand Down Expand Up @@ -142,7 +143,7 @@ Command Line Options for the `wf3rej` C Executable
Example - Process data with timestamps and a custom cosmic ray rejection table:
wf3rej.e ibfma4jqq_flt.fits,ibfma4jtq_flt.fits output.fits -t -table mycrejtab.fits
wf3rej.e iaao01k8q_flc.fits,iaao01k9q_flc.fits output.fits -t
Example - Print the code version and exit:
wf3rej.e -r
Expand Down
3 changes: 2 additions & 1 deletion wfc3tools/wf3rej.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$ wf3rej.e input output [-options]
Input can be a comma-delimited list of files, and an output file must be specified.
$ wf3rej.e ibfma4jqq_flt.fits,ibfma4jtq_flt.fits output.fits -t -table mycrejtab.fits
$ wf3rej.e iaao01k8q_flc.fits,iaao01k9q_flc.fits output.fits -t
Where the C executable options include:
Expand Down Expand Up @@ -62,6 +62,7 @@ def wf3rej(input, output, crrejtab="", scalense=0., initgues="",
----------
input : str or list
Name of input files, such as
- common separated (no spaces) filenames (``iaao01k8q_flc.fits,iaao01k9q_flc.fits``)
- a Python list of filenames
- a partial filename with wildcards (``*flt.fits``)
- an at-file (``@input``)
Expand Down

0 comments on commit cbb1476

Please sign in to comment.