Data Menu - SPEDAS GUI
Load Data
The SPEDAS GUI can be used to load data from a number of missions, including THEMIS, GOES, FAST, WIND, ACE, IUGONET and OMNI. The GUI can also be used to load data from SPDF CDAWeb. To learn more on loading data in the SPEDAS GUI, see Load Data and Load Data using CDAWlib.
Save Data As
The "Save Data As…" dialog allows the user to select a set of variables, and save the data as ASCII (with various formatting options) or as a set of files in the UCLA binary "upper flat file" format. Unlike "Save SPEDAS Document" or "Save As…", "Save Data As…" does not attempt to save any GUI objects or plotting parameters.
Click "File->Save Data As…" to bring up the dialog. On Windows XP, it will look something like this, assuming some data has already been loaded:
The left hand "Loaded Data" pane is a "tree widget" representing the data variables currently available. In the above screen shot, many of the nodes are fully expanded. Click any box showing "+" to expand that node, or click a box showing "-" to collapse that node.
To the right of the "Loaded Data" pane are some additional controls. If the "Restrict Time Range" box is checked, only the data with timestamps in the given time range will be saved. For now, the start and end times must be typed into the text box in YYYY-MM-DD/HH:MM:SS format.
If the "Save as Flat file" box is checked, the data will be saved in (binary) UCLA flat file format. For further information about this format, please consult the UCLA documentation.
If the "Save as ASCII data file" box is checked, the data will be saved as ASCII, one line per record. If this format is selected, there are additional choices for how the ASCII data is formatted. The "Time Format" drop-down menu brings up a list of different formats for representing timestamps with varying degrees of precision. The "Floating Point Format" drop-down menu specifies the precision and format of floating point quantities that are not internally marked as timestamps.
The "Header Style" drop-down menu offers a few options for including header lines in the ASCII output. If "None" is selected, no header will be produced; for "Field Names Only", a single header line will be included, listing the field names associated with each data column; for "Tecplot", a Tecplot-compatible header will be produced with one line of field names, and another line with a sample count and some other information.
The "Item Separator" drop-down menu allows the user to select whether columns are to be separated by commas, tabs, or spaces. This option also applies to the header, if one is requested.
As an example, if "Header Style" is set to "Field Names Only" and "Item Separator" is set to "Comma", the resulting ASCII file should be readable by Excel or other utilities that understand CSV ("comma separated value") formatted files.
The "Indicate flags with:" text box allows the user to choose what gets printed if an IEEE-754 "NaN", "Inf", or other non-numeric floating point value is encountered during the conversion to ASCII. We suggest keeping the default text "NaN". (The term "flag" is used because in some situations, TDAS inserts NaN values to "flag" missing or invalid data samples.)
"Update document with location of data" is not yet implemented in this release (and perhaps never will be), and should be disregarded for now.
The suggested workflow for this dialog is to first use the tree widget in the "Loaded Data" pane to select some subset of the currently loaded variables, then use the controls on the right hand side to select a file format, an optional time range, and any additional style settings (if ASCII format is selected). Clicking the "Save" button will perform a few checks on the selected data variables, and if the selection is valid, the GUI will pop up a file picker dialog to specify the filename and directory to save.
Caveats:
This dialog does not permit saving arbitrary collections of variables. Owing to the record-oriented structure of these file formats, all selected variables must contain the same number of samples. For UCLA upper flat file format, the only valid data types are 4-byte integers, and 4- and 8-byte floating-point values. THEMIS data represented as bytes or 16-bit integers (for example, ASK) cannot be saved as UCLA upper flat files. These restrictions are enforced at the very end of the workflow, when the user clicks "Save". The first variable name with an incompatible sample count or data type will be mentioned in the error message; try removing that variable from the selection, and repeat the process until a valid ensemble of variables remains.
ASCII files generated from large data sets (e.g. several hours of ASK keogram data) are potentially enormous, and may appear to lock up IDL for a long time while the file is being written. Even modest ASCII data sets may require several minutes to be saved. These operations are somewhat inefficient; due to the need for column-by-column checking, formatting, and output of data fields.
Manage Data and Import/Export Tplot
The Manage Data Window allows you to import TPLOT variables into the GUI, export TPLOT variables from the GUI, delete GUI variables, and view/edit the meta-data associated with various GUI variables.
To import TPLOT variables you can select one or many (ctrl/shift-click) tplot variables in the left TPLOT Data area, then press the right arrow button to move data into the GUI. The data will then be moved into the GUI and attempt to detect the variable meta-data that includes name, mission, observatory, instrument, units, and coordinate system.
When the right arrow is clicked to import tplot data, the Verify Data Window will be displayed allowing you to verify that this data was correctly detected. Click the OK button if it is or 'Cancel' if you change your mind about importing. After you press 'OK' on the Verify Data panel, the data will be loaded. The figure to the right shows the Verify Data window.
To export GUI variables to TPLOT, select the GUI quantities that you would like to export from the tree at the right and select the left arrow button to export them.
To delete GUI variables, select the GUI quantities that you would like to delete from the tree at the right, then select the trash can button to delete them.
To examine the meta-data (name, mission, observatory, instrument, units, coordinate system, and file name) associated with particular GUI variables. Select the variable to be examined in the tree at the right and select the magnifying glass button to examine the meta-data. A menu like the verify menu will pop-up and you can view or edit the meta-data for the selected quantities.