Skip to content

Commit

Permalink
deploy: 7f287fc
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbhughes committed Jun 24, 2024
1 parent 3c9426a commit 85be0a2
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 1,510 deletions.
119 changes: 0 additions & 119 deletions _sources/autoapi/regularizepsf/corrector/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,11 @@ regularizepsf.corrector
.. py:module:: regularizepsf.corrector
Exceptions
----------

.. autoapisummary::

regularizepsf.corrector.EvaluatedModelInconsistentSizeError
regularizepsf.corrector.InvalidSizeError
regularizepsf.corrector.UnevaluatedPointError


Classes
-------

.. autoapisummary::

regularizepsf.corrector.PointSpreadFunctionABC
regularizepsf.corrector.SimplePSF
regularizepsf.corrector.VariedPSF
regularizepsf.corrector.CorrectorABC
regularizepsf.corrector.FunctionalCorrector
regularizepsf.corrector.ArrayCorrector
Expand All @@ -38,112 +25,6 @@ Functions
Module Contents
---------------

.. py:exception:: EvaluatedModelInconsistentSizeError
Bases: :py:obj:`ValidationError`


Common base class for all non-exit exceptions.


.. py:exception:: InvalidSizeError
Bases: :py:obj:`ValidationError`


Common base class for all non-exit exceptions.


.. py:exception:: UnevaluatedPointError
Bases: :py:obj:`Exception`


Common base class for all non-exit exceptions.


.. py:class:: PointSpreadFunctionABC
.. py:method:: __call__(x: numbers.Real | numpy.ndarary, y: numbers.Real | numpy.ndarray) -> numbers.Real | numpy.ndarray
:abstractmethod:


Evaluation of the point spread function

:param x: first dimension coordinate to evaluate at
:type x: real number or `np.ndarray`
:param y: second dimension coordinate to evaluate at
:type y: real number or `np.ndarray`

:returns: the value of the point spread function at (x,y)
:rtype: real number or `np.ndarray`



.. py:property:: parameters
:type: List

:abstractmethod:

Varying parameters of the model.


.. py:class:: SimplePSF(function: Callable)
Bases: :py:obj:`PointSpreadFunctionABC`


Model for a simple PSF


.. py:method:: __call__(x: numbers.Real | numpy.ndarray, y: numbers.Real | numpy.ndarray, **kwargs: Dict[str, Any]) -> numbers.Real | numpy.ndarray
Evaluation of the point spread function

:param x: first dimension coordinate to evaluate at
:type x: real number or `np.ndarray`
:param y: second dimension coordinate to evaluate at
:type y: real number or `np.ndarray`

:returns: the value of the point spread function at (x,y)
:rtype: real number or `np.ndarray`



.. py:property:: parameters
:type: set[str]

Varying parameters of the model.


.. py:class:: VariedPSF(vary_function: Callable, base_psf: SimplePSF, validate_at_call: bool = True)
Bases: :py:obj:`PointSpreadFunctionABC`


Model for a PSF that varies over the field of view


.. py:method:: __call__(x: numbers.Real | numpy.ndarray, y: numbers.Real | numpy.ndarray) -> numbers.Real | numpy.ndarray
Evaluation of the point spread function

:param x: first dimension coordinate to evaluate at
:type x: real number or `np.ndarray`
:param y: second dimension coordinate to evaluate at
:type y: real number or `np.ndarray`

:returns: the value of the point spread function at (x,y)
:rtype: real number or `np.ndarray`



.. py:property:: parameters
:type: List

Varying parameters of the model.


.. py:class:: CorrectorABC
.. py:method:: save(path: str | pathlib.Path) -> None
Expand Down
171 changes: 0 additions & 171 deletions _sources/autoapi/regularizepsf/fitter/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,189 +12,18 @@ Attributes
regularizepsf.fitter.CoordinateIdentifier


Exceptions
----------

.. autoapisummary::

regularizepsf.fitter.InvalidSizeError


Classes
-------

.. autoapisummary::

regularizepsf.fitter.ArrayCorrector
regularizepsf.fitter.PointSpreadFunctionABC
regularizepsf.fitter.SimplePSF
regularizepsf.fitter.PatchCollectionABC
regularizepsf.fitter.CoordinatePatchCollection


Functions
---------

.. autoapisummary::

regularizepsf.fitter.calculate_covering


Module Contents
---------------

.. py:class:: ArrayCorrector(evaluations: dict[Any, numpy.ndarray], target_evaluation: numpy.ndarray)
Bases: :py:obj:`CorrectorABC`


A PSF corrector that is evaluated as array patches



