IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23911


Ignore:
Timestamp:
Apr 17, 2009, 3:57:42 PM (17 years ago)
Author:
bills
Message:

set exciseValue when reading image from pmFPAfile

Location:
trunk/magic/remove/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksio.c

    r23487 r23911  
    66static void streakFilesFree(streakFiles *sf);
    77static void freeImages(streakFiles *);
     8static void setExciseValue(sFile *in);
    89
    910static nebServer *ourNebServer = NULL;
     
    471472    sf->inImage->numCols = readout->image->numCols;
    472473    sf->inImage->numRows = readout->image->numRows;
     474    setExciseValue(sf->inImage);
    473475}
    474476
     
    545547            streaksExit("", PS_EXIT_DATA_ERROR);
    546548        }
    547         if (in->image->type.type == PS_TYPE_U16) {
    548             in->exciseValue = 65535;
    549             psMetadataAddU16(in->header, PS_LIST_TAIL, "BLANK", 0, "", 65535);
    550             psMetadataAddU16(in->header, PS_LIST_TAIL, "ZBLANK", 0, "", 65535);
    551         } else {
    552             in->exciseValue = NAN;
    553         }
     549        setExciseValue(in);
    554550    }  else {
    555551        if (stage != IPP_STAGE_RAW) {
     
    613609
    614610#ifdef STREAKS_COMPRESS_OUTPUT
     611    // Paul says that I should be able to leave this blank
     612    bitpix = 0;
    615613    setFitsOptions(out, bitpix, bscale, bzero);
    616614    setFitsOptions(rec, bitpix, bscale, bzero);
     
    10351033    ourNebServer = NULL;
    10361034}
     1035static void
     1036setExciseValue(sFile *in)
     1037{
     1038    if (in->image->type.type == PS_TYPE_U16) {
     1039        in->exciseValue = 65535;
     1040        psMetadataAddU16(in->header, PS_LIST_TAIL, "BLANK", 0, "", 65535);
     1041        psMetadataAddU16(in->header, PS_LIST_TAIL, "ZBLANK", 0, "", 65535);
     1042    } else {
     1043        in->exciseValue = NAN;
     1044    }
     1045}
  • trunk/magic/remove/src/streaksremove.c

    r21481 r23911  
    2828        streaksExit("", PS_EXIT_CONFIG_ERROR);
    2929    }
    30     double maskStreak = (double) psMetadataLookupU8(&status, masks, "STREAK");
     30    double maskStreak = (double) psMetadataLookupU16(&status, masks, "STREAK");
    3131    if (!status) {
    3232        psError(PM_ERR_CONFIG, false, "failed to lookup mask value for STREAK in recipes\n");
     
    3535
    3636    // optionally setting pixels with any mask bits execpt POOR.WARP to NAN
    37     psU8 poorWarp = (double) psMetadataLookupU8(&status, masks, "POOR.WARP");
     37    psU16 poorWarp = (double) psMetadataLookupU16(&status, masks, "CONV.POOR");
    3838    if (!status) {
    3939        psError(PM_ERR_CONFIG, false, "failed to lookup mask value for POOR.WARP in recipes\n");
    4040        streaksExit("", PS_EXIT_CONFIG_ERROR);
    4141    }
    42     psU8 maskMask = ~poorWarp;
     42    psU16 maskMask = ~poorWarp;
    4343
    4444    psString streaksFileName = psMetadataLookupStr(NULL, config->arguments, "STREAKS");
Note: See TracChangeset for help on using the changeset viewer.