IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34496


Ignore:
Timestamp:
Oct 3, 2012, 11:45:45 AM (14 years ago)
Author:
eugene
Message:

add EXT_ parameters needed for PS1_DV2 (EXT_FLUX, EXT_CAL_MAG, EXT_CHISQ, EXT_NDOF)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceIO_CMF.c.in

    r34452 r34496  
    723723    sources = psArraySort (sources, pmSourceSortByFlux);
    724724
     725    @>PS1_DV2@ float magOffset;
     726    @>PS1_DV2@ float zeroptErr;
     727    @>PS1_DV2@ float fwhmMajor;
     728    @>PS1_DV2@ float fwhmMinor;
     729    @>PS1_DV2@ pmSourceOutputsCommonValues (&magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
     730
    725731    // we are writing one row per model; we need to write out same number of columns for each row: find the max Nparams
    726732    int nParamMax = 0;
     
    797803            @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "RA_EXT",           0, "EXT model ra coordinate",                    raPos);
    798804            @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "DEC_EXT",          0, "EXT model dec coordinate",                   decPos);
     805            @>PS1_DV2@ float instFlux = isfinite(model->mag) ? pow(10.0, -0.4*model->mag) : NAN;
     806                                         @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "EXT_INST_FLUX",    0, "EXT fit instrumental counts",                instFlux);
    799807            psMetadataAddF32 (row, PS_LIST_TAIL, "EXT_INST_MAG",     0, "EXT fit instrumental magnitude",             model->mag);
    800808            psMetadataAddF32 (row, PS_LIST_TAIL, "EXT_INST_MAG_SIG", 0, "Sigma of PSF instrumental magnitude",        model->magErr);
     809
     810            @>PS1_DV2@ float calMag = isfinite(magOffset) ? model->mag + magOffset : NAN;
     811            @>PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "EXT_CAL_MAG", PS_DATA_F32, "EXT Magnitude using supplied calibration",   calMag);
     812            @>PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "EXT_CHISQ",   PS_DATA_F32, "EXT Magnitude using supplied calibration",   model->chisq);
     813            @>PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "EXT_NDOF",    PS_DATA_F32, "EXT Magnitude using supplied calibration",   model->nDOF);
    801814
    802815            @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "POSANGLE",   0, "position angle at source (degrees)",         posAngle);
Note: See TracChangeset for help on using the changeset viewer.