IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 25, 2010, 2:56:44 PM (16 years ago)
Author:
Paul Price
Message:

Fixing sign error in magnitude correction that was producing magnitudes WAY too faint. The important thing is that the transmission (clouds) correction is negative. I think I must at some stage have flipped the sign on magCorr so as to get trans negative, without realising this threw the zero point off. This gives correct zero points compared to SDSS, while also applying the transmission correction properly. Thanks to Dave Young for finding this bug!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackSources.c

    r27725 r28095  
    7777    PS_ASSERT_VECTOR_SIZE(inputMask, sourceLists->n, false);
    7878
    79 #if defined(TESTING) && 0
     79#if defined(TESTING) && 1
    8080    {
    8181        // Deliberately induce a major transparency difference
    82         psArray *sources = sourceLists->data[1]; // Sources to correct
     82        psArray *sources = sourceLists->data[0]; // Sources to correct
    8383        for (int i = 0; i < sources->n; i++) {
    8484            pmSource *source = sources->data[i]; // Source of interest
     
    283283                }
    284284                psArray *sources = sourceLists->data[i]; // Sources of interest
    285                 float magCorr = zp->data.F32[i] + trans->data.F32[i] - 2.5*log10(options->sumExposure);
     285                float magCorr = zp->data.F32[i] - trans->data.F32[i] - 2.5*log10(options->sumExposure);
    286286                if (zpExpNum == numGoodImages) {
    287287                    // Using measured zero points, so attempt to set target zero point
    288288                    magCorr -= zpTarget;
    289289                }
    290                 options->norm->data.F32[i] = -magCorr;
     290                options->norm->data.F32[i] = magCorr;
    291291                psLogMsg("ppStack", PS_LOG_INFO,
    292292                         "Applying scale correction to image %d: %f mag (%f)\n",
Note: See TracChangeset for help on using the changeset viewer.