tabsim 0.0.11__tar.gz → 0.0.13__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.11 → tabsim-0.0.13}/PKG-INFO +1 -1
- {tabsim-0.0.11 → tabsim-0.0.13}/pyproject.toml +1 -1
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/config.py +57 -57
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/sim_vis.py +37 -28
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim.egg-info/PKG-INFO +1 -1
- {tabsim-0.0.11 → tabsim-0.0.13}/LICENSE +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/README.md +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/docs/conf.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/setup.cfg +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/__init__.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/dask/__init__.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/dask/coordinates.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/dask/extras.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/dask/interferometry.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/dask/observation.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/__init__.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/config/sim_config_base.yaml +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/config/tab_config_base.yaml +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/norad_satellite.rfimodel +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/satellite.ole +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/satellite.rfimodel +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/stationary.loc +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/stationary.rfimodel +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/tles/2023-02-21-navstar.json +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/tles/2024-01-15-1T78VE.json +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/rfi/tles/2024-01-15-ISS.json +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/sky/calibrator.skymodel +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/telescopes/EDA2.itrf.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/telescopes/MWA.itrf.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/telescopes/MeerKAT.itrf.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/data/telescopes/_telescopes.yaml +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/jax/__init__.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/jax/coordinates.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/jax/interferometry.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/jax/utils.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/plot.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/read_ms.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/__init__.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/ast_region.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/flag_data.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/import_tle_files.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/setup_spacetrack_login.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/tle_sat_region.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/scripts/write_config_from_ms.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/sky.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/tle.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/tools.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim/write.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim.egg-info/SOURCES.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim.egg-info/dependency_links.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim.egg-info/entry_points.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim.egg-info/requires.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tabsim.egg-info/top_level.txt +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tests/test_basic.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tests/test_sim-vis.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tests/test_tle_api.py +0 -0
- {tabsim-0.0.11 → tabsim-0.0.13}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tabsim
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
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>
|
|
@@ -240,11 +240,11 @@ def sigma_value(value: Union[str, float, int], obs: Observation):
|
|
|
240
240
|
raise ValueError()
|
|
241
241
|
|
|
242
242
|
|
|
243
|
-
def load_obs(
|
|
243
|
+
def load_obs(sim_config: dict) -> Observation:
|
|
244
244
|
|
|
245
|
-
tel_ =
|
|
246
|
-
obs_ =
|
|
247
|
-
dask_ =
|
|
245
|
+
tel_ = sim_config["telescope"]
|
|
246
|
+
obs_ = sim_config["observation"]
|
|
247
|
+
dask_ = sim_config["dask"]
|
|
248
248
|
|
|
249
249
|
def arange(start: float, delta: float, n: int):
|
|
250
250
|
x = da.arange(start, start + n * delta, delta)[:n]
|
|
@@ -342,14 +342,14 @@ def add_power_spectrum_sources(obs: Observation, ps_rand: dict) -> None:
|
|
|
342
342
|
obs.addAstro(I[:, None, :], ra, dec)
|
|
343
343
|
|
|
344
344
|
|
|
345
|
-
def add_astro_sources(obs: Observation,
|
|
345
|
+
def add_astro_sources(obs: Observation, sim_config: dict) -> None:
|
|
346
346
|
"""Add astronomical sources from the simulation config file to the observation object.
|
|
347
347
|
|
|
348
348
|
Parameters
|
|
349
349
|
----------
|
|
350
350
|
obs : Observation
|
|
351
351
|
Observation object instance.
|
|
352
|
-
|
|
352
|
+
sim_config : dict
|
|
353
353
|
Simulation config dictionary.
|
|
354
354
|
"""
|
|
355
355
|
|
|
@@ -358,7 +358,7 @@ def add_astro_sources(obs: Observation, obs_spec: dict) -> None:
|
|
|
358
358
|
"gauss": obs.addAstroGauss,
|
|
359
359
|
"exp": obs.addAstroExp,
|
|
360
360
|
}
|
|
361
|
-
ast_ =
|
|
361
|
+
ast_ = sim_config["ast_sources"]
|
|
362
362
|
|
|
363
363
|
if ast_["pow_spec"]["random"]["type"]:
|
|
364
364
|
add_power_spectrum_sources(obs, ast_["pow_spec"]["random"])
|
|
@@ -467,9 +467,9 @@ def generate_spectra(spec_df: pd.DataFrame, freqs: Array, id_key: str) -> tuple:
|
|
|
467
467
|
return np.array(ids), da.atleast_2d(spectra)
|
|
468
468
|
|
|
469
469
|
|
|
470
|
-
def add_satellite_sources(obs: Observation,
|
|
470
|
+
def add_satellite_sources(obs: Observation, sim_config: dict) -> None:
|
|
471
471
|
|
|
472
|
-
sat_ =
|
|
472
|
+
sat_ = sim_config["rfi_sources"]["satellite"]
|
|
473
473
|
|
|
474
474
|
# Circular path based Satellites
|
|
475
475
|
if len(sat_["sat_ids"]) > 0:
|
|
@@ -513,10 +513,10 @@ def add_satellite_sources(obs: Observation, obs_spec: dict) -> None:
|
|
|
513
513
|
|
|
514
514
|
|
|
515
515
|
def add_tle_satellite_sources(
|
|
516
|
-
obs: Observation,
|
|
516
|
+
obs: Observation, sim_config: dict, spacetrack_path: str
|
|
517
517
|
) -> None:
|
|
518
518
|
|
|
519
|
-
sat_ =
|
|
519
|
+
sat_ = sim_config["rfi_sources"]["tle_satellite"]
|
|
520
520
|
|
|
521
521
|
# TLE path based Satellites
|
|
522
522
|
tle_cond = [
|
|
@@ -588,9 +588,9 @@ def add_tle_satellite_sources(
|
|
|
588
588
|
print("No NORAD IDs matching in 'norad_spec_model' file given.")
|
|
589
589
|
|
|
590
590
|
|
|
591
|
-
def add_stationary_sources(obs: Observation,
|
|
591
|
+
def add_stationary_sources(obs: Observation, sim_config: dict) -> None:
|
|
592
592
|
|
|
593
|
-
stat_ =
|
|
593
|
+
stat_ = sim_config["rfi_sources"]["stationary"]
|
|
594
594
|
if len(stat_["loc_ids"]) > 0:
|
|
595
595
|
ids = stat_["loc_ids"]
|
|
596
596
|
path_ids = []
|
|
@@ -637,9 +637,9 @@ def add_stationary_sources(obs: Observation, obs_spec: dict) -> None:
|
|
|
637
637
|
print("No locations IDs matching in 'spec_model' file given.")
|
|
638
638
|
|
|
639
639
|
|
|
640
|
-
def add_gains(obs: Observation,
|
|
640
|
+
def add_gains(obs: Observation, sim_config: dict) -> None:
|
|
641
641
|
|
|
642
|
-
gains_ =
|
|
642
|
+
gains_ = sim_config["gains"]
|
|
643
643
|
gain_offset = gains_["G0_mean"] != 1 or gains_["G0_std"] != 0
|
|
644
644
|
gain_var = gains_["Gt_std_amp"] != 0 or gains_["Gt_std_phase"] != 0
|
|
645
645
|
if gain_offset or gain_var:
|
|
@@ -659,11 +659,11 @@ def add_gains(obs: Observation, obs_spec: dict) -> None:
|
|
|
659
659
|
print("No gains added ...")
|
|
660
660
|
|
|
661
661
|
|
|
662
|
-
def plot_diagnostics(obs: Observation,
|
|
662
|
+
def plot_diagnostics(obs: Observation, sim_config: dict, save_path: str) -> None:
|
|
663
663
|
|
|
664
664
|
from tabsim.plot import plot_uv, plot_src_alt, plot_angular_seps
|
|
665
665
|
|
|
666
|
-
diag_ =
|
|
666
|
+
diag_ = sim_config["diagnostics"]
|
|
667
667
|
|
|
668
668
|
if diag_["src_alt"]:
|
|
669
669
|
print()
|
|
@@ -713,29 +713,29 @@ def write_to_zarr(obs: Observation, zarr_path: str, overwrite: bool) -> None:
|
|
|
713
713
|
print(f"zarr Write Time : {end - start}")
|
|
714
714
|
|
|
715
715
|
|
|
716
|
-
def save_data(obs: Observation,
|
|
716
|
+
def save_data(obs: Observation, sim_config: dict, zarr_path: str, ms_path: str) -> None:
|
|
717
717
|
|
|
718
|
-
if
|
|
718
|
+
if sim_config["output"]["zarr"] or sim_config["output"]["ms"]:
|
|
719
719
|
print()
|
|
720
720
|
print("Calculating visibilities ...")
|
|
721
|
-
obs.calculate_vis(flags=
|
|
721
|
+
obs.calculate_vis(flags=sim_config["output"]["flag_data"])
|
|
722
722
|
|
|
723
|
-
overwrite =
|
|
723
|
+
overwrite = sim_config["output"]["overwrite"]
|
|
724
724
|
|
|
725
|
-
if
|
|
725
|
+
if sim_config["output"]["zarr"] and sim_config["output"]["ms"]:
|
|
726
726
|
write_to_zarr(obs, zarr_path, overwrite)
|
|
727
727
|
xds = xr.open_zarr(zarr_path)
|
|
728
728
|
write_to_ms(xds, ms_path, overwrite)
|
|
729
729
|
print_signal_specs(
|
|
730
730
|
xds.vis_rfi.data, xds.vis_ast.data, xds.noise_data.data, xds.flags.data
|
|
731
731
|
)
|
|
732
|
-
elif
|
|
732
|
+
elif sim_config["output"]["zarr"]:
|
|
733
733
|
write_to_zarr(obs, zarr_path, overwrite)
|
|
734
734
|
xds = xr.open_zarr(zarr_path)
|
|
735
735
|
print_signal_specs(
|
|
736
736
|
xds.vis_rfi.data, xds.vis_ast.data, xds.noise_data.data, xds.flags.data
|
|
737
737
|
)
|
|
738
|
-
elif
|
|
738
|
+
elif sim_config["output"]["ms"]:
|
|
739
739
|
write_to_ms(obs.dataset, ms_path, overwrite)
|
|
740
740
|
xds = xds_from_ms(ms_path)
|
|
741
741
|
print_signal_specs(
|
|
@@ -750,15 +750,15 @@ def save_data(obs: Observation, obs_spec: dict, zarr_path: str, ms_path: str) ->
|
|
|
750
750
|
)
|
|
751
751
|
|
|
752
752
|
|
|
753
|
-
def save_inputs(obs: Observation,
|
|
753
|
+
def save_inputs(obs: Observation, sim_config: dict, save_path: str) -> None:
|
|
754
754
|
|
|
755
755
|
for key in ["enu_path", "itrf_path"]:
|
|
756
|
-
path =
|
|
756
|
+
path = sim_config["telescope"][key]
|
|
757
757
|
if path is not None:
|
|
758
758
|
shutil.copy(path, save_path)
|
|
759
759
|
|
|
760
|
-
for key in
|
|
761
|
-
path =
|
|
760
|
+
for key in sim_config["ast_sources"].keys():
|
|
761
|
+
path = sim_config["ast_sources"][key]["path"]
|
|
762
762
|
if path is not None:
|
|
763
763
|
shutil.copy(path, save_path)
|
|
764
764
|
|
|
@@ -772,14 +772,14 @@ def save_inputs(obs: Observation, obs_spec: dict, save_path: str) -> None:
|
|
|
772
772
|
"spec_model",
|
|
773
773
|
]
|
|
774
774
|
for key1, key2 in zip(key, subkey):
|
|
775
|
-
path =
|
|
775
|
+
path = sim_config["rfi_sources"][key1][key2]
|
|
776
776
|
if path is not None:
|
|
777
777
|
shutil.copy(path, save_path)
|
|
778
778
|
|
|
779
779
|
np.savetxt(os.path.join(save_path, "norad_ids.yaml"), obs.norad_ids, fmt="%i")
|
|
780
780
|
|
|
781
781
|
with open(os.path.join(save_path, "sim_config.yaml"), "w") as fp:
|
|
782
|
-
yaml.dump(
|
|
782
|
+
yaml.dump(sim_config, fp)
|
|
783
783
|
|
|
784
784
|
|
|
785
785
|
def print_fringe_freq_sat(obs: Observation):
|
|
@@ -876,7 +876,7 @@ def check_telescope_defintion(tel_def: dict):
|
|
|
876
876
|
|
|
877
877
|
|
|
878
878
|
def run_sim_config(
|
|
879
|
-
|
|
879
|
+
sim_config: Optional[dict] = None,
|
|
880
880
|
config_path: Optional[str] = None,
|
|
881
881
|
spacetrack_path: Optional[str] = None,
|
|
882
882
|
) -> Tuple[Observation, str]:
|
|
@@ -892,24 +892,24 @@ def run_sim_config(
|
|
|
892
892
|
print(datetime.now())
|
|
893
893
|
|
|
894
894
|
if config_path:
|
|
895
|
-
|
|
896
|
-
elif
|
|
897
|
-
raise ValueError("
|
|
895
|
+
sim_config = load_config(config_path, config_type="sim")
|
|
896
|
+
elif sim_config is None:
|
|
897
|
+
raise ValueError("sim_config or config_path must be defined.")
|
|
898
898
|
|
|
899
899
|
rfi_def = get_rfi_definitions()
|
|
900
|
-
|
|
900
|
+
sim_config["rfi_sources"] = deep_update(sim_config["rfi_sources"], rfi_def)
|
|
901
901
|
|
|
902
|
-
if not check_telescope_defintion(
|
|
903
|
-
tel_def = get_telescope_definitions(
|
|
904
|
-
|
|
902
|
+
if not check_telescope_defintion(sim_config["telescope"]):
|
|
903
|
+
tel_def = get_telescope_definitions(sim_config["telescope"]["name"])
|
|
904
|
+
sim_config["telescope"] = deep_update(sim_config["telescope"], tel_def)
|
|
905
905
|
|
|
906
|
-
obs = load_obs(
|
|
907
|
-
add_astro_sources(obs,
|
|
908
|
-
add_satellite_sources(obs,
|
|
909
|
-
if
|
|
910
|
-
add_tle_satellite_sources(obs,
|
|
911
|
-
add_stationary_sources(obs,
|
|
912
|
-
add_gains(obs,
|
|
906
|
+
obs = load_obs(sim_config)
|
|
907
|
+
add_astro_sources(obs, sim_config)
|
|
908
|
+
add_satellite_sources(obs, sim_config)
|
|
909
|
+
if sim_config["rfi_sources"]["tle_satellite"]["max_n_sat"] != 0 and spacetrack_path:
|
|
910
|
+
add_tle_satellite_sources(obs, sim_config, spacetrack_path)
|
|
911
|
+
add_stationary_sources(obs, sim_config)
|
|
912
|
+
add_gains(obs, sim_config)
|
|
913
913
|
|
|
914
914
|
# Change this for calculating all RFI sources
|
|
915
915
|
if obs.n_rfi_satellite > 0:
|
|
@@ -920,39 +920,39 @@ def run_sim_config(
|
|
|
920
920
|
print(obs)
|
|
921
921
|
|
|
922
922
|
obs_name = mk_obs_name(
|
|
923
|
-
|
|
923
|
+
sim_config["output"]["prefix"], obs, sim_config["output"]["suffix"]
|
|
924
924
|
)
|
|
925
925
|
save_path, zarr_path, ms_path = mk_obs_dir(
|
|
926
|
-
|
|
926
|
+
sim_config["output"]["path"], obs_name, sim_config["output"]["overwrite"]
|
|
927
927
|
)
|
|
928
928
|
|
|
929
929
|
input_path = os.path.join(save_path, "input_data")
|
|
930
930
|
|
|
931
931
|
os.makedirs(input_path, exist_ok=True)
|
|
932
|
-
save_inputs(obs,
|
|
932
|
+
save_inputs(obs, sim_config, input_path)
|
|
933
933
|
|
|
934
934
|
print()
|
|
935
935
|
print(f"Writing data to : {save_path}")
|
|
936
936
|
|
|
937
937
|
plot_cond = np.array(
|
|
938
938
|
[
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
939
|
+
sim_config["diagnostics"]["rfi_seps"],
|
|
940
|
+
sim_config["diagnostics"]["src_alt"],
|
|
941
|
+
sim_config["diagnostics"]["uv_cov"],
|
|
942
942
|
]
|
|
943
943
|
)
|
|
944
944
|
if np.any(plot_cond):
|
|
945
|
-
plot_diagnostics(obs,
|
|
945
|
+
plot_diagnostics(obs, sim_config, save_path)
|
|
946
946
|
else:
|
|
947
947
|
print("\nNo diagnostic plots.")
|
|
948
948
|
|
|
949
|
-
save_data(obs,
|
|
949
|
+
save_data(obs, sim_config, zarr_path, ms_path)
|
|
950
950
|
|
|
951
|
-
if
|
|
951
|
+
if sim_config["output"]["accumulate_ms"] is not None:
|
|
952
952
|
from tabsim.write import add_to_ms
|
|
953
953
|
|
|
954
954
|
xds = xr.open_zarr(zarr_path)
|
|
955
|
-
add_to_ms(xds,
|
|
955
|
+
add_to_ms(xds, sim_config["output"]["accumulate_ms"])
|
|
956
956
|
|
|
957
957
|
end = datetime.now()
|
|
958
958
|
print()
|
|
@@ -966,8 +966,8 @@ def run_sim_config(
|
|
|
966
966
|
sys.stdout = backup
|
|
967
967
|
|
|
968
968
|
if (
|
|
969
|
-
not
|
|
970
|
-
and
|
|
969
|
+
not sim_config["output"]["keep_sim"]
|
|
970
|
+
and sim_config["output"]["accumulate_ms"] is not None
|
|
971
971
|
):
|
|
972
972
|
shutil.rmtree(save_path)
|
|
973
973
|
return obs, save_path
|
|
@@ -29,6 +29,11 @@ def main():
|
|
|
29
29
|
required=True,
|
|
30
30
|
help="File path to the observation config file.",
|
|
31
31
|
)
|
|
32
|
+
parser.add_argument(
|
|
33
|
+
"-sp",
|
|
34
|
+
"--save_path",
|
|
35
|
+
help="Output directory path of simulation files.",
|
|
36
|
+
)
|
|
32
37
|
parser.add_argument(
|
|
33
38
|
"-r",
|
|
34
39
|
"--rfi_amp",
|
|
@@ -80,69 +85,73 @@ def main():
|
|
|
80
85
|
config_path = os.path.abspath(args.config_path)
|
|
81
86
|
work_dir = os.path.split(config_path)[0]
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
sim_config = load_config(config_path, config_type="sim")
|
|
89
|
+
|
|
90
|
+
if args.save_path:
|
|
91
|
+
save_path = Path(args.save_path)
|
|
92
|
+
sim_config["output"]["path"] = save_path
|
|
84
93
|
|
|
85
94
|
if args.ra is not None:
|
|
86
|
-
|
|
95
|
+
sim_config["observation"]["ra"] = args.ra
|
|
87
96
|
|
|
88
|
-
config_st_path =
|
|
97
|
+
config_st_path = sim_config["rfi_sources"]["tle_satellite"]["spacetrack_path"]
|
|
89
98
|
if spacetrack_path:
|
|
90
|
-
|
|
99
|
+
sim_config["rfi_sources"]["tle_satellite"]["spacetrack_path"] = os.path.abspath(
|
|
91
100
|
os.path.join(work_dir, spacetrack_path)
|
|
92
101
|
)
|
|
93
102
|
elif config_st_path:
|
|
94
103
|
config_st_path = get_abs_path(config_st_path, work_dir)
|
|
95
|
-
|
|
104
|
+
sim_config["rfi_sources"]["tle_satellite"]["spacetrack_path"] = config_st_path
|
|
96
105
|
spacetrack_path = config_st_path
|
|
97
106
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
sim_config["rfi_sources"]["tle_satellite"]["power_scale"] *= rfi_amp
|
|
108
|
+
sim_config["rfi_sources"]["satellite"]["power_scale"] *= rfi_amp
|
|
109
|
+
sim_config["rfi_sources"]["stationary"]["power_scale"] *= rfi_amp
|
|
101
110
|
|
|
102
|
-
|
|
111
|
+
sim_config["output"]["overwrite"] = args.overwrite
|
|
103
112
|
|
|
104
113
|
if args.n_ant is not None:
|
|
105
|
-
|
|
114
|
+
sim_config["telescope"]["n_ant"] = args.n_ant
|
|
106
115
|
|
|
107
116
|
if args.n_int is not None:
|
|
108
|
-
|
|
117
|
+
sim_config["observation"]["n_int"] = args.n_int
|
|
109
118
|
|
|
110
|
-
suffix =
|
|
119
|
+
suffix = sim_config["output"]["suffix"]
|
|
111
120
|
if suffix:
|
|
112
121
|
suffix = f"{rfi_amp:.1e}RFI_" + suffix
|
|
113
122
|
else:
|
|
114
123
|
suffix = f"_{rfi_amp:.1e}RFI"
|
|
115
|
-
|
|
124
|
+
sim_config["output"]["suffix"] = f"{rfi_amp:.1e}RFI"
|
|
116
125
|
|
|
117
126
|
if args.SEFD is not None:
|
|
118
|
-
|
|
127
|
+
sim_config["observation"]["SEFD"] = args.SEFD
|
|
119
128
|
|
|
120
129
|
if args.int_time is not None:
|
|
121
|
-
|
|
130
|
+
sim_config["observation"]["int_time"] = args.int_time
|
|
122
131
|
|
|
123
132
|
if args.n_time is not None:
|
|
124
|
-
|
|
133
|
+
sim_config["observation"]["n_time"] = args.n_time
|
|
125
134
|
|
|
126
135
|
for ast in ["exp", "gauss", "point", "pow_spec"]:
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
sim_config["ast_sources"][ast]["path"] = get_abs_path(
|
|
137
|
+
sim_config["ast_sources"][ast]["path"], work_dir
|
|
129
138
|
)
|
|
130
139
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
sim_config["output"]["path"] = get_abs_path(sim_config["output"]["path"], work_dir)
|
|
141
|
+
sim_config["rfi_sources"]["tle_satellite"]["norad_ids_path"] = get_abs_path(
|
|
142
|
+
sim_config["rfi_sources"]["tle_satellite"]["norad_ids_path"], work_dir
|
|
134
143
|
)
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
sim_config["rfi_sources"]["tle_satellite"]["norad_spec_model"] = get_abs_path(
|
|
145
|
+
sim_config["rfi_sources"]["tle_satellite"]["norad_spec_model"], work_dir
|
|
137
146
|
)
|
|
138
|
-
|
|
139
|
-
|
|
147
|
+
sim_config["telescope"]["enu_path"] = get_abs_path(
|
|
148
|
+
sim_config["telescope"]["enu_path"], work_dir
|
|
140
149
|
)
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
sim_config["telescope"]["itrf_path"] = get_abs_path(
|
|
151
|
+
sim_config["telescope"]["itrf_path"], work_dir
|
|
143
152
|
)
|
|
144
153
|
|
|
145
|
-
return run_sim_config(
|
|
154
|
+
return run_sim_config(sim_config=sim_config, spacetrack_path=spacetrack_path)
|
|
146
155
|
|
|
147
156
|
|
|
148
157
|
if __name__ == "__main__":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tabsim
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
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>
|
|
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
|
|
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
|