tabsim 0.0.1__tar.gz → 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tabsim-0.0.1 → tabsim-0.0.2}/PKG-INFO +4 -2
- {tabsim-0.0.1 → tabsim-0.0.2}/pyproject.toml +3 -2
- tabsim-0.0.2/tabsim/__init__.py +6 -0
- tabsim-0.0.2/tabsim/data/aux_data/tles/2023-02-21-J8HE0T.json +1 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/scripts/sim_vis.py +7 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim.egg-info/PKG-INFO +4 -2
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim.egg-info/SOURCES.txt +5 -1
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim.egg-info/requires.txt +3 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim.egg-info/top_level.txt +1 -0
- tabsim-0.0.2/tests/test_basic.py +5 -0
- tabsim-0.0.2/tests/test_sim-vis.py +40 -0
- tabsim-0.0.2/tests/test_version.py +6 -0
- tabsim-0.0.1/tabsim/jax/__init__.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/LICENSE +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/README.md +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/setup.cfg +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/config.py +0 -0
- {tabsim-0.0.1/tabsim → tabsim-0.0.2/tabsim/dask}/__init__.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/dask/coordinates.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/dask/extras.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/dask/interferometry.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/dask/observation.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/EDA2.itrf.txt +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/MWA.itrf.txt +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/MeerKAT.itrf.txt +0 -0
- {tabsim-0.0.1/tabsim/dask → tabsim-0.0.2/tabsim/data}/__init__.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/aux_data/calibrator.skymodel +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/aux_data/norad_satellite.rfimodel +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/aux_data/satellite.ole +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/aux_data/satellite.rfimodel +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/aux_data/stationary.loc +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/aux_data/stationary.rfimodel +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/config_files/sim_config_base.yaml +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/data/config_files/tab_config_base.yaml +0 -0
- {tabsim-0.0.1/tabsim/data → tabsim-0.0.2/tabsim/jax}/__init__.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/jax/coordinates.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/jax/interferometry.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/jax/utils.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/plot.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/scripts/__init__.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/scripts/ast_region.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/scripts/flag_data.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/scripts/tle_sat_region.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/sky.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/tle.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/tools.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim/write.py +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim.egg-info/dependency_links.txt +0 -0
- {tabsim-0.0.1 → tabsim-0.0.2}/tabsim.egg-info/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tabsim
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Trajectory-based Radio Frequency Interference (RFI) simulations for radio interferometeric data.
|
|
5
5
|
Author-email: Chris Finlay <christopher.finlay@epfl.ch>
|
|
6
6
|
Maintainer-email: Chris Finlay <christopher.finlay@epfl.ch>
|
|
@@ -680,7 +680,7 @@ License: GNU GENERAL PUBLIC LICENSE
|
|
|
680
680
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
681
681
|
|
|
682
682
|
Project-URL: Repository, https://github.com/chrisfinlay/tab-sim.git
|
|
683
|
-
Requires-Python: <3.13,>=3.
|
|
683
|
+
Requires-Python: <3.13,>=3.10
|
|
684
684
|
Description-Content-Type: text/markdown
|
|
685
685
|
License-File: LICENSE
|
|
686
686
|
Requires-Dist: jax
|
|
@@ -702,6 +702,8 @@ Requires-Dist: regions; extra == "sat"
|
|
|
702
702
|
Provides-Extra: ipy
|
|
703
703
|
Requires-Dist: ipython; extra == "ipy"
|
|
704
704
|
Requires-Dist: ipykernel; extra == "ipy"
|
|
705
|
+
Provides-Extra: test
|
|
706
|
+
Requires-Dist: pytest; extra == "test"
|
|
705
707
|
Dynamic: license-file
|
|
706
708
|
|
|
707
709
|
# tab-sim
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "tabsim"
|
|
8
|
-
version = "0.0.
|
|
8
|
+
version = "0.0.2"
|
|
9
9
|
license = {file = "LICENSE"}
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
# dynamic = ["version", "readme"]
|
|
@@ -17,7 +17,7 @@ maintainers = [
|
|
|
17
17
|
]
|
|
18
18
|
description = "Trajectory-based Radio Frequency Interference (RFI) simulations for radio interferometeric data."
|
|
19
19
|
|
|
20
|
-
requires-python = ">=3.
|
|
20
|
+
requires-python = ">=3.10,<3.13"
|
|
21
21
|
dependencies = [
|
|
22
22
|
"jax", "dask<=2024.10.0", "xarray", "zarr<3.0.0",
|
|
23
23
|
"dask-ms>=0.2.21", "scipy", "tqdm", "matplotlib",
|
|
@@ -31,6 +31,7 @@ sat = ["regions"]
|
|
|
31
31
|
# all = ["jax[cuda12]", "regions", "bdsf", "TGEpy @ git+https://github.com/chrisfinlay/TGEpy.git"]
|
|
32
32
|
# all_cpu = ["regions", "bdsf", "TGEpy @ git+https://github.com/chrisfinlay/TGEpy.git"]
|
|
33
33
|
ipy = ["ipython", "ipykernel"]
|
|
34
|
+
test = ["pytest"]
|
|
34
35
|
|
|
35
36
|
[project.urls]
|
|
36
37
|
Repository = "https://github.com/chrisfinlay/tab-sim.git"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"COMMENT":{"0":"GENERATED VIA SPACETRACK.ORG API","1":"GENERATED VIA SPACETRACK.ORG API","2":"GENERATED VIA SPACETRACK.ORG API","3":"GENERATED VIA SPACETRACK.ORG API","4":"GENERATED VIA SPACETRACK.ORG API","5":"GENERATED VIA SPACETRACK.ORG API","6":"GENERATED VIA SPACETRACK.ORG API","7":"GENERATED VIA SPACETRACK.ORG API"},"ORIGINATOR":{"0":"18 SPCS","1":"18 SPCS","2":"18 SPCS","3":"18 SPCS","4":"18 SPCS","5":"18 SPCS","6":"18 SPCS","7":"18 SPCS"},"NORAD_CAT_ID":{"0":"20452","1":"38833","2":"38833","3":"38833","4":"38833","5":"45854","6":"45854","7":"45854"},"OBJECT_NAME":{"0":"NAVSTAR 18 (USA 50)","1":"NAVSTAR 67 (USA 239)","2":"NAVSTAR 67 (USA 239)","3":"NAVSTAR 67 (USA 239)","4":"NAVSTAR 67 (USA 239)","5":"NAVSTAR 79 (USA 304)","6":"NAVSTAR 79 (USA 304)","7":"NAVSTAR 79 (USA 304)"},"OBJECT_TYPE":{"0":"PAYLOAD","1":"PAYLOAD","2":"PAYLOAD","3":"PAYLOAD","4":"PAYLOAD","5":"PAYLOAD","6":"PAYLOAD","7":"PAYLOAD"},"CLASSIFICATION_TYPE":{"0":"U","1":"U","2":"U","3":"U","4":"U","5":"U","6":"U","7":"U"},"INTLDES":{"0":"90008A","1":"12053A","2":"12053A","3":"12053A","4":"12053A","5":"20041A","6":"20041A","7":"20041A"},"EPOCH":{"0":"2023-02-21 06:38:50","1":"2023-02-21 06:37:41","2":"2023-02-21 06:37:41","3":"2023-02-21 06:37:41","4":"2023-02-22 06:33:35","5":"2023-02-21 08:40:26","6":"2023-02-22 10:18:13","7":"2023-02-22 10:18:13"},"EPOCH_MICROSECONDS":{"0":"12736","1":"186496","2":"186496","3":"189952","4":"104608","5":"76288","6":"882176","7":"882176"},"MEAN_MOTION":{"0":"1.89597679","1":"2.0056438","2":"2.0056438","3":"2.00564379","4":"2.00564407","5":"2.00566443","6":"2.00566487","7":"2.00566487"},"ECCENTRICITY":{"0":"0.0013992","1":"0.0135647","2":"0.0135647","3":"0.013565","4":"0.0135663","5":"0.0030268","6":"0.0030262","7":"0.0030262"},"INCLINATION":{"0":"54.7164","1":"53.518","2":"53.518","3":"53.518","4":"53.5179","5":"55.7203","6":"55.7213","7":"55.7213"},"RA_OF_ASC_NODE":{"0":"175.9594","1":"193.1658","2":"193.1658","3":"193.1658","4":"193.125","5":"76.4335","6":"76.391","7":"76.391"},"ARG_OF_PERICENTER":{"0":"264.8777","1":"50.1444","2":"50.1444","3":"50.1442","4":"50.1485","5":"186.8094","6":"186.8192","7":"186.8192"},"MEAN_ANOMALY":{"0":"93.0539","1":"310.9883","2":"310.9883","3":"310.9885","4":"310.9878","5":"299.724","6":"350.8122","7":"350.8122"},"EPHEMERIS_TYPE":{"0":"0","1":"0","2":"0","3":"0","4":"0","5":"0","6":"0","7":"0"},"ELEMENT_SET_NO":{"0":"999","1":"999","2":"999","3":"999","4":"999","5":"999","6":"999","7":"999"},"REV_AT_EPOCH":{"0":"23344","1":"7602","2":"7513","3":"7513","4":"7515","5":"1973","6":"1974","7":"1975"},"BSTAR":{"0":"0","1":"0","2":"0","3":"0","4":"0","5":"0","6":"0","7":"0"},"MEAN_MOTION_DOT":{"0":"0.00000009","1":"0.00000013","2":"0.00000013","3":"0.00000013","4":"0.0000002","5":"-0.00000013","6":"-0.00000024","7":"-0.00000024"},"MEAN_MOTION_DDOT":{"0":"0","1":"0","2":"0","3":"0","4":"0","5":"0","6":"0","7":"0"},"FILE":{"0":"3819803","1":"3818603","2":"3819803","3":"3821329","4":"3824148","5":"3821329","6":"3823581","7":"3824148"},"TLE_LINE0":{"0":"0 NAVSTAR 18 (USA 50)","1":"0 NAVSTAR 67 (USA 239)","2":"0 NAVSTAR 67 (USA 239)","3":"0 NAVSTAR 67 (USA 239)","4":"0 NAVSTAR 67 (USA 239)","5":"0 NAVSTAR 79 (USA 304)","6":"0 NAVSTAR 79 (USA 304)","7":"0 NAVSTAR 79 (USA 304)"},"TLE_LINE1":{"0":"1 20452U 90008A 23052.27696774 .00000009 00000-0 00000-0 0 9999","1":"1 38833U 12053A 23052.27617114 .00000013 00000-0 00000+0 0 9990","2":"1 38833U 12053A 23052.27617114 .00000013 00000-0 00000-0 0 9991","3":"1 38833U 12053A 23052.27617118 .00000013 00000-0 00000-0 0 9995","4":"1 38833U 12053A 23053.27332297 .00000020 00000-0 00000-0 0 9996","5":"1 45854U 20041A 23052.36141292 -.00000013 00000-0 00000-0 0 9998","6":"1 45854U 20041A 23053.42932734 -.00000024 00000-0 00000+0 0 9996","7":"1 45854U 20041A 23053.42932734 -.00000024 00000-0 00000-0 0 9997"},"TLE_LINE2":{"0":"2 20452 54.7164 175.9594 0013992 264.8777 93.0539 1.89597679233443","1":"2 38833 53.5180 193.1658 0135647 50.1444 310.9883 2.00564380 76021","2":"2 38833 53.5180 193.1658 0135647 50.1444 310.9883 2.00564380 75132","3":"2 38833 53.5180 193.1658 0135650 50.1442 310.9885 2.00564379 75134","4":"2 38833 53.5179 193.1250 0135663 50.1485 310.9878 2.00564407 75157","5":"2 45854 55.7203 76.4335 0030268 186.8094 299.7240 2.00566443 19736","6":"2 45854 55.7213 76.3910 0030262 186.8192 350.8122 2.00566487 19745","7":"2 45854 55.7213 76.3910 0030262 186.8192 350.8122 2.00566487 19756"},"OBJECT_ID":{"0":"1990-008A","1":"2012-053A","2":"2012-053A","3":"2012-053A","4":"2012-053A","5":"2020-041A","6":"2020-041A","7":"2020-041A"},"OBJECT_NUMBER":{"0":"20452","1":"38833","2":"38833","3":"38833","4":"38833","5":"45854","6":"45854","7":"45854"},"SEMIMAJOR_AXIS":{"0":"27574.850","1":"26560.279","2":"26560.279","3":"26560.279","4":"26560.277","5":"26560.097","6":"26560.093","7":"26560.093"},"PERIOD":{"0":"759.503","1":"717.974","2":"717.974","3":"717.974","4":"717.974","5":"717.967","6":"717.966","7":"717.966"},"APOGEE":{"0":"21235.298","1":"20542.427","2":"20542.427","3":"20542.435","4":"20542.467","5":"20262.354","6":"20262.334","7":"20262.334"},"PERIGEE":{"0":"21158.133","1":"19821.862","2":"19821.862","3":"19821.854","4":"19821.817","5":"20101.570","6":"20101.582","7":"20101.582"},"DECAYED":{"0":"0","1":"0","2":"0","3":"0","4":"0","5":"0","6":"0","7":"0"},"Fetch_Timestamp":{"0":"2025-06-12T20:52:43.524","1":"2025-06-12T20:52:43.524","2":"2025-06-12T20:52:43.524","3":"2025-06-12T20:52:43.524","4":"2025-06-12T20:52:43.524","5":"2025-06-12T20:52:43.524","6":"2025-06-12T20:52:43.524","7":"2025-06-12T20:52:43.524"}}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import os
|
|
3
|
+
import sys
|
|
4
|
+
from pathlib import Path
|
|
3
5
|
|
|
4
6
|
from tabsim.config import load_config, run_sim_config
|
|
5
7
|
|
|
@@ -63,6 +65,11 @@ def main():
|
|
|
63
65
|
args = parser.parse_args()
|
|
64
66
|
rfi_amp = args.rfi_amp
|
|
65
67
|
spacetrack_path = args.spacetrack
|
|
68
|
+
config_path = Path(args.config_path)
|
|
69
|
+
|
|
70
|
+
if not config_path.is_file():
|
|
71
|
+
print(f"Error: config file not found: {config_path}", file=sys.stderr)
|
|
72
|
+
sys.exit(1) # Exit with error code
|
|
66
73
|
|
|
67
74
|
config_path = os.path.abspath(args.config_path)
|
|
68
75
|
work_dir = os.path.split(config_path)[0]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tabsim
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Trajectory-based Radio Frequency Interference (RFI) simulations for radio interferometeric data.
|
|
5
5
|
Author-email: Chris Finlay <christopher.finlay@epfl.ch>
|
|
6
6
|
Maintainer-email: Chris Finlay <christopher.finlay@epfl.ch>
|
|
@@ -680,7 +680,7 @@ License: GNU GENERAL PUBLIC LICENSE
|
|
|
680
680
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
681
681
|
|
|
682
682
|
Project-URL: Repository, https://github.com/chrisfinlay/tab-sim.git
|
|
683
|
-
Requires-Python: <3.13,>=3.
|
|
683
|
+
Requires-Python: <3.13,>=3.10
|
|
684
684
|
Description-Content-Type: text/markdown
|
|
685
685
|
License-File: LICENSE
|
|
686
686
|
Requires-Dist: jax
|
|
@@ -702,6 +702,8 @@ Requires-Dist: regions; extra == "sat"
|
|
|
702
702
|
Provides-Extra: ipy
|
|
703
703
|
Requires-Dist: ipython; extra == "ipy"
|
|
704
704
|
Requires-Dist: ipykernel; extra == "ipy"
|
|
705
|
+
Provides-Extra: test
|
|
706
|
+
Requires-Dist: pytest; extra == "test"
|
|
705
707
|
Dynamic: license-file
|
|
706
708
|
|
|
707
709
|
# tab-sim
|
|
@@ -29,6 +29,7 @@ tabsim/data/aux_data/satellite.ole
|
|
|
29
29
|
tabsim/data/aux_data/satellite.rfimodel
|
|
30
30
|
tabsim/data/aux_data/stationary.loc
|
|
31
31
|
tabsim/data/aux_data/stationary.rfimodel
|
|
32
|
+
tabsim/data/aux_data/tles/2023-02-21-J8HE0T.json
|
|
32
33
|
tabsim/data/config_files/sim_config_base.yaml
|
|
33
34
|
tabsim/data/config_files/tab_config_base.yaml
|
|
34
35
|
tabsim/jax/__init__.py
|
|
@@ -39,4 +40,7 @@ tabsim/scripts/__init__.py
|
|
|
39
40
|
tabsim/scripts/ast_region.py
|
|
40
41
|
tabsim/scripts/flag_data.py
|
|
41
42
|
tabsim/scripts/sim_vis.py
|
|
42
|
-
tabsim/scripts/tle_sat_region.py
|
|
43
|
+
tabsim/scripts/tle_sat_region.py
|
|
44
|
+
tests/test_basic.py
|
|
45
|
+
tests/test_sim-vis.py
|
|
46
|
+
tests/test_version.py
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import pytest
|
|
3
|
+
from unittest.mock import patch
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from tabsim.scripts import sim_vis
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_sim_vis_help_exists(capsys):
|
|
9
|
+
test_args = ["sim-vis", "--help"]
|
|
10
|
+
|
|
11
|
+
with patch.object(sys, "argv", test_args):
|
|
12
|
+
with pytest.raises(SystemExit) as e:
|
|
13
|
+
sim_vis.main()
|
|
14
|
+
|
|
15
|
+
assert e.value.code == 0 # argparse exits with code 0 for --help
|
|
16
|
+
out = capsys.readouterr().out
|
|
17
|
+
assert "usage:" in out.lower()
|
|
18
|
+
assert "--help" in out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_missing_config_file():
|
|
22
|
+
args = ["sim-vis", "--config", "nonexistent.yaml"]
|
|
23
|
+
|
|
24
|
+
with patch.object(sys, "argv", args), pytest.raises(SystemExit):
|
|
25
|
+
sim_vis.main()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def test_simulation_runs_with_config(capsys):
|
|
29
|
+
config_path = (
|
|
30
|
+
Path(__file__).parent.parent / "examples" / "test" / "sim_test_16A.yaml"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
assert config_path.is_file(), f"Missing config file: {config_path}"
|
|
34
|
+
args = ["sim-vis", "--config", str(config_path), "-o"]
|
|
35
|
+
|
|
36
|
+
with patch.object(sys, "argv", args):
|
|
37
|
+
sim_vis.main()
|
|
38
|
+
|
|
39
|
+
output = capsys.readouterr().out
|
|
40
|
+
assert "Total simulation time" in output
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|