IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 5:20:02 PM (17 years ago)
Author:
Paul Price
Message:

Updating to work following merge of pap_branch_20090128. Compiles, but not tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubCamera.c

    r21360 r21374  
    66 *
    77 *  @author IfA
    8  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2009-02-06 01:37:17 $
     8 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-06 03:20:02 $
    1010 *  Copyright 2009 Institute for Astronomy, University of Hawaii
    1111 */
     
    3939    }
    4040
    41     // Input weight map
    42     pmFPAfile *inputWeight = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.WEIGHT", "INPUT.WEIGHT");
    43     if (!status) {
    44         psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.WEIGHT");
     41    // Input variance map
     42    pmFPAfile *inputVariance = pmFPAfileBindFromArgs(&status, input, config, "PPSUB.INPUT.VARIANCE", "INPUT.VARIANCE");
     43    if (!status) {
     44        psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.INPUT.VARIANCE");
    4545        return NULL;
    4646    }
    47     if (inputWeight && inputWeight->type != PM_FPA_FILE_WEIGHT) {
    48         psError(PS_ERR_IO, true, "PPSUB.INPUT.WEIGHT is not of type WEIGHT");
     47    if (inputVariance && inputVariance->type != PM_FPA_FILE_VARIANCE) {
     48        psError(PS_ERR_IO, true, "PPSUB.INPUT.VARIANCE is not of type VARIANCE");
    4949        return false;
    5050    }
     
    7373    }
    7474
    75     // Reference weight map
    76     pmFPAfile *refWeight = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.WEIGHT", "REF.WEIGHT");
    77     if (!status) {
    78         psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.WEIGHT");
     75    // Reference variance map
     76    pmFPAfile *refVariance = pmFPAfileBindFromArgs(&status, ref, config, "PPSUB.REF.VARIANCE", "REF.VARIANCE");
     77    if (!status) {
     78        psError (PS_ERR_UNKNOWN, false, "Failed to load file definition PPSUB.REF.VARIANCE");
    7979        return NULL;
    8080    }
    81     if (refWeight && refWeight->type != PM_FPA_FILE_WEIGHT) {
    82         psError(PS_ERR_IO, true, "PPSUB.REF.WEIGHT is not of type WEIGHT");
     81    if (refVariance && refVariance->type != PM_FPA_FILE_VARIANCE) {
     82        psError(PS_ERR_IO, true, "PPSUB.REF.VARIANCE is not of type VARIANCE");
    8383        return false;
    8484    }
     
    108108    outMask->save = true;
    109109
    110     // Output weight
    111     if (inputWeight && refWeight) {
    112         pmFPAfile *outWeight = pmFPAfileDefineOutput(config, output->fpa, "PPSUB.OUTPUT.WEIGHT");
    113         if (!outWeight) {
    114             psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.WEIGHT"));
    115             return false;
    116         }
    117         if (outWeight->type != PM_FPA_FILE_WEIGHT) {
    118             psError(PS_ERR_IO, true, "PPSUB.OUTPUT.WEIGHT is not of type WEIGHT");
    119             return false;
    120         }
    121         outWeight->save = true;
     110    // Output variance
     111    if (inputVariance && refVariance) {
     112        pmFPAfile *outVariance = pmFPAfileDefineOutput(config, output->fpa, "PPSUB.OUTPUT.VARIANCE");
     113        if (!outVariance) {
     114            psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.VARIANCE"));
     115            return false;
     116        }
     117        if (outVariance->type != PM_FPA_FILE_VARIANCE) {
     118            psError(PS_ERR_IO, true, "PPSUB.OUTPUT.VARIANCE is not of type VARIANCE");
     119            return false;
     120        }
     121        outVariance->save = true;
    122122    }
    123123
     
    146146    // XXX should be based on recipe : inConvMask->save = true;
    147147
    148     // Convolved input weight
    149     if (inputWeight) {
    150         pmFPAfile *inConvWeight = pmFPAfileDefineOutput(config, inConv->fpa, "PPSUB.INPUT.CONV.WEIGHT");
    151         if (!inConvWeight) {
    152             psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.WEIGHT"));
    153             return false;
    154         }
    155         if (inConvWeight->type != PM_FPA_FILE_WEIGHT) {
    156             psError(PS_ERR_IO, true, "PPSUB.INPUT.CONV.WEIGHT is not of type WEIGHT");
    157             return false;
    158         }
    159         // XXX should be based on recipe : inConvWeight->save = true;
     148    // Convolved input variance
     149    if (inputVariance) {
     150        pmFPAfile *inConvVariance = pmFPAfileDefineOutput(config, inConv->fpa, "PPSUB.INPUT.CONV.VARIANCE");
     151        if (!inConvVariance) {
     152            psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.VARIANCE"));
     153            return false;
     154        }
     155        if (inConvVariance->type != PM_FPA_FILE_VARIANCE) {
     156            psError(PS_ERR_IO, true, "PPSUB.INPUT.CONV.VARIANCE is not of type VARIANCE");
     157            return false;
     158        }
     159        // XXX should be based on recipe : inConvVariance->save = true;
    160160    }
    161161
     
    184184    // XXX should be based on recipe : refConvMask->save = true;
    185185
    186     // Convolved ref weight
    187     if (refWeight) {
    188         pmFPAfile *refConvWeight = pmFPAfileDefineOutput(config, refConv->fpa, "PPSUB.REF.CONV.WEIGHT");
    189         if (!refConvWeight) {
    190             psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.WEIGHT"));
    191             return false;
    192         }
    193         if (refConvWeight->type != PM_FPA_FILE_WEIGHT) {
    194             psError(PS_ERR_IO, true, "PPSUB.REF.CONV.WEIGHT is not of type WEIGHT");
    195             return false;
    196         }
    197         // XXX should be based on recipe : refConvWeight->save = true;
     186    // Convolved ref variance
     187    if (refVariance) {
     188        pmFPAfile *refConvVariance = pmFPAfileDefineOutput(config, refConv->fpa, "PPSUB.REF.CONV.VARIANCE");
     189        if (!refConvVariance) {
     190            psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.VARIANCE"));
     191            return false;
     192        }
     193        if (refConvVariance->type != PM_FPA_FILE_VARIANCE) {
     194            psError(PS_ERR_IO, true, "PPSUB.REF.CONV.VARIANCE is not of type VARIANCE");
     195            return false;
     196        }
     197        // XXX should be based on recipe : refConvVariance->save = true;
    198198    }
    199199
Note: See TracChangeset for help on using the changeset viewer.