SCF Editor v1.0

[picture of SCF editor]

written by Joey Mukherjee -

Table of contents

  1. Overview
  2. Getting Started
  3. Limitations
  4. File Button...
    1. New
    2. Open
    3. Save
    4. Save As
    5. Delete
    6. Quit
  5. Variables...
    1. Defining Variables
    2. Editing Variables
    3. Deleting Variables
  6. Header...
    1. Title
    2. Contact Info
  7. SCF...
    1. Reformat
    2. Check
    3. Register
  8. Window...
    1. Variables
    2. Functions
    3. Miscellaneous
  9. Algorithm


It is assumed the reader is already familiar with SCF's as this document makes no attempt at educating the user on the use of SCF's. If you need help on creating SCF's, see the document written by Carrie Gonzalez.

The SCF editor is a tool used for easily writing an SCF file. What makes the SCF editor useful is its ability to encapsulate the elements of an SCF without forcing the user to search through the PIDF file for information. It currently makes no attempt at checking the validity of an SCF. Other programs exist for that purpose and in the future, it may be incorporated into the editor.

The SCF editor is also very dumb in that it knows nothing about the instruments being utilized by the user. It is assumed that the user knows everything about the instrument he/she wishes to plot.

Lastly, the SCF Editor is basically an "editor". You can click through each of the buttons if you wish, but it is almost always easier to type each of the commands. Where the SCF Editor will save you time is in defining variables and creating comments.

Getting Started

To start the program, just type "scfedit". No command line arguments are read in at this time. Getting started is easy: just type in to the algorithm editor window on the main screen. What you are typing in here is the algorithm used in the SCF. If you forget a function or a variable, you can use the separate windows to see the available functions and you can even click the buttons to have them automatically typed for you.

When you need to define a variable, go to the Variables menu and click "Define" and then the type of variable you wish to define. After defining all the variables and completing the algorithm, you are ready to save and try it out.


Current limitations:

The File Button

Basic file handling routines.


New will reset all dialogs to nothing. Do this when you wish to start over.


Open will load a new file for editing. Any current file in memory will be reset. If you a get a bizarre looking SCF, this is because your SCF is a different revision from the SCF editor.


Save will save the file with the current filename.

Save As

Save will allow you to save the file with another filename.


Delete will let you delete an SCF file from disk.


Quit - exit the program.


There are three types of variables: input, temp, and output. Input variables involve an IDFS source and units. Output variables are derived from a combination of input and temp variables as well as functions. All defined variables will be added to the variable window. If you wish to edit or delete a variable, right click on the button.

Defining Variables

After defining a variable, the variable button will pop up on the variable window. You can click the button on there to add the text to the algorithm window. When defining a variable, take care to create a UNIQUE name. The name is very important to the SCF editor and the name MUST be unique or you might overwrite another variable. To define the dimensions for both the TEMP and OUTPUT variables, select "Vector" and type in the lengths for each of the dimensions seperated by a space.

Input Variables

On input variables, before you can enter the source or the units, you must pick the data type. Valid data types are :

  1. Sensor Data
  2. Scan Data
  3. Calibration Data
  4. Instrument Status (mode) Data
  5. Data Quality Flags
  6. Start Azimuthal Angle
  7. Stop Azimuthal Angle
  8. Spin Rate
  9. Data Accumulation Time in Milliseconds
  10. Data Accumulation Time in Nanoseconds
  11. Data Latency Time in Milliseconds
  12. Data Latency Time in Nanoseconds

When you have picked a data type, you are now able to pick the source.

Click the source button and the standard source dialog will pop up. If you picked one of the first seven data types, you will be asked the data type again. If that data type is not available for that instrument, you may have an invalid input variable. If it is available, pick the same data type over again.

When you have a valid source, you will see the "Source" field filled in. This field is not editable. If you picked a data source which has some modifiers (i.e. - a sensor number), that "Data Source Modifier" field will be filled in. This field is editable in case one needs to add additional modifiers such as a scan value or phi angle reduction.

After the source has been picked, you can pick a valid unit. This will fill in the units field for you with the correct tables from the PIDF. The "Dimension" field will also be set for you.

The rest of the items can be edited. Make sure to choose a name.

Temp Variables

Temp variables need only a name and a dimension. Edit both of these and press OK. They are used as place holder when combining functions to make an output variable.

Output Variables

For output variables, the user must fill in everything. When filling in labels, long descriptions, and short descriptions; keep in mind the length limits.

Editing Variables

To edit a variable, popup the variable window and right click on the button. When you right click, you will see edit and delete. Choose "edit" and the standard dialog will popup allowing you to edit the variable.

A handy trick to create a new variable similar to an already existing variable is to edit the old variable and change the name. You will see both variables pop up.

Deleting Variables

To delete a variable, popup the variable window and right click on the button. When you right click, you will see edit and delete. Choose "delete" and the variable will disappear.


The header is basically anything that has nothing to do with the actual SCF itself. Header information is useful for a user who might want your SCF or for you to remember about a certain SCF. You do not have to enter header information if you are not interested.


Lets you change the title of the SCF. The title is roughly the first line of the SCF file.

Contact Info

Enter any information about who is writing the SCF such as name, address, and email address.


Enter any comments about the SCF.


These functions operate on the SCF file currently in memory. Currently, "Register" is unimplemented. "Reformat" is marginal. "Check" spawns two applications which must be in the path. The first is "chk_scf" and the other is "textok".


Reformat will attempt ( I stress *attempt*) to make the SCF look a little better by removing additional/unneccesary spaces. Its algorithm is very limiting, but it will perform some basic formatting. Most reformatting must be done by the user.


Will run chk_scf to check the SCF for errors. If there are no errors, there will only be a single line explaining that it was checking a file in /tmp directory. Otherwise, the errors will be explained right below that line. Press OK! to remove the box before continuing.


Currently unimplemented.


Occasionally a window will get lost on the screen somewhere, or you might close it inadvertantly. The options under the "Window" command allow you to find the window again.


Bring the variable window to the front. You can click on one of these buttons to put the text in the algorithm window or you can right click on the button to edit or delete it.


Brings the functions window to the front. The functions window is defined by the file SCF_fn.h being in the SDDAS_HOME/src/libbase_SCF directory. All functions defined in there will become a button. When clicked, they will put "= < function name> (" into the algorithm window.


Brings the Miscellaneous window to the front. The miscellaneous functions are other functions which are internal to the SCF. Examples are FOR and IF.


The algorithm window allows you to type in free form any information pertaining to the algorithm. Standard windows activities (like cut, paste, selection, removal, etc...) are allowed. Be sure to remember SCF limitations like you must define variables for constants if you wish to use them and that the unary - operator is not supported. Each token must be seperated by a space or else the checker will not be able to parse. You must also define a title or it will give an invalid number of input variables error.