IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26325


Ignore:
Timestamp:
Dec 2, 2009, 1:17:56 PM (16 years ago)
Author:
Paul Price
Message:

Think I had the sense of magnitude corrections wrong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppStack/src/ppStackSources.c

    r26313 r26325  
    163163        }
    164164
    165         zp->data.F32[i] = airmassTerm * airmass - 2.5 * log10(exptime);
     165        zp->data.F32[i] = 2.5 * log10(exptime) - airmassTerm * airmass;
    166166        sumExpTime += exptime;
    167167    }
     
    243243    psFree(matches);
    244244
    245     // M = m + c0 + c1 * airmass - 2.5log(t) + transparency
     245    // M = m + c0 - c1 * airmass + 2.5log(t) - transparency
    246246    // Want sources to have m corresponding to airmass = 1 and t = sumExpTime and transparency = 0
    247     // m_0 + c1 * airmass_0 + 2.5log(t_0) - trans_0 = m_1 + c1 * airmass_1 + 2.5log(t_1) - trans_1
    248     // m_0 = m_1 + zp_1 + trans_1 - c1 * airmass_0 - 2.5log(t_0)
     247    // m_0 - c1 * airmass_0 + 2.5log(t_0) - trans_0 = m_1 - c1 * airmass_1 + 2.5log(t_1) - trans_1
     248    // m_0 = m_1 + zp_1 - trans_1 + c1 * airmass_0 - 2.5log(t_0)
     249    // where zp_1 = 2.5log(t_1) - c1 * airmass_1
    249250    // We don't need to know the magnitude zero point for the filter, since it cancels out
    250251    psLogMsg("ppStack", PS_LOG_INFO, "Scaling output to exp = %f sec, with airmass addition = %f mag\n",
     
    256257        }
    257258        psArray *sources = sourceLists->data[i]; // Sources of interest
    258         float magCorr = airmassTerm - 2.5*log10(sumExpTime) - zp->data.F32[i] - trans->data.F32[i];
     259        float magCorr = airmassTerm - 2.5*log10(sumExpTime) + zp->data.F32[i] - trans->data.F32[i];
    259260        options->norm->data.F32[i] = magCorr;
    260261        psLogMsg("ppStack", PS_LOG_INFO, "Applying magnitude correction to image %d: %f (%f,%f)\n",
Note: See TracChangeset for help on using the changeset viewer.