Skip to content

Commit

Permalink
Doc updates (#114)
Browse files Browse the repository at this point in the history
* maint: re-structure to src layout

* ci: don't test deploy to pypi, just check build

* ci: test py311 and 312

* docs: udpate the readme to mention how to test the repo

* docss: fix pypi badge

* docs: add contribution link into readme

* docs: fix links in contributing

* docs: fix authors

* Update CONTRIBUTING.rst

Co-authored-by: Matthew Kolopanis <[email protected]>

* fix: remove types module

* docs: fix Jonnies' author entry

---------

Co-authored-by: Matthew Kolopanis <[email protected]>
  • Loading branch information
steven-murray and mkolopanis authored Apr 22, 2024
1 parent e5bc368 commit 83b7ae1
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 58 deletions.
61 changes: 28 additions & 33 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,9 @@
Changelog
=========

Unreleased
==========
For latest release notes, see the
`GitHub releases page <https://github.com/rasg-affiliates/21cmSense/releases>`_.

Documentation
-------------
- Added a tutorial that reproduces Pober (2015) HERA memo results.

Fixed
-----
* Bug in ``dL_df`` (missing square).
* Use ``yaml.SafeLoader`` instead of ``yaml.FullLoader``.
* Bug when averaging from 2D to 1D that got about half the sensitivity.

Changed
-------
* Many computations altered to use numpy vectorization over for loop implementations.
Including but not limited to:

* 2D sensitivity calculation.
* 1D sensitivity calculation.
* UVW calculation as a function of time.

* ``_utils.find_nearest`` can solve for the index of an array of inputs.

Features
--------
* Added a parameter ``systematics_mask`` to ``PowerSpectrum`` sensitivity, which enables
arbitrary k-modes to be masked out in the sensitivity calculation.
* ``track`` option to ``Observation``. This is an alias for ``obs_duration`` but has
a closer resemblance to the original 21cmSense v1.
* New ``calculate_sensitivity_2d_grid`` method that makes it easier to obtain a gridded
cylindrical power spectrum sensitivity for arbitrary bins.
* Ability to use builtin observatories that set certain parameters.
* ``antpos.hera()`` can now return a split-core configuration, and also outriggers.

v2.0.0
======
Expand All @@ -62,3 +31,29 @@ Features
* All quantities have appropriate units (from astropy).
* Example documentation, and example configuration files.
* Configuration files are no longer python files... they are YAML.
* Added a parameter ``systematics_mask`` to ``PowerSpectrum`` sensitivity, which enables
arbitrary k-modes to be masked out in the sensitivity calculation.
* ``track`` option to ``Observation``. This is an alias for ``obs_duration`` but has
a closer resemblance to the original 21cmSense v1.
* New ``calculate_sensitivity_2d_grid`` method that makes it easier to obtain a gridded
cylindrical power spectrum sensitivity for arbitrary bins.
* Ability to use builtin observatories that set certain parameters.
* ``antpos.hera()`` can now return a split-core configuration, and also outriggers.


Fixed
-----
* Bug in ``dL_df`` (missing square).
* Use ``yaml.SafeLoader`` instead of ``yaml.FullLoader``.
* Bug when averaging from 2D to 1D that got about half the sensitivity.

Changed
-------
* Many computations altered to use numpy vectorization over for loop implementations.
Including but not limited to:

* 2D sensitivity calculation.
* 1D sensitivity calculation.
* UVW calculation as a function of time.

* ``_utils.find_nearest`` can solve for the index of an array of inputs.
22 changes: 11 additions & 11 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ little bit helps, and credit will always be given.
Bug reports/Feature Requests/Feedback/Questions
===============================================
It is incredibly helpful to us when users report bugs, unexpected behaviour, or request
features. You can do the following:

* `Report a bug <https://github.com/rasg-affiliates/21cmSense/issues/new?template=bug_report.md>`
* `Request a Feature <https://github.com/rasg-affiliates/21cmSense/issues/new?template=feature_request.md>`
* `Ask a Question <https://github.com/rasg-affiliates/21cmSense/issues/new?template=question.md>`

When doing any of these, please try to be as succinct, but detailed, as possible, and use
features. You can do any one of these, or simply ask a question about how to use 21cmSense,
by filing an issue `here <https://github.com/rasg-affiliates/21cmSense/issues/new>`_.
When doing this, please try to be as succinct, but detailed, as possible, and use
a "Minimum Working Example" whenever applicable.

Documentation improvements
Expand All @@ -37,19 +33,23 @@ otherwise your changes will likely fail continuous integration.

git clone [email protected]:your_name_here/21cmSense.git

2. Install `pre-commit <https://pre-commit.com/>`_ to do style checking automatically::
2. Install the package in dev mode::

pip install -e .[dev]

3. Install `pre-commit <https://pre-commit.com/>`_ to do style checking automatically::

pre-commit install

3. Create a branch for local development::
4. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

4. When you're done making changes, run all the checks with `pytest <https://docs.pytest.org/en/latest/>`_::
5. When you're done making changes, run all the checks with `pytest <https://docs.pytest.org/en/latest/>`_::

pytest

5. Commit your changes and push your branch to GitHub::
6. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
Expand Down
11 changes: 4 additions & 7 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
Author
======

`Jonathan Pober <https://github.com/jpober`_: [email protected]

Contributors
------------
Authors
=======

- `Jonathan Pober <https://github.com/jpober>`_
- Original author of the code.
- `Steven Murray <https://github.com/steven-murray>`_
- Update to Python 3 and usability enhancements.
- `Matthew Kolopanis <https://github.com/mkolopanis>`_
Expand Down
21 changes: 14 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
21cmSense
=========

.. image:: https://img.shields.io/pypi/pyversions/21cmSense
:alt: PyPI - Python Version
.. image:: https://img.shields.io/pypi/v/21cmSense
:alt: PyPI - Version
:target: https://pypi.org/project/21cmSense
.. image:: https://codecov.io/gh/rasg-affiliates/21cmSense/branch/main/graph/badge.svg
:target: https://codecov.io/gh/rasg-affiliates/21cmSense
:target: https://codecov.io/gh/rasg-affiliates/21cmSense
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:target: https://github.com/psf/black
.. image:: https://readthedocs.org/projects/21cmsense/badge/?version=latest
:target: https://21cmsense.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
:target: https://21cmsense.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/github/license/Ileriayo/markdown-badges?style=flat
:target: ./LICENSE.rst
:target: ./LICENSE.rst

A python package for calculating the expected sensitivities of 21cm experiments
to the Epoch of Reionization and/or Cosmic Dawn power spectrum.
Expand All @@ -28,6 +29,9 @@ using ``conda`` rather than them being automatically installed with pip::

$ conda install numpy scipy pyyaml astropy

To test that the package has installed correctly, install with ``pip install -e .[test]``
and run ``pytest`` in the top-level directory.

For Development
---------------
Clone/download the package and run ``pip install [-e] .[dev]`` in the top-level.
Expand All @@ -38,6 +42,9 @@ pre-commit hook checks.
We recommend using the ``commitizen`` tool to write commit messages -- we use the commit
messages to do our versioning!

See the `contributing docs <https://21cmsense.readthedocs.io/en/latest/contributing.html>`_
for more information about how to contribute to the project!

Usage
=====
There are two ways to use this code: as a python library or via the CLI.
Expand Down

0 comments on commit 83b7ae1

Please sign in to comment.