Product-Channel Connections
===========================

The definition of each SCC product requires the specification of all the lidar channels  needed to calculate it. For example, for a Raman backscatter product it is necessary to speficy which elastic and Raman lidar channels need to be used to compute the particle backscatter profile. 

The list of the channels to be provided depends on the product type and also on the product usecase_.

.. _usecase: usecases.html 


In particular, the number and the type of the lidar channels to be linked to a product for a particular usecase is given by the input channels (i.e. the channels you find on the top of each usecase schema) given in the definition of the corresponding usecase. 

For example, from the schema defining the usecase 5 of Raman backscatter product we find that 4 channels need to be linked: 

- 2 elastic channels (one for near range and another for the far range - *elTnr* and *elTfr*) 
- 2 Raman channels (again one for near range and one for the far range *vrRN2nr* of *vrRN2fr*).     

Lidar channels are linked to a particular product by using the tab 'Product/channel connections' available in each product settings page (from admin section). To make the link two channel characteristics should be provided: 

- channel ID
- Signal Type

The channel ID is automatically provided when you click on the small magnifying glass available on the right of channel ID field (tab Product/channel connections) and select the channel you want to use in the pop up list (if the channel ID to be included is already known it is possible to type it directly).

The signal type should be selected among the available options according to the role of the specific channel in the product calculation. To facilitate the consistency between the definition of signal type and what is required by the selected product usecase, the input channels reported in each usecase schema are named according to the available signal types. 

Coming back to the example of the usecase 5 of Raman backscatter, for the near range and far range elastic channels the signal types *elTnr* and *elTfr* should be used. In the same way for the near range and far range Raman channels the signal types *vrRN2nr* and *vrRN2fr* should be selected.  

.. warning::
    If the definition of the channels in "Product/channel connections" is not consistent with what expected from the specified product usecase, an error reporting inconsistent product definition is reported by ELPP module.


Sygnal types are defined as it follows:

:Elastic channels:  
	:elT: elastic lidar channel (total)
        :elTnr: near range elastic lidar channel (total)
	:elTfr: far range elastic lidar channel (total)
	:elTunr: ultra near range elastic lidar channel (total)
	:elPR: reflected polarization component of elastic lidar channel 
        :elPRnr: near range reflected polarization component of elastic lidar channel
	:elPRfr: far range reflected polarization component of elastic lidar channel
	:elPT: transmitted polarization component of elastic lidar channel
	:elPTnr: near range transmitted polarization component of elastic lidar channel
	:elPTfr: far range transmitted polarization component of elastic lidar channel

:Raman channels:
	:vrRN2: ro-vibration Raman channel due to atmospheric N2 molecule
	:vrRN2nr: near range ro-vibrational Raman channel due to atmospheric N2 molecule
	:vrRN2fr: far range ro-vibrational Raman channel due to the atmospheric N2 molecule
	:pRRlow: low quantum number pure rotational Raman channel. Typically used together with high quantum number pure rotational Raman channel(s) to perform atmospheric temperature measurements 
	:pRRlownr: near range low quantum number pure rotational Raman channel. Typically used together with high quantum number pure rotational Raman channel(s) to perform atmospheric temperature measurements
	:pRRlowfr: far range low quantum number pure rotational Raman channel. Typically used together with high quantum number pure rotational Raman channel(s) to perform atmospheric temperature measurements
	:pRRhigh: high quantum number pure ritational Raman channel. Typically used together with low quantun number pure rotational Raman channel(s) to perform atmospheric temperature measurements
	:pRRhighnr: near range high quantum number pure ritational Raman channel. Typically used together with low quantun number pure rotational Raman channel(s) to perform atmospheric temperature measurements
	:pRRhighfr: far range high quantum number pure ritational Raman channel. Typically used together with low quantun number pure rotational Raman channel(s) to perform atmospheric temperature measurements

:Polarization calibration channels:
	:+45elPR: plus 45 degrees rotated (in the polarization plane) reflected polariazion component of elastic lidar channel
 	:+45elPRnr: plus 45 degress rotated (in the polarization plane) near range reflected polarization component of elastic lidar channel 
	:+45elPRfr: plus 45 degrees rotated (in the polarization plane) far range reflected polarization component of elastic lidar channel
	:+45elPT: plus 45 degrees rotated (in the polariation plane) transmitted component of elastic lidar channel*
	:+45elPTnr: plus 45 degree rotated (in the polarization plane) near range transmitted polarization component of elastic lidar channel
	:+45elPTfr: plus 45 degree rotated (in the polarization plane) far range transmitted polarization component of elastic lidar channel
        :-45elPR: minus 45 degrees rotated (in the polarization plane) reflected polariazion component of elastic lidar channel
        :-45elPRnr: minus 45 degress rotated (in the polarization plane) near range reflected polarization component of elastic lidarchannel
        :-45elPRfr: minus 45 degrees rotated (in the polarization plane) far range reflected polarization component of elastic lidar channel
        :-45elPT: minus 45 degrees rotated (in the polariation plane) transmitted component of elastic lidar channel
        :-45elPTnr: minus 45 degree rotated (in the polarization plane) near range transmitted polarization component of elastic lidar channel
        :-45elPTfr: minus 45 degree rotated (in the polarization plane) far range transmitted polarization component of elastic lidarchannel

Elastic channels are requested for the definition of product types:

- Raman backscatter
- Elastic backscatter
- Raman backscatter and linear depolarization
- Elastic backscatter and linear depolarization
- Lidar ratio and extinction

Raman channels are requested for the definition of the product types:

- Raman backscatter 
- Raman backscatter and linear depolarization
- Extinction only
- Lidar ratio and extinction

Calibration channels are requested for the definition of the product types:

- Linear polarization calibration 
