Entering Data into a Data File ============================== First you need to enter some data into a file. Open your editor and start entering the data shown below: .. _my_exp_1: .. figure:: pictures/data_file.png :align: center :alt: The text version of this example data is my_exp_1.data in the example directory. :scale: 60 % Fig.1: Structure of a data file Now save the file as ``my_exp_1.data`` (this is the standard format of a :class:`LT.datafile.dfile` object). I prefer to give the data files the extension ``.data`` in order to distinguish them from other files. This example shows the four main parts of a data file. #. *Comment lines* (starting with a ``#`` in the first column) are ignored by the program and are used to add information that you might later find useful for yourself. #. *Parameter definition lines*. These **ALWAYS** start with ``#\``. In this way you can enter values which are common to all data points. #. **THE HEADER LINE**, this is the most important line and **MUST BE PRESENT**. It always starts with ``#!`` followed by the names of the variables of the data entered below in column form. #. Each columns is represented by ``name[dtype, col.nr.]/``, *dtype* is the data type and *col.nr* (starting at 0) is the column number, **do not forget the / at the end of the name** #. Data types: - s : string - f : float - i : integer 6. blank lines are ignored #. *Data lines*. Each line of **MUST** have the same number of data as you have variable names in the header line. In the end each variable name labels a column of data. Preparing data files should be done before you start the experiments and is part of your preparation for your next lab session. Entering data into a file is what one of you can do during the experiment and/or what you need to do when you start analyzing the data. These data can now be used in python using the (LabTool) :mod:`LT.box` for further analysis.