==============================================================
Quality checks on INGRID data taken with the spare controller
of INGRID before and after implementing the new version
of the software of the controller and the modified INGRID's 
wiring loom.

These changes in software and wiring loom were needed to make
our system compatible with:

a/ our published documentation
b/ LIRIS

Date: 11/12/2002-12/12/2002
==============================================================

The tests basically consist on measuring:

 -hot pixels (number and position)
 -readout noise
 -bias level (PRE level)
 -gain
 -linearity
 -shape of darks

The tests were done for different configurations:

SDSU-1     -- controller currently in use (current software version-nov2002)
SDSU-2     -- spare controller for INGRID (no wiring or software changes)
SDSU-2-mod -- spare controller with modified software version and wiring loom


     
  
A./Analyze results from the darks (script 'dc.mod') and compare between different 
   controllers and software versions. All tests were done on the 11-12-2002

 test 1: SDSU-2,     UT=11:40:35.678; Array temp= ? ;     run numbers: r559019-061
 test 2: SDSU-2-mod, UT=14:12:41.942; Array temp= 73.9K;  run numbers: r559064-106
 test 3: SDSU-1,     UT=22:23:45.533; Array temp= 74.68K; run numbers: r559232-274


 Results in directory /scratch/fs1a/almu/ingrid/SDSU/

 See 20021211-SDSU2-mod.eps
     20021211-SDSU2.eps
     20021211-SDSU1.eps

                           SDSU-2    SDSU-2-mod    SDSU-1
-----------------------------------------------------------
RON (all frame)             5.0 adu   4.75 adu   6.77 adu
 
PRE(*)[1:512,1:512]         11437.    11923.     10856.
level [1:512,513:1024]      11865     12352.     11559.
      [513:1024,513:1024]   11545.    13270.     10951.
      [513:1024,1:512]      11018.    11522.     14577.

POST(*)[1:512,1:512]        11447.    11935.     10864.
level  [1:512,513:1024]     11868     12357.     11561. 
       [513:1024,513:1024]  11547.    13275.     10953. 
       [513:1024,1:512]     11031.    11538.     14588. <---

hot(*) [1:512,1:512]        1568      1606       1464
pixels [1:512,513:1024]     967       619         992
       [513:1024,513:1024]  1087      603         886
       [513:1024,1:512]     1870      1735       1818

(*) in a 10s dark (dark10sa.fits)


B./ Generate directory 'comparo'
    Compare hot pixel masks for darks of 10s obtained with different controllers:
   (1: hot pixels, 0: good pixels)
  
 -----IDL commands used:

   sdsu2=readfits('sdsu-2-hpm_dark10sa.fits',h)
   sdsu2mod=readfits('sdsu-2-mod-hpm_dark10sa.fits',h)
   sdsu1=readfits('sdsu-1-hpm_dark10sa.fits',h)

   a=where(sdsu2 eq 1.,c)
   IDL> print,c
        5492
   
   b=where(sdsu2mod eq 1.,c)
   IDL> print,c
        4563

  d=where(sdsu1 eq 1.,c)
  IDL> print,c
        5160


   q=where(sdsu2 eq 1. and sdsu2mod eq 1.,c)
   IDL> print,c
        3334     ====> number of hot pixels in common in SDSU-2 and SDSU-2-modified

   q2=where(sdsu2  eq 1. and sdsu1 eq 1.,c)
   IDL> print,c
        3031     ====> number of hot pixels in common in SDSU-2 and SDSU-1

   q3=where(sdsu1 eq 1. and sdsu2mod eq 1.,c)
   IDL> print,c
        3058

  Check this number with the number of hot pixels in common between darks 
  (of the same exposure time) obtained with the same configuration:
  
  sdsu2=readfits('sdsu-2-hpm_dark10sa.fits',h)
  sdsu2b=readfits('sdsu-2-hpm_dark10sb.fits',h)
  f=where(sdsu2b eq 1.,c)
  IDL> print,c
        6101
  p=where(sdsu2 eq 1. and sdsu2b eq 1.,c)
  IDL> print,c
        3393     ===> the number of hot pixels in common between these two darks
                      is similar to the number of hot pixels in common between
                      darks taken with different configurations.
------------------------

  Conclusion: Number and position of the hot pixels neither depend on 
              the controller nor on the hardware and software changes made.


