-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Morris
committed
Aug 20, 2023
1 parent
a397abe
commit 7d9ded1
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import numpy as np | ||
|
||
from . import base, utils | ||
|
||
class NoiseSimulation(base.BaseSimulation): | ||
""" | ||
The base class for modeling noise. | ||
""" | ||
def __init__(self, array, pointing, site, **kwargs): | ||
super().__init__(array, pointing, site) | ||
|
||
self.white_noise_level = kwargs.get("white_noise", 1) | ||
|
||
def run(self): | ||
|
||
self.temperature = self.white_noise_level * np.random.standard_normal(size=(self.pointing.nt, self.pointing.nt)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters