8000 JP-3489: Update association expname docs by melanieclarke · Pull Request #8789 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-3489: Update association expname docs #8789

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

Merged
merged 7 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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
-------

Expand Down
1 change: 1 addition & 0 deletions docs/jwst/associations/association_api.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. _asn-full-api:

.. automodapi:: jwst.associations
:skip: main
12 changes: 8 additions & 4 deletions docs/jwst/associations/level2_asn_technical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion docs/jwst/associations/level3_asn_technical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions docs/jwst/associations/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <asn-level2-example>` or :ref:`Stage 3 <asn-level3-example>` examples.
If, however, the user *does* need to run the generator, :ref:`Association Generator
<design-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 <asn-level2-example>` or :ref:`Stage 3 <asn-level3-example>` 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
<design-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::
Expand Down
4 changes: 2 additions & 2 deletions jwst/associations/asn_from_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions jwst/associations/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
0