Skip to content

Commit

Permalink
removed part of last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paganol committed Nov 19, 2024
1 parent bcf9cc0 commit f6d2815
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/source/map_scanning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ transparent:

sim.fill_tods(sky_signal)

sim.add_noise(noise_type='white')
sim.add_noise(noise_type='white', random=sim.random)

for i in range(5):
print(f"{sim.observations[0].tod[0][i]:.5e}")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/noise.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ the interface is simplified.

sim.create_observations(detectors=det)

sim.add_noise(noise_type='one_over_f')
sim.add_noise(noise_type='one_over_f', random=sim.random)

for i in range(5):
print(f"{sim.observations[0].tod[0][i]:.5e}")
Expand Down
5 changes: 1 addition & 4 deletions litebird_sim/simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ def apply_quadratic_nonlin(
@_profile
def add_noise(
self,
random: Union[np.random.Generator, None] = None,
random: np.random.Generator,
noise_type: str = "one_over_f",
component: str = "tod",
append_to_report: bool = True,
Expand All @@ -1563,9 +1563,6 @@ def add_noise(
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,
Expand Down

0 comments on commit f6d2815

Please sign in to comment.