Source directory | /data/lofarschool/data/exercise 45 |
---|---|
Contact person | Casey Law/Michael Wise |
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.
Basic python.
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.
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.]”.
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.Use these functions to answer the following questions.
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.])