IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7888


Ignore:
Timestamp:
Jul 12, 2006, 4:22:29 PM (20 years ago)
Author:
Paul Price
Message:

Getting rid of template file --- we use the output file for that.

Location:
trunk/ppFringe/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppFringe/src/ppFringeData.c

    r7839 r7888  
    1818        data->outFile = NULL;
    1919    }
    20     if (data->templateFile) {
    21         psFitsClose(data->templateFile);
    22         data->templateFile = NULL;
    23     }
    2420    return;
    2521}
     
    3329    data->inName = NULL;
    3430    data->outName = NULL;
    35     data->templateName = NULL;
    3631    data->numPoints = 0;
    3732    data->xWidth = 0;
     
    4338    data->inFile = NULL;
    4439    data->outFile = NULL;
    45     data->templateFile = NULL;
    4640    data->inFPA = NULL;
    4741
  • trunk/ppFringe/src/ppFringeData.h

    r7826 r7888  
    99    const char *inName;                 // Input FITS image file
    1010    const char *outName;                // Output FITS table file
    11     const char *templateName;           // Name of template output file
    1211    int numPoints;                      // Number of fringe points
    1312    int xWidth, yWidth;                 // Width of fringe points in x and y
     
    1716    psFits *inFile;                     // Input file handle
    1817    psFits *outFile;                    // Output file handle
    19     psFits *templateFile;               // Template file handle
    2018    pmFPA *inFPA;                       // Input FPA
    2119} ppFringeData;
  • trunk/ppFringe/src/ppFringeSetup.c

    r7837 r7888  
    2424{
    2525    // Setup and parse command-line arguments
    26     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-template", 0, "Template output", NULL);
    2726    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-detid", 0, "Detrend identifier", NULL);
    2827    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-classid", 0, "Class identifier", NULL);
     
    4039    data->inName = config->argv[1];
    4140    data->outName = config->argv[2];
    42     data->templateName = psMetadataLookupStr(NULL, config->arguments, "-template");
    4341
    4442    // Open the input file, determine the camera
     
    6967        goto die;
    7068    }
     69    psFree(view);
    7170
    7271    // Now we have a camera format, we can read the recipe
     
    9695    READ_RECIPE_ITEM("MASKVAL", recipe, data->maskVal, U8);
    9796
    98     // Open the output and template file
    99     data->outFile = psFitsOpen(data->outName, "w");
     97    // Open the output file
     98    data->outFile = psFitsOpen(data->outName, "a+");
    10099    if (!data->outFile) {
    101100        psError(PS_ERR_IO, false, "Unable to open output file %s\n", data->outName);
    102101        goto die;
    103     }
    104 
    105     if (data->templateName && strlen(data->templateName) > 0) {
    106         data->templateFile = psFitsOpen(data->templateName, "r");
    107         if (!data->templateFile) {
    108             psError(PS_ERR_IO, false, "Unable to open template file %s\n", data->templateName);
    109             goto die;
    110         }
    111102    }
    112103
Note: See TracChangeset for help on using the changeset viewer.