.. py:property:: evaluations
:type: dict[Any, numpy.ndarray]



.. py:property:: evaluation_points
:type: list



.. py:method:: correct_image(image: numpy.ndarray, size: Optional[int] = None, alpha: float = 0.5, epsilon: float = 0.05) -> numpy.ndarray
PSF correct an image according to the model

:param image: image to be corrected
:type image: 2D float np.ndarray
:param size: how big to make the patches when correcting an image,
only used for FunctionalCorrector
:type size: int
:param alpha: controls the “hardness” of the transition from amplification
to attenuation, see notes
:type alpha: float
:param epsilon: controls the maximum of the amplification, see notes
:type epsilon: float

:returns: a image that has been PSF corrected
:rtype: np.ndarray



.. py:method:: __getitem__(xy: Tuple[int, int]) -> numpy.ndarray
.. py:method:: save(path: str) -> None
Save the model to a file.

:param path: where to save the model, suggested extension is ".psf"
:type path: str or `pathlib.Path`

:rtype: None



.. py:method:: load(path: str) -> ArrayCorrector
:classmethod:


Loads a model from the path

:param path: where to load the model from, suggested extension is ".psf"
:type path: str or `pathlib.Path`



.. py:method:: simulate_observation(image: numpy.ndarray) -> numpy.ndarray
Simulates on a star field what an observation using this PSF looks like

:param image: image of point source stars to simluate PSF for
:type image: 2D float np.ndarray

:returns: an image with the PSF applied
:rtype: np.ndarray



.. py:function:: calculate_covering(image_shape: tuple[int, int], size: int) -> numpy.ndarray
Determines the grid of overlapping neighborhood patches.

:param image_shape: shape of the image we plan to correct
:type image_shape: tuple of 2 ints
:param size: size of the square patches we want to create
:type size: int

:returns: an array of shape Nx2 where return[:, 0]
are the x coordinate and return[:, 1] are the y coordinates
:rtype: np.ndarray


.. py:exception:: InvalidSizeError
Bases: :py:obj:`ValidationError`


Common base class for all non-exit exceptions.


.. py:class:: PointSpreadFunctionABC
.. py:method:: __call__(x: numbers.Real | numpy.ndarary, y: numbers.Real | numpy.ndarray) -> numbers.Real | numpy.ndarray
:abstractmethod:


Evaluation of the point spread function

:param x: first dimension coordinate to evaluate at
:type x: real number or `np.ndarray`
:param y: second dimension coordinate to evaluate at
:type y: real number or `np.ndarray`

:returns: the value of the point spread function at (x,y)
:rtype: real number or `np.ndarray`



.. py:property:: parameters
:type: List

:abstractmethod:

Varying parameters of the model.


.. py:class:: SimplePSF(function: Callable)
Bases: :py:obj:`PointSpreadFunctionABC`


Model for a simple PSF


.. py:method:: __call__(x: numbers.Real | numpy.ndarray, y: numbers.Real | numpy.ndarray, **kwargs: Dict[str, Any]) -> numbers.Real | numpy.ndarray
Evaluation of the point spread function

:param x: first dimension coordinate to evaluate at
:type x: real number or `np.ndarray`
:param y: second dimension coordinate to evaluate at
:type y: real number or `np.ndarray`

:returns: the value of the point spread function at (x,y)
:rtype: real number or `np.ndarray`



.. py:property:: parameters
:type: set[str]

Varying parameters of the model.


.. py:class:: PatchCollectionABC(patches: dict[Any, numpy.ndarray], counts: Optional[dict[Any, int]] = None)
.. py:method:: __len__() -> int
Expand Down
25 changes: 0 additions & 25 deletions _sources/autoapi/regularizepsf/psf/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ regularizepsf.psf
.. py:module:: regularizepsf.psf
Exceptions
----------

.. autoapisummary::

regularizepsf.psf.PSFParameterValidationError
regularizepsf.psf.VariedPSFParameterMismatchError


Classes
-------

Expand All @@ -36,22 +27,6 @@ Functions
Module Contents
---------------

.. py:exception:: PSFParameterValidationError
Bases: :py:obj:`ValidationError`


Common base class for all non-exit exceptions.


.. py:exception:: VariedPSFParameterMismatchError
Bases: :py:obj:`ValidationError`


Common base class for all non-exit exceptions.


.. py:class:: PointSpreadFunctionABC
.. py:method:: __call__(x: numbers.Real | numpy.ndarary, y: numbers.Real | numpy.ndarray) -> numbers.Real | numpy.ndarray
Expand Down
Loading

0 comments on commit 85be0a2

Please sign in to comment.