Skip to content

Commit

Permalink
Minor doc updates (#178)
Browse files Browse the repository at this point in the history
* Minor doc updates

* Whitespace fixes for CI errors

* Update doc/source/calacs.rst

Co-authored-by: P. L. Lim <[email protected]>

---------

Co-authored-by: P. L. Lim <[email protected]>
  • Loading branch information
jryon and pllim authored May 22, 2023
1 parent f8e8ce3 commit e8630c1
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 29 deletions.
2 changes: 1 addition & 1 deletion acstools/acscte.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Use this function to facilitate batch runs of ACSCTE.
Only WFC full-frame and some 2K subarrays are currently supported. See
`ACS Data Handbook <https://hst-docs.stsci.edu/acsdhb>`_
`Table 7.6 in the ACS Instrument Handbook <https://hst-docs.stsci.edu/acsihb/chapter-7-observing-techniques/7-3-operating-modes#id-7.3OperatingModes-table7.6>`_
for more details.
.. note:: Calibration flags are controlled by primary header.
Expand Down
3 changes: 2 additions & 1 deletion acstools/acscteforwardmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Use this function to facilitate batch runs of the forward model.
Only WFC full-frame and some 2K subarrays are currently supported. See
`ACS Data Handbook <https://hst-docs.stsci.edu/acsdhb>`_ for more details.
`Table 7.6 in the ACS Instrument Handbook <https://hst-docs.stsci.edu/acsihb/chapter-7-observing-techniques/7-3-operating-modes#id-7.3OperatingModes-table7.6>`_
for more details.
For guidance on running the CTE forward model, see the Jupyter notebook
`ACS CTE Forward Model Example <https://github.com/spacetelescope/acs-notebook/blob/master/acs_cte_forward_model/acs_cte_forward_model_example.ipynb>`_.
Expand Down
13 changes: 6 additions & 7 deletions acstools/acsphotcte.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@
install the software, compute the CTE corrections, send the result back,
and then terminate all resources. Hence, users should try to process as many
sources as they can in a single function call. Testing has shown that the
optimal number is < 25000, but the service can handle as many as 150,000
optimal number is < 25,000, but the service can handle as many as 150,000
sources in a single request.
Examples
--------
In this example, we get the CTE corrected FLT photometry for a list of 1000
sources. For each parameter, we generate 1000 random values in the interval [0, 1) and
then scale each value to be in the typical range. We use arbitrary values for
the fluxes, local sky backgrounds, and MJD. We assume a radius of 3 pixels was
used to compute the aperture photometry. For the ACS/WFC CCD chips, the maximum
number of Y transfers is 2048 and so we scale by 2048.
In this example, we obtain the CTE-corrected FLT photometry for a list of 1000
artificial sources. For each parameter, we generate 1000 random values in the interval [0, 1) and
then scale the random data by a realistic value for stellar fluxes,
y-transfers, and local sky backgrounds. An arbitrary MJD is defined, and
we assume an aperture radius of 3 pixels.
>>> import numpy as np
>>> from acstools import acsphotcte
Expand Down
6 changes: 3 additions & 3 deletions acstools/acszpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Examples
--------
Retrieve the zeropoint information for all the filters on 2016-04-01 for WFC:
Retrieve the zeropoint information for all of the WFC filters on 2016-04-01:
>>> from acstools import acszpt
>>> q = acszpt.Query(date="2016-04-01", detector="WFC")
Expand All @@ -41,7 +41,7 @@
F850LP 9031.5 1.5313e-19 25.937 24.323 24.851
F892N 8914.8 1.5105e-18 23.452 21.892 22.394
Retrieve the zeropoint information for the F435W filter on 2016-04-01 for WFC:
Retrieve the zeropoint information for the WFC/F435W filter on 2016-04-01:
>>> from acstools import acszpt
>>> q = acszpt.Query(date="2016-04-01", detector="WFC", filt="F435W")
Expand All @@ -52,7 +52,7 @@
------ -------- ----------------------------- ------- ------- -------
F435W 4329.9 3.1858e-19 25.142 25.767 25.652
Retrieve the zeropoint information for the F435W filter for WFC at multiple dates:
Retrieve the zeropoint information for the WFC/F435W filter on multiple dates:
>>> from acstools import acszpt
>>> dates = ['2004-10-13', '2011-04-01', '2014-01-17', '2018-05-23']
Expand Down
2 changes: 1 addition & 1 deletion acstools/satdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:func:`skimage.transform.probabilistic_hough_line` gives
slightly different results from run to run, but this should
not matter since :func:`detsat` only provides crude
not matter since :func:`detsat` only provides a crude
approximation of the actual trail(s).
Performance is faster when ``plot=False``, where applicable.
Expand Down
34 changes: 19 additions & 15 deletions doc/source/calacs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CTE Forward Model
=================

This functionality is provided to simulate the CTE effects associated with
readout of the WFC detectors. It is not part of the standard CALACS pipeline.
readout of the WFC detectors. It is not involved in standard data calibration with the CALACS pipeline.

.. automodapi:: acstools.acscteforwardmodel
:no-heading:
Expand All @@ -66,9 +66,11 @@ readout of the WFC detectors. It is not part of the standard CALACS pipeline.
PIXVALUE in FITS File
=====================

CALACS uses HSTIO that utilizes ``PIXVALUE`` keyword to represent a data
extension with constant value. However, this is not a standard FITS behavior
and is not recognized by ``astropy.io.fits``. While you should not encounter errors or warnings, constant value data extensions may exhibit unexpected behavior when reading, writing, or manipulating them with ``astropy.io.fits``. Therefore, if issues such as these arise, we recommend use of
CALACS uses HSTIO, which utilizes the ``PIXVALUE`` keyword to represent a data
extension with a constant value. However, this is not a standard FITS behavior
and is not recognized by ``astropy.io.fits``. While you should not encounter errors or warnings,
constant value data extensions may exhibit unexpected behavior when reading, writing, or
manipulating them with ``astropy.io.fits``. Therefore, if issues such as these arise, we recommend use of
``stsci.tools.stpyfits``, which is distributed as part of ``stsci_python``,
instead of `astropy.io.fits` when working with CALACS products.
To use ``stpyfits`` in Python::
Expand All @@ -80,7 +82,7 @@ calacs.e (C Program)

A detailed description of CALACS is available in the
`ACS Data Handbook <https://hst-docs.stsci.edu/acsdhb>`_.
If you have questions not answered in the documentation, please contact
If you have questions not answered in the documentation, please contact the
`STScI Help Desk <https://hsthelp.stsci.edu>`_.

Where to Find CALACS
Expand Down Expand Up @@ -135,8 +137,9 @@ CALACS supports several command line options:
* --ctegen <1|2>

* Specify which generation CTE correction to use, the default is 2. Gen 1 (officially deprecated) refers to
the correction algorithm used in calacs version pre 9.2.0 in relation to
`ACS ISR 2010-03 <https://ui.adsabs.harvard.edu/abs/2010PASP..122.1035A/abstract>`_. Gen 2 refers to the new CTE correction algorithm implemented in calacs version 9.2.0 (HSTCAL 1.3.0) in relation to `ACS ISR 2018-04 <https://ui.adsabs.harvard.edu/abs/2018acs..rept....4A/abstract>`_.
the correction algorithm used in calacs version pre 9.2.0, described in
`ACS ISR 2010-03 <https://ui.adsabs.harvard.edu/abs/2010PASP..122.1035A/abstract>`_. Gen 2 refers to the
new CTE correction algorithm implemented in calacs version 9.2.0 (HSTCAL 1.3.0) described in `ACS ISR 2018-04 <https://ui.adsabs.harvard.edu/abs/2018acs..rept....4A/abstract>`_.

* --pctetab <filename>

Expand Down Expand Up @@ -195,7 +198,7 @@ Bias Level Correction (BLEVCORR)

BLEVCORR is performed after BIASCORR. Calculations are done in ELECTRONS.

For post-SM4 full-frame WFC exposures, it also includes:
For post-SM4 full-frame WFC exposures, this also includes:

* de-striping to remove stripes introduced by new hardware installed during
SM-4 (`ACS ISR 2011-05 <https://ui.adsabs.harvard.edu/abs/2011acs..rept....5G/abstract>`_)
Expand All @@ -205,18 +208,19 @@ For post-SM4 full-frame WFC exposures, it also includes:
Sink Pixel Flagging (SINKCORR)
------------------------------

SINKCORR flags sink pixels and the adjacent affected pixels with the value
1024 in the DQ array of WFC images using the SNKCFILE. Only performed on images
SINKCORR flags sink pixels and adjacent affected pixels with the value
1024 in the DQ array of WFC images using the SNKCFILE. It is only performed on images
taken after January 2015.

Pixel-Based CTE Correction (PCTECORR)
-------------------------------------

For all full-frame WFC exposures, pixel-based CTE correction (`ACS ISR 2018-04 <https://ui.adsabs.harvard.edu/abs/2018acs..rept....4A/abstract>`_)
is applied during ACSCTE that occurs after ACSCCD, specifically, after BLEVCORR.
For all full-frame WFC exposures, pixel-based CTE correction
(`ACS ISR 2018-04 <https://ui.adsabs.harvard.edu/abs/2018acs..rept....4A/abstract>`_)
is applied during ACSCTE, which runs after BLEVCORR in ACSCCD.

Because the CTE correction is applied before DARKCORR and FLSHCORR, it is
necessary to use a CTE-corrected dark (DRKCFILE) if the PCTECORR step is enabled.
necessary to use a CTE-corrected dark reference file (DRKCFILE) if the PCTECORR step is enabled.

Parameters characterizing the CTE correction are stored in a reference table,
PCTETAB.
Expand Down Expand Up @@ -284,7 +288,7 @@ not recommended unless you know what you are doing.**

* PCTENFOR

* Number of iterations used for forward CTE model.
* Number of iterations used for the CTE forward model.

Dark Current Subtraction (DARKCORR)
-----------------------------------
Expand All @@ -307,7 +311,7 @@ Flat-Field Correction (FLATCORR)

PFLTFILE is used for flat-field correction, which is a combination of the
pixel-to-pixel flats and low-order flats. This corrects for pixel-to-pixel and
large-scale sensitivity gradients across the detector by dividing the data with
large-scale sensitivity gradients across the detector by dividing the data by
the flat-field image.

Photometry Keywords (PHOTCORR)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To install the development version of this package::

.. note::

The information here reflect the *latest* software info and might not
The information here reflects the *latest* software and might not
be in-sync with the
`ACS Data Handbook <https://hst-docs.stsci.edu/acsdhb>`_.

Expand Down

0 comments on commit e8630c1

Please sign in to comment.