IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39389 for trunk


Ignore:
Timestamp:
Feb 24, 2016, 12:01:00 PM (10 years ago)
Author:
eugene
Message:

loop-weights are getting a space in the re-generated command line option: save and pass the user string

Location:
trunk/Ohana/src/relastro
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/include/relastro.h

    r39375 r39389  
    348348float *LoopWeight2MASS;
    349349float *LoopWeightTycho;
     350char *LoopWeight2MASSstr;
     351char *LoopWeightTychostr;
    350352
    351353int ImagSelect;
  • trunk/Ohana/src/relastro/src/args.c

    r39364 r39389  
    538538  // NOTE: this must come after -nloop above
    539539  LoopWeight2MASS = NULL;
     540  LoopWeight2MASSstr = NULL;
    540541  if ((N = get_argument (argc, argv, "-loop-weights-2mass"))) {
    541542    remove_argument (N, &argc, argv);
     543    LoopWeight2MASSstr = strcreate(argv[N]);
    542544    LoopWeight2MASS = ParseLoopWeights (argv[N]);
    543545    remove_argument (N, &argc, argv);
     
    546548  if ((N = get_argument (argc, argv, "-loop-weights-tycho"))) {
    547549    remove_argument (N, &argc, argv);
     550    LoopWeightTychostr = strcreate(argv[N]);
    548551    LoopWeightTycho = ParseLoopWeights (argv[N]);
    549552    remove_argument (N, &argc, argv);
  • trunk/Ohana/src/relastro/src/launch_region_hosts.c

    r39388 r39389  
    134134    if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset  %f", MaxMeanOffset);
    135135
    136     if (LoopWeight2MASS) {
    137       char *weightline = NULL;
    138       for (i = 0; i < NLOOP; i++) {
    139         strextend (&weightline, "%f,", LoopWeight2MASS[i]);
    140       }
    141       strextend (&command, "-loop-weights-2mass %s", weightline);
    142       free (weightline);
    143     }
    144     if (LoopWeightTycho) {
    145       char *weightline = NULL;
    146       for (i = 0; i < NLOOP; i++) {
    147         strextend (&weightline, "%f,", LoopWeightTycho[i]);
    148       }
    149       strextend (&command, "-loop-weights-tycho %s", weightline);
    150       free (weightline);
    151     }
     136    if (LoopWeight2MASS) {  strextend (&command, "-loop-weights-2mass %s", LoopWeight2MASSstr); }
     137    if (LoopWeightTycho) {  strextend (&command, "-loop-weights-tycho %s", LoopWeightTychostr); }
    152138
    153139    strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
Note: See TracChangeset for help on using the changeset viewer.