Madrigal database exercises - overview

Each group will do the following exercises:

  1. Go through the web interface exercises below

  2. Install one (or more) remote APIs (python, Matlab, or IDL)

  3. Run and then modify the example script in the language of choice that gets the latest Poker Flat data on Madrigal

  4. Run and then modify the example script in the language of choice that runs the globalIsprint example

Links and scripts to download (will be used below)

 

Python script to plot the latest Poker Flat data

Matlab script to plot the latest Poker Flat data

IDL script to plot the latest Poker Flat data

Python script to run globalIsprint example

Matlab script to run globalIsprint example

IDL script to run globalIsprint example

 

Step 1: Web exercises

  1. Start at one of the SRI Mirror web sites.

  2. Use the Browse for Individual Madrigal Experiments under Access Data to search for all instruments that were running on 2007-03-27. Use the This Madrigal Site option to not see duplicates with the real SRI server. Go back and repeat the search so only Incoherent Scatter Radars are shown.

  3. Select the Poker Flat World Day experiment that was running on 2007-03-27, and do the following with that experiment:

    1. Determine how many data files there are for that experiment, and how they differ.

    2. For one of the files, choose "View description from the catalog and/or header records", and read the summary information stored there. Ask questions if anything is unclear.

    3. Download one of the files is ascii format by using the Download file link, and sticking with the default Simple column-formated ascii option. Remember that this option does not filter the data, and no derived parameters will be included. Open the downloaded file with a text editor to make sure its easy to understand and parse.

    4. Madrigal administrators can add plots and links to each Madrigal experiment. Click on the Geometry Plot link to see the beams that were used. Examine other plots from that experiment.

    5. For the default file for Alternating Code (AC16-30), choose "Print file as ascii (isprint)". This link allows you print both measured and derived parameters. For this file, choose time parameters (year, month, day, hour, min, sec), geographic parameters (elm, azm, gdlat, glon, gdalt), geophysical parameter (kp), and I. S. Radar Basic Parameters (ne, dne, ti, dti, te, dte). Which of these parameters are in the file, and which are derived?

    6. Repeat the above with headers off and missing data replaced with the string NaN.

    7. Save the result in a file using the Save text to file button.

    8. Determine what the Autocorrelation parameter NUMTXAEU means.

    9. Next, we'll try to filter the data. There are some standards filter at the top of the web page, such as elevation or altitude. Just under them are free-form filters that allow filtering using any parameter. First, apply a filter to eliminate elevations under 75 degrees. Look at the resulting data to be sure all data with elevation less than 75 degrees is eliminated.

    10. Add a filter so that only data where te/dte is greater than 10.0 is printed (that is, the error in te is less than one-tenth the measured value).

  4. Use the Madrigal page Run Models->Calculate any Madrigal parameter for a given time and range of lat, lon, and alt to calculate the shadow height and magnetic field vector 1000 km directly above PFISR (lat 65.130, lon -147.471) at 2007-03-27 12:00:00 UT.

Step 2: Download Python, Matlab, and/or IDL Remote APIs

Go to the OpenMadrigal download page, and download one or more version. Available as *.tar.Z or *zip files. The Matlab and IDL installations assumes you have these commercial products already installed; the python version is open-source and can be installed on any computer.

Matlab installation: The Matlab version is simply *.m files, so they need to be put in a standard Matlab directory.

IDL installation: The IDL version is simply *.pro files, so they need to to put in a standard IDL directory.

To install the python version:

  1. Make sure you have python installed. If not, install it from python.org.

  2. If you want to run the plotting methods, following the the next two steps if needed.

  3. Install the package numpy from numpy.scipy.org if you don't already have it. This package does numerical arrays and linear algebra.

  4. Install the ploting package matplotlib from matplotlib.sourceforge.net if you don't already have it.

  5. To install the remote python madrigal api from www.openmadrigal.org, you will need to uncompress the file. Then you will need to run python setupMadrigalWeb.py install. If you are installing on Windows, you will need to open a command prompt, and then change directory to where you uncompressed the file. From windows the python command may be something like c:\python25\python.exe setupMadrigalWeb.py install. All the command line scripts (globalIsprint.py, madrigalPColor.py, and madrigalScatter.py) will be put into your PATH and so can be called directly from the command line.

Step 3: Use and modify the script to plot latest Poker Flat data (plotLatestPoker.*)

  1. Download either the python, Matlab, or IDL version of the script to plot the last hour of Poker Flat data (see top of page).

  2. Change the line with http://isr.sri.com/madrigal/ to the url of your mirror site. This is not absolutely necessary, but it will reduce network traffic.

  3. Verify the script runs successfully as is.

  4. This version just plots Nel (log of electron density) for the last hour of Poker Flat data. Modify the script to plot Ti (ion temperature) or Te (electron temperature). You will need to change the requested parameters, the Y label string, and for the Matlab and IDL versions, the minimum and maximum parameters values.

Step 4: Use and modify the globalIsprint exercise

  1. Download either the python, Matlab, or IDL version of the script to run the globalIsprint example (see top of page).

  2. Change the line with http://isr.sri.com/madrigal/ to the url of your mirror site. This is not absolutely necessary, but it will reduce network traffic.

  3. Verify the script runs successfully as is.

  4. Instead of using Kp as a filter, filter on Ap3 > 15.

  5. Add Te and Ti as parameters

  6. Filter also on Te > 1000

  • No labels