hera_sim.simulate.Simulator¶
- class hera_sim.simulate.Simulator(*, data: str | UVData | None = None, defaults_config: str | dict | None = None, redundancy_tol: float = 1.0, **kwargs)[source]¶
Simulate visibilities and/or instrumental effects for an entire array.
- Parameters:
data –
pyuvdata.UVData
object to use for the simulation or path to a UVData-supported file.defaults_config – Path to defaults configuraiton, seasonal keyword, or configuration dictionary for setting default simulation parameters. See tutorial on setting defaults for further information.
redundancy_tol – Position tolerance for finding redundant groups, in meters. Default is 1 meter.
kwargs – Parameters to use for initializing UVData object if none is provided. If
data
is a file path, then these parameters are used when reading the file. Otherwise, the parameters are used in creating aUVData
object usingempty_uvdata()
.
- Variables:
data (
pyuvdata.UVData
instance) – Object containing simulated visibilities and metadata.extras (dict) – Dictionary to use for storing extra parameters.
antpos (dict) – Dictionary pairing antenna numbers to ENU positions in meters.
lsts (np.ndarray of float) – Observed LSTs in radians.
freqs (np.ndarray of float) – Observed frequencies in GHz.
times (np.ndarray of float) – Observed times in JD.
red_grps (list of list of int) – Redundant baseline groups. Each entry is a list containing the baseline integer for each member of that redundant group.
red_vecs (list of
numpy.ndarray
of float) – Average of all the baselines for each redundant group.red_lengths (list of float) – Length of each redundant baseline.
Methods
add
(component, *[, add_vis, ret_vis, seed, ...])Simulate an effect then apply and/or return the result.
apply_defaults
(config[, refresh])Apply the provided default configuration.
calculate_filters
(*[, delay_filter_kwargs, ...])Pre-compute fringe-rate and delay filters for the entire array.
chunk_sim_and_save
(save_dir[, ref_files, ...])Chunk a simulation in time and write to disk.
get
(component[, key])Retrieve an effect that was previously simulated.
Generate a plot of the array layout in ENU coordinates.
refresh
()Refresh the object.
run_sim
([sim_file])Run an entire simulation.
write
(filename[, save_format])Write the
data
to disk using apyuvdata
-supported filetype.Deprecated Methods
add_eor
(model, **kwargs)Add an EoR-like model to the visibilities.
add_foregrounds
(model, **kwargs)Add foregrounds to the visibilities.
add_gains
(**kwargs)Apply bandpass gains to the visibilities.
add_noise
(model, **kwargs)Add thermal noise to the visibilities.
add_rfi
(model, **kwargs)Add RFI to the visibilities.
add_sigchain_reflections
([ants])Apply reflections to the visibilities.
add_xtalk
([model, bls])Add crosstalk to the visibilities.
Attributes
Mapping between antenna numbers and ENU positions in meters.
Channel width, assuming each channel is the same width.
Array storing the visibilities.
Frequencies in GHz.
Integration time, assuming it's identical across baselines.
Observed Local Sidereal Times in radians.
Array of polarization strings.
Simulation times in JD.