IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 12, 2010, 2:18:52 PM (16 years ago)
Author:
Paul Price
Message:

Add ability to get inputs from text file. Don't use PSF residuals ever, since they seem to cause bad results whenever they're used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppViz/src/ppVizPSF/ppVizPSFArguments.c

    r26405 r27667  
    5050    psMetadataAddStr(arguments, PS_LIST_TAIL, "-psf", 0, "Filename of PSF", NULL);
    5151    psMetadataAddStr(arguments, PS_LIST_TAIL, "-sources", 0, "Filename of CMF sources", NULL);
     52    psMetadataAddStr(arguments, PS_LIST_TAIL, "-input", 0, "Filename with x,y,mag", NULL);
    5253    psMetadataAddS32(arguments, PS_LIST_TAIL, "-fake-num", 0, "Number of fake sources", 0);
    5354    psMetadataAddF32(arguments, PS_LIST_TAIL, "-fake-mag", 0, "Magnitude of fake sources", NAN);
     
    6869    psMetadataAddStr(data->config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Output root name", data->outRoot);
    6970
     71    const char *inputName = psMetadataLookupStr(NULL, arguments, "-input"); // Name of input file
     72    if (inputName) {
     73        data->input = psVectorsReadFromFile(inputName, "%f %f %f");
     74        if (!data->input) {
     75            psError(psErrorCodeLast(), false, "Unable to read input file %s", inputName);
     76            return false;
     77        }
     78    }
     79
    7080    psTrace("ppVizPSF", 1, "Done reading command-line arguments\n");
    7181    psFree(arguments);
Note: See TracChangeset for help on using the changeset viewer.