C./ Estimation of the gain for several pairs of flats (note: not proper flats. They
    were taken through the ks filter, with the primary mirror petals closed.)

 C.1/ SDSU-2-modified
      ---------------
  np> imstat flat*
  #               IMAGE     MIDPT      MEAN    STDDEV       MIN       MAX
      flatks10sa.fits    15127.    14907.     1359.    -2050.    30316.
      flatks10sb.fits    15127.    14926.     1365.    -2041.    30502.
       flatks2sa.fits     3100.     3062.     266.2      -62.    21702.
       flatks2sb.fits     3115.     3076.     268.4      -25.    22393.
       flatks4sa.fits     6182.     6099.     526.4     -265.    24963.
       flatks4sb.fits     6183.     6105.     560.6    -1533.    25084.
       flatks6sa.fits     9207.     9095.     823.1    -1695.    25694.
       flatks6sb.fits     9236.     9103.     832.1    -1735.    25655.
   
   np> findgain flatks2sa flatks2sb dark2s dark2s
   Gain       = 3.956  electrons per ADU
   Read noise = 0.  electrons

   Flats      = flatks2sa[100:900,100:900]  &  flatks2sb[100:900,100:900]
   Biases     = dark2s[100:900,100:900]  &  dark2s[100:900,100:900]

   np> findgain flatks4sa flatks4sb dark4s dark4s
   Gain       = 1.089  electrons per ADU          ????
   Read noise = 0.  electrons

   Flats      = flatks4sa[100:900,100:900]  &  flatks4sb[100:900,100:900]
   Biases     = dark4s[100:900,100:900]  &  dark4s[100:900,100:900]
   np> 
   
   np> findgain flatks6sa flatks6sb dark6s dark6s 
   Gain       = 4.398  electrons per ADU
   Read noise = 0.  electrons

   Flats      = flatks6sa[100:900,100:900]  &  flatks6sb[100:900,100:900]
   Biases     = dark6s[100:900,100:900]  &  dark6s[100:900,100:900]
 
   np> findgain flatks10sa flatks10sb dark10sa dark10sb
   Gain       = 4.689  electrons per ADU
   Read noise = 25.71  electrons

   Flats      = flatks10sa[100:900,100:900]  &  flatks10sb[100:900,100:900]
   Biases     = dark10sa[100:900,100:900]  &  dark10sb[100:900,100:900]

Per quadrants: 
 
 Use flats:  flatks4sa,flatks4sb  (level ~6170 adu)

 ld: [270:450,290:390]  4.5  e/adu
 rd: [540:700,290:390]  4.397 e/adu
 ul: [290:450,560:670]  4.212 e/adu
 ur: [600:740,560:670]  4.439 e/adu


 C.2./ SDSU-2
       ------


    np> imstat flat*
#               IMAGE     MIDPT      MEAN    STDDEV       MIN       MAX
      flatks10sa.fits    15032.    14865.     1352.    -2030.    29049.
      flatks10sb.fits    15081.    14882.     1358.    -2027.    29390.
       flatks2sa.fits     3104.     3060.     299.5    -1394.    22962.
       flatks2sb.fits     3106.     3066.      301.    -1395.    22653.
       flatks4sa.fits     6171.     6083.     574.1    -1582.    25017.
       flatks4sb.fits     6179.     6089.     575.2    -1592.    25051.
       flatks6sa.fits     9185.     9067.     842.7    -1735.    25452.
       flatks6sb.fits     9214.     9076.     845.6    -1766.    25465.

 
  np> findgain flatks2sa flatks2sb dark2s dark2s
  Gain       = 4.238  electrons per ADU
  Read noise = 0.  electrons

  Flats      = flatks2sa[100:900,100:900]  &  flatks2sb[100:900,100:900]
  Biases     = dark2s[100:900,100:900]  &  dark2s[100:900,100:900]
 
  np> findgain flatks4sa flatks4sb dark4s dark4s
  Gain       = 4.413  electrons per ADU
  Read noise = 0.  electrons

  Flats      = flatks4sa[100:900,100:900]  &  flatks4sb[100:900,100:900]
  Biases     = dark4s[100:900,100:900]  &  dark4s[100:900,100:900]

  np> findgain flatks6sa flatks6sb dark6s dark6s
  Gain       = 4.512  electrons per ADU
  Read noise = 0.  electrons

  Flats      = flatks6sa[100:900,100:900]  &  flatks6sb[100:900,100:900]
  Biases     = dark6s[100:900,100:900]  &  dark6s[100:900,100:900]
  np> 

  np> findgain  flatks10sa flatks10sb dark10sa dark10sb
  Gain       = 4.707  electrons per ADU
  Read noise = 27.361  electrons

  Flats      = flatks10sa[100:900,100:900]  &  flatks10sb[100:900,100:900]
  Biases     = dark10sa[100:900,100:900]  &  dark10sb[100:900,100:900]

