EMBERS: Home ༶ Table of Contents ༶ API Reference
embers.tile_maps
is used to create tile maps by aggregating satellite data
It contains beam_utils
, ref_fee_healpix
, tile_maps
,
null_test
, compare_beams
A set of tools used to create and visualize tile maps
embers.tile_maps.beam_utils.
rotate_map
(nside, angle=None, healpix_array=None, savetag=None, flip=False)¶Rotates healpix array by the desired angle, and saves it.
Optionally flip the data, changes east-west into west-east because astronomy
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
healpix_cardinal_indices
(nside, za_max=90)¶Cardinal slices of healpix maps, upto an zenith angle threshold.
Healpix maps of nside=32 do not have pixels along their cardinal axes, but do have them along their diagonal axes. This function
determined the indices of diagonal slices of healpix maps, assuming the original map has been rotated by + 𝛑/4 using the
rotate_map()
function.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
healpix_cardinal_slices
(nside, hp_map, za_max)¶Slice healpix map along NS, EW axes, assuming it has been rotated by + 𝛑/4.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
nan_mad
(good_ref_map)¶Compute MAD of values in pixel of healpix map while ignoring nans.
Parameters: | good_ref_map – Reference healpix map, output from good_ref_maps() |
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
map_slices
(nside, good_map, za_max)¶Slice healpix map along NS & EW axes returning Median and MAD arrays of the cardinal slices.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
poly_fit
(x, y, data, order)¶Fit polynominal of any order to data
Parameters: |
|
---|
embers.tile_maps.beam_utils.
chisq_fit_gain
(data=None, model=None)¶Chisqaured fit the data and model.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
chisq_fit_test
(data=None, model=None, offset=20)¶chi-squared test for goodness of fit betweet model and data
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
plt_slice
(fig=None, sub=(None, None, None), zen_angle=None, map_slice=None, map_error=None, model_slice=None, delta_pow=None, pow_fit=None, slice_label=None, model_label=None, xlabel=False, ylabel=True, xlim=[-82, 82], ylim=[-26, 12], title=None)¶Plot a slice of measured beam map with errorbars fit the fee beam model. Subplot with residual power.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.beam_utils.
plot_healpix
(data_map=None, fig=None, sub=None, title=None, vmin=None, vmax=None, cmap=None, cbar=True)¶Yeesh do some healpix magic to plot the thing
Parameters: |
|
---|---|
Returns: |
|
Convert FEKO models on the reference antennas into usable healpix maps
embers.tile_maps.ref_fee_healpix.
create_model
(nside, file_name=None)¶Takes feko .ffe reference model, converts into healpix and smooths the response
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.ref_fee_healpix.
ref_healpix_save
(nside, out_dir)¶Save and plot reference healix maps
Parameters: |
|
---|---|
Returns: |
|
A set of tools to project satellite passes onto a healpix map according to their ephemeris.
embers.tile_maps.tile_maps.
check_pointing
(timestamp, obs_point_json)¶Check if timestamp is at MWA sweet-pointing 0, 2, 4, 41.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
plt_channel
(out_dir, times, ref, tile, ref_noise, tile_noise, chan_num, sat_id, pointing, timestamp)¶Plot power in a frequency channel of raw rf data, with various thresholds
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
plt_fee_fit
(times, mwa_fee_pass, mwa_pass_fit_raw, mwa_pass_fit, out_dir, point, timestamp, sat)¶Plot data and model with goodness of fit p-value to visualize the degree of fit
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
rf_apply_thresholds
(ali_file, chrono_file, sat_id, sat_chan, sat_thresh, noi_thresh, pow_thresh, point, plots, out_dir)¶Apply power, noise thresholds to rf data arrays.
For a particular NORAD sat ID, crop a pair of ref, tile data arrays to when the satellite is above the horizon as indicated by it’s ephemeris. Given the frequency channel in which the satellite transmits, extract the channel power and return a coherent data set with ephemeris and tile power in a tuple
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
rfe_calibration
(start_date, stop_date, tile_pair, sat_thresh, noi_thresh, pow_thresh, ref_model, fee_map, nside, obs_point_json, align_dir, chrono_dir, chan_map_dir, out_dir)¶Calibrate the gain variations of a RF Explorers at high powers.
For a given pair of reference and MWA tile rf data files, within a time interval, critically characterize the gain variations of the RF Explorers, at high power, where they enter a non-linear regime. This is done my comparing satellite passes with corresponding slices of the MWA FEE beam model, and determining the power deficit.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
rfe_collate_cali
(start_gain, stop_gain, rfe_cali_dir)¶Collate RF Explorer gain calibration data from all MWA tile pairs, and plot a gain solution.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
rfe_batch_cali
(start_date, stop_date, start_gain, stop_gain, sat_thresh, noi_thresh, pow_thresh, ref_model, fee_map, nside, obs_point_json, align_dir, chrono_dir, chan_map_dir, out_dir, max_cores=None)¶Batch gain calibrate all pairs of RF explorers and compute a global solution.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
project_tile_healpix
(start_date, stop_date, tile_pair, sat_thresh, noi_thresh, pow_thresh, ref_model, fee_map, rfe_cali, nside, obs_point_json, align_dir, chrono_dir, chan_map_dir, out_dir, plots, rfe_cali_bool)¶There be magic here. Project satellite RF data onto a sky healpix map.
For each satellite pass recorded by the MWA tiles and reference antennas, apply equation (1) from the beam paper to remove
satellite beam effect and calculate a resultant cross-sectional slice of the MWA beam. Using satellite ephemeris data, project
this beam slice onto a healpix map. This function also applies RFE gain correction using the gain solution created by
rfe_collate_cali()
. The resulting healpix map is saved to a .npz
file in out_dir
,
with the data structured in nested dictionaries, which have the following structure.
map*.npz
├── mwa_map
│ └── pointings
│ └── satellites
│ └── healpix maps
├── ref_map
│ └── pointings
│ └── satellites
│ └── healpix maps
├── tile_map
│ └── pointings
│ └── satellites
│ └── healpix maps
└── time_map
└── pointings
└── satellites
└── healpix maps
The highest level dictionary contains normalized mwa, reference, tile and time maps. Within each of these, there are dictionaries for each of the telescope pointings:0, 2, 4, 41. Within which there are dictionaries for each satellite norad ID, which contain a healpix map of data from one satellite, in one pointing. This structure may seem complicated, but is very useful for diagnostic purposes, and determining where errors in the final tile maps come from. The time maps contain the times of every data point added to the above maps.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
mwa_clean_maps
(nside, tile_map_raw, out_dir)¶Extract data from 18 good satellites and make the best possible MWA beam maps.
The maps created by project_tile_healpix()
contains satellite data from all 72 satallites listed
in embers.sat_utils.sat_list.norad_ids()
. Most of these satellites happen to be outside the frequency band of this beam expt
and all data from them is probably erroneous and mis-classified. Here, we extract a subset of the data belonging to a list of 18
satellites, identified for being active in the frequency band. Using this list of good_sats
, significantly improves the
quality of beam maps.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
plt_sat_maps
(sat, out_dir)¶Create healpix plots of the sky coverage of a satellite
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
plt_clean_maps
(clean_map, out_dir)¶Plot healpix clean beam, error and count maps at all pointings.
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.tile_maps.
tile_maps_batch
(start_date, stop_date, sat_thresh, noi_thresh, pow_thresh, ref_model, fee_map, rfe_cali, nside, obs_point_json, align_dir, chrono_dir, chan_map_dir, out_dir, plots, rfe_cali_bool=True, max_cores=None)¶Batch process satellite RF data to create clean beam maps and all intermediate data products.
Creates tile_maps_raw, which are tile maps with all possible raw data, sorted by satellite ID. Also creates clean_tile_maps which contain data from only the 18 satellites found to be consitently transmitting in the correct frequency band. Plots of satellite coverage and final clean beam maps are also saved to the out_dir.
Parameters: |
|
---|
A set of tools to perform null tests on reference rf data and reference beam models
embers.tile_maps.null_test.
good_ref_maps
(nside, map_dir, tile_pair)¶Collates reference data from 18 good satellites into a good_ref_map
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.null_test.
plt_null_test
(fig=None, sub=(None, None, None), zen_angle=None, del_pow=None, del_err=None, del_beam=None, del_fit=None, null_label=None, beam_label=None, fit_label=None, ylabel=True, title=None)¶Plot null test between two corresponding slices of reference beam maps
Parameters: |
|
---|---|
Returns: |
|
embers.tile_maps.null_test.
null_test
(nside, za_max, ref_model, map_dir, out_dir)¶Plot all null tests for reference beam maps
Parameters: |
|
---|---|
Returns: |
|
A set of tools to compare measured MWA beam maps with FEE models
embers.tile_maps.compare_beams.
beam_slice
(nside, tile_map, fee_map, out_dir)¶Compare slices of measured beam maps and FEE models.
NS & EW slices of measured MWA beam maps are compared to corresponding slices of FEE models. Complete sky maps are plotted to display power gradients across the beam.
Parameters: |
|
---|
embers.tile_maps.compare_beams.
batch_compare_beam
(nside, fee_map, map_dir, out_dir, max_cores=None)¶Batch compare multiple beam maps
Parameters: |
|
---|