ngect.engine module
Performance
- class ngect.engine.ArrayPerformance(ac_rev: str | None = None)
Bases:
objectCompute array performance metrics for ngVLA.
This class loads array configuration and receiver specifications and provides helpers to map requested observing setups to supported receiver bands and to compute sensitivity/observing time metrics.
Attributes
- subarraylist[str]
Available subarray names loaded from configuration.
- receiverlist[str]
Available receiver band names loaded from receiver data.
- _ac_dtdict
Subarray configuration dataset for the selected revision.
- _rx_dtdict
Receiver configuration dataset (latest by default).
- _co_dtdict
Correlator-related constants used in calculations (e.g.,
eta_c,eta_Q).
- ect(input)
Compute exposure time/sensitivity metrics for a given setup.
Parameters
- inputdict
Input parameters containing at least the following keys: -
freq(astropy.units.Quantity): requested observing frequency. -theta(astropy.units.Quantity): target angular resolution. -subarray(str): subarray name. -specmode(str): “cont” or “line”. -chanwidth(astropy.units.Quantity): channel width (velocity or frequency). -npol(int): number of polarizations. -tos(astropy.units.Quantity): on-source integration time. -elevation(astropy.units.Quantity): elevation angle. -ectmode(str): calculator mode (e.g., “tos2rms”). -pwv(str): precipitable water vapor setting.
Returns
- dict
Mapping with computed quantities such as:
freq,rx_name,fov,max_bw,t_sys,chanwidth_freq,chanwidth_velo,tos,sigma_fl,sigma_tb,num_ant,theta,eta_A,total_eff_A, and auxiliary efficiency factors.
Raises
- ValueError
If the requested frequency is unsupported by any receiver band.
Notes
This method performs both instrument configuration lookups and several numerical interpolations (e.g., cubic splines) over band-dependent system temperature and aperture efficiency curves. The implementation is adapted from the reference ngVLA sensitivity calculator.
- freq_to_receiver(freq)
Return receiver bands that support a requested frequency.
Parameters
- freqastropy.units.Quantity
Requested sky frequency (e.g.,
10 * u.GHz). May also be a plain float interpreted as GHz, but a Quantity is recommended.
Returns
- list[str]
List of receiver band names whose frequency coverage includes the requested value. Multiple bands may include a given frequency where they touch/overlap.
Raises
- ValueError
If the requested frequency is outside the range supported by all receivers.
- get_receiver(rx)
Get receiver properties.
Notes
This method is a placeholder and may be implemented in a future revision to return a structured view of receiver parameters.
- nearest_supported_frequency(freq: Quantity) dict
Find the nearest supported receiver band edge to a requested frequency.
Parameters
- freqastropy.units.Quantity
Requested sky frequency. Must be a quantity with frequency units (e.g.,
10 * u.GHz).
Returns
- dict
A mapping with the following keys:
unit: always"GHz".band: receiver band name (e.g.,"BAND_1").freq: nearest band-edge frequency as a float in GHz.range: a mapping with keyslowandhighgiving the band limits in GHz.
Notes
The search considers both low and high edges of every band and returns the one closest to the requested frequency.
Examples
>>> from ngect.engine import ArrayPerformance >>> from astropy import units as u >>> ap = ArrayPerformance() >>> ap.nearest_supported_frequency(0.5 * u.GHz)["freq"] 1.2