From cbb1476ac74227e14b8e581994812a65daf97ee9 Mon Sep 17 00:00:00 2001 From: Michele De La Pena Date: Wed, 16 Aug 2023 17:01:02 -0400 Subject: [PATCH] Improved description when input is a string. --- docs/wfc3tools/wf3rej.rst | 5 +++-- wfc3tools/wf3rej.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/wfc3tools/wf3rej.rst b/docs/wfc3tools/wf3rej.rst index 54f0590..a825a16 100644 --- a/docs/wfc3tools/wf3rej.rst +++ b/docs/wfc3tools/wf3rej.rst @@ -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. @@ -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``) @@ -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 diff --git a/wfc3tools/wf3rej.py b/wfc3tools/wf3rej.py index 203bf51..9d7380b 100644 --- a/wfc3tools/wf3rej.py +++ b/wfc3tools/wf3rej.py @@ -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: @@ -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``)