<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Dear Philippe,<br>
<br>
the idea of my modification was to determinate IlluminationCorrection
as best as possible, but with minimal modification of AW dataflow.<br>
<br>
PhotSrcCatalog object has skybackground already as magnitude value:<br>
skybackground = -2.50 * math.log10(frame.image.median/frame.EXPTIME)<br>
<br>
If you recall, in AW calibration flow the IlluminationCorrection
produced from not many exposures, but only one. It doesn't allowed to
store into DB more then 1 source exposure, used to produce
IlluminationCorrection. <br>
The idea to use several exposures must be evaluated taking into account
possible variation and stability of illumination over FOV. <br>
<br>
With best regars,<br>
Fedor Getman<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:heraud@astro.uni-bonn.de">heraud@astro.uni-bonn.de</a> wrote:
<blockquote
 cite="mid:c94a8a5d6a288122c0cdf981dc67430c.squirrel@www.astro.uni-bonn.de"
 type="cite">
  <pre wrap="">Dear Fedor,

Thus you also noticed the problem! That's good!
Thanks for the code. I will test it when I find some time.
But I am wondering if you should not have a -2.5log10 somewhere since I
think the "background" derived by Sextractor is in ADU/Frame, which you
use to correct magnitude?
And does it work if we combine exposures with different exposure times (I
do not see here that the exposure time is used)?

Best regards,
Philippe


  </pre>
  <blockquote type="cite">
    <pre wrap="">Dear Philippe and Gijs,

first of all, my apologise for not commited to cvs my modification of
illumination correction done several mounth before.
Here the modified method "get_inputs_for_fit_routine()" wich must be
invocked instead original one in "
    </pre>
  </blockquote>
  <pre wrap=""><!---->
()" of IlluminationCorrection
  </pre>
  <blockquote type="cite">
    <pre wrap="">class.
The idea is to adjust before fitting the residuals into the same
surface, using common value over FOV - sky background (as determined by
sExtractor during source detection).

In our tests with 3c273 mosaic, that modified method to derive
IlluminationCorrection give reasonable results in comparision to SDSS
mags.

-------------------------------------------------------------------------------------------------
    def get_inputs_for_fit_routine_new(self):
        '''This routine accumulates source information from the input
        PhotSrcCatalog objects in preparation for the overall fit.
        '''
        sigclipped_rawzeros_list = []
        pixelpos_list            = []
        error_list               = []

        gridpositions_dict = {}
        sigclipped_rawzeros_dict = {}

        for photcat in self.photcats:
            for gridposition in self.gridpositions[photcat.chip.name]:

gridpositions_dict[photcat.chip.name+"_"+str(gridposition.index)] =
gridposition

            for src in photcat.photsourcelist:
                corrected_dmag = src.mag - src.instmag -
(self.photcats[0].skybackground-photcat.Background)
                dmag_error     = math.sqrt(src.mag_err**2 +
src.instmag_err**2)

sigclipped_rawzeros_dict[photcat.chip.name+"_"+str(src.index)] =
(corrected_dmag, dmag_error)

        # do sigma-clipping
        mean, stdev   =
get_mean_and_stdev([sigclipped_rawzeros_dict[key][0] for key in
sigclipped_rawzeros_dict.keys()])
        median        = do_median([sigclipped_rawzeros_dict[key][0] for
key in sigclipped_rawzeros_dict.keys()])
        sigma_clip    = abs(self.process_params.SIGCLIP_LEVEL * stdev)

        for key in sigclipped_rawzeros_dict.keys():
            if abs( sigclipped_rawzeros_dict[key][0] - median ) &gt;
sigma_clip:
                sigclipped_rawzeros_dict.pop(key)

        # Add the gridpositions and the corrected raw zeropoints to the
lists defined
        # above
        for star in sigclipped_rawzeros_dict.keys():

sigclipped_rawzeros_list.append(sigclipped_rawzeros_dict[star][0] -
median)
                pixelpos_list.append((gridpositions_dict[star].x,
gridpositions_dict[star].y))
                error_list.append(1.)

        return pixelpos_list, sigclipped_rawzeros_list, error_list
-------------------------------------------------------------------------------------------------


Philippe Heraudeau wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Dear Gijs,

As we discussed yesterday the illumination correction is underestimated
in awe because of the rescaling of each individual chip to the median of
the zeropoints (see ./astro/main/IlluminationCorrection.py)
I simulated this in the 2 ps files you can download with:

wget <a class="moz-txt-link-freetext" href="http://www.astro.uni-bonn.de/~heraud/illum_4_4.ps.gz">http://www.astro.uni-bonn.de/~heraud/illum_4_4.ps.gz</a>
wget <a class="moz-txt-link-freetext" href="http://www.astro.uni-bonn.de/~heraud/illum_8_8.ps.gz">http://www.astro.uni-bonn.de/~heraud/illum_8_8.ps.gz</a>

which illustrate this effect for 4x4 chip and 8*8 chip cameras.
The higher number of chips the more "smoothing" and that's why you
notice more the underestimation with CFHTLS data than with WFI.

The figures show:
a) the input illumination correction which is about 25% maximum from
peak to valley.
b) the 2D 2nd order polynomial fit of the input
c) the input illumination after dividing the field by the number of
chips and rescaling each chip to the median to simulate what is done in
aw for 4x4 chips in illum_4_4.ps and 8x8 chips in illum_8_8.ps
d) the 2D 2nd order polynomial fit of c) which clearly underestimate the
input: only a few percent (6-7%) are seen instead of 25%
Note: The minimum of the plotted surfaces is always set to 0 and the
median of c is 0.

We should solve this issue to get the proper illumination correction...

Cheers,
Philippe


      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>