IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 5, 2008, 12:41:58 PM (18 years ago)
Author:
bills
Message:

Get configuration dump file name from command line option. If no file
is provided, no dump is created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpArguments.c

    r19043 r19399  
    5959        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PSF", 0, "Do PSF determination?", true);
    6060    }
     61    if ((N = psArgumentGet(argc, argv, "-dumpconfig"))) {
     62        psArgumentRemove(N, &argc, argv);
     63        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "DUMP_CONFIG", PS_META_REPLACE,
     64                         "Filename for configuration dump", argv[N]);
     65        psArgumentRemove(N, &argc, argv);
     66    }
     67
    6168
    6269    if (!pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list")) {
     
    166173
    167174    // Dump configuration, now that's it's settled
    168     {
     175    psString dump_file =  psMetadataLookupStr(&status, config->arguments, "DUMP_CONFIG");
     176    if (dump_file) {
    169177        const char *skyCamera = psMetadataLookupStr(NULL, config->arguments,
    170178                                                    "SKYCELL.CAMERA");  // Name of camera for skycell
     
    172180        pmConfigRecipesCull(config, "PSWARP,PPSTATS,PSPHOT,MASKS");
    173181
    174         const char *outroot = psMetadataLookupStr(NULL, config->arguments, "OUTPUT"); // Output root name
    175         psAssert(outroot, "Should be there, we put it there!");
    176 
    177182        pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PSWARP.INPUT"); // Input file
    178         pmConfigDump(config, input->fpa, outroot);
     183        pmConfigDump(config, input->fpa, dump_file);
    179184    }
    180185
Note: See TracChangeset for help on using the changeset viewer.