Reference¶
This reference page details the functions included in Virgo, describing their roles and what they do.
simulate¶
-
simulate
(l, b, beamwidth=0.6, v_min=-400, v_max=400, plot_file='') Simulate 21 cm profiles based on the LAB HI Survey.
Parameters: - l (float) – Target galactic longitude [deg]
- b (float) – Target galactic latitude [deg]
- beamwidth (float) – Telescope half-power beamwidth (approx. equal to 0.7 * lambda/D) [deg]
- v_min (float) – Minimum radial velocity (xlim) [km/s]
- v_max (float) – Maximum radial velocity (xlim) [km/s]
predict¶
-
predict
(lat, lon, height=0, source='', date='', plot_sun=True, plot_file='') Plots source Alt/Az given the observer’s Earth coordinates.
Parameters: - lat (float) – Observer latitude [deg]
- lon (float) – Obesrver longitude [deg]
- height (float) – Observer elevation [m]
- source (string) – Date in YYYY-MM-DD format. If no date is given, it defaults to today’s system date.
- plot_sun (bool) – Also plot Sun position for reference
- plot_file (string) – Output plot filename
equatorial¶
-
equatorial
(alt, az, lat, lon, height=0) Takes observer’s location and Alt/Az as input and returns RA/Dec as a tuple.
Parameters: - alt (float) – Altitude [deg]
- az (float) – Azimuth [deg]
- lat (float) – Observer latitude [deg]
- lon (float) – Observer longitude [deg]
- height (float) – Observer elevation [m]
galactic¶
-
galactic
(ra, dec) Converts RA/Dec. to galactic coordinates, returning galactic longitude and latitude (tuple).
Parameters: - ra (float) – Right ascension [deg]
- dec (float) – Declination [deg]
frequency¶
-
frequency
(wavelength) Transform wavelength to frequency.
Parameters: wavelength (float) – Wavelength [m]
wavelength¶
-
wavelength
(frequency) Transform frequency to wavelength.
Parameters: frequency (float) – Wave frequency [Hz]
gain¶
-
gain
(D, f, e=0.7, u='dBi') Estimate parabolic antenna gain.
Parameters: - D (float) – Antenna diameter [m]
- f (float) – Frequency [Hz]
- e (float) – Aperture efficiency (0 >= e >= 1)
- u (string) – Output gain unit (‘dBi’, ‘linear’ or ‘K/Jy’)
A_e¶
-
A_e
(gain, f)¶ Transform antenna gain to effective aperture [m^2].
Parameters: - gain (float) – Antenna gain [dBi]
- f (float) – Frequency [Hz]
beamwidth¶
-
beamwidth
(D, f) Estimate parabolic antenna half-power beamwidth (FWHM).
Parameters: - D (float) – Antenna diameter [m]
- f (float) – Frequency [Hz]
NF¶
-
NF
(T_noise, T_ref=290)¶ Convert noise temperature to noise figure [dB].
Parameters: - T_noise (float) – Noise temperature [K]
- T_ref (float) – Reference temperature [K]
T_noise¶
-
T_noise
(NF, T_ref=290)¶ Convert noise figure to noise temperature [K].
Parameters: - NF (float) – Noise figure [dB]
- T_ref (float) – Reference temperature [K]
G_T¶
-
G_T
(gain, T_sys)¶ Compute antenna gain-to-noise-temperature (G/T).
Parameters: - gain (float) – Antenna gain [dBi]
- T_sys (float) – System noise temperature [K]
SEFD¶
-
SEFD
(A_e, T_sys)¶ Compute system equivalent flux density [Jy].
Parameters: - A_e (float) – Effective antenna aperture [m^2]
- T_sys (float) – System noise temperature [K]
snr¶
-
snr
(S, sefd, t, bw) Estimate the obtained signal-to-noise ratio of an observation (radiometer equation).
Parameters: - S (float) – Source flux density [Jy]
- sefd (float) – Instrument’s system equivalent flux density [Jy]
- t (float) – Total on-source integration time [sec]
- bw (float) – Acquisition bandwidth [Hz]
map_hi¶
-
map_hi
(ra=None, dec=None, plot_file='')¶ Plots the all-sky 21 cm map (LAB HI survey). Setting RA/Dec (optional args) will add a red dot indicating where the telescope is pointing to.
Parameters: - ra (float) – Right ascension [deg]
- dec (float) – Declination [deg]
- plot_file (string) – Output plot filename
observe¶
-
observe
(obs_parameters, spectrometer='wola', obs_file='observation.dat', start_in=0) Begin data acquisition (requires SDR connected to the machine).
Parameters: - obs_parameters (dict) – Observation parameters
- spectrometer (string) – Spectrometer flowchart/pipeline (‘WOLA’/’FTF’)
- obs_file (string) – Output data filename
- start_in (float) – Schedule observation start [sec]
Arguments for obs_parameters
:
-
obs_parameters
¶ Parameters: - dev_args (string) – Device arguments (gr-osmosdr)
- rf_gain (float) – RF gain
- if_gain (float) – IF gain
- bb_gain (float) – Baseband gain
- frequency (float) – Center frequency [Hz]
- bandwidth (float) – Instantaneous bandwidth [Hz]
- channels (int) – Number of frequency channels (FFT size)
- t_sample (float) – Integration time per FFT sample
- duration (float) – Total observing duration [sec]
plot¶
-
plot
(obs_parameters='', n=0, m=0, f_rest=0, slope_correction=False, dB=False, rfi=[0,0], xlim=[0,0], ylim=[0,0], dm=0, obs_file='observation.dat', cal_file='', waterfall_fits='', spectra_csv='', power_csv='', plot_file='plot.png') Process, analyze and plot data.
Parameters: - obs_parameters (dict) – Observation parameters
- n (int) – Median filter factor (spectrum)
- m (int) – Median filter factor (time series)
- f_rest (float) – Spectral line reference frequency used for radial velocity (Doppler shift) calculations [Hz]
- slope_correction (bool) – Correct slope in poorly-calibrated spectra using linear regression
- dB (bool) – Display data in decibel scaling
- rfi (list) – Blank frequency channels contaminated with RFI ([low_frequency, high_frequency]) [Hz]
- xlim (list) – x-axis limits ([low_frequency, high_frequency]) [Hz]
- ylim (list) – y-axis limits ([start_time, end_time]) [Hz]
- dm (float) – Dispersion measure for dedispersion [pc/cm^3]
- obs_file (string) – Input observation filename (generated with virgo.observe)
- cal_file (string) – Input calibration filename (generated with virgo.observe)
- waterfall_fits (string) – Output FITS filename
- spectra_csv (string) – Output CSV filename (spectra)
- power_csv (string) – Output CSV filename (time series)
- plot_file (string) – Output plot filename
Arguments for obs_parameters
:
-
obs_parameters
Parameters: - dev_args (string) – Device arguments (gr-osmosdr)
- rf_gain (float) – RF gain
- if_gain (float) – IF gain
- bb_gain (float) – Baseband gain
- frequency (float) – Center frequency [Hz]
- bandwidth (float) – Instantaneous bandwidth [Hz]
- channels (int) – Number of frequency channels (FFT size)
- t_sample (float) – Integration time per FFT sample
- duration (float) – Total observing duration [sec]
plot_rfi¶
-
plot_rfi
(rfi_parameters, data='rfi_data', dB=True, plot_file='plot.png')¶ Plots wideband RFI survey spectrum.
Parameters: - rfi_parameters (dict) – Identical to obs_parameters, but also including ‘f_lo’: f_lo
- data (string) – Survey data directory containing individual observations
- dB (bool) – Display data in decibel scaling
- plot_file (string) – Output plot filename
monitor_rfi¶
-
monitor_rfi
(f_lo, f_hi, obs_parameters, data='rfi_data')¶ Begin data acquisition (wideband RFI survey).
Parameters: - obs_parameters (dict) – Observation parameters (identical to parameters used to acquire data)
- f_lo (float) – Start frequency [Hz]
- f_hi (float) – End frequency [Hz]
- data (string) – Survey data directory to output individual observations to
Arguments for obs_parameters
:
-
obs_parameters
Parameters: - dev_args (string) – Device arguments (gr-osmosdr)
- rf_gain (float) – RF gain
- if_gain (float) – IF gain
- bb_gain (float) – Baseband gain
- frequency (float) – Center frequency [Hz]
- bandwidth (float) – Instantaneous bandwidth [Hz]
- channels (int) – Number of frequency channels (FFT size)
- t_sample (float) – Integration time per FFT sample
- duration (float) – Total observing duration [sec]