Adding a channel
================

After adding a system, a telescope and a laser to the database, you need to add a new channel. 
To do this, click on the **HOI channels** in the *System settings* panel.
This will take you to a page with a list of all available channels that are connected with your lidar systems. 
This list should be empty if this is the first time you add a system. 

To add a new channel to the database click on **Add HOI channel** at the top right of the screen.
This will take you to a new page were you can fill in the needed information. As before, the fields in **bold**
are mandatory and you will need to fill them before you can save you new system. 

The fields you have to fill here are more, as many of these are used during the processing of measurements.

.. warning::

   There is a last step, different from the previous cases, when saving a new channel. You need to connect your  channel with
   a lidar system before you save, or else all your entry will be lost. Read carefully through this document (or directly
   the :ref:`last section <connect-channel-to-system>`) to avoid any problems.
   

Fill in the fields
------------------

To start using the single calculus chain you will need to fill the following fields:

Name
   The name of the channel ex. "355", "1064 analog" etc.

Telescope
   The telescope that is used for this channel
   
Laser
   The laser that is used for this channel

Interference filter center
   The center of the interference filter in nm
   
Interference filter FWHM
   The FWHM of the interference filter in nm

Emission wavelength
   The emission wavelength of the laser used for this channel
   
Field of view
   The field of view related to this channel in mrad

Raw range resolution
   The raw range resolution of the measured data in m

Dead time
   The dead of the detector in ns. You should fill in this in case
   of a photon counting detector.

Trigger delay
   The trigger delay value for the channel in ns. Fill in 0 if not needed.
   
Scattering mechanism
   The scattering mechanism that is involved in this channel. Select the appropriate value from the drop-down list.

Dead time correction type
   The dead time correction type to be applied. Select *Not defined* if none needs to be defined.

Background mode
   The way to calculate the signal background. Select *Not defined* if none needs to be defined.

Signal type
   The type of the signal that is measured, ex. "elT" for total elastic, "vrRN2" for vibrational-rotational
   Raman signal from Nitrogen molecules etc. See :ref:`signal-types` for details.
   
Detection mode
   The detection mode of this channel.

.. _connect-channel-to-system:

Connecting to a system
----------------------

Before you finish, you need to attach your channel to one of your systems. To do this, go at the bottom of the page and
select your system from the drop-down list in the **System channels** area. 

When you are done, press the **save** button at the bottom right of the page. 
This will take you back to the list of your channels. 
If everything went OK your new channel you just added should appear in the list.


