REGIS :
Dans xsh_data_rec on peut garder l'info sur le slit elle est partagée par tt les ordres.
==> Transformer xsh_data_rec pour cela!!

All:
xsh_mbias (xsh_crh_multi.c look at QUAL definition. CRHs seems not to be caught)

xsh_orderpos: update and provide andrea info to run on NIR data

NIR data reduction: commit change from Andrea to extract proper area.

Andrea:
xsh_linear: fix PAF generation

High:
v general: UVB raw data: Added DET.WIN1.BINX|Y,DPR.TECH|CATG|TYPE. 
v general: NIR: darks: Missing DET.OUT1.RON|CONAD|GAIN 
v general: Allowed to properly prepare (flip 180 deg?) UVB data. 
v general: Added xsh_utl_ima_arith to generate dummy images 
           (bias/dark for UVB/NIR) through existing image manipulation.

v xsh_mdark: BP_MAP/QUAL does not list CRHs. done: CRHs now are found

v general: Why NIR products are 1024*2048 and not 2048*2048? Now 2040x2040
v general: Allowed to properly prepare (flip 90 deg?) NIR data. 
o general: setting pre-over scan: VIS:2144x4000 UVB:2144x3000 NIR:2048x2048
o general: test all recipes on NIR/UVB data
o general: test startup on all data
o general: Missing biases 
o general: NIR: darks: missing off frames.  Even using the master dark frames
           as off frames there are problems

xsh_startup:
o   Find better starting data set for pattern and data catalog to have a more
    robust pattern matching in UVB.
v   Generate THE table corresponding to best model configuartion
v   Added XM,YM as best guess values after annealing 

v   XF and YF differs from XC & YC and from XThpre and YThpre: why?
v   Gauss fit is more accurate that xsh fit but less robust
v   Critical is the setting of the offy parameter value. Range: offy=[-2,6]
    Then with offset=7 we get 20 Ids
    Then with offset=7 we get 23 Ids (with box_sy=30)
    On a large table finds 1879 over 2577 lines, 1949 (with offset 7)
    On a large table finds 1843 over 2577 lines, 1920 (with offset 7 boxy=20)
    On a large table finds 1674 over 2577 lines, 1692 (with offset 7 boxy=10)
    
    Applied a min threshold to the image to remove weak line detection.
    Fixed peaks detection-selection
    Improved pattern matching: 13/24

     Is input to annealing X-Y position the correct one?
     product from physical model seems not to be recovered. 
     Gauss fit is insensible to line position

xsh_mbias:

xsh_mdark: 
      kappa(sigma) default to be set to 8-10: else too many CRHs
      problem reading test master dark


xsh_mflat:
TODO: add order traces/edges (order-x-y values)
      kappa(sigma) default to be set to 5: else flats are detected as CRHs 
      
xsh_orderpos: TODO: add order traces (order-x-y values), residuals
              Activate single frame CRHs detection

xsh_2dmap: TODO: add order traces (order-x-y values), residualsi. Fail on demo
              Activate single frame CRHs detection

xsh_wavecal: TODO: add order traces (order-x-y values), residuals. Fail on demo
              Activate single frame CRHs detection

xsh_linear: add paf info
xsh_scired: 
            Activate single frame CRHs detection


High:
xsh_mdark: 
  NIR: fix input tags: DARK_NIR (_ON & _OFF extensions have no sense)

a) xsh_format_recover/startup:
1 Find better guess
2 Define products
3 Define QC
4 Verify robustness to wrong cfg
5 Verify improvement cfg
6 Add THE map as data product

Medium:
b) Integrate the lin-gain algorithm into the xsh_linearity_recipe
Status: Done. To be better tested.

 
Low:
c) 
-If some function is not properly documented list this/those to the
 consortium and ask to add what missing.


suspended (to be rediscussed next progress meeting)
d) Add in some calibration procedures (xsh-predict, xsh_orderpos, xsh_2dmap, xsh_wavecal) a few columns to plot results as a function of X: and Y: (work expected to be ready by March 31)

