IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 9, 2013, 12:26:48 PM (13 years ago)
Author:
eugene
Message:

major upgrades to pswarp to enable skycell warp -> chip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpMaskStats.c

    r28130 r35563  
    11#include "pswarp.h"
    2 #include <ppStats.h>
    32
    43bool pswarpMaskStats(const pmReadout *readout, psMetadata *stats, const pmConfig *config)
     
    3130                              dynamicMaskVal,advisoryMaskVal)) {
    3231    psError(PS_ERR_UNKNOWN, false, "Unable to calculate masks for readout.");
    33     return(false);
     32    return false;
    3433  }
    35   psMetadataAddS32(stats, PS_LIST_TAIL,"MASKFRAC_NPIX", 0,
    36                    "Number of valid pixels", Npix_valid);
    37   psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_STATIC", 0,
    38                    "Fraction of pixels statically masked", (float) Npix_static / Npix_valid);
    39   psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_DYNAMIC", 0,
    40                    "Fraction of pixels dynamically masked", (float) Npix_dynamic / Npix_valid);
    41   psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_MAGIC", 0,
    42                    "Fraction of pixels magically masked", (float) Npix_magic / Npix_valid);
    43   psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_ADVISORY", 0,
    44                    "Fraction of pixels masked as an advisory", (float) Npix_advisory / Npix_valid);
    45   return(true);
     34
     35  // XXX with multiple inputs (eg, output stacks -> exposure), these only represent the last input
     36  psMetadataAddS32(stats, PS_LIST_TAIL,"MASKFRAC_NPIX",     PS_META_REPLACE, "Number of valid pixels", Npix_valid);
     37  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_STATIC",   PS_META_REPLACE, "Fraction of pixels statically masked", (float) Npix_static / Npix_valid);
     38  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_DYNAMIC",  PS_META_REPLACE, "Fraction of pixels dynamically masked", (float) Npix_dynamic / Npix_valid);
     39  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_MAGIC",    PS_META_REPLACE, "Fraction of pixels magically masked", (float) Npix_magic / Npix_valid);
     40  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_ADVISORY", PS_META_REPLACE, "Fraction of pixels masked as an advisory", (float) Npix_advisory / Npix_valid);
     41  return true;
    4642}
Note: See TracChangeset for help on using the changeset viewer.