IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38382


Ignore:
Timestamp:
Jun 5, 2015, 12:14:01 PM (11 years ago)
Author:
eugene
Message:

update to libohana strextend

Location:
branches/eam_branches/ohana.20150429/src/relastro
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/relastro/include/relastro.h

    r38062 r38382  
    539539int hpm_objects (SkyRegion *region, Catalog *catalog);
    540540
    541 int strextend (char *input, char *format,...);
    542541int launch_region_hosts (RegionHostTable *regionHosts);
    543542
     
    591590float getColorBlue (off_t meas, int cat);
    592591float getColorRed (off_t meas, int cat);
    593 
    594 int strextend (char *input, char *format,...);
    595592
    596593int areImagesLoaded ();
  • branches/eam_branches/ohana.20150429/src/relastro/src/UpdateObjectOffsets.c

    r38352 r38382  
    152152    // MaxDensityUse, MaxDensityValue
    153153
    154     char command[1024];
    155     snprintf (command, 1024, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f",
     154    char *command = NULL;
     155    strextend (&command, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f",
    156156              group->hosts[i][0].hostID, CATDIR, group->hosts[i][0].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR);
    157157
    158     if (FIT_MODE == FIT_PM_ONLY)         strextend (command, "-pm");
    159     if (FIT_MODE == FIT_PAR_ONLY)        strextend (command, "-par");
    160     if (FIT_MODE == FIT_PM_AND_PAR)      strextend (command, "-pmpar");
    161 
    162     if (VERBOSE)       strextend (command, "-v");
    163     if (VERBOSE2)      strextend (command, "-vv");
    164     if (RESET)         strextend (command, "-reset");
    165     if (UPDATE)        strextend (command, "-update");
    166 
    167     if (RESET_BAD_IMAGES) strextend (command, "-reset-bad-images");
    168 
    169     if (ImagSelect)    strextend (command, "-instmag %f %f", ImagMin, ImagMax);
    170     if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue);
    171    
    172     if (USE_BASIC_CHECK) strextend (command, "-basic-image-search");
    173     if (FlagOutlier)     strextend (command, "-clip %d", CLIP_THRESH);
    174     if (ExcludeBogus)    strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
    175    
    176     if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1");
    177 
    178     if (PHOTCODE_KEEP_LIST) strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST);
    179     if (PHOTCODE_SKIP_LIST) strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST);
    180     if (PhotFlagSelect)     strextend (command, "+photflags");
    181     if (PhotFlagBad)        strextend (command, "+photflagbad %d", PhotFlagBad);
    182     if (PhotFlagPoor)       strextend (command, "+photflagpoor %d", PhotFlagPoor);
     158    if (FIT_MODE == FIT_PM_ONLY)         strextend (&command, "-pm");
     159    if (FIT_MODE == FIT_PAR_ONLY)        strextend (&command, "-par");
     160    if (FIT_MODE == FIT_PM_AND_PAR)      strextend (&command, "-pmpar");
     161
     162    if (VERBOSE)       strextend (&command, "-v");
     163    if (VERBOSE2)      strextend (&command, "-vv");
     164    if (RESET)         strextend (&command, "-reset");
     165    if (UPDATE)        strextend (&command, "-update");
     166
     167    if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images");
     168
     169    if (ImagSelect)    strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     170    if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);
     171   
     172    if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");
     173    if (FlagOutlier)     strextend (&command, "-clip %d", CLIP_THRESH);
     174    if (ExcludeBogus)    strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
     175   
     176    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
     177
     178    if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
     179    if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     180    if (PhotFlagSelect)     strextend (&command, "+photflags");
     181    if (PhotFlagBad)        strextend (&command, "+photflagbad %d", PhotFlagBad);
     182    if (PhotFlagPoor)       strextend (&command, "+photflagpoor %d", PhotFlagPoor);
    183183    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    184184
    185185    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    186       strextend (command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     186      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
    187187    }
    188188    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
    189       strextend (command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    190     }
    191 
    192     if (MinBadQF > 0.0)        strextend (command, "-min-bad-psfqf %f", MinBadQF);
    193     if (MaxMeanOffset != 10.0) strextend (command, "-max-mean-offset  %f", MaxMeanOffset);
     189      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     190    }
     191
     192    if (MinBadQF > 0.0)        strextend (&command, "-min-bad-psfqf %f", MinBadQF);
     193    if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset  %f", MaxMeanOffset);
    194194
    195195    if (TimeSelect) {
    196196      char *tstart = ohana_sec_to_date (TSTART);
    197197      char *tstop  = ohana_sec_to_date (TSTOP);
    198       strextend (command, "-time %s %s", tstart, tstop);
     198      strextend (&command, "-time %s %s", tstart, tstop);
    199199      free (tstart);
    200200      free (tstop);
     
    270270    // MaxDensityUse, MaxDensityValue
    271271
    272     char command[1024];
    273     snprintf (command, 1024, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f",
     272    char *command = NULL;
     273    strextend (&command, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f",
    274274              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR);
    275275
    276     if (FIT_MODE == FIT_PM_ONLY)         strextend (command, "-pm");
    277     if (FIT_MODE == FIT_PAR_ONLY)        strextend (command, "-par");
    278     if (FIT_MODE == FIT_PM_AND_PAR)      strextend (command, "-pmpar");
    279 
    280     if (VERBOSE)       strextend (command, "-v");
    281     if (VERBOSE2)      strextend (command, "-vv");
    282     if (RESET)         strextend (command, "-reset");
    283     if (UPDATE)        strextend (command, "-update");
    284 
    285     if (RESET_BAD_IMAGES) strextend (command, "-reset-bad-images");
    286 
    287     if (ImagSelect)    strextend (command, "-instmag %f %f", ImagMin, ImagMax);
    288     if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue);
    289    
    290     if (USE_BASIC_CHECK) strextend (command, "-basic-image-search");
    291     if (FlagOutlier)     strextend (command, "-clip %d", CLIP_THRESH);
    292     if (ExcludeBogus)    strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
    293    
    294     if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1");
    295 
    296     if (PHOTCODE_KEEP_LIST) strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST);
    297     if (PHOTCODE_SKIP_LIST) strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST);
    298     if (PhotFlagSelect)     strextend (command, "+photflags");
    299     if (PhotFlagBad)        strextend (command, "+photflagbad %d", PhotFlagBad);
    300     if (PhotFlagPoor)       strextend (command, "+photflagpoor %d", PhotFlagPoor);
     276    if (FIT_MODE == FIT_PM_ONLY)         strextend (&command, "-pm");
     277    if (FIT_MODE == FIT_PAR_ONLY)        strextend (&command, "-par");
     278    if (FIT_MODE == FIT_PM_AND_PAR)      strextend (&command, "-pmpar");
     279
     280    if (VERBOSE)       strextend (&command, "-v");
     281    if (VERBOSE2)      strextend (&command, "-vv");
     282    if (RESET)         strextend (&command, "-reset");
     283    if (UPDATE)        strextend (&command, "-update");
     284
     285    if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images");
     286
     287    if (ImagSelect)    strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     288    if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);
     289   
     290    if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");
     291    if (FlagOutlier)     strextend (&command, "-clip %d", CLIP_THRESH);
     292    if (ExcludeBogus)    strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
     293   
     294    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
     295
     296    if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
     297    if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     298    if (PhotFlagSelect)     strextend (&command, "+photflags");
     299    if (PhotFlagBad)        strextend (&command, "+photflagbad %d", PhotFlagBad);
     300    if (PhotFlagPoor)       strextend (&command, "+photflagpoor %d", PhotFlagPoor);
    301301    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    302302
    303303    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    304       strextend (command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     304      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
    305305    }
    306306    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
    307       strextend (command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    308     }
    309 
    310     if (MinBadQF > 0.0)        strextend (command, "-min-bad-psfqf %f", MinBadQF);
    311     if (MaxMeanOffset != 10.0) strextend (command, "-max-mean-offset  %f", MaxMeanOffset);
     307      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     308    }
     309
     310    if (MinBadQF > 0.0)        strextend (&command, "-min-bad-psfqf %f", MinBadQF);
     311    if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset  %f", MaxMeanOffset);
    312312
    313313    if (TimeSelect) {
    314314      char *tstart = ohana_sec_to_date (TSTART);
    315315      char *tstop  = ohana_sec_to_date (TSTOP);
    316       strextend (command, "-time %s %s", tstart, tstop);
     316      strextend (&command, "-time %s %s", tstart, tstop);
    317317      free (tstart);
    318318      free (tstop);
  • branches/eam_branches/ohana.20150429/src/relastro/src/args.c

    r37807 r38382  
    959959}
    960960
    961 int strextend (char *input, char *format,...) {
    962 
    963   char tmpextra[1024], tmpline[1024];
    964   va_list argp;
    965 
    966   va_start (argp, format);
    967   vsnprintf (tmpextra, 1024, format, argp);
    968   snprintf (tmpline, 1024, "%s %s", input, tmpextra);
    969   strcpy (input, tmpline);
    970 
    971   return TRUE;
    972 }
  • branches/eam_branches/ohana.20150429/src/relastro/src/launch_region_hosts.c

    r37807 r38382  
    7777    }
    7878
    79     char command[1024];
    80     snprintf (command, 1024, "relastro -parallel-images %s", filename);
    81     strextend (command, "-region-hosts %s", REGION_FILE);
    82     strextend (command, "-region-hostID %d", host->hostID);
    83     strextend (command, "-D CATDIR %s", CATDIR);
    84     strextend (command, "-region %f %f %f %f", host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat);
    85     strextend (command, "-statmode %s", STATMODE);
    86     strextend (command, "-minerror %f", MIN_ERROR);
    87     strextend (command, "-nloop %d", NLOOP);
    88     strextend (command, "-threads %d", NTHREADS);
     79    char *command = NULL;
     80    strextend (&command, "relastro -parallel-images %s", filename);
     81    strextend (&command, "-region-hosts %s", REGION_FILE);
     82    strextend (&command, "-region-hostID %d", host->hostID);
     83    strextend (&command, "-D CATDIR %s", CATDIR);
     84    strextend (&command, "-region %f %f %f %f", host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat);
     85    strextend (&command, "-statmode %s", STATMODE);
     86    strextend (&command, "-minerror %f", MIN_ERROR);
     87    strextend (&command, "-nloop %d", NLOOP);
     88    strextend (&command, "-threads %d", NTHREADS);
    8989
    9090    switch (FIT_TARGET) {
    9191      case TARGET_SIMPLE:
    92         strextend (command, "-update-simple");
     92        strextend (&command, "-update-simple");
    9393        break;
    9494      case TARGET_CHIPS:
    95         strextend (command, "-update-chips");
     95        strextend (&command, "-update-chips");
    9696        break;
    9797      case TARGET_MOSAICS:
    98         strextend (command, "-update-mosaics");
     98        strextend (&command, "-update-mosaics");
    9999        break;
    100100      case TARGET_NONE:
     
    102102    }
    103103
    104     if (VERBOSE)            strextend (command, "-v");
    105     if (VERBOSE2)           strextend (command, "-vv");
    106     if (RESET)              strextend (command, "-reset");
    107     if (UPDATE)             strextend (command, "-update");
    108     if (PARALLEL)           strextend (command, "-parallel");
    109     if (PARALLEL_MANUAL)    strextend (command, "-parallel-manual");
    110     if (PARALLEL_SERIAL)    strextend (command, "-parallel-serial");
    111     if (PHOTCODE_KEEP_LIST) strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST);
    112     if (PHOTCODE_SKIP_LIST) strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST);
    113     if (PHOTCODE_RESET_LIST) strextend (command, "-reset-to-photcode %s", PHOTCODE_RESET_LIST);
     104    if (VERBOSE)            strextend (&command, "-v");
     105    if (VERBOSE2)           strextend (&command, "-vv");
     106    if (RESET)              strextend (&command, "-reset");
     107    if (UPDATE)             strextend (&command, "-update");
     108    if (PARALLEL)           strextend (&command, "-parallel");
     109    if (PARALLEL_MANUAL)    strextend (&command, "-parallel-manual");
     110    if (PARALLEL_SERIAL)    strextend (&command, "-parallel-serial");
     111    if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
     112    if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     113    if (PHOTCODE_RESET_LIST) strextend (&command, "-reset-to-photcode %s", PHOTCODE_RESET_LIST);
    114114
    115     if (MaxDensityUse)      strextend (command, "-max-density %f", MaxDensityValue);
    116     if (ImagSelect)         strextend (command, "-instmag %f %f", ImagMin, ImagMax);
    117     if (ExcludeBogus)       strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
     115    if (MaxDensityUse)      strextend (&command, "-max-density %f", MaxDensityValue);
     116    if (ImagSelect)         strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     117    if (ExcludeBogus)       strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
    118118
    119119    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    120       strextend (command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     120      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
    121121    }
    122122    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
    123       strextend (command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     123      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    124124    }
    125125
    126     if (PhotFlagSelect)     strextend (command, "+photflags");
    127     if (PhotFlagBad)        strextend (command, "+photflagbad %d", PhotFlagBad);
    128     if (PhotFlagPoor)       strextend (command, "+photflagpoor %d", PhotFlagPoor);
     126    if (PhotFlagSelect)     strextend (&command, "+photflags");
     127    if (PhotFlagBad)        strextend (&command, "+photflagbad %d", PhotFlagBad);
     128    if (PhotFlagPoor)       strextend (&command, "+photflagpoor %d", PhotFlagPoor);
    129129
    130     if (CHIPMAP)            strextend (command, "-chipmap %d", CHIPMAP);
    131     if (RESET_IMAGES)       strextend (command, "-reset-images");
     130    if (CHIPMAP)            strextend (&command, "-chipmap %d", CHIPMAP);
     131    if (RESET_IMAGES)       strextend (&command, "-reset-images");
    132132
    133     if (MinBadQF > 0.0)        strextend (command, "-min-bad-psfqf %f", MinBadQF);
    134     if (MaxMeanOffset != 10.0) strextend (command, "-max-mean-offset  %f", MaxMeanOffset);
     133    if (MinBadQF > 0.0)        strextend (&command, "-min-bad-psfqf %f", MinBadQF);
     134    if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset  %f", MaxMeanOffset);
    135135
    136     strextend (command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
    137     strextend (command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
    138     strextend (command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX);
    139     strextend (command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS);
     136    strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
     137    strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     138    strextend (&command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX);
     139    strextend (&command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS);
    140140
    141     strextend (command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
     141    strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
    142142
    143     strextend (command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
    144     strextend (command, "-D USE_ICRF_LOCAL %d",   USE_ICRF_LOCAL);
    145     strextend (command, "-D USE_ICRF_SHFIT %d",   USE_ICRF_SHFIT);
    146     strextend (command, "-D USE_ICRF_POLE %d",    USE_ICRF_POLE);
     143    strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
     144    strextend (&command, "-D USE_ICRF_LOCAL %d",   USE_ICRF_LOCAL);
     145    strextend (&command, "-D USE_ICRF_SHFIT %d",   USE_ICRF_SHFIT);
     146    strextend (&command, "-D USE_ICRF_POLE %d",    USE_ICRF_POLE);
    147147
    148     if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1");
     148    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
    149149
    150150    if (TimeSelect) {
    151151      char *tstart = ohana_sec_to_date (TSTART);
    152152      char *tstop  = ohana_sec_to_date (TSTOP);
    153       strextend (command, "-time %s %s", tstart, tstop);
     153      strextend (&command, "-time %s %s", tstart, tstop);
    154154      free (tstart);
    155155      free (tstop);
  • branches/eam_branches/ohana.20150429/src/relastro/src/load_catalogs.c

    r38352 r38382  
    160160    // MaxDensityUse, MaxDensityValue
    161161
    162     char command[1024];
    163     snprintf (command, 1024, "relastro_client -load-objects %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f -D RELASTRO_SIGMA_LIM %f",
     162    char *command = NULL;
     163    strextend (&command, "relastro_client -load-objects %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f -D RELASTRO_SIGMA_LIM %f",
    164164              table->hosts[i].results, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR, SIGMA_LIM);
    165165
    166     if (FIT_MODE == FIT_PM_ONLY)         strextend (command, "-pm");
    167     if (FIT_MODE == FIT_PAR_ONLY)        strextend (command, "-par");
    168     if (FIT_MODE == FIT_PM_AND_PAR)      strextend (command, "-pmpar");
    169 
    170     if (VERBOSE)       strextend (command, "-v");
    171     if (VERBOSE2)      strextend (command, "-vv");
    172     if (RESET)         strextend (command, "-reset");
    173     if (ImagSelect)    strextend (command, "-instmag %f %f", ImagMin, ImagMax);
    174     if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue);
    175     if (FlagOutlier)   strextend (command, "-clip %d", CLIP_THRESH);
    176     if (ExcludeBogus)  strextend (command, "-exclude-bogus %f", ExcludeBogusRadius);
    177 
    178     if (USE_ICRF_CORRECT) strextend (command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
    179     if (USE_GALAXY_MODEL) strextend (command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
     166    if (FIT_MODE == FIT_PM_ONLY)         strextend (&command, "-pm");
     167    if (FIT_MODE == FIT_PAR_ONLY)        strextend (&command, "-par");
     168    if (FIT_MODE == FIT_PM_AND_PAR)      strextend (&command, "-pmpar");
     169
     170    if (VERBOSE)       strextend (&command, "-v");
     171    if (VERBOSE2)      strextend (&command, "-vv");
     172    if (RESET)         strextend (&command, "-reset");
     173    if (ImagSelect)    strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     174    if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);
     175    if (FlagOutlier)   strextend (&command, "-clip %d", CLIP_THRESH);
     176    if (ExcludeBogus)  strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
     177
     178    if (USE_ICRF_CORRECT) strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
     179    if (USE_GALAXY_MODEL) strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
    180180   
    181181    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    182       strextend (command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     182      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
    183183    }
    184184    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
    185       strextend (command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    186     }
    187 
    188     if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1");
    189     if (PHOTCODE_KEEP_LIST)  strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST);
    190     if (PHOTCODE_SKIP_LIST)  strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST);
    191     if (PhotFlagSelect)      strextend (command, "+photflags");
    192     if (PhotFlagBad)         strextend (command, "+photflagbad %d", PhotFlagBad);
    193     if (PhotFlagPoor)        strextend (command, "+photflagpoor %d", PhotFlagPoor);
     185      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     186    }
     187
     188    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
     189    if (PHOTCODE_KEEP_LIST)  strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
     190    if (PHOTCODE_SKIP_LIST)  strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     191    if (PhotFlagSelect)      strextend (&command, "+photflags");
     192    if (PhotFlagBad)         strextend (&command, "+photflagbad %d", PhotFlagBad);
     193    if (PhotFlagPoor)        strextend (&command, "+photflagpoor %d", PhotFlagPoor);
    194194    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    195195
     
    197197      char *tstart = ohana_sec_to_date (TSTART);
    198198      char *tstop  = ohana_sec_to_date (TSTOP);
    199       strextend (command, "-time %s %s", tstart, tstop);
     199      strextend (&command, "-time %s %s", tstart, tstop);
    200200      free (tstart);
    201201      free (tstop);
Note: See TracChangeset for help on using the changeset viewer.