IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9058


Ignore:
Timestamp:
Sep 28, 2006, 5:31:33 PM (20 years ago)
Author:
Paul Price
Message:

Adding -norm option to do normalisation of a file.

Location:
trunk/ppImage/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageArguments.c

    r8751 r9058  
    6969    }
    7070
     71    // Optional normalisation factor
     72    if ((N = psArgumentGet(argc, argv, "-norm"))) {
     73        psArgumentRemove(N, &argc, argv);
     74        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "NORMALISATION", PS_TYPE_F32,
     75                         "Normalisation to apply", argv[N]);
     76        psArgumentRemove(N, &argc, argv);
     77    }
     78
    7179    if (argc != 2) usage ();
    7280
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r8751 r9058  
    5757    }
    5858
     59    // Normalisation by a (known) constant
     60    bool mdok;                          // Status of MD lookup
     61    float norm = psMetadataLookupF32(&mdok, config->arguments, "NORMALISATION");
     62    if (mdok && isfinite(norm)) {
     63        psBinaryOp(input->image, input->image, "*", psScalarAlloc(norm, PS_TYPE_F32));
     64    }
     65
    5966    psFree (detview);
    6067    return true;
Note: See TracChangeset for help on using the changeset viewer.