Skip to content
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

Reorganize the User’s manual #342

Merged
merged 12 commits into from
Nov 20, 2024
Merged

Reorganize the User’s manual #342

merged 12 commits into from
Nov 20, 2024

Conversation

ziotom78
Copy link
Member

@ziotom78 ziotom78 commented Nov 13, 2024

This PR addresses issue #341.

  • Use PyData as the default theme for docs and update Sphinx and deps
  • Rework the structure of the documentation
  • Check that the documentation is consistent and reads seamlessly

@ziotom78
Copy link
Member Author

I have completed fixing the grammar. Could somebody please have a look at the way the documentation looks now? Here is a screenshot with the new style:

image

@paganol
Copy link
Member

paganol commented Nov 18, 2024

Hi @ziotom78, I like it, thanks!! I just added an example for the high level interface in the noise section.

I also took the opportunity for changing the default behavior of Simulation.add_noise, before we had to pass explicitly the random number generator, now, if random is empty, self.random is used. This change doesn't really belong to this PR, so if you think that it should be in a separate PR I can do that, let me know.

def add_noise(
self,
random: Union[np.random.Generator, None] = None,
noise_type: str = "one_over_f",
component: str = "tod",
append_to_report: bool = True,
):
"""Adds noise to tods.
This method must be called after having set the instrument,
the list of detectors to simulate through calls to
:meth:`.set_instrument` and :meth:`.add_detector`.
The parameter `random` must be specified and must be a random number
generator thatimplements the ``normal`` method. You should typically
use the `random` field of a :class:`.Simulation` object for this.
"""
if random is None:
random = self.random
add_noise_to_observations(
observations=self.observations,
noise_type=noise_type,
random=random,
component=component,
)

@ziotom78
Copy link
Member Author

I also took the opportunity for changing the default behavior of Simulation.add_noise, before we had to pass explicitly the random number generator, now, if random is empty, self.random is used. This change doesn't really belong to this PR, so if you think that it should be in a separate PR I can do that, let me know.

I know it’s boring, but having a separate PR for it would be clearer to users. This would let us properly advertise this change in the CHANGELOG by referencing the right PR.

@paganol
Copy link
Member

paganol commented Nov 19, 2024

For me we can merge

@ziotom78 ziotom78 merged commit dd4c0bf into master Nov 20, 2024
9 checks passed
yusuke-takase pushed a commit that referenced this pull request Nov 23, 2024
* Use PyData as the default theme for docs and update Sphinx and deps

* Rework the structure of the documentation

* Merge `Bandpasses` chapter into Detector and split `Scanning`

* Remove duplicated material

* Add missing reference

* Remove spurious comma

* Fix the grammar of a few sentences

* Fix grammar and broken links, update references where needed

* example in the noise page included, argument random in Simulation.add_noise is now optional

* removed part of last commit

* [skip ci] Update CHANGELOG

---------

Co-authored-by: Luca Pagano <lu.pagano@gmail.com>
ziotom78 added a commit that referenced this pull request Nov 28, 2024
* angle correction for 1-detector-pointing due to wedge HWP

* Code simplifications (distructive changes) around the pointing systematics

* modifiy the `pointing_sys.py`

* add add_hwp_rot_disturb

* modify add_hwp_rot_disturb

* update documents

* add comments

* refactoring

* fix bug of __init__

* add comments

* reverse gitignore and remove cmb maps

* add detailed assertion comments

* refactor: update pointing_sys imports and __all__ exports

* destructive change on pointing_sys.py: update functionality for MPI

* update docs

* update docs, remove cmb

* fix scanning.py assertion

* merge master

* add test of hwp pointing sys

* update notebook

* Reorganize the User’s manual (#342)

* Use PyData as the default theme for docs and update Sphinx and deps

* Rework the structure of the documentation

* Merge `Bandpasses` chapter into Detector and split `Scanning`

* Remove duplicated material

* Add missing reference

* Remove spurious comma

* Fix the grammar of a few sentences

* Fix grammar and broken links, update references where needed

* example in the noise page included, argument random in Simulation.add_noise is now optional

* removed part of last commit

* [skip ci] Update CHANGELOG

---------

Co-authored-by: Luca Pagano <lu.pagano@gmail.com>

* Focal plane visualizer and detector file generator  (#345)

* add plot_fp.py

* ask duration_yr

* CHANGELOG.md: Add entry for plot_fp.py implementation and its functionality

* update README

* add plot.fp.rst in docs

* docs: Improve formatting and clarity in plot_fp.rst

* Fix the formatting to make ruff happy

---------

Co-authored-by: Yusuke Takase <yusuke@MacBook-Air.local>
Co-authored-by: Maurizio Tomasi <ziotom78@gmail.com>

* Change the default behavior of Simulation.add_noise() (#349)

* Simulation.add_noise uses self.random as default

* CHANGELOG updated

* reformat by ruff

* Update plot usage GIF in README.md

* Update focal plane visualization section header in plot_fp.rst

* Remove unused __init__.py file from pointing_sys module

* Refactor import statement in litebird_sim and adjust spin rate in simulation test

* update pointing reference file

* Add documentation for pointing systematics and introduce pointing_sys.rst

* Add author Yusuke Takase to pyproject.toml

* CHANGELOG.md: Update breaking changes for PointingSys and get_pointings functions

* refactoring for ruff

* update pointing sys notebooks

* docs: update

* remove `docs/build`

---------

Co-authored-by: Nicolò Raffuzzi <nraff@MacBook-Air.local>
Co-authored-by: Maurizio Tomasi <ziotom78@gmail.com>
Co-authored-by: Luca Pagano <lu.pagano@gmail.com>
Co-authored-by: Yusuke Takase <yusuke@MacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants