IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2008, 3:41:14 PM (18 years ago)
Author:
Paul Price
Message:

Need to include camera name now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimCreate.c

    r17557 r17915  
    1818    pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "PPIMAGE.INPUT", "INPUT");
    1919    if (!input) {
    20         // if we have not specified the camera already, we need to interpolate the recipes associated with this camera, and read other command-line recipes
     20        // if we have not specified the camera already, we need to interpolate the recipes associated with this camera, and read other command-line recipes
    2121        if (!pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CL)) {
    2222            psError(PS_ERR_IO, false, "Error merging recipes from camera config for %s", config->cameraName);
     
    2424        }
    2525
    26         simImage = true;
    27         fpa = pmFPAConstruct(config->camera); // FPA to contain the observation
    28         if (!fpa) {
    29             psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration.");
    30             return NULL;
    31         }
    32        
     26        simImage = true;
     27        fpa = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the observation
     28        if (!fpa) {
     29            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration.");
     30            return NULL;
     31        }
     32
    3333    } else {
    34         simImage = false;
    35         if (input->type != PM_FPA_FILE_IMAGE) {
    36             psError(PS_ERR_IO, true, "PPIMAGE.INPUT is not of type IMAGE");
    37             return NULL;
    38         }
    39         fpa = input->fpa;
     34        simImage = false;
     35        if (input->type != PM_FPA_FILE_IMAGE) {
     36            psError(PS_ERR_IO, true, "PPIMAGE.INPUT is not of type IMAGE");
     37            return NULL;
     38        }
     39        fpa = input->fpa;
    4040    }
    4141
     
    4949    if (file->type != PM_FPA_FILE_IMAGE) {
    5050        psError(PS_ERR_BAD_PARAMETER_TYPE, true, "%s type is not IMAGE", OUTPUT_FILE);
    51         psFree(fpa);
     51        psFree(fpa);
    5252        psFree(file);
    5353        return NULL;
     
    6060    // have we supplied a psf model?
    6161    if (psMetadataLookupPtr(NULL, config->arguments, "PSPHOT.PSF")) {
    62         bool status = false;
     62        bool status = false;
    6363
    64         // tie the psf file to the chipMosaic
     64        // tie the psf file to the chipMosaic
    6565        pmFPAfileBindFromArgs(&status, file, config, "PSPHOT.PSF.LOAD", "PSPHOT.PSF");
    6666        if (!status) {
    6767            psError(PS_ERR_UNKNOWN, false, "Failed to find/build PSPHOT.PSF.LOAD");
    68             psFree(fpa);
    69             psFree(file);
     68            psFree(fpa);
     69            psFree(file);
    7070            return NULL;
    7171        }
     
    8383    // if we have loaded an input image, we do not need to populate the fpa
    8484    if (!simImage) {
    85         return file;
     85        return file;
    8686    }
    8787
     
    9595            psFree(fpa);
    9696            psFree(view);
    97             psFree(file);
     97            psFree(file);
    9898            return NULL;
    9999        }
     
    107107                psFree(fpa);
    108108                psFree(view);
    109                 psFree(file);
     109                psFree(file);
    110110                return NULL;
    111111            }
     
    119119                    psFree(fpa);
    120120                    psFree(view);
    121                     psFree(file);
     121                    psFree(file);
    122122                    return NULL;
    123123                }
Note: See TracChangeset for help on using the changeset viewer.