From 47ec50b5fa375eac5cb4a5de19f540dd4b5eff12 Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 16 Sep 2024 13:07:12 -0400 Subject: [PATCH 1/5] Remove extra spaces --- jwst/associations/association.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jwst/associations/association.py b/jwst/associations/association.py index 1baed4406f..e6edce4b75 100644 --- a/jwst/associations/association.py +++ b/jwst/associations/association.py @@ -209,8 +209,8 @@ def validate(cls, asn): fpath, fname = os.path.split(member["expname"]) if len(fpath) > 0: err_str = "Input association file contains path information;" - err_str += " note that this can complicate usage and/or sharing" - err_str += " of such files." + err_str += " note that this can complicate usage and/or sharing" + err_str += " of such files." logger.debug(err_str) warnings.warn(err_str, UserWarning) return True From fa9a6dd0c3753dfa43786a9031fe307b736d6e7c Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 16 Sep 2024 13:07:59 -0400 Subject: [PATCH 2/5] Resolve autosummary warning about missing stub file --- docs/jwst/associations/association_api.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/jwst/associations/association_api.rst b/docs/jwst/associations/association_api.rst index 68071c8752..3a82f4ffef 100644 --- a/docs/jwst/associations/association_api.rst +++ b/docs/jwst/associations/association_api.rst @@ -1,3 +1,4 @@ .. _asn-full-api: .. automodapi:: jwst.associations + :skip: main From 7f04369032d6f0da013bd6c6560456853a868b43 Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 16 Sep 2024 13:08:35 -0400 Subject: [PATCH 3/5] Fix typos --- jwst/associations/asn_from_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jwst/associations/asn_from_list.py b/jwst/associations/asn_from_list.py index e7c9f5009a..792daea0d4 100644 --- a/jwst/associations/asn_from_list.py +++ b/jwst/associations/asn_from_list.py @@ -9,7 +9,7 @@ def asn_from_list(items, rule=DMS_Level3_Base, **kwargs): - """Creat an association from a list + """Create an association from a list Parameters ---------- @@ -32,7 +32,7 @@ def asn_from_list(items, rule=DMS_Level3_Base, **kwargs): ----- This is a lower-level tool for artificially creating an association. As such, the association created may not be valid. - It is presume the user knows what they are doing. + It is presumed the user knows what they are doing. """ asn = rule() From dc25467e9e79f2b8455efc43ddb0960b46a2c28c Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 16 Sep 2024 13:09:43 -0400 Subject: [PATCH 4/5] Update docs for path recommendation in expname --- docs/jwst/associations/level2_asn_technical.rst | 12 ++++++++---- docs/jwst/associations/level3_asn_technical.rst | 9 ++++++++- docs/jwst/associations/overview.rst | 17 ++++++++++------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/docs/jwst/associations/level2_asn_technical.rst b/docs/jwst/associations/level2_asn_technical.rst index ee32678fe3..ec71adc71d 100644 --- a/docs/jwst/associations/level2_asn_technical.rst +++ b/docs/jwst/associations/level2_asn_technical.rst @@ -133,10 +133,14 @@ members *required* association. Each member has the following keywords. expname *required* - The exposure file name. This must be a filename only, with no path. This - file must be in the same directory as the association file, so path is not - needed. If path data is included, an exception is raised when loading the - association file. + The exposure file name. + + It is recommended that this value be set to a filename only, + with no path. In this case, the file must be in the same directory as the + association file, so the path is not needed. If valid absolute or relative + path data is included, the input file is still found and used by the pipeline, + but a warning is raised: the association file in this case may be less portable + than if the path data is not included. exptype *required* Type of information represented by the exposure. Possible diff --git a/docs/jwst/associations/level3_asn_technical.rst b/docs/jwst/associations/level3_asn_technical.rst index 98d872a6d4..5e08f6c54a 100644 --- a/docs/jwst/associations/level3_asn_technical.rst +++ b/docs/jwst/associations/level3_asn_technical.rst @@ -135,7 +135,14 @@ members *required* association. Each member has the following keywords. expname *required* - The exposure file name + The exposure file name. + + It is recommended that this value be set to a filename only, + with no path. In this case, the file must be in the same directory as the + association file, so the path is not needed. If valid absolute or relative + path data is included, the input file is still found and used by the pipeline, + but a warning is raised: the association file in this case may be less portable + than if the path data is not included. exptype *required* Type of information represented by the exposure. Possible values are diff --git a/docs/jwst/associations/overview.rst b/docs/jwst/associations/overview.rst index e90554e44a..4b3f0ffa7c 100644 --- a/docs/jwst/associations/overview.rst +++ b/docs/jwst/associations/overview.rst @@ -84,13 +84,16 @@ Usage Users should not need to run the generator. Instead, it is expected that one edits an already existing association that accompanies the user's JWST data. -Care should be taken if editing an association file. Keep in mind all input -files listed in the association file are in the same directory as the -association file and no path information can be put in ``expname``, only the -file name. Or, if need be, an association can be created based on the existing -:ref:`Stage 2 ` or :ref:`Stage 3 ` examples. -If, however, the user *does* need to run the generator, :ref:`Association Generator -` documentation will be helpful. + +Care should be taken if editing an association file. Keep in mind that generally +all input files listed in the association files are assumed to be in the same +directory as the association file and no path information is put in ``expname``. + +If need be, an association can be created based on the existing +:ref:`Stage 2 ` or :ref:`Stage 3 ` examples, +or using the command line tool :ref:`asn-from-list`. +If, however, the user *does* need to run the generator, the :ref:`Association Generator +` description and :ref:`asn-generate` documentation will be helpful. Once an association is in-hand, one can pass it as input to a pipeline routine. For example:: From bc0abc27c261f9fe35125026f66fce0bc7e6b51c Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 16 Sep 2024 13:18:17 -0400 Subject: [PATCH 5/5] Update change log --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index b9f075c9c6..bd82a9d40d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -64,6 +64,9 @@ documentation - Add changelog to documentation. [#8716] +- Updated description of association keyword `expname`: including path information + in addition to the filename is discouraged, but allowed. [#8789] + emicorr -------