TIDE/PSI Summary Plot Creation and Data Reduction ------------------------------------------------- To run the software, login into the 'tide' account on griffin. Ask Peggy Sloan, Barbara Giles, or Dick West for the password. All of the file/plot options listed below read TIDE level-zero (lz) files plus POLAR orbit and attitude files and ion masks. Use the 'find file' option on the web to determine the name and location of the level-zero, orbit, attitude, mask, and spacecraft potential files for a specific date. The name of the files to be processed and the time range to be processed are passed to the processing program (tide_lz) from the list file. If the processing requires data from more than one day, the list file must contain the name of each file that needs to be processed. The format of the list file is: line 1: start time (mn/dd/yy hh:mm:ss) line 2: stop time (mn/dd/yy hh:mm:ss) line 3: 1 [lz filename] line 3 is repeated for each lz file to be processed, list the files in time sequence line 4: 2 [orbit filename] line 4 is repeated for each daily orbit file, list the files in time sequence. line 5: 3 [attitude filename] line 5 is repeated for each daily orbit file, list the files in time sequence. line 6: 4 [mask filename] only one mask is permitted and it is optional line 7: 5 [spacecraft potential filename] optional, repeated if processing time crosses a month The level-zero processing software is run on griffin from: /export/data2/tide/smry_plt Most of the programs take a lot of time to run. To check the progress of a program, using a second window, type: tail tyymnddh1m1_h2m2.err This command will list the last few lines of the error/message file created by the software. h1m1 is the start hour minute and h2m2 is the stop hour and minute. Each lz file contains ~9392 records and is 24 hours long. Comments in the .err file will include the current record number and time. The remainder of this document discuss how to create each of the summary plots and text files. The Daily Summary Plots are created for each new level-zero. They are created whenever GSFC sends a new level-zero file. All other plots and files are created upon request. When the software creates plots, they are stored in files with two different formats, postscript (.ps) files are used to get high/quality hardcopies of the plot. Graphics Interchange Format (.gif) files are used to store images for later viewing on a screen. Only postscript files are sent to printers. -------------------------------------------------------------------------------- TIDE Level-Zero Processing Parameter file The parameter file tells the software what type of output to create, text files and/or plot input files. It also customizes the plots. Standard parameter files exist for the processing discussed below. Non-standard or customized plot parameter files can be created by running lz_parm. lz_parm prompts the user for all necessary information via a series of menus. Note: The menus can be confusing because some of them want to set a bit for each option on the menu by entering a 1 if you want the item and a 0 if you don't. This way you can select more than one option. Menus that allow multiple selections will have 'bit' in the menu prompt. Other menus allow the selection of only one item by entering the item number. All ion count rate processing except moments text files are handled from option 1 (bit 1) of the main menu. Moments are bit 4. The first prompt is for the name of the parameter file. Make the filename descriptive and add a .parm extension. -------------------------------------------------------------------------------- Daily TIDE/PSI Summary Plots: There are three types of summary plots created for each level-zero file. The housekeeping summary plots contain several panels, displaying selected data from both the TIDE and the PSI housekeeping parameters. Spin-Averaged Summary Plots contain count rates summed over energy and spin angle for a user-specified mass. Currently the only mass plotted is Singles (mass 5). Direct-Event Spectrograms are color plots of the mass spectra for each channel. To generate the plot input files: - create the list file by copying one of the existing list files and editing it or by creating it from scratch, all new list files need to contain the level-zero, orbit, and attitude filenames, mask filenames will not be available - run tide_lz with smry_plots.parm and the list file Note: Each summary plot can be created separately using hk_smry.parm, mss_avg.parm, de_plot.parm It will take tide_lz anywhere from 1.5 to 3 hours to run, depending on how busy the workstation is. To create the housekeeping summary plots: - when tide_lz is complete get into IDL using command 'idl' IDL> .run tide_hk_smry TIDE summary filename => tyymndd0000_2400.hk_tid Start Time (hours) => 0.0 Stop Time (hours) => 24.0 0 stop 1 hardcopy what next => 1 0 stop 1 hardcopy what next => 0 IDL> .run psi_hk_smry PSI summary filename => tyymndd0000_2400.hk_psi Start Time (hours) => 0.0 Stop Time (hours) => 24.0 0 stop 1 hardcopy what next => 1 0 stop 1 hardcopy what next => 0 IDL> exit The gif and postscript output files are: tidyymndd0000_2359.gif psiyymndd0000_2359.gif tidyymndd0000_2359.ps psiyymndd0000_2359.ps To create the spin-averaged summary plots: - get into IDL IDL> @mass_avg filename => tyymndd0000_2400.mss_avg mass_number (0-5) => 5 plot stops? y/n => n start time in hours (xx.xx) => 0.0 length of axis in hours => 24.0 number of plots => 1 Press q to quit IDL> exit Note: In the near future, the TIDE flight software will be changed to start sending new data. When this happens, the answer to the plot stops? will be y for any data generated after the software change was made. The postscript and gif output files are: tyymndd0000_2400_m5.avg.ps tyymndd0000_2400_m5.avg.gif To create the direct-event spectrogram summary plots: - from IDL, type .run de_spect color (1), grayscale (2) (select color unless requester specifies otherwise) direct-event sprectrogram filename => tyymnddh1m1_h2m2.sg_de The postscript and gif output files are: tyymnddh1m1_h2m2.sg_de.ps tyymnddh1m1_h2m2.sg_de.gif Get hardcopies of the plots by sending the housekeeping and spin-averaged postscript files to a black/white printer and sending the direct-event spectrogram postscript file to a color printer. Give the four plots to Paul Craven. After creating hardcopies of the plots, several files need to be moved to the web site. Before moving the .gif files, check to make sure they were created correctly. Look at them in IDL using .run view_gif. If they are correct, copy them. If the plots do not look correct, recreate them using IDL. Note: just replot them, don't rerun tide_lz. The .err files can be deleted as soon as tide_lz has run correctly. If a job aborts, this file will help indicate where the problem is. Move the housekeeping byte files using: mv tyymmdd*.hk /export/data/tide/hk Due to 'firewall' protection on the web, getting files to the web site currently takes a little effort: telnet satyr login into web (See Barbara Giles, Peggy Sloan, or Dick West for the password) cd htdocs/tmpmo2/hk/daily cp /net/griffin/export/data2/tide/smry_plt/tid*2359* . cp /net/griffin/export/data2/tide/smry_plt/psi*2359* . cd ~/htdocs/tmpmo2/engspn_avg cp /net/griffin/export/data2/tide/smry_plt/tyymn*.avg.* . cd ~/htdocs/tmpmo2/spectrograms/direct_events cp /net/griffin/export/data2/tide/smry_plt/tyymn*.sg_de.* . lo (log off satyr) Once the hardcopies of the plots have been given to Paul Craven, the files copied to the web site, the tid*2359*, psi*2359*, *.hk_psi, *.hk_tid, *.mss_avg, t*.avg.*, and *.sg_de* files can all be deleted. -------------------------------------------------------------------------------- Playback of the Housekeeping (hk) text display and the Instrument Parameter (ip) text display. The hk text display is a list of all the hk data every 9.2 seconds. It is stored in a file called tyymnddh1m1_h2m2.eng, where h1m1 is the start hour and minute and h2m2 is the stop hour and minute. The file can be very large, so it should only be run for limited time intervals. The ip text display is a list of ip data anytime one of them changes and once every superspin (192 seconds). It is stored in a file called tyymnddh1m1_h2m2.ip . Like the hk, the file can be large, so it should be run for limit time intervals. DO NOT print the file. Let the requestor know where the file is and what it is call. - after creating the list file, run tide_lz using the hk_ip.parm -------------------------------------------------------------------------------- Direct_event text files: These text files contain the 128 time-of-flight bin count rates reported every superspin (192 sceonds). Seven files, one for each channel, are created called tyymnddh1m1_h2m2.de_chn. After the software has run, let the requester know where the files are. - create a list file with the correct lz filename and time range - run tide_lz with de_file.parm and the list file - Move the direct-events text files using: mv tyy*.de_ch* ../direct_events Note: To generate both text and plot files run tide_lz with de_plot_file.parm. -------------------------------------------------------------------------------- Phase Space Density (PSD) Velocity Distribution Plots: The output file has the format: tyymnddh1m1_h2m2_mq.psd, where mq is the ion's mass to charge ratio, for hydrogen mq = 1, for oxygen mq = 16. Each output file usually contains input data for several plots. - create the list file - run tide_lz with one of the following parm files: spins filename ion in avg scpot max.vel psd-rng perp_vx psd_h.parm H+ 1 0.0 actual 5-9 mom Vx psd_h_5min_5_10.parm H+ 50 1.8 actual 5-10 mom Vx psd_h_8_14.parm H+ 1 0.0 actual 8-14 mom Vx psd_h_min.parm H+ 10 0.0 actual 5-9 mom Vx psd_h_min_6_12.parm H+ 10 0.0 actual 6-12 mom Vx psd_h_min_8_14.parm H+ 10 0.0 actual 8-14 mom Vx psd_h_min_9_15.parm H+ 10 0.0 actual 9-15 mom Vx psd_o.parm O+ 1 0.0 actual 8-14 mom Vx psd_o_5min_6_11.parm O+ 50 1.8 actual 6-11 mom Vx psd_o_min.parm O+ 10 0.0 actual 8-14 mom Vx psd_o_min_6_12.parm O+ 10 0.0 actual 6-12 mom Vx Different parameter files can be created by running lz_parm. - from IDL, type .run tide_psd psd image filename => tyymnddh1m1_h2m2_mq.psd How many psd plots do you want skipped? (this lets you skip to the middle of a file containing several plots) Enter W to display in a window, P to create a postscript file, G to create a GIF file, or any combination of those letters. Output type: WPG Enter the name of a directory in which the program will write temporary files or press to use your default directory. User directory: Enter a unique tag to distinguish your temporary files or press to ignore this option. Unique tag: color (1), grayscale black_white(2), white-black(3) (select color unless requester specifies otherwise) For screen displays, you will need to press 'q' to stop or any other key to see the next plot. The output file format is tyymnddh1m1s1_h2m2s2_mq.psd.ps or .gif, where h1m1s1_h2m2s2 is the time range convered by the plot and mq is the ion's mass to charge ratio. To put phase space density velocity distribution plots on the web: telnet satyr login into web cd htdocs/tmpmo2/vel_distrb cp /net/griffin/export/data2/tide/smry_plt/tyy*_mq.* . where mq is the ions mass to charge ratio (01 for hydrogen and 16 for oxygen) Do not put velocity distribution plots on the web unles requested to do so. -------------------------------------------------------------------------------- Ion count rate text files: These text files contain count rates at each energy and spin angle for a specified mass every time the mass is reported, which will vary depending on the mode TIDE is in. Seven files, one for each channel, are created called tyymnddh1m1_h2m2.mss_chN. Each file will be very large, so the code should be run for a limited time range. Let the requester know where the files are. - create a list file with the correct lz filename and time range - run tide_lz with one of the following parmeter files: ion_cnts_h.parm for hydrogen ion_cnts_o.parm for oxygen ion_cnts_singles.parm for singles ion_cnts_stops.parm for stops - Move ion count rate files using: mv tyy*.mss_ch* ../ion_cnts Tell the person who requested them that they are on griffin in /export/data2/tide/ion_cnts. -------------------------------------------------------------------------------- Chromogram Plots: Chromogram plots are used to display all 6 data dimensions at once on a single plot. - create the list file - run tide_lz with one of the following parm files: filename -horz-vert-color- ------masses------ units-range esp_5m_ef_3_6.parm energy-spin-polar H+ O+ He++ He+ NO+ energy flux (3-6) esp_5m_nf_1_6.parm energy-spin-polar H+ O+ He++ He+ NO+ number flux (1-6) esp_5m_psd_5_11.parm energy-spin-polar H+ O+ He++ He+ NO+ psd (5-11) esp_6m_hz_0_3.parm energy-spin-polar H+ O+ He++ He+ NO+ hertz (0-3) and Singles Different parameter files can be created by running lz_parm. The file extension on the outfile indicates the dimension plotted on the horizontal axis, then the vertical axis, then the dimension the color is based on. The dimensions are energy (e), spin angle (s), and polar angle (p). All extensions will be combinations of these letters. - from IDL, type @smry chromogram image filename => tyymnddh1m1_h2m2.hvc Enter W to display in a window, P to create a postscript file, G to create a GIF file, or any combination of those letters. Output type: WPG Enter the name of a directory in which the program will write temporary files or press to use your default directory. User directory: Enter a unique tag to distinguish your temporary files or press to ignore this option. Unique tag: The postscript and gif output files are: tyymnddh1m1_h2m2.hvc.ps tyymnddh1m1_h2m2.hvc.gif where h1m1 and h2m2 are the time range for each plot created. List the .ps files to verify the filenames. The chromogram image file may contain several plot pages. ps and gif files are for each page. To put chromogram plots on the web: telnet satyr login into web cd htdocs/tmpmo2/chromorgams/special cp /net/griffin/export/data2/tide/smry_plt/tyy*.hvc.gif . cp /net/griffin/export/data2/tide/smry_plt/tyy*.hvc.ps . Do not put chromogram plots on the web unless requested to do so. Note: half-orbit chromograms are created and moved to the web through a different means. -------------------------------------------------------------------------------- Energy/Spin Angle Spectrograms Plots: Spectrogram plots are used to display count rate or flux in color as a function of energy and spin angle for a user-specified number of channels or masses. - create the list file - run tide_lz with one of the following parm files: filename horz-vert-panels --masses-- channels units-range esp1m1_hz_05_45.parm energy/spin/mass Stops 4 log(hertz) (.5-4.5) sep1m1_hz_05_45.parm spin/energy/polar Stops 4 log(hertz) (.5-4.5) esm2p3_ef_5_10.parm energy/spin/mass H+,O+ 3,4,5 log(eng flx) (5-10) esm4p7_ef_3_6.parm energy/spin/mass H+,He++ 1,2,3,4, log(eng flx) (3-6) He+,O+ 5,6,7 esm5p3_hz_1_4.parm energy/spin/polar H+,He++, 3,4,5 log(hertz) (1-4) He+,O+,NO+ sem5p3_hz_1_4.parm spin/energy/mass H+,He++, 3,4,5 log(hertz) (1-4) He+,O+,NO+ Different parameter files can be created by running lz_parm. The file extension on the outfile indicates the dimension plotted on the horizontal axis, then the vertical axis, then the dimension used for each panel (image), and the dimensions used for each page of the plot. The dimensions are energy (e), spin angle (s), polar angle (p), and mass (m). Energy and spin angle can be either the vertical or horizontal dimensions, polar angle and mass can be the panel or page dimensions. - from IDL, type @sg_smry spectrogram image filename => tyymnddh1m1_h2m2.hvip Enter W to display in a window, P to create a postscript file, G to create a GIF file, or any combination of those letters. Output type: WPG Enter the name of a directory in which the program will write temporary files or press to use your default directory. User directory: Enter a unique tag to distinguish your temporary files or press to ignore this option. Unique tag: The postscript and gif output files are: tyymnddh1m1_h2m2.hvipNN.ps tyymnddh1m1_h2m2.hvipNN.gif where h1m1 and h2m2 are the time range for each plot created and NN is either the channel or mass/charge ratio of the data on each plot page. List the .ps files to verify the filenames. To put spectrogram plots on the web: telnet satyr login into web cd htdocs/tmpmo2/spectrograms/energy_spin cp /net/griffin/export/data2/tide/smry_plt/tyy*.hvi*.gif . cp /net/griffin/export/data2/tide/smry_plt/tyy*.hvi*.ps . Do not put spectrogram plots on the web unless requested to do so. -------------------------------------------------------------------------------- Moments Text Files: Moments text files contain a ion density and velocity and temperature vectors for each reported mass. - after creating the list file, run tide_lz using one of the following parameter files: mom.parm - moments calculated every spin, s/c potential = 0.0 mom_5min.parm - moments calculated from 5 minute average, scpot = 0.0 mom_min.parm - moments calculated from 1 minute average, scpot = 0.0 The output file is tyymmddh1m1_h2m2.mom. Let the requestor know where the text file is. To plot the data from IDL: IDL> .run tide_moments moments filename => tyymnddh1m1_h2m2.mom plot tpara/tperp (1) or tx,ty,tz (2) => plot b-field velocity (1) or gse-velocity (2) => Enter W to display in a window, P to create a postscript file, G to create a GIF file, or any combination of those letters. Output type: Enter the name of a directory in which the program will write temporary files or press to use your default directory. User directory: Enter a unique tag to distinguish your temporary files or press to ignore this option. Unique tag: Plots are created for each mass in the text file. For screen displays, press any key to see the next mass. -------------------------------------------------------------------------------- B-Field Text Files: B-field text files contain a list of times and the magnetic elevation and azimuth angles for a user-specified time range. - after creating the list file, run tide_lz using b_field.parm The output file is tyymmddh1m1_h2m2.bfld, either e-mail the file to the requestor or tell him the name (including path) of the file. To e-mail the file use: mail [first_name].[last_name]@msfc.nasa.gov < tyymmddh1m1_h2m2.bfld -------------------------------------------------------------------------------- Mirror Ratios Plots: The mirror_ratio plots contain 7 panels (one for each channel) displaying the mirror ratios as a function of time. The corresponding RPA values are listed on the left side of the plot. - create a list file with the correct lz filename and time range (mirror_ratio plots do not use orbit data) - run tide_lz using mir_rat.parm and new list file - when tide_lz is complete, get into IDL IDL> .run mirror_ratios Mirror ratio filename => tyymnddh1m1_h2m2.mir_rat 0 stop 1 hardcopy what next => 1 0 stop 1 hardcopy what next => 0 IDL> exit The postscript and gif output filenames are the input filename with .ps and .gif extensions.