Data Handling - nthallen/keutsch-hcho GitHub Wiki

Stopping Data Collection and Saving Data

Note: If you want to return to the Cygwin terminal screen (HCHO@HCHO /home/ch2o) WITHOUT stopping data collection, type > exit in the command window. You can restart the instrument operation screens with a $ ./doit

Quitting the HCHO Instrument Operation Interface

To stop operations from the Cygwin window on the GSE type

> swStat pressure control idle

> swStat Full Shutdown

> swStat Time Warp

Full Shutdown will nominally wait until the current 30-minute chopping period is complete, then initiate a final laser scan before suspending chopping and shutting down data acquisition. The Time Warp command will cause it to jump immediately to the scan.

If running calibrations, remember to turn off any flows through the AUX box, and turn Valve 1 off.

Close the zero and calibration gas cylinders as well. You don't want to accidentally waste your calibrated HCHO gas cylinder standard if it's connected!

Data Handling Step 1 - REDUCE

As with instrument operation, all the following commands must be executed in the /home/CH2O directory.

REDUCE invokes saverun to move all the current log file into a new dated run directory on the FILIF onboard computer. Reduce then copies the raw data from the FILIF instrument computer (CH2O) to the GSE (HCHO) and converts the raw data into *.csv files.

$ reduce

Reduce should be issued at the command prompt. If you need to process or reprocess a run that was created by an earlier invocation of reduce or saverun, you can specify the run you want to process with:

$ reduce YYMMDD.X

Reduce will prompt you to select the folder where you wish to save the data, e.g., data, junk, or cal. Other options include flight, and preflt. After pressing enter, the reduce algorithm will prompt you to enter a description of the run. Type in whatever text will help you remember what the file contains! Since you will likely collect many data runs, skipping over this step is ill-advised! After you have typed in a description, press enter and then add a period before pressing enter again. The data is now being copied from the FILIF onboard computer and hard drive to the GSE. This process can take several tens of minutes if you have a large file!

Data Handling Step 2 - GETRUN

GETRUN invokes MATLAB to convert the data from *.csv to *.mat and saves the processed data in the C:/Cygwin64/home/CH2O/MAT directory on the GSE (HCHO). GETRUN should be issued at the command prompt:

$ getrun YYMMDD.X

Note: The location of the MAT directory here can be changed in order to apply some rational organization to the list of runs. This is particularly helpful when the runs span multiple field campaigns. The MATLAB command to make this change is

>> update_ne_runsdir('HCHO_DATA_DIR')

This brings up a standard folder-selection dialog where you can select and/or create the folder where you want new runs to be stored. Subsequent invocations of getrun will save .mat files to the selected folder, and the MATLAB script ui_hcho will only list runs in that folder. You can organize your runs within the MAT hierarchy with standard GUI file manager applications, simply dragging the runs between folders as appropriate.