lib_SRT.virgo package

lib_SRT.virgo.run_ftf module

argument_parser()
main(top_block_cls=<class 'lib_SRT.virgo.run_ftf.run_observation'>, options=None)
class run_observation(*args: Any, **kwargs: Any)

Bases: top_block

get_bandwidth()
get_bb_gain()
get_channels()
get_custom_window()
get_dev_args()
get_duration()
get_frequency()
get_if_gain()
get_obs_file()
get_raw_file()
get_rf_gain()
get_sinc()
get_sinc_sample_locations()
get_t_sample()
set_bandwidth(bandwidth)
set_bb_gain(bb_gain)
set_channels(channels)
set_custom_window(custom_window)
set_dev_args(dev_args)
set_duration(duration)
set_frequency(frequency)
set_if_gain(if_gain)
set_obs_file(obs_file)
set_raw_file(raw_file)
set_rf_gain(rf_gain)
set_sinc(sinc)
set_sinc_sample_locations(sinc_sample_locations)
set_t_sample(t_sample)

lib_SRT.virgo.run_wola module

argument_parser()
main(top_block_cls=<class 'lib_SRT.virgo.run_wola.run_observation'>, options=None)
class run_observation(*args: Any, **kwargs: Any)

Bases: top_block

get_bandwidth()
get_bb_gain()
get_channels()
get_custom_window()
get_dev_args()
get_duration()
get_frequency()
get_if_gain()
get_obs_file()
get_raw_file()
get_rf_gain()
get_sinc()
get_sinc_sample_locations()
get_t_sample()
set_bandwidth(bandwidth)
set_bb_gain(bb_gain)
set_channels(channels)
set_custom_window(custom_window)
set_dev_args(dev_args)
set_duration(duration)
set_frequency(frequency)
set_if_gain(if_gain)
set_obs_file(obs_file)
set_raw_file(raw_file)
set_rf_gain(rf_gain)
set_sinc(sinc)
set_sinc_sample_locations(sinc_sample_locations)
set_t_sample(t_sample)

lib_SRT.virgo.virgo module

A_e(gain, f)

Transform antenna gain to effective aperture [m^2].

Args:

gain: float. Antenna gain [dBi] f: float. Frequency [Hz]

G_T(gain, T_sys)

Compute antenna gain-to-noise-temperature (G/T).

Args:

gain: float. Antenna gain [dBi] T_sys: float. System noise temperature [K]

NF(T_noise, T_ref=290)

Convert noise temperature to noise figure [dB].

Args:

T_noise: float. Noise temperature [K] T_ref: float. Reference temperature [K]

SEFD(A_e, T_sys)

Compute system equivalent flux density [Jy].

Args:

A_e: float. Effective antenna aperture [m^2] T_sys: float. System noise temperature [K]

T_noise(NF, T_ref=290)

Convert noise figure to noise temperature [K].

Args:

NF: float. Noise figure [dB] T_ref: float. Reference temperature [K]

beamwidth(D, f)

Estimate parabolic antenna half-power beamwidth (FWHM).

Args:

D: float. Antenna diameter [m] f: float. Frequency [Hz]

equatorial(alt, az, lat, lon, height=0)

Takes observer’s location and Alt/Az as input and returns RA/Dec as a tuple.

Args:

alt: float. Altitude [deg] az: float. Azimuth [deg] lat: float. Observer latitude [deg] lon: float. Observer longitude [deg] height: float. Observer elevation [m]

frequency(wavelength)

Transform wavelength to frequency.

Args:

wavelength: float. Wavelength [m]

gain(D, f, e=0.7, u='dBi')

Estimate parabolic antenna gain.

Args:

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’)

galactic(ra, dec)

Converts RA/Dec. to galactic coordinates, returning galactic longitude and latitude (tuple).

Args:

ra: float. Right ascension [hr] dec: float. Declination [deg]

main()
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.

Args:

ra: float. Right ascension [hr] dec: float. Declination [deg] plot_file: string. Output plot filename

monitor_rfi(f_lo, f_hi, obs_parameters, data='rfi_data')

Begin data acquisition (wideband RFI survey).

Args:

f_lo: float. Start frequency [Hz] f_hi: float. End frequency [Hz] obs_parameters: dict. Observation parameters (identical to parameters used to acquire data)

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] loc: string: latitude, longitude, and elevation of observation (float, separated by spaces) ra_dec: string: right ascension and declination of observation target (float, separated by space) az_alt: string: azimuth and altitude of observation target (float, separated by space; takes precedence over ra_dec)

data: string. Survey data directory to output individual observations to

observe(obs_parameters, spectrometer='wola', obs_file='observation.dat', start_in=0, raw_file='/dev/null')

Begin data acquisition (requires SDR connected to the machine).

Args:
obs_parameters: dict. Observation 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] loc: string: latitude, longitude, and elevation of observation (float, separated by spaces) ra_dec: string: right ascension and declination of observation target (float, separated by space) az_alt: string: azimuth and altitude of observation target (float, separated by space; takes precedence over ra_dec)

spectrometer: string. Spectrometer flowchart/pipeline (‘WOLA’/’FTF’) obs_file: string. Output data filename start_in: float. Schedule observation start [sec]

plot(obs_parameters='', n=0, m=0, f_rest=0, slope_correction=False, dB=False, vlsr=False, meta=False, avg_ylim=[0, 0], cal_ylim=[0, 0], rfi=[], xlim=[0, 0], ylim=[0, 0], dm=0, obs_file='observation.dat', cal_file='', waterfall_fits='', spectra_csv='', power_csv='', plot_file='plot.png', avplot_file='average.png', calplot_file='calibrated.png', waterplot_file='waterfall.png', powplot_file='powerDist.png')

Process, analyze and plot data.

Args:
obs_parameters: dict. Observation parameters (identical to parameters used to acquire data)

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] loc: string: latitude, longitude, and elevation of observation (float, separated by spaces) ra_dec: string: right ascension and declination of observation target (float, separated by space) az_alt: string: azimuth and altitude of observation target (float, separated by space; takes precedence over ra_dec)

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 vlsr: bool. Display graph in VLSR frame of reference meta: bool. Display header with date, time, and target rfi: list. Blank frequency channels contaminated with RFI ([low_frequency, high_frequency]) [Hz] avg_ylim: list. Averaged plot y-axis limits ([low, high]) cal_ylim: list. Calibrated plot y-axis limits ([low, high]) 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

plot_rfi(rfi_parameters, data='rfi_data', dB=True, plot_file='plot.png')

Plots wideband RFI survey spectrum.

Args:

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

predict(lat, lon, height=0, source='', date='', plot_sun=True, plot_file='')

Plots source Alt/Az given the observer’s Earth coordinates.

Args:

lat: float. Observer latitude [deg] lon: float. Obesrver longitude [deg] height: float. Observer elevation [m] source: string. Source name date: 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

simulate(l, b, beamwidth=0.6, v_min=-400, v_max=400, plot_file='')

Simulate 21 cm profiles based on the LAB HI Survey.

Args:

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] plot_file: string. Output plot filename

snr(S, sefd, t, bw)

Estimate the obtained signal-to-noise ratio of an observation (radiometer equation).

Args:

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]

wavelength(frequency)

Transform frequency to wavelength.

Args:

frequency: float. Wave frequency [Hz]

Module contents