Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Oct 12, 2023
1 parent ed4d3e1 commit 3031734
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 22 deletions.
18 changes: 9 additions & 9 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ API Changes
if the angle arrays have not been either set or explicitly allocated. One should be sure
to either set them (e.g. using ``photon_array.dxdz = [...]``) or explicitly allocate
them (using ``photon_array.allocateAngles()``). (#1191)
- Changed the ``.SED`` attribute name of `ChromaticObject`s to lowercase ``.sed``. (#1245)
- Changed the ``.SED`` attribute name of `ChromaticObject` to lowercase ``.sed``. (#1245)


Config Updates
Expand All @@ -35,14 +35,14 @@ New Features

- Updated Roman telescope data to Phase C (aka Cycle 9) specifications (#1017)
- Added `ShapeData.applyWCS` method to convert HSM shapes to sky coordinates. Also added
the option ``use_sky_coords=True`` to `FindAdaptiveMom` to apply this automatically. (#1219)
the option ``use_sky_coords=True`` to `hsm.FindAdaptiveMom` to apply this automatically. (#1219)
- Added `DoubleZernike` class and related functionality. (#1221)
- Added some utility functions that we have found useful in our test suite, and which other
people might want to use to the installed galsim.utilities. (#1240)
- Added `galsim.utilities.merge_sorted` which merges two or more sorted numpy arrays faster than
- Added `utilities.merge_sorted` which merges two or more sorted numpy arrays faster than
the available numpy options. (#1243)
- Added `galsim.EmissionLine` class to represent emission line SEDs. (#1247, #1249)
- Updated data in galsim.roman module to Phase C (Cycle 9) information. (#1017, #1251)
- Added `EmissionLine` class to represent emission line SEDs. (#1247, #1249)
- Updated data in `roman` module to Phase C (Cycle 9) information. (#1017, #1251)


Performance Improvements
Expand All @@ -55,12 +55,12 @@ Performance Improvements
Now it only adds it if there is not already one given by the user. (#1229, #1236)
- Work around an OMP bug that disables multiprocessing on some systems when omp_get_max_threads
is called. (#1241)
- Sped up the `combine_wave_lists` function, using the new `merge_sorted` function. (#1243)
- No longer keep a separate ``wave_list`` array in `ChromaticObject`s. These are always
- Sped up the `combine_wave_list` function, using the new `merge_sorted` function. (#1243)
- No longer keep a separate ``wave_list`` array in `ChromaticObject`. These are always
equal to the ``wave_list`` in the ``sed`` attribute, so there is no need to duplicate the
work of computing the ``wave_list``. (#1245)
- Delayed the calculation of the `sed` attributes of `ChromaticObject`s until they are actually
needed. Since sometimes they aren't needed, this is a performance improvement in those cases.
- Delayed the calculation of the ``sed`` attributes of `ChromaticObject` until they are actually
needed. Since sometimes they are not needed, this is a performance improvement in those cases.
(#1245)
- Reduce long-term memory usage of Silicon class after drawing onto a very large stamp and
then moving on to smaller stamps. (#1246)
Expand Down
6 changes: 6 additions & 0 deletions docs/config_input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ The ``input`` fields defined by GalSim are:
* ``index`` = *str_value* (optional) If set, the power spectrum will only be computed when this index changed. E.g. if ``index`` is 'file_num', then it will only update with each new file, not with each image.
* ``variance`` = *float_value* (optional) If set, rescale the overall variance of the generated shears to this value.

* ``initial_image`` specifies an initial image (read from an FITS file) to draw onto, rather than create a new blank image.

* ``file_name`` = *str_value* (required) The name fo the file with the desired initial image.
* ``dir`` = *str_value* (default = '.') The directory the file is in.
* ``read_header`` = *bool_value* (default = False) Whether to read the header as well.

Another feature of the ``input`` field is that it may optionally be a list. So you can have multiple input catalogs for instance; one for object parameters and one for overall image parameters perhaps. When using values with the type 'InputCatalog', you would specify which catalog to use with ``num``. If you only have a single item for one of the inputs, you can omit the ``num`` parameter when you are using it.

Custom Input Types
Expand Down
3 changes: 3 additions & 0 deletions docs/config_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ Generic Types
* ``items`` = *list* (required) A list of profiles.
* ``index`` = *int_value* (default = 'Sequence' from 0 to len(items)-1) Which item in the list to select each time.

* 'Eval' Use Python's ``eval`` function to evaluate a given string as a GSObject.

* ``str`` = *str_value* (required) The string to evaluate.

Other Attributes
----------------
Expand Down
3 changes: 3 additions & 0 deletions docs/sed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ Spectral Energy Distributions
.. automethod:: galsim.SED._mul_sed
.. automethod:: galsim.SED._mul_bandpass
.. automethod:: galsim.SED._mul_scalar

.. autoclass:: galsim.EmissionLine
:members:
4 changes: 4 additions & 0 deletions docs/zernike.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ Zernike Functions
.. automethod:: galsim.zernike.Zernike.__rmul__
.. automethod:: galsim.zernike.Zernike.__call__

.. autoclass:: galsim.zernike.DoubleZernike

.. autofunction:: galsim.zernike.noll_to_zern
.. autofunction:: galsim.zernike.zernikeRotMatrix
.. autofunction:: galsim.zernike.zernikeBasis
.. autofunction:: galsim.zernike.zernikeGradBases
.. autofunction:: galsim.zernike.doubleZernikeBasis
.. autofunction:: galsim.zernike.describe_zernike
2 changes: 1 addition & 1 deletion galsim/chromatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ChromaticObject:
>>> gal = bulge + disk
The ``sed`` instances above describe the flux density in photons/nm/cm^2/s of an object, possibly
normalized with either the `sed.withFlux` or `sed.withMagnitude` methods (see their docstrings
normalized with either the `SED.withFlux` or `SED.withMagnitude` methods (see their docstrings
for details about these and other normalization options). Note that for dimensional
consistency, in this case, the ``flux`` attribute of the multiplied `GSObject` is interpreted
as being dimensionless instead of in its normal units of [photons/s/cm^2]. The photons/s/cm^2
Expand Down
8 changes: 4 additions & 4 deletions galsim/hsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ def applyWCS(self, wcs, image_pos):
The values that are different from the original are:
moments_sigma is changed to be in units of arcsec.
observed_shape is changed to be in (u,v) coordinates.
moments_centroid is changed to be in (u,v) coordinates relative to image_pos.
* ``moments_sigma`` is changed to be in units of arcsec.
* ``observed_shape`` is changed to be in (u,v) coordinates.
* ``moments_centroid`` is changed to be in (u,v) coordinates relative to image_pos.
.. note::
Expand Down Expand Up @@ -704,7 +704,7 @@ def FindAdaptiveMom(object_image, weight=None, badpix=None, guess_sig=5.0, preci
for the coordinate variables. These coordinates are measured in arcsec and are oriented
such that +v is towards North and +u is towards West. In this case, the returned values are
all in arcsec, and are based instead on Iuu, Ivv, and Iuv. To enable this feature, use
``use_sky_coords=True`. See also the method `ShapeData.applyWCS` for more details.
``use_sky_coords=True``. See also the method `ShapeData.applyWCS` for more details.
.. note::
Expand Down
2 changes: 1 addition & 1 deletion galsim/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ class CaptureLog:
"""A context manager that saves logging output into a string that is accessible for
checking in unit tests.
After exiting the context, the attribute `output` will have the logging output.
After exiting the context, the attribute ``output`` will have the logging output.
Sample usage:
Expand Down
14 changes: 7 additions & 7 deletions galsim/zernike.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,19 +961,19 @@ class DoubleZernike:
separate annuli:
.. math::
DZ_{k, j}(u, v, x, y) = Z_k(u, v) Z_j(x, y)
DZ_{k,j}(u, v, x, y) = Z_k(u, v) Z_j(x, y)
The double Zernike's therefore satisfy the orthonormality condition:
.. math::
\int_{annuli} DZ_(k, j) DZ_(k', j') = A1 A2 \delta_{k, k'} \delta_{j, j'}
\int_{annuli} DZ_{k,j} DZ_{k',j'} = A_1 A_2 \delta_{k, k'} \delta_{j, j'}
where A1 and A2 are the areas of the two annuli.
where :math:`A_1` and :math:`A_2` are the areas of the two annuli.
Double Zernikes series are useful for representing the field and pupil
dependent wavefronts of a telescope. We adopt the typical convention that
the first index (the `k` index) corresponds to the field-dependence, while
the second index (the `j` index) corresponds to the pupil-dependence.
the first index (the ``k`` index) corresponds to the field-dependence, while
the second index (the ``j`` index) corresponds to the pupil-dependence.
Parameters:
coef: [kmax, jmax] array of double Zernike coefficients. Like the
Expand Down Expand Up @@ -1131,8 +1131,8 @@ def coef(self):
"""DoubleZernike coefficients.
The coefficients are stored in a 2D array, where the first index
corresponds to the `uv` dependence and the second index corresponds to
the `xy` dependence. The indices are Noll indices. As an example, when
corresponds to the ``uv`` dependence and the second index corresponds to
the ``xy`` dependence. The indices are Noll indices. As an example, when
describing a telescope wavefront the (1, 4) tuple corresponds to a
constant (over the field) pupil defocus. The (2, 5) term is a linear
(over the field) astigmatism, etc.
Expand Down

0 comments on commit 3031734

Please sign in to comment.