Per quadrants: 
 
 Use flats:  flatks4sa,flatks4sb  (level ~6170 adu)

 ld: [270:450,290:390]  4.558 e/adu
 rd: [540:700,290:390]  4.454 e/adu
 ul: [290:450,560:670]  4.263 e/adu
 ur: [600:740,560:670]  4.433 e/adu



C.3/ SDSU-1
     ------

np> imstat flat*
#               IMAGE     MIDPT      MEAN    STDDEV       MIN       MAX
      flatks10sa.fits    12019.    11845.     1083.    -2072.    25333.
      flatks10sb.fits    12028.    11857.     1087.    -2126.    25380.
       flatks2sa.fits     2456.     2425.     243.9    -1577.    22401.
       flatks2sb.fits     2460.     2427.     244.9    -1563.    22352.
       flatks4sa.fits     4893.     4822.     460.6    -1694.    24514.
       flatks4sb.fits     4892.     4828.     461.2    -1703.    24389.
       flatks6sa.fits     7289.     7199.     673.3    -1766.    25214.
       flatks6sb.fits     7299.     7207.     674.5    -1825.    25129.
 

np> findgain flatks2sa flatks2sb dark2s dark2s
Gain       = 4.023  electrons per ADU
Read noise = 0.  electrons
Flats      = flatks2sa[100:900,100:900]  &  flatks2sb[100:900,100:900]
Biases     = dark2s[100:900,100:900]  &  dark2s[100:900,100:900]

np> findgain flatks4sa flatks4sb dark4s dark4s
Gain       = 4.33  electrons per ADU
Read noise = 0.  electrons
Flats      = flatks4sa[100:900,100:900]  &  flatks4sb[100:900,100:900]
Biases     = dark4s[100:900,100:900]  &  dark4s[100:900,100:900]

np> findgain flatks6sa flatks6sb dark6s dark6s
Gain       = 4.391  electrons per ADU
Read noise = 0.  electrons
Flats      = flatks6sa[100:900,100:900]  &  flatks6sb[100:900,100:900]
Biases     = dark6s[100:900,100:900]  &  dark6s[100:900,100:900]

np> findgain flatks10sa flatks10sb dark10sa dark10sb
Gain       = 4.593  electrons per ADU
Read noise = 37.106  electrons
Flats      = flatks10sa[100:900,100:900]  &  flatks10sb[100:900,100:900]
Biases     = dark10sa[100:900,100:900]  &  dark10sb[100:900,100:900]


Per quadrants: 
 
 Use flats:  flatks6sa,flatks6sb  (level ~7290 adu)

 ld: [270:450,290:390]  4.61 e/adu
 rd: [540:700,290:390]  4.53 e/adu
 ul: [290:450,560:670]  4.20 e/adu 
 ur: [600:740,560:670]  4.39 e/adu


  Conclusion: The gain of the detector does not seem to depend neither on the 
              controller used nor on the software and hardware changes
              applied to the controller. The differences in gain between
              quadrants are the same with the different configurations.

D. Linearity tests with the spare controller (SDSU-2) after the
   hardware and software modifications.

   *Files: r559292-407, date: 12/12/2002, UT~13:05h
   *Output from 'ilinearity':
 
Calculating read noise before linearity test ...
subtracting pre read from post read ...
subtracting pre read from post read ...
median of first dark  :  2.982
median of second dark :  3.168
average               :  0.293 +- 0.600
readnoise             :  5.000 +- 0.012

Dark current:   0.151 +-  0.008 ADU/s

Calculating read noise after linearity test ...
median of first dark  :  4.252
median of second dark :  3.970
average               :  0.049 +- 0.651
readnoise             :  4.948 +- 0.013

Dark current:   0.293 +-  0.016 ADU/s


Output table (lin-sdsu-2-mod) in: 

/scratch/fs1a/almu/ingrid/SDSU/SDSU-2-modified/linearity

*full well limit at ~28000-30000 adu
*non-linearity ~2% over the range 0-15000 adu
*gain variable between ~4.2 and 4.7 e/adu over the range 0-15000 adu


 Conclusion: INGRID linearity measured with SDSU-2-modified have not changed
             with respect to the current values (for SDSU-1).