The External Calibrator for Hydrogen Arrays (ECHO) is a system for calibrating wide-field radio frequency arrays using a radio transmitter mounted on a drone. Primarily targeting (but not exclusively limited to) arrays operating in the sub-GHz band targeting highly redshifted 21cm radiation from the early universe.
This repository contains software for planning missions and analyzing data. It also contains hardware designs for drones and mounts.
This is an open source project. Use and reuse is encouraged. If you use this code or hardware designs please reference the github repo. http://github.com/dannyjacobs/ECHO and cite our 2017 paper. If you have improvements please fork and send a PR!
- We have an active "Slack Connect" channel, accessible to anyone with a Slack account. To be invited, email Danny Jacobs
- Project Web page
- Code Documentation
- A mailing list exists
Install prerequisites. We recommend the anaconda package manager
- healpy (note that as of Jan 2020 healpy is not available for Windows)
- matplotlib
- numpy
- scipy
Get this repo
git clone https://github.com/dannyjacobs/ECHO.git
Install using pip
cd ECHO
pip install .
The code is organized into a few modules. The beam mapping pipeline steps are
- Read and down-select drone telemetry
- Read and down-select radio telescope data (varies per telescope, usually spectra vs time)
- Match up drone positions and telescope measurements. (Sometimes referred to as zippering.)
- Grid beam (including power map, sample counts and standard deviation)
- Analyze results. Example analysis steps include:
- subtract transmitter model
- plot beam maps
- plot slices
- plot drone events and dynamics
- difference beams
Functions for plotting, but also all functions relating to healpix gridding and manipulation including gridding.
grid_to_healpix
: grids aligned RF power vs XYZ position into a healpix mapmake_beam
: downselects desired spectral channel, converts from latlon to XYZ and callsgrid_to_healpix
project_healpix
: flattens from spherical healpix map to 2d gnomic projectionrotate_hpm
: rotates a healpix map about the polar axis. useful for plotting- Other functions, most of whom are deprecated.
Functions for reading and writing drone and beam data. Drone log file formats are not well documented and change all the time.
read_map
: replacement for healpy read function that respects nanswrite_map
: replacement for healpy write function that respect nansapm_version
: tries to determine the version of ardupilot that wrote a log file.read_apm_log_A_B_C
: reads an ardupilot log of version A_B_C- returns position_times, positions,
- attitude_times, attitudes,
- waypoint_times, waypoint_numbers
read_echo_spectrum
: reads a spectrum data file output by the ECHO spectrum logger ca 2017 (signalhound + get_sh_spectra)read_orbcomm_spectrum
: reads a spectrum data file output by the Bradley orbcomm system (ca 2017)channel_select
: given a spectrum, list of frequencies, and desired frequency returns closest frequency and spectrum amplitudeinterp_rx
: interpolates received power onto the measured position time gridflag_angles
: flags outlier yaws input times,yaw_angles return matching flag arrayflag_waypoints
: flags a range of time around a list of waypointsapply_flagtimes
: Given a list of bad times, a buffer size and a time array, generate a flag table.
latlon2xy
: about what you thinkto_spherical
: xyz to spherical
Most of these are of dubious necessity.
unix_to_gps
: thin wrapper around astropy.Timegps_to_HMS
: convert GPS time to Hours Minutes Seconds, thin wrapper around
Stuff developed to support real-time operations. This never worked very well with mavlink.
Scripts used in the 2017 paper are all run in one master shell script
- plot_yaw.py
- plot_GB_pos_power_interp.py
- ECHO_zipper.py
- ECHO_mk_beam.py
- plot_ECHO_GB_power_rms_counts.py
- plot_ECHO_GB_maps.py
- plot_GB_slices.py
- ECHO_sub_tx_beam.py
- plot_ECHO_GB_ratios.py
- plot_GB_avg_slices.py
- plot_MWAtile_slices.py
- MWATilemodel2hpm.py
- combine_MWAtile_maps.py
- valon_readwrite.py : program the valon transmitter
- gen_spherical_flight_path.py : generate waypoints in a healpix pattern
- CST_to_healpix.py : convert the beam file from CST Microwave studio to a healpix map. Note that this should eventually be replaced with pyuvbeam.