Changelog¶
dev¶
Added¶
Classes subclassed from
SimulationComponentnow have ais_randomizedclass attribute that informs theSimulatorof whether it should provide aBitGeneratorto the class when simulating the component. - Classes which use a random component should now have arngattribute,which should be treated in the same manner as other model parameters. In other words, random states are now effectively treated as model parameters.
New simulator class
FFTVisthat uses thefftvispackage to simulate visibilities. This is a CPU-based visibility simulator that is faster thanMatVisfor large, compact arrays.
Changed¶
All random number generation now uses the new
numpyAPI. - Rather than seed the global random state, a newBitGeneratoris madewith whatever random seed is desired.
The Simulator API has remained virtually unchanged, but the internal logic that handles random state management has received a significant update.
Deprecated¶
Support for Python 3.9 has been dropped.
Fixed¶
API calls for pyuvdata v2.4.0.
v4.1.0 [2023.06.26]¶
This release heavily focuses on performance of the visibility simulators, and in
particular the VisCPU simulator.
Fixed¶
Passing
spline_interp_optsnow correctly pipes these options through to the visibility simulators.
Added¶
New
_blt_order_kwsclass-attribute forVisibilitySimulatorsubclasses, that can be used to create the mock metadata in an order corresponding to that required by the simulator (instead of re-ordering after data creation, which can take some time).New optional
compress_data_model()method onVisibilitySimulatorsubclasses that allows unnecessary metadata in theUVDataobject to be dropped before simulation (can be restored afterwards with the associatedrestore_data_model()). This can reduce peak memory usage.New
check_antenna_conjugationparameter for theVisCPUsimulator, to allow turning off checks for antenna conjugation, which takes time and is unnecessary for mock datasets.Dependency on
hera-cli-utilswhich adds options like--log-leveland--profiletohera-sim-vis.py.Option to use a taper in generating a bandpass.
utils.tanh_windowfunction for generating a two-sided tanh window.interpolators.Reflectionclass for building a complex reflection coefficient interpolator from anpzarchive.Reflection coefficient and beam integral
npzarchives for the phase 1 and phase 4 systems (i.e., dipole feed and Vivaldi feed).
Changed¶
run_check_acceptabilityis nowFalseby default when constructing simulations from obsparams configuration files, to improve performance.For
VisCPUsimulator, we no longer copy the whole data array when simulating, but instead just fill the existing one, to save on peak RAM.Made
VisCPU._reorder_vis()much faster (like 99% time reduction).The
--compressoption tohera-sim-vis.pyis no longer a boolean flag but takes a file argument. This file will be written as a cache of the baseline-time indices required to keep when compressing by redundancy.
v4.0.0 [2023.05.22]¶
Breaking Changes¶
Removed the
HealViswrapper. Usepyuvsiminstead.
Changed¶
Updated package to always use future array shapes for
pyuvdataobjects (this includes updates toPolyBeamandSimulatorobjects amongst others).
v3.1.1 [2023.02.23]¶
Changed¶
Coupling matrix calculation in
MutualCouplinghas been updated to correctly calculate the coupling coefficients from the provided E-field beam.
v3.1.0 [2023.01.17]¶
Added¶
MutualCouplingclass that simulates the systematic described in Josaitis et al. 2021.- New class attributes for the
SimulationComponentclass: return_typespecifies what type of return value to expect;attrs_to_pullspecifies whichSimulatorattributes to use.
- New class attributes for the
Some helper functions for
MutualCouplingmatrix multiplications.More attributes from the underlying
UVDataobject exposed to theSimulator.
Changed¶
Simulator._update_argslogic has been improved.Simulatorattributeslsts,times, andfreqsare no longer cached.
v3.0.0¶
Removed¶
Finally removed ability to set
use_pixel_beamsandbm_pixon the VisCPU simulator. This was removed in v1.0.0 ofvis_cpu.Official support for py37.
Internals¶
Added isort and pyupgrade pre-commit hooks for cleaner code.
v2.3.4 [2022.06.08]¶
Added¶
NotImplementedErrorraised when trying to simulate noise using an interpolated sky temperature and phase-wrapped LSTs.More comparison tests of pyuvsim wrapper.
Fixed¶
Inferred integration time in
ThermalNoisewhen phase-wrapped LSTs are used.Added
**kwargstoPolyBeam.interpmethod to match UVBeam.healvis wrapper properly sets cross-pol visibilities to zero.
Changed¶
Temporarily forced all UVData objects in the code to use current array shapes.
v2.3.3 [2022.02.21]¶
Added¶
adjustment.interpolate_to_referencenow supports interpolating in time when there is a phase wrap in LST.
Changed¶
Some logical statements in
adjustment.interpolate_to_referencewere changed to use binary operators on logical arrays instead of e.g.np.logical_or.
v2.3.2 [2022.02.18]¶
Added¶
_extract_kwargsattribute added to theSimulationComponentclass. This attribute is used by theSimulatorto determine which optional parameters should actually be extracted from the data.antpairoptional parameter added to theThermalNoiseclass. This is used to determine whether to simulate noise via the radiometer equation (as is appropriate for a cross-correlation) or to just add a bias from the receiver temperature (which is our proxy for what should happen to an auto-correlation).
Fixed¶
The
Simulatorclass now correctly uses the auto-correlations to simulate noise for the cross-correlations.
v2.3.1 [2022.01.19]¶
Fixed¶
Using the
normalize_beamsoption is now possible with thefrom_configclass method.
v2.3.0 [2022.01.19]¶
Added¶
normalize_beamsoption inModelDataclass. Setting this parameter toTrueenforces peak-normalization on all of the beams used in the simulation. The default behavior is to not peak-normalize the beams.
v2.2.1 [2022.01.14]¶
Added¶
OverAirCrossCouplingnow has a parameteramp_norm. This lets the user decide at what distance from the receiverator the gain of the emitted signal is equal to the base amplitude.
Fixed¶
OverAirCrossCouplingnow only simulates the systematic for cross-correlations.ReflectionSpectrumclass had itsis_multiplicativeattribute set to True.
v2.2.0 [2022.01.13]¶
Added¶
New
ReflectionSpectrumclass to generate multiple reflections over a specified range of delays/amplitudes.
Fixed¶
Corrected some parameter initializations in
sigchainmodule.
v2.1.0 [2022.01.12]¶
Added¶
New
OverAirCrossCouplingclass to better model crosstalk in H1C data.
Changed¶
Slightly modified
Simulatorlogic for automatically choosing parameter values. This extends the number of cases the class can handle, but will be changed in a future update.
v2.0.0 [2021.11.16]¶
Added¶
New VisibilitySimulator interface. See the `<https://hera-sim.readthedocs.io/en/latest/tutorials/visibility_simulator.html> Visibility Simulator Tutorial`_ for details. This is a breaking change for usage of the visibility simulators, and includes more robust handling of polarization, fixed ordering of data when put back into the
UVDataobjects, more native support for usingpyradioskyto define the sky model, and improved support forvis_cpu.Interface directly to the
pyuvsimsimulation engine.Ability to load tutorial data from the installed package.
New and refactored tests for visibility simulations.
Fixed¶
default
feed_arrayforPolyBeamfixed.
Changed¶
Updated tutorial for the visibility simulator interface (see above link).
vis_cpumade an optional extraremoved the
conversionsmodule, which is now in thevis_cpupackage.Can now properly use
pyuvdata>=2.2.0.
v1.1.1 [2021.08.21]¶
Added¶
Add a Zernike polynomial beam model.
v1.1.0 [2021.08.04]¶
Added¶
Enable polarization support for
vis_cpu(handles polarized primary beams, but only Stokes I sky model so far)Add a polarized version of the analytic PolyBeam model.
v1.0.2 [2021.07.01]¶
Fixed¶
Bug in retrieval of unique LSTs by
Simulatorwhen a blt-order other than time-baseline is used has been fixed. LSTs should now be correctly retrieved.empty_uvdata()now sets thephase_typeattribute to “drift”.
v1.0.1 [2021.06.30]¶
Added¶
Fixed¶
Discrepancy in
PointSourceForegrounddocumentation and actual implementation has been resolved. Simulated foregrounds now look reasonable.
Changed¶
The time parameters used for generating an example
Simulatorinstance in the tutorial have been updated to match their description.Simulatortutorial has been changed slightly to account for the foreground fix.
v1.0.0 [2021.06.16]¶
Added¶
adjustmentmodule from HERA Phase 1 Validation workadjust_to_reference()High-level interface for making one set of data comply with another set of data. This may involve rephasing or interpolating in time and/or interpolating in frequency. In the case of a mismatch between the two array layouts, this algorithm will select a subset of antennas to provide the greatest number of unique baselines that remain in the downselected array.
All other functions in this module exist only to modularize the above function.
cli_utilsmodule providing utility functions for the CLI simulation script.componentsmodule providing an abstract base class for simulation components.Any new simulation components should be subclassed from the
SimulationComponentABC. New simulation components subclassed appropriately are automatically discoverable by theSimulatorclass. A MWE for subclassing new components is as follows:@component class Component: pass class Model(Component): ...
The
Componentbase class tracks any models subclassed from it and makes it discoverable to theSimulator.
New “season” configuration (called
"debug"), intended to be used for debugging theSimulatorwhen making changes that might not be easily tested.chunk_sim_and_save()function from HERA Phase 1 Validation workThis function allows the user to write a
pyuvdata.UVDataobject to disk in chunks of some set number of integrations per file (either specified directly, or specified implicitly by providing a list of reference files). This is very useful for taking a large simulation and writing it to disk in a way that mimics how the correlator writes files to disk.
Ability to generate noise visibilities based on autocorrelations from the data. This is achieved by providing a value for the
autovisparameter in thethermal_noisefunction (seeThermalNoise).The
vary_gains_in_time()provides an interface for taking a gain spectrum and applying time variation (linear, sinusoidal, or noiselike) to any of the reflection coefficient parameters (amplitude, phase, or delay).The
CrossCouplingSpectrumprovides an interface for generating multiple realizations of the cross-coupling systematic spaced logarithmically in amplitude and linearly in delay. This is ported over from the Validation work.
Fixed¶
The reionization signal produced by
eor.noiselike_eoris now guaranteed to be real-valued for autocorrelations (although the statistics of the EoR signal for the autocorrelations still need to be investigated for correctness).
Changed¶
- API BREAKING CHANGES
All functions that take frequencies and LSTs as arguments have had their signatures changed to
func(lsts, freqs, *args, **kwargs).Functions that employ
rough_fringe_filter()orrough_delay_filter()as part of the visibility calculation now have parametersdelay_filter_kwargsand/orfringe_filter_kwargs, which are dictionaries that are ultimately passed to the filtering functions.foregrounds.diffuse_foregroundandeor.noiselike_eorare both affected by this.Some parameters have been renamed to enable simpler handling of package-wide defaults. Parameters that have been changed are:
filter_type->delay_filter_typeingen_delay_filter()filter_type->fringe_filter_typeingen_fringe_filter()chance->impulse_chanceinrfi_impulse(seeImpulse)strength->impulse_strengthinrfi_impulse(seeImpulse)Similar changes were made in
rfi_dtv(DTV) andrfi_scatter(Scatter).
Any occurrence of the parameter
fqshas been replaced withfreqs.The
noise.jy2Tfunction was moved toutilsand renamed. Seejansky_to_kelvin().The parameter
fq0has been renamed tof0inRfiStation.sigchain.HERA_NRAO_BANDPASSno longer exists in the code, but may be loaded from the fileHERA_H1C_BANDPASS.npyin thedatadirectory.
- Other Changes
The
Simulatorhas undergone many changes that make the class much easier to use, while also providing a handful of extra features. The newSimulatorprovides the following features:A universal
add()method for applying any of the effects implemented inhera_sim, as well as any custom effects defined by the user.A
get()method that retrieves any previously simulated effect.The option to apply a simulated effect to only a subset of antennas, baselines, and/or polarizations, accessed through using the
vis_filterparameter.Multiple modes of seeding the random state to achieve a higher degree of realism than previously available.
The
calculate_filters()method pre-calculates the fringe-rate and delay filters for the entire array and caches the result. This provides a marginal-to-modest speedup for small arrays, but can provide a significant speedup for very large arrays. Benchmarking results TBD.An instance of the
Simulatormay be generated with an empty call to the class if any of the season defaults are active (or if the user has provided some other sufficiently complete set of default settings).Some of the methods for interacting with the underlying
pyuvdata.UVDataobject have been exposed to theSimulator(e.g.get_data).An easy reference to the
chunk_sim_and_save()function.
foregrounds,eor,noise,rfi,antpos, andsigchainhave been modified to implement the features using callable classes. The old functions still exist for backwards-compatibility, but moving forward any additions to visibility or systematics simulators should be implemented using callable classes and be appropriately subclassed fromSimulationComponent.empty_uvdata()has had almost all of its parameter values set to default asNone. Additionally, then_freq,n_times,antennasparameters are being deprecated and will be removed in a future release.white_noise()is being deprecated. This function has been moved to the utility module and can be found atgen_white_noise().
v0.4.0 [2021.05.01]¶
Added¶
- New features added to
vis_cpu - Analytic beam interpolation
Instead of gridding the beam and interpolating the grid using splines, the beam can be interpolated directly by calling its
interpmethod.The user specifies this by passing
use_pixel_beams=Falsetovis_cpu.
- A simple MPI parallelization scheme
Simulation scripts may be run using
mpirun/mpiexecThe user imports
mpi4pyinto their script and passesmpi_comm=MPI.COMM_WORLDto vis_cpu
- New
PolyBeamandPerturbedPolyBeamanalytic beams (classes) Derived from
pyuvsim.Analytic beamBased on axisymmetric Chebyshev polynomial fits to the Fagnoni beam.
PerturbedPolyBeam is capable of expressing a range of non-redundancy effects, including per-beam stretch factors, perturbed sidelobes, and ellipticity/rotation.
- New
- New features added to
v0.3.0 [2019.12.10]¶
Added¶
- New sub-package
simulators VisibilitySimulatorsclassProvides a common interface to interferometric visibility simulators. Users instantiate one of its subclasses and provide input antenna and sky scenarios.
HealVissubclassProvides an interface to the
healvisvisibility simulator.
VisCPUsubclassProvides an interface to the
viscpuvisibility simulator.
conversionsmoduleNot intended to be interfaced with by the end user; it provides useful coordinate transformations for
VisibilitySimulators.
- New sub-package
v0.2.0 [2019.11.20]¶
Added¶
- Command-line Interface
Use anywhere with
hera_sim run [options] INPUTTutorial available on readthedocs
- Enhancement of
run_simmethod ofSimulatorclass - Allows for each simulation component to be returned
Components returned as a list of 2-tuples
(model_name, visibility)Components returned by specifying
ret_vis=Truein their kwargs
- Enhancement of
- Option to seed random number generators for various methods
Available via the
Simulator.add_methods by specifying the kwargseed_redundantly=TrueSeeds are stored in
Simulatorobject, and may be saved as anpyfile when using theSimulator.write_datamethod
- New YAML tag
!antpos Allows for antenna layouts to be constructed using
hera_sim.antposfunctions by specifying parameters in config file
- New YAML tag
Fixed¶
Changelog formatting for v0.1.0 entry
Changed¶
- Implementation of
defaultsmodule Allows for semantic organization of config files
- Parameters that have the same name take on the same value
e.g.
stdin variousrfifunctions only has one value, even if it’s specified multiple times
- Implementation of
v0.1.0 [2019.08.28]¶
Added¶
- New module
interpolators - Classes intended to be interfaced with by end-users:
TskyProvides an interface for generating a sky temperature interpolation object when provided with a
.npzfile and interpolation kwargs.
Beam,BandpassProvides an interface for generating either a
poly1dorinterp1dinterpolation object when provided with an appropriate datafile.
- New module
- New module
defaults Provides an interface which allows the user to dynamically adjust default parameter settings for various
hera_simfunctions.
- New module
- New module
__yaml_constructors Not intended to be interfaced with by the end user; this module just provides a location for defining new YAML tags to be used in conjunction with the
defaultsmodule features and theSimulator.run_simmethod.
- New module
- New directory
config Provides a location to store configuration files.
- New directory
Fixed¶
Changed¶
HERA-specific variables had their definitions removed from the codebase. Objects storing these variables still exist in the codebase, but their definitions now come from loading in data stored in various new files added to the
datadirectory.
v0.0.1¶
Initial released version