.. highlightlang:: us .. index:: Gas Response Time (T90) .. _gaslaufzeiten_korrigieren: .. _gasresponsetime_correction: Gas Response Time Correction ============================ The addin "Gas Response Time Correction" can be used to shift signals in time. The channels can be specified in a file with there time lag. Installation ------------ * Choose :ref:`tools-add-in-manager`. * Select the Add-In :guilabel:`Gas Response Time Correction`. * Choose OK. * Create a copy for the example file :file:`\\uniplot\\addin\\rs_delaytime\\delaytime_example.ini` using the Windows Explorer. Choose a name and folder of your choice. Configuration ------------- Before you can use the addin you must specify the channels and there time lag values in the ini file. * Choose **Tools=>Gas Response Time Configuration** * Select the open "Enable Gas Response Time correction". * Click on the ``Browse...`` to open the new INI file. * After the file has been selected click on the ``Edit File`` button. Close the dialog box with *OK* to edit the INI file. .. image:: S:/uniplot-obj/images/delaytime-config-en.* Configuration INI file ---------------------- .. highlight:: ini Here is the example INI file:: ; ; UniPlot-Configuration file to shift data. ; Example: Gas Response Time ; ; The data must be recorded with a constant frequency, e.g 10 Hz. ; ; Each channel specified can be shifted in time positive or negative. ; ; The time values must be specified in the time units of the specified ; time channel. ; Example: NOx = 1.5 will shift the signal Nox by 1.5 seconds. The data ; point at 2 seconds will be shiftet to the position 0.5 seconds. The last ; 1.5 seconds at the end of the channel will be filled with missings. ; ; The shift must be smaller than to total recorded time. ; ; The channel name must be identical to the name used in the NC file. ; For MDF files: the time channel name must be specified without the enumeration ; value. ; [TimeChannel] Name=TimeStemp_QP1 [DataChannel] NOx = 1.5 HC = 3.1 CO2 = 1.9 In the section ``TimeChannel`` you must specify the time channel name. You can define a comma separated list of time channel namens. In this case the first matched time channel will be used to calculate the time shift. Example:: [TimeChannel] Name=TimeStemp_QP1, Time, acttime The section DataChannel contains the channels and there time delay. The Names are case sensitive and must match the spelling used in the NC file. The time delay must be specified in the unit of time channel, for example in seconds. Save the file when you are done. Usage ----- * If the correction is enabled the specified channels will be corrected during import. All datapoints will be advanced or delayed in time. The missing values at the end or the beginning will be filled with ``missing``. * The delay time will be saved in the channel attribute ``delaytime``. If the channel already contains the attribute ``delaytime``, it will be ignored. * The correction will be executed before the formula channels are evaluated. * The global attribute DT_delaytime_applied = 1 will be added to the NC file. UniScript-Interface ------------------- .. highlight:: us The delay times can be set with the help of the DT_ApplyDelayTimes function. The addin must be loaded and the option "Enable gas response time correction" must be disabled with the following function call before the data file is imported:: _DT_EnabelDelayTime("0"); The option can be enabled with "1". The first parameter of DT_ApplyDelayTimes() is the NC file name of the ncid of an open NC file with write mode. The second parameter is an object with the delay times for each channel. The element obj[1] contains the time channel name. A vector of time channels can be specified. In thsi case the first match is used. Example:: obj = [.] obj[1] = ["Time", "RECTime"]; obj["NOX"] = 3.49 obj["HC"] = 2.2 obj["CO"] = 4.12 DT_ApplyDelayTimes(ssNCFileName, obj); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2014.2 - UniScript Interface. * - R2013.0 - New. :sub:`id-1502096`