===Procedure for METIS_ifu_cal_DetLin ===

Detector linearity templates are used to determine detector linearity curves. The WCU BB/flatfield source is set to the appropriate temperature. A short series (10, tbc) of observations is taken with various WCU integrating sphere exit aperture masks to vary the brightness levels.

<color #00a2e8>Setup METIS: Background exposures</color>
  * Set ''wcu-per'' (''INS.OPTI17.NAME'') to ''IN''
  * Set ''wcu-pp1'' (''INS.OPTI18.NAME'') to ''ELT_mask''
  * Set ''wcu-bb-aperture-mask'' (''INS.OPTI19.NAME'') to ''CLOSED''
  * Set ''wcu-fp2-1'' (''INS.OPTI20.NAME'') to ''flatfield'' (open position)
  * Set ''wcu-bb'' (''SEQ.WCU.BB.TEMP'') to ''TEMP-L''
  * Wait for about 45 minutes (warming up time, depends on the BB temperature selection)
  * Check the power readout. If the power is detectable, continue
  * Take background measurements with requested DIT, NDIT and NEXPO

<color #00a2e8>Setup METIS: Science exposures</color>
  * Set ''wcu-bb-aperture-mask''  (''INS.OPTI19.NAME'') to ''MASK01''
  * Set ''cfo-pp1'' (''INS.OPTI1.NAME'') to ''PPS-CFO1''
  * Set ''cfo-fp2'' (''INS.OPTI3.NAME'') to ''FIELD-11''
  * Set ''cfo-lms'' (''INS.OPTI4.NAME'') to ''IN''
  * Set ''lms-pwa'' (''INS.OPTI5.NAME'') to ''PPS-LMS''
  * Set ''lms-gra'' (''INS.OPTI6.NAME'') to grating angle (main dispersed range)
  * Set ''lms-pra'' (''INS.OPTI7.NAME'') to chosen pre-disperser angle (spectral order)
  * Set ''lms-msa'' (''INS.OPTI8.NAME'') to ''Nominal'' or ''Extended''
  * [comment] For this detector calibration we set the pre-disperser and disperser to such a setting that illuminates the detector most equally.
  * Take science measurements with requested DIT, NDIT and NEXPO 

===Parameters for METIS_ifu_cal_DetLin ===

^Parameter             ^Hidden     ^Range (default)            ^Label^
|DPR CATG              |yes        |CALIB TEST (CALIB) |Data product category|
|DPR TECH              |yes        |IFU (IFU)                 |Data product technique|
|DPR TYPE              |yes        |DETLIN (DETLIN)     |Data product type|      
|DET3 DIT               |yes         |0..TBD (NODEFAULT)         |LMS Detector integration time (DIT)|
|DET3 NDIT              |yes         |1..TBD (NODEFAULT)         |LMS Number of Integrations (NDIT)|
|SEQ TIME              |no         |0..TBD (NODEFAULT)         |Total integration time (sec)|
|DET3 NCORRS NAME       |no         |TBD                         |LMS Readout mode|
|SEQ NEXPO             |no         |0..1000 (NODEFAULT)        |Number of exposures per offset|
|INS WLEN CEN         |no         |2700 - 5300 nm (NODEFAULT)           |Central wavelength|
|SEQ WCU_BB_TEMP       |yes        |TEMP-L TEMP-M (NODEFAULT)     |WCU BB temperature for specific filter|
|SEQ WCU_OFF_NFRAMES   |yes        |TBD                        |Number of WCU off frames to take |
|INS OPTI1 NAME         |yes        | PPS-CFO1 (PPS-CFO1)                |CFO-PP1 mask wheel|
|INS OPTI2 NAME         |yes        | OUT (OUT)                |CFO-PP1 ADC wheel|
|INS OPTI3 NAME         |no         |FIELD-11 (FIELD-11)                  |Slit name|
|INS OPTI4 NAME         |yes        |IN (IN)                  |LMS beamsplitter pickoff wheel|
|INS OPTI5 NAME         |yes        |open PPS-LMS SPM-LMS (PPS-LMS)   |LMS PP1 mask wheel|
|INS OPTI6 NAME         |no        |OUT IN (NODEFAULT)                  |LMS spectral IFU mechanism|
|INS OPTI7 NAME         |yes        |TBD (TBD)                  |LMS pre-disperser (to be determined by template)|
|INS OPTI8 NAME         |yes        |TBD (TBD)                  |LMS main disperser (to be determined by template)|
|INS OPTI17 NAME         |yes        |IN (IN)                    | WCU periscope arm|
|INS OPTI18 NAME	|yes          |WCU_mask AIV_mask ELT_mask (ELT_mask)             |WCU PP1 masks|
|INS OPTI20 NAME        |yes         |flatfield (flatfield) |WCU FP2.1 mask wheel|