IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2009, 11:58:24 AM (17 years ago)
Author:
Paul Price
Message:

Committing changes in progress. Attempting to make ppSub spit out not just the regular subtracted image and sources, but the inverse with sources in the inverse (for the warp-warp difference). Does not compile yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppSub/src/ppSubData.c

    r23688 r23704  
    2020
    2121
    22 static void subOptionsFree(ppSubData *options)
     22static void subDataFree(ppSubData *data)
    2323{
    24     psFree(options->stats);
     24    if (data->statsFile) {
     25        psString stats = psMetadataConfigFormat(data->stats); // Statistics to output
     26        if (!stats || strlen(stats) == 0) {
     27            psWarning("Unable to generate statistics file.");
     28        } else {
     29            fprintf(data->statsFile, "%s", stats);
     30        }
     31        psFree(stats);
     32        fclose(data->statsFile);
     33    }
     34    psFree(data->stats);
    2535    return;
    2636}
     
    2838ppSubData *ppSubDataAlloc(void)
    2939{
    30     ppSubData *options = psAlloc(sizeof(ppSubData)); // Processing data, to return
    31     psMemSetDeallocator(options, (psFreeFunc)subOptionsFree);
     40    ppSubData *data = psAlloc(sizeof(ppSubData)); // Processing data, to return
     41    psMemSetDeallocator(data, (psFreeFunc)subDataFree);
    3242
    33     options->quality = 0;
    34     options->stats = psMetadataAlloc();
    35     psMetadataAddS32(options->stats, PS_LIST_TAIL, "QUALITY", 0, "Data quality", 0);
     43    data->quality = 0;
     44    data->photometry = false;
     45    data->inverse = false;
     46    data->statsFile = NULL;
     47    data->stats = psMetadataAlloc();
     48    psMetadataAddS32(data->stats, PS_LIST_TAIL, "QUALITY", 0, "Data quality", 0);
    3649
    3750    return options;
Note: See TracChangeset for help on using the changeset viewer.