===== Data Processing School :: Exercise 45 ===== ^ Source directory | /data/lofarschool/data/exercise 45 | ^ Contact person | Casey Law/Michael Wise | ==== Context ==== This exercise will demonstrate how some simple Python commands can help visualize how a single polarization of the LOFAR low band antennae responds to electromagnetic radiation. === Prerequisite === Basic python. ==== Description ==== This exercise describes two functions you can use in this exercise to visualize the LOFAR LBA beam. The beam model is an analytic solution to how a single polarization of the LBA (e.g., "x") sees electromagnetic radiation from the sky. This model only applies to a single polarization that is rotated 45 degrees relative to local north. For the x+y sensitivity, imagine rotating the sensitivity pattern of x by 90 degrees and adding it to the original pattern. The exercise consists of two functions that can plot either one or a set of slices through the beam. - "show_azimuth" requires as input the observing frequency and an azimuth value. It then plots a slice through the beam at that frequency and azimuth (from horizon to zenith). Azimuth=0deg is due north and increases to the east. - "show_elevation" is the same, but plots a slice through the beam at a given elevation, starting from azimuth zero through 360 degrees. Both functions can take one input value of azimuth or elevation. They can also take lists of multiple azimuths and elevations. A list in python is defined with square brackets, e.g., "[10., 50.]". ==== Files & Directories ==== The following files are found in the exercise directory: - ''coordinates_mod.py'' -- A Python script the does coordinate conversion. Not used directly. - ''exercise.py'' -- A Python script that defines a few functions for plotting the beam amplitude. - ''inputs'' -- A directory for associated files and libraries. Not used directly. - ''inputs_old'' -- An old inputs directory. Not used directly. - ''lofar_beams.py'' -- A Python script that reads in the LOFAR LBA beam model. Not used directly in the exercise, but could be fun for experimentation. - ''README.txt'' -- File that introduces the exercise and problems. ==== Step-by-step instructions ==== Use these functions to answer the following questions. - Imagine a cell phone tower that is 50m tall and located 50km away to the east. How much will the x-dipole signal be reduced by the beam sensitivity at 30. and 80. MHz? - What is the elevation of the x-dipole half-power point for frequency = 30 MHz and azimuth = 0., pi/8, pi/4, 3pi/8, pi/2, pi? - How is the x-dipole beam pattern is symmetric in azimuth? How often does it repeat itself in a full 360 degrees? How often would the x+y dipole pattern repeat in 360 degrees? - Estimate the most that the x+y beam amplitude changes with azimuth at 30 and at 80 MHz? - At what frequency between 30-80 MHz does the x+y beam have the least structure (most smooth)? ==== Example outputs ==== Here is are quick exapmles of how you can run the two functions: # first, run python interactively and import the script. > ipython -pylab >>> import exercise # this shows an azimuth slice through the beam at 30 MHz toward the east. >>> exercise.show_azimuth(30e6,90.) # this shows three elevation slices through the beam at 80 MHz. >>> exercise.show_elevation(80e6,[10.,30.,50.])