IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 9, 2010, 8:24:35 PM (16 years ago)
Author:
Paul Price
Message:

Adding ppVizPattern to visualise pattern correction from pattern output.

Location:
branches/eam_branches/20091201/ppViz
Files:
3 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ppViz

    • Property svn:mergeinfo set to (toggle deleted branches)
      /branches/eam_branches/20091113/ppViz26119-26255
      /branches/pap/ppViz26320
  • branches/eam_branches/20091201/ppViz/src/ppVizPattern/ppVizPatternCamera.c

    r26827 r26837  
    77#include <psmodules.h>
    88
    9 #include "ppVizPSF.h"
     9#include "ppVizPattern.h"
    1010
    1111/// Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc
     
    2727
    2828
    29 bool ppVizPSFCamera(ppVizPSFData *data // Run-time data
     29bool ppVizPatternCamera(ppVizPatternData *data // Run-time data
    3030    )
    3131{
    3232    bool status;                        // Status of file definition
    3333
    34     fileArguments("PSF", data->psfName, "Input PSF", data->config);
    35     pmFPAfile *psf = pmFPAfileDefineFromArgs(&status, data->config, "PSPHOT.PSF.LOAD", "PSF"); // File
    36     if (!status || !psf) {
    37         psError(PS_ERR_IO, false, "Failed to build file from PSPHOT.LOAD.PSF");
     34    fileArguments("PATTERN", data->patternName, "Input pattern", data->config);
     35    pmFPAfile *input = pmFPAfileDefineFromArgs(&status, data->config, "PPVIZPATTERN.INPUT",
     36                                               "PATTERN"); // File
     37    if (!status || !input) {
     38        psError(PS_ERR_IO, false, "Failed to build file from PPVIZPATTERN.INPUT");
    3839        return false;
    3940    }
    4041
    41     if (data->sourcesName) {
    42         fileArguments("SOURCES", data->sourcesName, "Input sources", data->config);
    43         pmFPAfile *srcs = pmFPAfileBindFromArgs(&status, psf, data->config,
    44                                                 "PSPHOT.INPUT.CMF", "SOURCES"); // File
    45         if (!status || !srcs) {
    46             psError(PS_ERR_IO, false, "Failed to build file from PSPHOT.INPUT.CMF");
    47             return false;
    48         }
    49     }
    50 
    51     pmFPAfile *output = pmFPAfileDefineOutput(data->config, psf->fpa, "PPVIZPSF.OUTPUT");
     42    pmFPAfile *output = pmFPAfileDefineOutput(data->config, input->fpa, "PPVIZPATTERN.OUTPUT");
    5243    if (!output) {
    5344        psError(psErrorCodeLast(), false, "Unable to define output.");
     
    5647    output->save = true;
    5748
     49#if 0
    5850    // Now the camera has been determined, we can read the recipe
    59     psMetadata *recipe = psMetadataLookupMetadata(NULL, data->config->recipes, PPVIZPSF_RECIPE); // Recipe
     51    psMetadata *recipe = psMetadataLookupMetadata(NULL, data->config->recipes, PPVIZPATTERN_RECIPE); // Recipe
    6052    if (!recipe) {
    61         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPVIZPSF_RECIPE);
     53        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPVIZPATTERN_RECIPE);
    6254        return false;
    6355    }
    64 
    65     data->minFlux = psMetadataLookupF32(NULL, recipe, "MINFLUX"); // Minimum flux
    66     if (!isfinite(data->minFlux) || data->minFlux <= 0) {
    67         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find legitimate value for MINFLUX");
    68         return false;
    69     }
    70 
    71     if (!data->sourcesName) {
    72         data->size = psMetadataLookupS32(NULL, recipe, "SIZE"); // Size of PSF
    73         if (data->size <= 0) {
    74             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find legitimate value for SIZE");
    75             return false;
    76         }
    77     }
     56#endif
    7857
    7958    return true;
Note: See TracChangeset for help on using the changeset viewer.