tabsim 0.0.1__py3-none-any.whl
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/__init__.py +0 -0
- tabsim/config.py +904 -0
- tabsim/dask/__init__.py +0 -0
- tabsim/dask/coordinates.py +469 -0
- tabsim/dask/extras.py +60 -0
- tabsim/dask/interferometry.py +572 -0
- tabsim/dask/observation.py +969 -0
- tabsim/data/EDA2.itrf.txt +256 -0
- tabsim/data/MWA.itrf.txt +128 -0
- tabsim/data/MeerKAT.itrf.txt +64 -0
- tabsim/data/__init__.py +0 -0
- tabsim/data/aux_data/calibrator.skymodel +2 -0
- tabsim/data/aux_data/norad_satellite.rfimodel +61711 -0
- tabsim/data/aux_data/satellite.ole +3 -0
- tabsim/data/aux_data/satellite.rfimodel +3 -0
- tabsim/data/aux_data/stationary.loc +4 -0
- tabsim/data/aux_data/stationary.rfimodel +4 -0
- tabsim/data/config_files/sim_config_base.yaml +172 -0
- tabsim/data/config_files/tab_config_base.yaml +86 -0
- tabsim/jax/__init__.py +0 -0
- tabsim/jax/coordinates.py +1082 -0
- tabsim/jax/interferometry.py +667 -0
- tabsim/jax/utils.py +90 -0
- tabsim/plot.py +323 -0
- tabsim/scripts/__init__.py +1 -0
- tabsim/scripts/ast_region.py +56 -0
- tabsim/scripts/flag_data.py +195 -0
- tabsim/scripts/sim_vis.py +136 -0
- tabsim/scripts/tle_sat_region.py +191 -0
- tabsim/sky.py +137 -0
- tabsim/tle.py +753 -0
- tabsim/tools.py +111 -0
- tabsim/write.py +715 -0
- tabsim-0.0.1.dist-info/METADATA +991 -0
- tabsim-0.0.1.dist-info/RECORD +39 -0
- tabsim-0.0.1.dist-info/WHEEL +5 -0
- tabsim-0.0.1.dist-info/entry_points.txt +5 -0
- tabsim-0.0.1.dist-info/licenses/LICENSE +674 -0
- tabsim-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
###############################################################################################
|
|
2
|
+
# This is base simulation config that is loaded and then updated with your provided config.
|
|
3
|
+
# Populated parameters here are the default values used if none are specified in your config.
|
|
4
|
+
###############################################################################################
|
|
5
|
+
ast_sources:
|
|
6
|
+
##########################################
|
|
7
|
+
# Exponential shaped astronomical sources
|
|
8
|
+
##########################################
|
|
9
|
+
exp:
|
|
10
|
+
path: null # Optional - Path to skymodel
|
|
11
|
+
random:
|
|
12
|
+
n_src: 0 # Optional - Number of exponentially shaped sources to include
|
|
13
|
+
I_pow_law: 1.6 # Required if n_src > 0 - Exponent for power law intensity distribution
|
|
14
|
+
max_I: 1.0 # Required if n_src > 0 - Maximum intensity of intensity distribution in Jy
|
|
15
|
+
max_sep: 50.0 # Required if n_src > 0 - Maximum angular separation between sources in arcseconds
|
|
16
|
+
min_I: 3sigma # Required if n_src > 0 - Minimum intensity of intensity distribution in Jy (3sigma calculated from theoretical image noise)
|
|
17
|
+
n_beam: 5 # Required if n_src > 0 - Maximum angular separation between sources based on the theoretical synthesized beam width
|
|
18
|
+
random_seed: 123456 # Required if n_src > 0 - Random seed used for drawing locations, intensities and shapes
|
|
19
|
+
si_mean: 0.7 # Required if n_src > 0 - Mean of the Gaussian distribution to draw spectral indices from
|
|
20
|
+
si_std: 0.2 # Required if n_src > 0 - Sandard deviation of the Gaussian distribution to draw spectral indices from
|
|
21
|
+
size_mean: 30.0 # Required if n_src > 0 - Mean of the Gaussian distribution to draw source sizes from in arcseconds
|
|
22
|
+
size_std: 5.0 # Required if n_src > 0 - Standard deviation of the Gaussian distribution to draw spectral indices from
|
|
23
|
+
#######################################
|
|
24
|
+
# Gaussian shaped astronomical sources
|
|
25
|
+
#######################################
|
|
26
|
+
gauss:
|
|
27
|
+
path: null # Optional - Path to skymodel
|
|
28
|
+
random:
|
|
29
|
+
n_src: 0 # Optional - Number of Gaussian shaped sources to include
|
|
30
|
+
I_pow_law: 1.6 # Required if n_src > 0 - Exponent for power law intensity distribution
|
|
31
|
+
major_mean: 30.0 # Required if n_src > 0 - Mean of the Gaussian distribution to draw source size major axes from in arcseconds
|
|
32
|
+
major_std: 5.0 # Required if n_src > 0 - Standard deviation of the Gaussian distribution to draw source sizes from in arcseconds
|
|
33
|
+
max_I: 1.0 # Required if n_src > 0 - Maximum intensity of intensity distribution in Jy
|
|
34
|
+
max_sep: 50.0 # Required if n_src > 0 - Maximum angular separation between sources in arcseconds
|
|
35
|
+
min_I: 3sigma # Required if n_src > 0 - Minimum intensity of intensity distribution in Jy (3sigma calculated from theoretical image noise)
|
|
36
|
+
minor_mean: 30.0 # Required if n_src > 0 - Mean of the Gaussian distribution to draw source size minor axes from in arcseconds
|
|
37
|
+
minor_std: 5.0 # Required if n_src > 0 - Standard deviation of the Gaussian distribution to draw source sizes from in arcseconds
|
|
38
|
+
n_beam: 5 # Required if n_src > 0 - Maximum angular separation between sources based on the theoretical synthesized beam width
|
|
39
|
+
random_seed: 123456 # Required if n_src > 0 - Random seed used for drawing locations, intensities and shapes
|
|
40
|
+
si_mean: 0.7 # Required if n_src > 0 - Mean of the Gaussian distribution to draw spectral indices from
|
|
41
|
+
si_std: 0.2 # Required if n_src > 0 - Sandard deviation of the Gaussian distribution to draw spectral indices from
|
|
42
|
+
####################################
|
|
43
|
+
# Point shaped astronomical sources
|
|
44
|
+
####################################
|
|
45
|
+
point:
|
|
46
|
+
path: null # Optional - Path to skymodel
|
|
47
|
+
random:
|
|
48
|
+
n_src: 0 # Optional - Number of point sources to include
|
|
49
|
+
I_pow_law: 1.6 # Required if n_src > 0 - Exponent for power law intensity distribution
|
|
50
|
+
max_I: 1.0 # Required if n_src > 0 - Maximum intensity of intensity distribution in Jy
|
|
51
|
+
max_sep: 50.0 # Required if n_src > 0 - Maximum angular separation between sources in arcseconds
|
|
52
|
+
min_I: 3sigma # Required if n_src > 0 - Minimum intensity of intensity distribution in Jy (3sigma calculated from theoretical image noise)
|
|
53
|
+
n_beam: 5 # Required if n_src > 0 - Maximum angular separation between sources based on the theoretical synthesized beam width
|
|
54
|
+
random_seed: 123456 # Required if n_src > 0 - Random seed used for drawing locations, intensities and shapes
|
|
55
|
+
si_mean: 0.7 # Required if n_src > 0 - Mean of the Gaussian distribution to draw spectral indices from
|
|
56
|
+
si_std: 0.2 # Required if n_src > 0 - Sandard deviation of the Gaussian distribution to draw spectral indices from
|
|
57
|
+
#################################################
|
|
58
|
+
# Gaussian field realization astronomical source
|
|
59
|
+
#################################################
|
|
60
|
+
pow_spec:
|
|
61
|
+
path: null # Optional - Path to skymodel
|
|
62
|
+
random:
|
|
63
|
+
type: null # Optional - Type of power spectrum to use. Currently only 'Cl' or 'Pk' is available which is a power law spectrum and power law with a knee respectively
|
|
64
|
+
random_seed: 1234 # Required if type is specified - Random seed used for drawing Gaussian field realization
|
|
65
|
+
fov_f: 1.2 # Required if type is specified - Fraction of the field of view to model (based on minimum frequency and dish diameter)
|
|
66
|
+
n_side: 128 # Required if type is specified - Number of pixel/point sources per sideof the sky image
|
|
67
|
+
A: 0.000513 # Required if type 'Cl' is specified - Amplitude of power spectrum at k=0 in mK^2
|
|
68
|
+
beta: 1.34 # Required if type 'Cl' is specified - Exponent of the power law spectrum
|
|
69
|
+
P0: 1e12 # Required if type 'Pk' is specified - Amplitude of power spectrum for k below 'k0'
|
|
70
|
+
k0: 1e1 # Required if type 'Pk' is specified - Change point where the power spectrum changes from flat to a power law
|
|
71
|
+
gamma: 2.34 # Required if type 'Pk' is specified - Exponent of the power law portion of the power spectrum
|
|
72
|
+
##################
|
|
73
|
+
# Dask parameters
|
|
74
|
+
##################
|
|
75
|
+
dask:
|
|
76
|
+
max_chunk_MB: 100 # Required - Approximate size of the dask chunks to process in Megabytes
|
|
77
|
+
###################
|
|
78
|
+
# Diagnostoc plots
|
|
79
|
+
###################
|
|
80
|
+
diagnostics:
|
|
81
|
+
rfi_seps: True # Optional - Whether to plot the angular separations, over time, between the pointing direction and the RFI sources.
|
|
82
|
+
src_alt: True # Optional - Whether to plot the source altitude over time
|
|
83
|
+
uv_cov: True # Optional - Whether to plot the uv distribution of the observation in metres
|
|
84
|
+
##################
|
|
85
|
+
# Gain parameters
|
|
86
|
+
##################
|
|
87
|
+
gains:
|
|
88
|
+
G0_mean: 1.0 # Optional - Mean of the Gaussian distribution for the starting gain amplitude (phase is uniformaly distributed when G0_mean!=1.0)
|
|
89
|
+
G0_std: 0.0 # Optional - Standard deviation of the Gaussian distribution for the starting gain amplitude
|
|
90
|
+
Gt_std_amp: 0 # Optional - Standard deviation of the Gaussian distribution for the variability of the gain amplitude [%]
|
|
91
|
+
Gt_std_phase: 0 # Optional - Standard deviation of the Gaussian distribution for the variability of the gain phase [deg]
|
|
92
|
+
Gt_corr_amp: 3 # Optional - Correlation time of the Gaussian process for the time variability of the gain amplitude [hr]
|
|
93
|
+
Gt_corr_phase: 3 # Optional - Correlation time of the Gaussian process for the time variability of the gain phase [hr]
|
|
94
|
+
random_seed: 999 # Optional - Random seed used for drawing of gain parameters
|
|
95
|
+
#########################
|
|
96
|
+
# Observation parameters
|
|
97
|
+
#########################
|
|
98
|
+
observation:
|
|
99
|
+
start_time_jd: null # Required - Centroid of the starting time in Julian date
|
|
100
|
+
start_time_isot: null # Required - Centroid of the starting time in ISOT format e.g. 2024-02-21T12:47:32.123
|
|
101
|
+
start_time_lha: null # Required - Centroid of the starting time in local hour angle in degrees
|
|
102
|
+
start_time: null # Required - Centroid of the starting time in Greenwich mean sidereal time in seconds
|
|
103
|
+
# Only one of the above is required to be specified, order of preference is start_time_jd, start_time_isot, start_time
|
|
104
|
+
SEFD: null # Required - System equivalent flux density of the antennas in Jy. Visibility noise is calculated from this, chan_width, and int_time
|
|
105
|
+
auto_corrs: False # Optional - Whether to simulate the autocorrelations
|
|
106
|
+
chan_width: null # Required if n_freq < 2 - The bandwidth of a single frequency channel in Hz
|
|
107
|
+
ra: null # Required - Right ascension of the target direction in decimal degrees
|
|
108
|
+
dec: null # Required - Declination of the target direction in decimal degrees
|
|
109
|
+
int_time: null # Required - Integration time per time step in seconds
|
|
110
|
+
n_freq: null # Required - Number of frequency channels to simulate
|
|
111
|
+
n_int: null # Required - Number of samples used to integrate within a single time step.
|
|
112
|
+
n_time: null # Required - Number of time steps to simulate
|
|
113
|
+
no_w: False # Optional - Whether to include the w-component in the baselines. Simulates a planar array at all times
|
|
114
|
+
random_seed: null # Optional - Random seed to use for drawing the visibility noise
|
|
115
|
+
start_freq: null # Required - Centroid of the starting frequency for the frequencies to simulate in Hz
|
|
116
|
+
target_name: target # Optional - Name of the target
|
|
117
|
+
####################
|
|
118
|
+
# Output parameters
|
|
119
|
+
####################
|
|
120
|
+
output:
|
|
121
|
+
zarr: True # Optional - Whether to save the output to a zarr file. This contains almost all inputs ot the simulation
|
|
122
|
+
ms: True # Optional - Whether to save the output to a Measurement Set file
|
|
123
|
+
flag_data: True # Optional - Whether to apply ideal 3sigma flags
|
|
124
|
+
overwrite: False # Optional - Whether to overwrite a previous simulation with the same name
|
|
125
|
+
path: ./ # Optional - Path to where the simulation should be saved
|
|
126
|
+
prefix: null # Optional - Prefix used in the simulation file name
|
|
127
|
+
suffix: null # Optional - Suffix used in the simulation file name
|
|
128
|
+
rfi_sources:
|
|
129
|
+
#######################################
|
|
130
|
+
# Circular trajectory based satellites
|
|
131
|
+
#######################################
|
|
132
|
+
satellite:
|
|
133
|
+
# These parameters are used for simulating satellites with a circular path
|
|
134
|
+
sat_ids: [] # Optional - IDs of satellites to include where the orbital parameters and spectral models are defined in the following files
|
|
135
|
+
circ_path: null # Required if sat_ids != [] - Path to the csv '.ole' file containing the satellite orbital parameters per satellite ID
|
|
136
|
+
spec_model: null # Required if sat_ids != [] - Path to the csv '.rfimodel' file of spectral models for each satellite ID
|
|
137
|
+
power_scale: 1.0 # Optional - Fractional scale, of the spectral model, for the satellite emission power
|
|
138
|
+
##################################
|
|
139
|
+
# TLE trajectory based satellites
|
|
140
|
+
##################################
|
|
141
|
+
tle_satellite:
|
|
142
|
+
sat_names: [] # Optional - Names of satellites to include. A 'like' search is done e.g. starlink returns all starlink satellites
|
|
143
|
+
norad_ids: [] # Optional - NORAD IDs of the satellites to include
|
|
144
|
+
norad_ids_path: null # Optional - Path to a file conating the NORAD IDs of satellites to include. Each ID is on a seaprate line
|
|
145
|
+
norad_spec_model: null # Required if any TLE satellites are included - Path to the csv file of spectral models fo each satellite by NORAD ID
|
|
146
|
+
max_n_sat: null # Optional - Maximum number of TLE satellites to include. Defaults to all found satellites.
|
|
147
|
+
spacetrack_path: null # Required if any TLE satellites are included - Path to the Space-Track login config file
|
|
148
|
+
max_ang_sep: 90 # Optional - Maximum angular separation from the target direction, in degrees, of satellites to include
|
|
149
|
+
min_alt: 0 # Optional - Minimum altitude of satellites to include. 0 indicates above the horizon
|
|
150
|
+
tle_dir: ./tles # Optional - Path to the directory where to save TLEs for future use
|
|
151
|
+
vis_step: 1.0 # Optional - Time step, in minutes, to check for satellites satisfying the given conditions
|
|
152
|
+
power_scale: 1.0 # Optional - Fractional scale, of the spectral model, for the satellite emission power
|
|
153
|
+
##################################################
|
|
154
|
+
# Stationary RFI source relative to the telescope
|
|
155
|
+
##################################################
|
|
156
|
+
stationary:
|
|
157
|
+
loc_ids: [] # Optional - IDs of stationary sources to include where the location parameters and spectral models are defined in the following files
|
|
158
|
+
geo_path: null # Optional - Path to the (csv) '.loc' file where the stationary sources are positioned
|
|
159
|
+
spec_model: null # Required if loc_ids != [] - Path to the csv '.rfimodel' file of spectral models for each stationary source by ID
|
|
160
|
+
power_scale: 1.0 # Optional - Fractional scale, of the spectral model, for the satellite emission power
|
|
161
|
+
#######################
|
|
162
|
+
# Telescope parameters
|
|
163
|
+
#######################
|
|
164
|
+
telescope:
|
|
165
|
+
latitude: null # Required - Latitude of the telescope location in decimal degrees. North is +ve
|
|
166
|
+
longitude: null # Required - Longitude of the telescope in decimal degrees. East from Greenwich meridian
|
|
167
|
+
elevation: null # Required - Elevation of the telescope above the WGS84 Earth ellipsoid model in metres.
|
|
168
|
+
dish_d: null # Required - Dish diameter in metres
|
|
169
|
+
enu_path: null # Required if itrf_path is null - Path to the csv file of the antennas in East, North, Up frame, in metres, relative to the telescope location
|
|
170
|
+
itrf_path: null # Required if enu_path is null - Path to the csv file contaning the antenna positions in International Terrestrial Reference Frame in metres.
|
|
171
|
+
n_ant: null # Required - Number of antennas to include. Takes the forst n_ant antennas in the given antenna files
|
|
172
|
+
name: MeerKAT # Optional - Telescope name
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
##################
|
|
2
|
+
# Data parameters
|
|
3
|
+
##################
|
|
4
|
+
data:
|
|
5
|
+
sim_dir: null # Optional - Can be provided when running tabascal
|
|
6
|
+
ms_path: null # Optional - Can be provided when running tabascal
|
|
7
|
+
freq: null # Optional - Defaults to channel 0
|
|
8
|
+
data_col: DATA # Optional - Defaults to 'DATA'
|
|
9
|
+
corr: xx # Optional - Defaults to 'xx' polarization, i.e. correlation 0
|
|
10
|
+
######################
|
|
11
|
+
# Plotting parameters
|
|
12
|
+
######################
|
|
13
|
+
plots:
|
|
14
|
+
init: true # Optional - Plot the estimated astronomical and RFI visibilities as well as the gains based on the initial parameter estimate
|
|
15
|
+
truth: true # Optional - Plot the estimated astronomical and RFI visibilities as well as the gains based on the true parameter estimate
|
|
16
|
+
prior: true # Optional - Plot the prior distribution over the astronomical and RFI visibilities as well as the gains
|
|
17
|
+
prior_samples: 100 # Optional - Number of prior samples to use when plotting the prior
|
|
18
|
+
#######################
|
|
19
|
+
# Inference parameters
|
|
20
|
+
#######################
|
|
21
|
+
inference:
|
|
22
|
+
opt: true # Optional - Whether to run the optimization to find optimal (MAP) parameters
|
|
23
|
+
fisher: false # Optional - Whether to run the Fisher covariance prediction at the optimal (MAP) location found
|
|
24
|
+
mcmc: false # Optional - Whether to run MCMC to sample the posterior distribution
|
|
25
|
+
##########################
|
|
26
|
+
# Optimization parameters
|
|
27
|
+
##########################
|
|
28
|
+
opt:
|
|
29
|
+
epsilon: 1e-2 # Optional - Step size in the optimization run
|
|
30
|
+
max_iter: 500 # Optional - Maximum number of iterations to run the optimization for
|
|
31
|
+
guide: map # Optional - The type of optimization to run. Currently only 'map' is possible
|
|
32
|
+
dual_run: true # Optional - Whether to continue optimzation for a second run using a step size 10x smaller
|
|
33
|
+
################################################
|
|
34
|
+
# Fisher-based covariance prediction parameters
|
|
35
|
+
################################################
|
|
36
|
+
fisher:
|
|
37
|
+
max_cg_iter: 10000 # Optional - Maximum number of conjugate gradient steps to use when when estimating the Fisher-based covariance estimate
|
|
38
|
+
n_samples: 1 # Optional - Number of samples to use for the Fisher-based covariance estimate
|
|
39
|
+
###################################################
|
|
40
|
+
# Astronomical prior and initialization parameters
|
|
41
|
+
####################################################
|
|
42
|
+
ast:
|
|
43
|
+
init: est # Optional - The initialization method for the astronomical visibility parameters. Options are 'est', 'prior', 'truth', 'truth_mean'
|
|
44
|
+
mean: 0 # Optional - Mean of the prior distribution for the astronomical visibility parameters. Options are 0, 'est', 'prior', 'truth', 'truth_mean'
|
|
45
|
+
pow_spec:
|
|
46
|
+
P0: null # Optional - Power spectrum value at k=0 for the astronomical visibility parameters prior standard deviation
|
|
47
|
+
gamma: 1.0 # Optional - Exponential of the power law section of the power spectrum for astronomical visibility parameters
|
|
48
|
+
k0: 1e-3 # Optional - Position of the knee of the power spectrum
|
|
49
|
+
##########################################
|
|
50
|
+
# RFI prior and initialization parameters
|
|
51
|
+
##########################################
|
|
52
|
+
rfi:
|
|
53
|
+
init: est # Optional - The initialization method for the RFI signal parameters. Options are 'est', 'prior', 'truth'
|
|
54
|
+
mean: 0 # Optional - Mean of the prior distribution for the astronomical visibility parameters. Options are 0, 'est', 'truth'
|
|
55
|
+
corr_time: 24 # Optional - Correlation time of the RFI signal in seconds
|
|
56
|
+
var: null # Optional - Variance of the RFI signal in Jy. When null an estimate is made based on the data
|
|
57
|
+
n_int_factor: 1 # Optional - Factor to increase the number of integration samples over the predicted value
|
|
58
|
+
n_int_samples: null # Optional - Specify the number of integration samples to use
|
|
59
|
+
############################
|
|
60
|
+
# Satellite path parameters
|
|
61
|
+
############################
|
|
62
|
+
satellites:
|
|
63
|
+
norad_ids_path: null # Optional - Path to text file containing NORAD IDs of astellits to include. File should have one NORAD ID per line
|
|
64
|
+
norad_ids: [] # Optional - NORAD IDs of satellites to include
|
|
65
|
+
spacetrack_path: null # Required if any TLE satellites are included - Path to the Space-Track login config file
|
|
66
|
+
tle_dir: null # Optional - Path of the directory where TLEs will be saved for future runs
|
|
67
|
+
tle_offset: 0 # Optional - Time offset (in days) for the TLE that is used in tabascal. Specifically for testing
|
|
68
|
+
sat_ids: [] # Optional - Satellite IDs of satellites with circular trajectories to include
|
|
69
|
+
ole_path: null # Optional - Path to the csv '.ole' file containing circular trajectory-based satellite orbit parameters
|
|
70
|
+
###########################################
|
|
71
|
+
# Gain prior and initialization parameters
|
|
72
|
+
###########################################
|
|
73
|
+
gains:
|
|
74
|
+
init: prior # Optional - The initialization method for the gain parameters. Options are 'prior', 'truth'
|
|
75
|
+
amp_mean: 1.0 # Optional - Mean of the prior distribution over the gain amplitudes. Options are 'truth' or a value like 1.0
|
|
76
|
+
phase_mean: 0.0 # Optional - Mean of the prior distribution over the gain phases, in radiands. Options are 'truth' or a value like 0.0
|
|
77
|
+
amp_std: 1.0 # Optional - Standard deviation of the prior distribution over the gain amplitudes as a percentage
|
|
78
|
+
phase_std: 1.0 # Optional - Standard deviation of the prior distribution over the gain phases in degrees
|
|
79
|
+
corr_time: 180 # Optional - Correlation time of the gains in minutes
|
|
80
|
+
# ###################
|
|
81
|
+
# # Model parameters
|
|
82
|
+
# ###################
|
|
83
|
+
# model:
|
|
84
|
+
# func: fixed_orbit_rfi_full_fft_standard_model
|
|
85
|
+
# name: fixed_orbit_rfi
|
|
86
|
+
|
tabsim/jax/__init__.py
ADDED
|
File without changes
|