IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19962


Ignore:
Timestamp:
Oct 7, 2008, 2:07:16 PM (18 years ago)
Author:
Paul Price
Message:

Adding hook to setup psphot visualisation.

Location:
trunk/ppSub/src
Files:
2 edited

Legend:

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

    r19698 r19962  
    77#include <pslib.h>
    88#include <psmodules.h>
     9#include <psphot.h>
    910
    1011#include "ppSub.h"
     
    172173{
    173174    assert(config);
     175
     176    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     177    if (!recipe) {
     178        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
     179        return false;
     180    }
     181
     182    {
     183        int arg;                        // Argument Number
     184        if ((arg = psArgumentGet(argc, argv, "-psphot-visual"))) {
     185            psArgumentRemove(arg, &argc, argv);
     186            psMetadataAddBool(recipe, PS_LIST_TAIL, "PSPHOT.VISUAL", 0, "Visual guide to psphot?", true);
     187        }
     188    }
    174189
    175190    pmConfigFileSetsMD(config->arguments, &argc, argv, "PPSUB.SOURCES", "-sources", NULL);
     
    249264    }
    250265
    251     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
    252     if (!recipe) {
    253         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
    254         return false;
    255     }
    256 
    257266    if (psMetadataLookupBool(NULL, arguments, "-photometry")) {
    258267        psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, "Perform photometry?", true);
  • trunk/ppSub/src/ppSubReadout.c

    r19704 r19962  
    512512        psFree(psf);
    513513
     514        if (psMetadataLookupBool(&mdok, recipe, "PSPHOT.VISUAL")) {
     515            psphotSetVisual(true);
     516        }
     517
    514518        // Need to ensure aperture residual is not calculated
    515         psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PSPHOT_RECIPE); // Recipe
    516         psMetadataItem *item = psMetadataLookup(recipe, "MEASURE.APTREND"); // Item determining aptrend
     519        psMetadata *psphotRecipe = psMetadataLookupMetadata(NULL, config->recipes, PSPHOT_RECIPE); // Recipe
     520        psMetadataItem *item = psMetadataLookup(psphotRecipe, "MEASURE.APTREND"); // Item determining aptrend
    517521        if (!item) {
    518522            psWarning("Unable to find MEASURE.APTREND in psphot recipe");
Note: See TracChangeset for help on using the changeset viewer.