IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:49:37 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/pstamp/src/ppstampArguments.c

    r29885 r33638  
    2121    fprintf(stderr, "\n");
    2222    fprintf(stderr, "Optional arguments:\n");
    23     fprintf(stderr, "   [-class_id class_id]     selects class_id (only used with -pixcenter)\n");
    24     fprintf(stderr, "   [-astrom astrom.cmp] :   provide an alternative astrometry calibration\n");
    25     fprintf(stderr, "   [-mask   mk_image] :     mask image\n");
    26     fprintf(stderr, "   [-variance var_image] :  variance image\n");
    27     fprintf(stderr, "   [-no_censor_masked] : do not set masked pixels to NAN\n");
     23    fprintf(stderr, "   [-class_id class_id]  : selects class_id (only used with -pixcenter)\n");
     24    fprintf(stderr, "   [-astrom astrom.cmp]  : provide an alternative astrometry calibration\n");
     25    fprintf(stderr, "   [-mask   mk_image]    : mask image\n");
     26    fprintf(stderr, "   [-variance var_image] : variance image\n");
     27    fprintf(stderr, "   [-stage stage]        : stage of input image (raw, chip, warp, stack, diff)\n");
     28    fprintf(stderr, "   [-write_jpeg]         : write a JPEG  format of the image stamp\n");
     29    // fprintf(stderr, "   [-no_censor_masked]   : do not set masked pixels to NAN\n");
    2830    fprintf(stderr, "\n");
    2931
     
    6062    *pOptions = options;
    6163
    62     if (!pstampGetROI(&options->roip, &argc, argv, &gotCenter, &gotRange)) {
    63         usage();
     64    if ((argnum = psArgumentGet(argc, argv, "-wholefile"))) {
     65        psArgumentRemove(argnum, &argc, argv);
     66        gotCenter = true;
     67        gotRange = true;
     68        options->wholeFile = true;
     69    } else {
     70        if (!pstampGetROI(&options->roip, &argc, argv, &gotCenter, &gotRange)) {
     71            usage();
     72        }
    6473    }
    6574
     
    8493        psArgumentRemove(argnum, &argc, argv);
    8594    }
     95    if ((argnum = psArgumentGet(argc, argv, "-write_jpeg"))) {
     96        psArgumentRemove(argnum, &argc, argv);
     97        options->writeJPEG = true;
     98    } else {
     99        options->writeJPEG = false;
     100    }
    86101
    87102    pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM", "-astrom", "-astromlist");
     
    97112   
    98113    if ((argnum = psArgumentGet(argc, argv, "-no_censor_masked"))) {
     114        // this is the default. This is for compatiability
    99115        psArgumentRemove(argnum, &argc, argv);
    100116        options->censorMasked = false;
     117    }
     118    if ((argnum = psArgumentGet(argc, argv, "-censor_masked"))) {
     119        // default changed to not censor allow it to be changed back to true
     120        psArgumentRemove(argnum, &argc, argv);
     121        options->censorMasked = true;
     122    }
     123    if ((argnum = psArgumentGet(argc, argv, "-nocompress"))) {
     124        psArgumentRemove(argnum, &argc, argv);
     125        options->nocompress = true;
    101126    }
    102127
Note: See TracChangeset for help on using the changeset viewer.