IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 22, 2010, 8:34:28 PM (16 years ago)
Author:
Paul Price
Message:

Adding exposure map (both exposure time and number of inputs) to the outputs of ppStack. These are calculated both for the regular (convolved) and unconvolved stacks. These should compress pretty well, but I haven't enabled the compression yet. I also plan to add a weighted exposure time output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCamera.c

    r27075 r27400  
    283283    }
    284284
     285
     286    // Exposure image
     287    pmFPA *expFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output
     288    if (!expFPA) {
     289        psError(psErrorCodeLast(), false, "Unable to construct an FPA from camera configuration.");
     290        return false;
     291    }
     292    pmFPAfile *exp = pmFPAfileDefineOutput(config, expFPA, "PPSTACK.OUTPUT.EXP");
     293    psFree(expFPA);                        // Drop reference
     294    if (!exp) {
     295        psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.OUTPUT.EXP"));
     296        return false;
     297    }
     298    if (exp->type != PM_FPA_FILE_IMAGE) {
     299        psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.OUTPUT.EXP is not of type IMAGE");
     300        return false;
     301    }
     302    exp->save = true;
     303
     304    if (!pmFPAAddSourceFromFormat(expFPA, "Stack", exp->format)) {
     305        psError(psErrorCodeLast(), false, "Unable to generate output FPA.");
     306        return false;
     307    }
     308
     309    // Exposure numbers
     310    pmFPAfile *expNum = pmFPAfileDefineOutput(config, exp->fpa, "PPSTACK.OUTPUT.EXPNUM");
     311    if (!expNum) {
     312        psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.OUTPUT.MASK"));
     313        return false;
     314    }
     315    if (expNum->type != PM_FPA_FILE_MASK) {
     316        psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.OUTPUT.EXPNUM is not of type MASK");
     317        return false;
     318    }
     319    expNum->save = true;
     320
     321
     322
    285323    if (havePSFs) {
    286324        pmFPA *psfFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain PSF
     
    302340    }
    303341
    304 #if 1
    305342    // Unconvolved stack
    306343    pmFPA *unconvFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain unconvolved output
     
    351388        unconvVariance->save = true;
    352389    }
    353 #endif
     390
     391
     392    // Exposure image
     393    pmFPA *unconvExpFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output
     394    if (!unconvExpFPA) {
     395        psError(psErrorCodeLast(), false, "Unable to construct an FPA from camera configuration.");
     396        return false;
     397    }
     398    pmFPAfile *unconvExp = pmFPAfileDefineOutput(config, unconvExpFPA, "PPSTACK.UNCONV.EXP");
     399    psFree(unconvExpFPA);               // Drop reference
     400    if (!unconvExp) {
     401        psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.UNCONV.EXP"));
     402        return false;
     403    }
     404    if (unconvExp->type != PM_FPA_FILE_IMAGE) {
     405        psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.UNCONV.EXP is not of type IMAGE");
     406        return false;
     407    }
     408    unconvExp->save = true;
     409
     410    if (!pmFPAAddSourceFromFormat(unconvExpFPA, "Stack", unconvExp->format)) {
     411        psError(psErrorCodeLast(), false, "Unable to generate output FPA.");
     412        return false;
     413    }
     414
     415    // Output mask
     416    pmFPAfile *unconvExpNum = pmFPAfileDefineOutput(config, unconvExp->fpa, "PPSTACK.UNCONV.EXPNUM");
     417    if (!unconvExpNum) {
     418        psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.UNCONV.MASK"));
     419        return false;
     420    }
     421    if (unconvExpNum->type != PM_FPA_FILE_MASK) {
     422        psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.UNCONV.EXPNUM is not of type MASK");
     423        return false;
     424    }
     425    unconvExpNum->save = true;
     426
    354427
    355428    // Output JPEGs
Note: See TracChangeset for help on using the changeset viewer.