IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26422


Ignore:
Timestamp:
Dec 15, 2009, 6:18:17 PM (16 years ago)
Author:
eugene
Message:

psMetadataItemSupplement now has optional error status

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psphot/src/psphotOutput.c

    r25755 r26422  
    183183psMetadata *psphotDefineHeader (psMetadata *recipe) {
    184184
     185    bool status = true;
     186
    185187    psMetadata *header = psMetadataAlloc ();
    186188
    187189    // write necessary information to output header
    188     psMetadataItemSupplement (header, recipe, "ZERO_PT");
    189     psMetadataItemSupplement (header, recipe, "PHOTCODE");
    190 
    191     psMetadataItemSupplement (header, recipe, "APMIFIT");
    192     psMetadataItemSupplement (header, recipe, "DAPMIFIT");
    193     psMetadataItemSupplement (header, recipe, "NAPMIFIT");
     190    psMetadataItemSupplement (&status, header, recipe, "ZERO_PT");
     191    psMetadataItemSupplement (&status, header, recipe, "PHOTCODE");
     192
     193    psMetadataItemSupplement (&status, header, recipe, "APMIFIT");
     194    psMetadataItemSupplement (&status, header, recipe, "DAPMIFIT");
     195    psMetadataItemSupplement (&status, header, recipe, "NAPMIFIT");
    194196
    195197    // PSF model parameters (shape values for image center)
    196     psMetadataItemSupplement (header, recipe, "NPSFSTAR");
    197     psMetadataItemSupplement (header, recipe, "APLOSS");
    198 
    199     psMetadataItemSupplement (header, recipe, "FWHM_MAJ");
    200     psMetadataItemSupplement (header, recipe, "FW_MJ_SG");
    201     psMetadataItemSupplement (header, recipe, "FW_MJ_LQ");
    202     psMetadataItemSupplement (header, recipe, "FW_MJ_UQ");
    203 
    204     psMetadataItemSupplement (header, recipe, "FWHM_MIN");
    205     psMetadataItemSupplement (header, recipe, "FW_MN_SG");
    206     psMetadataItemSupplement (header, recipe, "FW_MN_LQ");
    207     psMetadataItemSupplement (header, recipe, "FW_MN_UQ");
    208 
    209     psMetadataItemSupplement (header, recipe, "ANGLE");
     198    psMetadataItemSupplement (&status, header, recipe, "NPSFSTAR");
     199    psMetadataItemSupplement (&status, header, recipe, "APLOSS");
     200
     201    psMetadataItemSupplement (&status, header, recipe, "FWHM_MAJ");
     202    psMetadataItemSupplement (&status, header, recipe, "FW_MJ_SG");
     203    psMetadataItemSupplement (&status, header, recipe, "FW_MJ_LQ");
     204    psMetadataItemSupplement (&status, header, recipe, "FW_MJ_UQ");
     205
     206    psMetadataItemSupplement (&status, header, recipe, "FWHM_MIN");
     207    psMetadataItemSupplement (&status, header, recipe, "FW_MN_SG");
     208    psMetadataItemSupplement (&status, header, recipe, "FW_MN_LQ");
     209    psMetadataItemSupplement (&status, header, recipe, "FW_MN_UQ");
     210
     211    psMetadataItemSupplement (&status, header, recipe, "ANGLE");
    210212
    211213    // Image Quality measurements
    212     psMetadataItemSupplement (header, recipe, "IQ_NSTAR");
    213 
    214     psMetadataItemSupplement (header, recipe, "IQ_FW1");
    215     psMetadataItemSupplement (header, recipe, "IQ_FW1_E");
    216     psMetadataItemSupplement (header, recipe, "IQ_FW2");
    217     psMetadataItemSupplement (header, recipe, "IQ_FW2_E");
    218 
    219     psMetadataItemSupplement (header, recipe, "IQ_M2");
    220     psMetadataItemSupplement (header, recipe, "IQ_M2_ER");
    221     psMetadataItemSupplement (header, recipe, "IQ_M2_LQ");
    222     psMetadataItemSupplement (header, recipe, "IQ_M2_UQ");
    223 
    224     psMetadataItemSupplement (header, recipe, "IQ_M2C");
    225     psMetadataItemSupplement (header, recipe, "IQ_M2C_E");
    226     psMetadataItemSupplement (header, recipe, "IQ_M2C_L");
    227     psMetadataItemSupplement (header, recipe, "IQ_M2C_U");
    228 
    229     psMetadataItemSupplement (header, recipe, "IQ_M2S");
    230     psMetadataItemSupplement (header, recipe, "IQ_M2S_E");
    231     psMetadataItemSupplement (header, recipe, "IQ_M2S_L");
    232     psMetadataItemSupplement (header, recipe, "IQ_M2S_U");
    233 
    234     psMetadataItemSupplement (header, recipe, "IQ_M3");
    235     psMetadataItemSupplement (header, recipe, "IQ_M3_ER");
    236     psMetadataItemSupplement (header, recipe, "IQ_M3_LQ");
    237     psMetadataItemSupplement (header, recipe, "IQ_M3_UQ");
    238 
    239     psMetadataItemSupplement (header, recipe, "IQ_M4");
    240     psMetadataItemSupplement (header, recipe, "IQ_M4_ER");
    241     psMetadataItemSupplement (header, recipe, "IQ_M4_LQ");
    242     psMetadataItemSupplement (header, recipe, "IQ_M4_UQ");
     214    psMetadataItemSupplement (&status, header, recipe, "IQ_NSTAR");
     215
     216    psMetadataItemSupplement (&status, header, recipe, "IQ_FW1");
     217    psMetadataItemSupplement (&status, header, recipe, "IQ_FW1_E");
     218    psMetadataItemSupplement (&status, header, recipe, "IQ_FW2");
     219    psMetadataItemSupplement (&status, header, recipe, "IQ_FW2_E");
     220
     221    psMetadataItemSupplement (&status, header, recipe, "IQ_M2");
     222    psMetadataItemSupplement (&status, header, recipe, "IQ_M2_ER");
     223    psMetadataItemSupplement (&status, header, recipe, "IQ_M2_LQ");
     224    psMetadataItemSupplement (&status, header, recipe, "IQ_M2_UQ");
     225
     226    psMetadataItemSupplement (&status, header, recipe, "IQ_M2C");
     227    psMetadataItemSupplement (&status, header, recipe, "IQ_M2C_E");
     228    psMetadataItemSupplement (&status, header, recipe, "IQ_M2C_L");
     229    psMetadataItemSupplement (&status, header, recipe, "IQ_M2C_U");
     230
     231    psMetadataItemSupplement (&status, header, recipe, "IQ_M2S");
     232    psMetadataItemSupplement (&status, header, recipe, "IQ_M2S_E");
     233    psMetadataItemSupplement (&status, header, recipe, "IQ_M2S_L");
     234    psMetadataItemSupplement (&status, header, recipe, "IQ_M2S_U");
     235
     236    psMetadataItemSupplement (&status, header, recipe, "IQ_M3");
     237    psMetadataItemSupplement (&status, header, recipe, "IQ_M3_ER");
     238    psMetadataItemSupplement (&status, header, recipe, "IQ_M3_LQ");
     239    psMetadataItemSupplement (&status, header, recipe, "IQ_M3_UQ");
     240
     241    psMetadataItemSupplement (&status, header, recipe, "IQ_M4");
     242    psMetadataItemSupplement (&status, header, recipe, "IQ_M4_ER");
     243    psMetadataItemSupplement (&status, header, recipe, "IQ_M4_LQ");
     244    psMetadataItemSupplement (&status, header, recipe, "IQ_M4_UQ");
    243245
    244246    // XXX these need to be defined from elsewhere
    245247    psMetadataAdd (header, PS_LIST_TAIL, "FSATUR",   PS_DATA_F32 | PS_META_REPLACE, "SATURATION MAG",      0.0);
    246248    psMetadataAdd (header, PS_LIST_TAIL, "FLIMIT",   PS_DATA_F32 | PS_META_REPLACE, "COMPLETENESS MAG",    0.0);
    247     psMetadataItemSupplement (header, recipe, "NSTARS");
    248 
    249     psMetadataItemSupplement (header, recipe, "NDET_EXT");
    250     psMetadataItemSupplement (header, recipe, "NDET_CR");
     249    psMetadataItemSupplement (&status, header, recipe, "NSTARS");
     250
     251    psMetadataItemSupplement (&status, header, recipe, "NDET_EXT");
     252    psMetadataItemSupplement (&status, header, recipe, "NDET_CR");
    251253
    252254    // sky background model statistics
    253     psMetadataItemSupplement (header, recipe, "MSKY_MN");
    254     psMetadataItemSupplement (header, recipe, "MSKY_SIG");
    255     psMetadataItemSupplement (header, recipe, "MSKY_MIN");
    256     psMetadataItemSupplement (header, recipe, "MSKY_MAX");
    257     psMetadataItemSupplement (header, recipe, "MSKY_NX");
    258     psMetadataItemSupplement (header, recipe, "MSKY_NY");
     255    psMetadataItemSupplement (&status, header, recipe, "MSKY_MN");
     256    psMetadataItemSupplement (&status, header, recipe, "MSKY_SIG");
     257    psMetadataItemSupplement (&status, header, recipe, "MSKY_MIN");
     258    psMetadataItemSupplement (&status, header, recipe, "MSKY_MAX");
     259    psMetadataItemSupplement (&status, header, recipe, "MSKY_NX");
     260    psMetadataItemSupplement (&status, header, recipe, "MSKY_NY");
    259261
    260262    psMetadataAddF32 (header, PS_LIST_TAIL, "DT_PHOT", PS_META_REPLACE, "elapsed psphot time", psTimerMark ("psphotReadout"));
    261 
    262     // XXX : don't require any of these about values to exist
    263     psErrorClear ();
    264263
    265264    return header;
Note: See TracChangeset for help on using the changeset viewer.