Bug fixes and updates required by pipeline for SSDR2  - 20130917

Last Updated: 20140318 (DRY)

Bug Fixes Required in Pipeline

Images and Spectra

                ARC     = 'arc_MASTEROTJ093953.18+165516.4_20130208_Gr13_Free_slit1.5_56456_1.f'

        that means we need to cut the value whenever is longer that 68 char ? or the value is truncated automatically ?

    3. MJD Keywords need updated -- for images and spectra 

        mjd_end = mjd_obs + (ndit*single_image_exptime+1.8)/(60.*60.*24.)   DONE for SOFI SPECTRA         telapse = mjd_end-mjd_obs         tmid = telapse/2.

        where 1.8 sec is the overhead between one DIT and the next

Images Only (now including EFOSC acquisition images)

     5. We noticed that we had been recording the SOFI DETRON value in ADU and not electron counts  -- set DETRON = 12.0 in sofi images. Also need to update sofi EFFRON:

          effron = 12.*sqrt(ncombine)/sqrt(ndit)

          I don't understand this. For EFOSC we have DETRON=READ OUT NOISE = 11.6

          for sofi at the moment we have     READ OUT NOISE = 2.1   , but we want DETRON=12.0 ?

         For SOFI we had set DETRON = 2.1 ADU, but we need it in electron counts. Therefore DETRON = adu*gain = 2.1*5.4 ~ 12.

         The value is confirmed here : http://www.eso.org/sci/facilities/lasilla/instruments/sofi/inst/setup/Detector_characteristic.html

            

      6. We need to make sure the GAIN (e-/DN) is scaled according to the stacking process we've adopted. Our SOFI images are median combined, which means:

            effective gain = 2/3 * NCOMBINE * gain   DONE

     7. There's an issue with ZP measured in a very small percentage of images (zeropoint_corrections_20140523.tgz - https://db.tt/9XbCCSfX). Cosimo measure the ZPs by hand and Dave updated the values in the fits headers before send to ESO. Find the SOFI/EFOSC spreadsheets of corrections attached below (CI_mjd_obs_vs_photzp_EFOSC2_20140514t172734.xlsx, CI_mjd_obs_vs_photzp_SOFI_20140522t155631.xlsx)

        8. Wrong datatype or undefined value for some DETRON, PHOTSYS, PHOTZPER, PSF_FWHM keywords (best to look at the keywords in the 10 example images here and for some notes on what Dave did to fix these issues see here) 

      9. EFFRON for SOFI images. The SOFI images were median-combined so we are to use this formula:

                    EFFRON = RON / sqrt( ncombine * ndit ) * sqrt( pi/2 )

                instead of

                    EFFRON = 12.*sqrt(ncombine)/sqrt(ndit)

    10. SOFI zeropiints. ESO want the zeropoint corrected so that:

              MAG = -2.5 log10( data ) + PHOTZP

         and not as we have it:

            MAG = -2.5 log10( data / TEXPTIME) + PHOTZP

     Note we should be using DIT and not TEXPTIME as the images are median combined, so to fix our PHOTZP we need to apply this correction:

            PHOTZP_new = PHOTZP_old + 2.5log10(DIT)

    See here for more notes

        Also note, we have decided not to submit EFOSC images as 'science images', so we don't need to worry about the format of PHOTZP for EFOSC (at this time).

Spectra Only

      if the issue was only in the April data, I'm not doing anything unless the problem is found in more recent data