-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
ebdb70f
commit ad19ba0
Showing
9 changed files
with
43 additions
and
31 deletions.
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
9 changes: 5 additions & 4 deletions
9
dsa2000_cal/dsa2000_cal/assets/rfi/lte_rfi/tests/test_cell_tower.py
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import jax | ||
import numpy as np | ||
from astropy import units as au | ||
|
||
from dsa2000_cal.assets.rfi.lte_rfi.lwa_cell_tower import LWACellTower | ||
from dsa2000_cal.assets.rfi.lte_rfi.mock_cell_tower import MockCellTower | ||
|
||
|
||
def test_lte_rfi_source_factory(): | ||
model = MockCellTower(seed='test') | ||
import pylab as plt | ||
source_params = model.make_source_params(freqs=np.linspace(700, 800, 50) * au.MHz) | ||
plt.plot(source_params.delay_acf.x, source_params.delay_acf.values[:, 0]) | ||
delays = np.linspace(-1e7, 1e7, 1000) | ||
print(source_params.delay_acf) | ||
plt.plot(delays, jax.vmap(source_params.delay_acf)(delays)[:, 0, 0]) | ||
plt.xlabel('Delay [s]') | ||
plt.ylabel('Auto-correlation function') | ||
plt.show() | ||
assert source_params.delay_acf.regular_grid | ||
plt.show() |
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
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
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
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
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
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
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