Create Variable
Objectives
In a standard way, Isatis.neo dynamically creates variables when needed. These variables are generated with default attributes. For example, a numerical variable is automatically created as a Float 32-bits, with a default Display Format coming from the Setting up Preferences (depending on the associated unit) or with the attributes of an input variable when the two variables are physically equivalent.
The Create Variable functionality allows the creation of variables with specific attributes, different from the default ones, for instance a variable stored on 64 bits or a macro variable with 10 indices. All the values of the created variables are first set to Undefined.
Note that the Create Variable tool is also reachable in the Calculator application to create new variables before storing the result of the calculations in these new variables.
Interface
-
Select the Type of the variables to be created:
- Variable: to create a simple variable.
- Macro Variable: to create a macro variable. A macro variable groups several realizations, i.e. several variables of the same type (same storage, unit...). Each realization can be seen as an independent variable and is reachable by its index. For example, simulations are grouped into a macro variable. A macro variable is defined by its storage (as a classical variable), the number of indices and its index type (it should be Integer for a simulation number, Double for a threshold, Categorical for a domain, a String of characters for a date).
- Data Table: Click the directory icon next to Data Table to open a Data Selector and select the input data where the new variable will be created. The Data Table can also be dragged and dropped directly from the Data tab.
- Name: Enter the Name of the new variable to be created. This cannot be the same as the name of an existing variable in the same data table.
-
Define the Storage of the new variable. It can be of any type: Text, Categorical, Selection, Numerical - Float or Integer (on 64 or 32 bits). The storage format for float variables is a question of variable precision. A 64-bit format guarantees a better precision but it will take more space on the machine. In Isatis.neo, coordinates are stored in 64 bits. For integer variables, it depends on the variable values. A 32-bit integer allows the storage of values until 2^31, and until 2^63 with a 64-bit integer. The associated parameters depend on the Type and on the Storage defined.
- Text: No additional parameter is required.
- Categorical: This kind of variable is made to deal with categories (with a maximum of 32767 categories). A category is associated to a specific string of characters (corresponding to an integer value) and to a dedicated color. The different categories of the variables are managed via a catalog. Categories are exclusive: they can not overlap themselves, and a category cannot contain two others for example. The creation of this kind of variable requires defining the associated catalog. You can define a new catalog or use an existing one by ticking the corresponding option and selecting in the list the catalog you want to associate to your new variable.
- Selection: This kind of variable corresponds to a binary variable which can take the value 0 or 1 (equal 1 when the data point is inside the selection, 0 otherwise). A sample will be selected if the value of the selection variable is set to 1 and masked off if the value is 0. No undefined value is allowed in a selection variable. Many operators of Isatis.neo use a selection during input/read data table or output/write data table. In the input phase, this means that some samples will not be used during the calculation. In the output phase, this means that you do not want the operator to be applied to the masked samples. Any additional parameter is required here to create this kind of variable.
- Integer (32 or 64 bits): In the case of an integer variable, a Symbol, defined by a string of characters, can be associated.
- Float (32 or 64 bits): Select here the Unit Class of the variable. Untick the Use Default Display Unit option to define the Display Unit as the unit and the Precision used each time you will do something on this variable in Isatis.neo (display, statistics...). Otherwise the unit and precision defined for the associated unit class in the Setting up Preferences will be used.
-
A Macro Variable is defined by its storage (as a classical variable), the number of indices and its index type (it should be Integer for a simulation number, Double for a threshold, Categorical for a domain, a String of characters for a date).
- When creating a macro variable with Integer Indices Type, you have to specify the Number of Indices, i.e. the maximum index. The macro variable(s) indices should be set from 1 to this maximum index in most cases, but you can also define a Starting Index different from 1.
-
When creating a macro variable with Double Indices Type, you have to define the list of indices you want for the macro. Click on the
button to open the dedicated window. If indices are regular, they can be defined by entering a Minimum, a Maximum and a Step. If indices are irregular, define the value of your choice in the Add Value field and click
to add the entered value to the list.
Select the Unit Class associated to your indices. Untick the Use Default Display Unit option to define the Display Unit as the unit and the Precision used each time you will do something on this variable in Isatis.neo (display, statistics...). Otherwise the unit and precision defined for the associated unit class in the Setting up Preferences will be used.
- When creating a macro variable with String Indices Type, you have to define each index by entering the corresponding string. Use the
and
buttons to add/remove an index.
- When creating a macro variable with Categorical Indices Type, you have to define the associated catalog. You can define a new catalog or use an existing one by ticking the corresponding option and selecting in the list the catalog you want to associate to your new variable.