Changeset 38391
- Timestamp:
- Jun 5, 2015, 12:44:29 PM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429
- Files:
-
- 15 edited
-
Makefile.Common (modified) (2 diffs)
-
src/dvopsps/src/insert_detections_dvopsps.c (modified) (1 diff)
-
src/dvopsps/src/insert_diffobj_dvopsps.c (modified) (1 diff)
-
src/dvopsps/src/insert_objects_dvopsps.c (modified) (1 diff)
-
src/photdbc/src/photdbc_catalogs.c (modified) (3 diffs)
-
src/relastro/src/high_speed_catalogs.c (modified) (2 diffs)
-
src/relastro/src/hpm_catalogs.c (modified) (2 diffs)
-
src/relastro/src/relastro_objects.c (modified) (1 diff)
-
src/uniphot/src/update_dvo_ckids.c (modified) (1 diff)
-
src/uniphot/src/update_dvo_fiximids.c (modified) (2 diffs)
-
src/uniphot/src/update_dvo_fixstkids.c (modified) (2 diffs)
-
src/uniphot/src/update_dvo_setastrom.c (modified) (1 diff)
-
src/uniphot/src/update_dvo_setgalmodel.c (modified) (1 diff)
-
src/uniphot/src/update_dvo_setphot.c (modified) (1 diff)
-
src/uniphot/src/update_dvo_setposangle.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/Makefile.Common
r38337 r38391 44 44 @echo "" 45 45 46 $(TEST )/%.$(ARCH): $(TEST)/%.c47 echo $@48 echo $*49 echo $<50 echo $^51 @if [ ! -d $(TEST ) ]; then mkdir -p $(TEST); fi46 $(TESTDIR)/%.$(ARCH): $(TESTDIR)/%.c 47 @echo $@ 48 @echo $* 49 @echo $< 50 @echo $^ 51 @if [ ! -d $(TESTDIR) ]; then mkdir -p $(TESTDIR); fi 52 52 $(CC) $(TEST_CFLAGS) -o $@ $^ $(TEST_LDFLAGS) 53 53 @echo "compiled $*" 54 54 @echo "" 55 55 56 $(TESTBIN)/%: $(TEST )/%.$(ARCH)56 $(TESTBIN)/%: $(TESTDIR)/%.$(ARCH) 57 57 @if [ ! -d $(TESTBIN) ]; then mkdir -p $(TESTBIN); fi 58 58 rm -f $(TESTBIN)/$* 59 cp $(TEST )/$*.$(ARCH) $(TESTBIN)/$*59 cp $(TESTDIR)/$*.$(ARCH) $(TESTBIN)/$* 60 60 @echo "installed $*" 61 61 @echo "" … … 128 128 rm -f `find . -name "#*"` 129 129 130 test.clean: 131 for i in $(TESTPROG); do rm -f $(TESTBIN)/$$i; done 132 for i in $(TESTPROG); do rm -f $(TESTDIR)/$$i.$(ARCH); done 133 130 134 dist: clean 131 135 rm -rf $(BIN) -
branches/eam_branches/ohana.20150429/src/dvopsps/src/insert_detections_dvopsps.c
r38352 r38391 138 138 } 139 139 140 char command[1024];141 s nprintf (command, 1024, "dvopsps_client detections -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",140 char *command = NULL; 141 strextend (&command, "dvopsps_client detections -hostID %d -catdir %s -hostdir %s -region %f %f %f %f", 142 142 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 143 143 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 144 144 145 char tmpline[1024]; 146 snprintf (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline); 147 snprintf (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline); 148 snprintf (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline); 149 snprintf (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline); 150 151 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 152 if (SAVE_REMOTE) { snprintf (tmpline, 1024, "%s -save %s", command, table->hosts[i].results); strcpy (command, tmpline); } 145 strextend (&command, "-dbhost %s", DATABASE_HOST); 146 strextend (&command, "-dbuser %s", DATABASE_USER); 147 strextend (&command, "-dbpass %s", DATABASE_PASS); 148 strextend (&command, "-dbname %s", DATABASE_NAME); 149 150 if (VERBOSE) { strextend (&command, "-v");} 151 if (SAVE_REMOTE) { strextend (&command, "-save %s", table->hosts[i].results);} 153 152 154 153 // some filters -- these are the detections we skip 155 if (TIME_START) { s nprintf (tmpline, 1024, "%s -time-start %s", command, TIME_START); strcpy (command, tmpline); }156 if (TIME_END) { s nprintf (tmpline, 1024, "%s -time-end %s", command, TIME_END); strcpy (command, tmpline); }154 if (TIME_START) { strextend (&command, "-time-start %s", TIME_START);} 155 if (TIME_END) { strextend (&command, "-time-end %s", TIME_END);} 157 156 158 if (PHOTCODE_START > 0) { s nprintf (tmpline, 1024, "%s -photcode-start %d", command, PHOTCODE_START); strcpy (command, tmpline); }159 if (PHOTCODE_END <= INT_MAX) { s nprintf (tmpline, 1024, "%s -photcode-end %d", command, PHOTCODE_END); strcpy (command, tmpline); }157 if (PHOTCODE_START > 0) { strextend (&command, "-photcode-start %d", PHOTCODE_START);} 158 if (PHOTCODE_END <= INT_MAX) { strextend (&command, "-photcode-end %d", PHOTCODE_END);} 160 159 161 160 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/dvopsps/src/insert_diffobj_dvopsps.c
r38352 r38391 126 126 table->hosts[i].pathname = tmppath; 127 127 128 char command[1024];129 s nprintf (command, 1024, "dvopsps_client diffobj -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",128 char *command = NULL; 129 strextend (&command, "dvopsps_client diffobj -hostID %d -catdir %s -hostdir %s -region %f %f %f %f", 130 130 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 131 131 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 132 132 133 char tmpline[1024]; 134 snprintf (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline); 135 snprintf (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline); 136 snprintf (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline); 137 snprintf (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline); 133 strextend (&command, "-dbhost %s", DATABASE_HOST); 134 strextend (&command, "-dbuser %s", DATABASE_USER); 135 strextend (&command, "-dbpass %s", DATABASE_PASS); 136 strextend (&command, "-dbname %s", DATABASE_NAME); 138 137 139 if (VERBOSE) { s nprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); }140 if (SINGLE_CPT) { s nprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }138 if (VERBOSE) { strextend (&command, "-v"); } 139 if (SINGLE_CPT) { strextend (&command, "-cpt %s", SINGLE_CPT); } 141 140 142 141 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/dvopsps/src/insert_objects_dvopsps.c
r38352 r38391 126 126 table->hosts[i].pathname = tmppath; 127 127 128 char command[1024];129 s nprintf (command, 1024, "dvopsps_client objects -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",128 char *command = NULL; 129 strextend (&command, "dvopsps_client objects -hostID %d -catdir %s -hostdir %s -region %f %f %f %f", 130 130 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 131 131 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 132 132 133 char tmpline[1024]; 134 snprintf (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline); 135 snprintf (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline); 136 snprintf (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline); 137 snprintf (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline); 133 strextend (&command, "-dbhost %s", DATABASE_HOST); 134 strextend (&command, "-dbuser %s", DATABASE_USER); 135 strextend (&command, "-dbpass %s", DATABASE_PASS); 136 strextend (&command, "-dbname %s", DATABASE_NAME); 138 137 139 if (VERBOSE) { s nprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); }140 if (SINGLE_CPT) { s nprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }138 if (VERBOSE) { strextend (&command, "-v"); } 139 if (SINGLE_CPT) { strextend (&command, "-cpt %s", SINGLE_CPT); } 141 140 142 141 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/photdbc/src/photdbc_catalogs.c
r38372 r38391 122 122 123 123 // options / arguments that can affect relastro_client -update-objects: 124 char command[DVO_MAX_PATH];125 s nprintf (command, DVO_MAX_PATH, "photdbc_client %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D NMEAS_MIN %d -D NMEAS_MIN_FILTERED %d -D AVE_SIGMA_LIM %f -D SIGMA_MAX %f",124 char *command = NULL; 125 strextend (&command, "photdbc_client %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D NMEAS_MIN %d -D NMEAS_MIN_FILTERED %d -D AVE_SIGMA_LIM %f -D SIGMA_MAX %f", 126 126 tmproot, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 127 127 REGION.Rmin, REGION.Rmax, REGION.Dmin, REGION.Dmax, … … 129 129 ); 130 130 131 char tmpline[DVO_MAX_PATH]; 132 if (VERBOSE) { snprintf (tmpline, DVO_MAX_PATH, "%s -v", command); strcpy (command, tmpline); } 133 if (ExcludeByInstMag) { snprintf (tmpline, DVO_MAX_PATH, "%s -instmag %f %f", command, INST_MAG_MIN, INST_MAG_MAX); strcpy (command, tmpline); } 134 if (ExcludeByMinSigma) { snprintf (tmpline, DVO_MAX_PATH, "%s -min-sigma %f", command, SIGMA_MIN_KEEP); strcpy (command, tmpline); } 135 if (ExcludeByMaxMinMag) { snprintf (tmpline, DVO_MAX_PATH, "%s -maxminmag %f", command, MAX_MIN_MAG); strcpy (command, tmpline); } 136 if (PHOTCODE_DROP_LIST) { snprintf (tmpline, DVO_MAX_PATH, "%s -photcode-drop %s", command, PHOTCODE_DROP_LIST); strcpy (command, tmpline); } 137 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, DVO_MAX_PATH, "%s -photcode-keep %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 138 if (CATCOMPRESS) { snprintf (tmpline, DVO_MAX_PATH, "%s -set-compress %s", command, CATCOMPRESS); strcpy (command, tmpline); } 139 if (CATFORMAT) { snprintf (tmpline, DVO_MAX_PATH, "%s -set-format %s", command, CATFORMAT); strcpy (command, tmpline); } 140 if (CATMODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -set-mode %s", command, CATMODE); strcpy (command, tmpline); } 131 if (VERBOSE) { strextend (&command, "-v"); } 132 if (ExcludeByInstMag) { strextend (&command, "-instmag %f %f", INST_MAG_MIN, INST_MAG_MAX); } 133 if (ExcludeByMinSigma) { strextend (&command, "-min-sigma %f", SIGMA_MIN_KEEP); } 134 if (ExcludeByMaxMinMag) { strextend (&command, "-maxminmag %f", MAX_MIN_MAG); } 135 if (PHOTCODE_DROP_LIST) { strextend (&command, "-photcode-drop %s", PHOTCODE_DROP_LIST); } 136 if (PHOTCODE_KEEP_LIST) { strextend (&command, "-photcode-keep %s", PHOTCODE_KEEP_LIST); } 137 if (CATCOMPRESS) { strextend (&command, "-set-compress %s", CATCOMPRESS); } 138 if (CATFORMAT) { strextend (&command, "-set-format %s", CATFORMAT); } 139 if (CATMODE) { strextend (&command, "-set-mode %s", CATMODE); } 141 140 142 141 if (PARALLEL_OUTHOSTS) { … … 144 143 free (table_output->hosts[i].pathname); 145 144 table_output->hosts[i].pathname = tmppath; 146 s nprintf (tmpline, DVO_MAX_PATH, "%s -hostdir-output %s", command, table_output->hosts[i].pathname); strcpy (command, tmpline);145 strextend (&command, "-hostdir-output %s", table_output->hosts[i].pathname); 147 146 } 148 147 -
branches/eam_branches/ohana.20150429/src/relastro/src/high_speed_catalogs.c
r38352 r38391 147 147 } 148 148 149 char command[1024];150 s nprintf (command, 1024, "relastro_client -high-speed %s %s %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",149 char *command = NULL; 150 strextend (&command, "relastro_client -high-speed %s %s %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f", 151 151 PHOTCODE_A_LIST, PHOTCODE_B_LIST, RADIUS, outputDir, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 152 152 … … 154 154 155 155 // options / arguments that can affect relastro_client -high-speed 156 char tmpline[1024]; 157 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 158 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 159 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 160 161 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 162 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 163 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 164 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 165 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 156 if (FIT_MODE == FIT_PM_ONLY) { strextend (&command, "-pm"); } 157 if (FIT_MODE == FIT_PAR_ONLY) { strextend (&command, "-par"); } 158 if (FIT_MODE == FIT_PM_AND_PAR) { strextend (&command, "-pmpar"); } 159 160 if (VERBOSE) { strextend (&command, "-v"); } 161 if (VERBOSE2) { strextend (&command, "-vv"); } 162 if (RESET) { strextend (&command, "-reset"); } 163 if (ImagSelect) { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); } 164 if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); } 166 165 167 if (USE_BASIC_CHECK) { snprintf (tmpline, 1024, "%s -basic-image-search", command); strcpy (command, tmpline); } 168 169 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 170 171 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); } 172 173 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 174 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 175 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 176 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } 177 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 166 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 167 if (FlagOutlier) { strextend (&command, "-clip %d", CLIP_THRESH); } 168 if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); } 169 if (PHOTCODE_KEEP_LIST) { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); } 170 if (PHOTCODE_SKIP_LIST) { strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); } 171 if (PhotFlagSelect) { strextend (&command, "+photflags"); } 172 if (PhotFlagBad) { strextend (&command, "+photflagbad %d", PhotFlagBad); } 173 if (PhotFlagPoor) { strextend (&command, "+photflagpoor %d", PhotFlagPoor); } 178 174 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 179 175 180 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); }181 if (MaxMeanOffset != 10.0) { s nprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); }182 183 if (WHERE_A[0]) { s nprintf (tmpline, 1024, "%s -D WHERE_A \"%s\"", command, WHERE_A); strcpy (command, tmpline); }184 if (WHERE_B[0]) { s nprintf (tmpline, 1024, "%s -D WHERE_B \"%s\"", command, WHERE_B); strcpy (command, tmpline); }176 if (MinBadQF > 0.0) { strextend (&command, "-min-bad-psfqf %f", MinBadQF); } 177 if (MaxMeanOffset != 10.0) { strextend (&command, "-max-mean-offset %f", MaxMeanOffset); } 178 179 if (WHERE_A[0]) { strextend (&command, "-D WHERE_A \"%s\"", WHERE_A); } 180 if (WHERE_B[0]) { strextend (&command, "-D WHERE_B \"%s\"", WHERE_B); } 185 181 186 182 if (TimeSelect) { 187 183 char *tstart = ohana_sec_to_date (TSTART); 188 184 char *tstop = ohana_sec_to_date (TSTOP); 189 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);185 strextend (&command, "-time %s %s", tstart, tstop); 190 186 free (tstart); 191 187 free (tstop); 192 strcpy (command, tmpline);193 188 } 194 189 -
branches/eam_branches/ohana.20150429/src/relastro/src/hpm_catalogs.c
r38352 r38391 145 145 } 146 146 147 char command[1024];148 s nprintf (command, 1024, "relastro_client -hpm %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",147 char *command = NULL; 148 strextend (&command, "relastro_client -hpm %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f", 149 149 RADIUS, outputDir, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 150 150 … … 152 152 153 153 // options / arguments that can affect relastro_client -high-speed 154 char tmpline[1024]; 155 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 156 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 157 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 158 159 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 160 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 161 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 162 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 163 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 154 if (FIT_MODE == FIT_PM_ONLY) { strextend (&command, "-pm"); } 155 if (FIT_MODE == FIT_PAR_ONLY) { strextend (&command, "-par"); } 156 if (FIT_MODE == FIT_PM_AND_PAR) { strextend (&command, "-pmpar"); } 157 158 if (VERBOSE) { strextend (&command, "-v"); } 159 if (VERBOSE2) { strextend (&command, "-vv"); } 160 if (RESET) { strextend (&command, "-reset"); } 161 if (ImagSelect) { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); } 162 if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); } 164 163 165 if (USE_BASIC_CHECK) { snprintf (tmpline, 1024, "%s -basic-image-search", command); strcpy (command, tmpline); } 166 167 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 168 169 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); } 170 171 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 172 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 173 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 174 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } 175 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 164 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 165 if (FlagOutlier) { strextend (&command, "-clip %d", CLIP_THRESH); } 166 if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); } 167 if (PHOTCODE_KEEP_LIST) { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); } 168 if (PHOTCODE_SKIP_LIST) { strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); } 169 if (PhotFlagSelect) { strextend (&command, "+photflags"); } 170 if (PhotFlagBad) { strextend (&command, "+photflagbad %d", PhotFlagBad); } 171 if (PhotFlagPoor) { strextend (&command, "+photflagpoor %d", PhotFlagPoor); } 176 172 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 177 173 178 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); }179 if (MaxMeanOffset != 10.0) { s nprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); }174 if (MinBadQF > 0.0) { strextend (&command, "-min-bad-psfqf %f", MinBadQF); } 175 if (MaxMeanOffset != 10.0) { strextend (&command, "-max-mean-offset %f", MaxMeanOffset); } 180 176 181 177 if (TimeSelect) { 182 178 char *tstart = ohana_sec_to_date (TSTART); 183 179 char *tstop = ohana_sec_to_date (TSTOP); 184 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);180 strextend (&command, "-time %s %s", tstart, tstop); 185 181 free (tstart); 186 182 free (tstop); 187 strcpy (command, tmpline);188 183 } 189 184 -
branches/eam_branches/ohana.20150429/src/relastro/src/relastro_objects.c
r38352 r38391 147 147 // SRC_MEAS_TOOFEW 148 148 149 char command[1024];150 s nprintf (command, 1024, "relastro_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s",149 char *command = NULL; 150 strextend (&command, "relastro_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s", 151 151 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE); 152 152 153 char tmpline[1024]; 154 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 155 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 156 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 157 158 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 159 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 160 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 161 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 162 163 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 164 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 165 166 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 167 168 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); } 169 170 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 171 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 172 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 173 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } 174 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 153 if (FIT_MODE == FIT_PM_ONLY) { strextend (&command, "-pm"); } 154 if (FIT_MODE == FIT_PAR_ONLY) { strextend (&command, "-par"); } 155 if (FIT_MODE == FIT_PM_AND_PAR) { strextend (&command, "-pmpar"); } 156 157 if (VERBOSE) { strextend (&command, "-v"); } 158 if (VERBOSE2) { strextend (&command, "-vv"); } 159 if (RESET) { strextend (&command, "-reset"); } 160 if (UPDATE) { strextend (&command, "-update"); } 161 if (ImagSelect) { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); } 162 if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); } 163 if (FlagOutlier) { strextend (&command, "-clip %d", CLIP_THRESH); } 164 if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); } 165 if (PHOTCODE_KEEP_LIST) { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); } 166 if (PHOTCODE_SKIP_LIST) { strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); } 167 if (PhotFlagSelect) { strextend (&command, "+photflags"); } 168 if (PhotFlagBad) { strextend (&command, "+photflagbad %d", PhotFlagBad); } 169 if (PhotFlagPoor) { strextend (&command, "+photflagpoor %d", PhotFlagPoor); } 175 170 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 176 171 177 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); }178 if (MaxMeanOffset != 10.0) { s nprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); }172 if (MinBadQF > 0.0) { strextend (&command, "-min-bad-psfqf %f", MinBadQF); } 173 if (MaxMeanOffset != 10.0) { strextend (&command, "-max-mean-offset %f", MaxMeanOffset); } 179 174 180 175 if (TimeSelect) { 181 176 char *tstart = ohana_sec_to_date (TSTART); 182 177 char *tstop = ohana_sec_to_date (TSTOP); 183 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);178 strextend (&command, "-time %s %s", tstart, tstop); 184 179 free (tstart); 185 180 free (tstop); 186 strcpy (command, tmpline);187 181 } 188 182 -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_ckids.c
r38352 r38391 111 111 table->hosts[i].pathname = tmppath; 112 112 113 char command[1024];114 s nprintf (command, 1024, "ckids_client -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",113 char *command = NULL; 114 strextend (&command, "ckids_client -hostID %d -catdir %s -hostdir %s -region %f %f %f %f", 115 115 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 116 116 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 117 117 118 char tmpline[1024]; 119 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 120 if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); } 121 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 118 if (VERBOSE) { strextend (&command, "-v"); } 119 if (SINGLE_CPT) { strextend (&command, "-cpt %s", SINGLE_CPT); } 120 if (UPDATE) { strextend (&command, "-update"); } 122 121 123 122 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_fiximids.c
r38352 r38391 112 112 snprintf (table->hosts[i].results, 1024, "%s/fiximids.results.%s.dat", table->hosts[i].pathname, uniquer); 113 113 114 char command[1024];115 s nprintf (command, 1024, "fiximids_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f",114 char *command = NULL; 115 strextend (&command, "fiximids_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f", 116 116 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile, 117 117 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); … … 119 119 int saveImstats = VERBOSE_IMSTATS || SUMMARY_IMSTATS; 120 120 121 char tmpline[1024]; 122 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 123 if (saveImstats) { snprintf (tmpline, 1024, "%s -imstats %s", command, table->hosts[i].results); strcpy (command, tmpline); } 124 if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); } 125 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 121 if (VERBOSE) { strextend (&command, "-v"); } 122 if (saveImstats) { strextend (&command, "-imstats %s", table->hosts[i].results); } 123 if (SINGLE_CPT) { strextend (&command, "-cpt %s", SINGLE_CPT); } 124 if (UPDATE) { strextend (&command, "-update"); } 126 125 127 126 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_fixstkids.c
r38352 r38391 127 127 snprintf (table->hosts[i].results, 1024, "%s/fixstkids.results.%s.dat", table->hosts[i].pathname, uniquer); 128 128 129 char command[1024];130 s nprintf (command, 1024, "fixstkids_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f",129 char *command = NULL; 130 strextend (&command, "fixstkids_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f", 131 131 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile, 132 132 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); … … 134 134 int saveImstats = VERBOSE_IMSTATS || SUMMARY_IMSTATS; 135 135 136 char tmpline[1024]; 137 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 138 if (saveImstats) { snprintf (tmpline, 1024, "%s -imstats %s", command, table->hosts[i].results); strcpy (command, tmpline); } 139 if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); } 140 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 136 if (VERBOSE) { strextend (&command, "-v"); } 137 if (saveImstats) { strextend (&command, "-imstats %s", table->hosts[i].results); } 138 if (SINGLE_CPT) { strextend (&command, "-cpt %s", SINGLE_CPT); } 139 if (UPDATE) { strextend (&command, "-update"); } 141 140 142 141 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_setastrom.c
r38352 r38391 95 95 table->hosts[i].pathname = tmppath; 96 96 97 char command[1024];98 s nprintf (command, 1024, "setastrom_client -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",97 char *command = NULL; 98 strextend (&command, "setastrom_client -hostID %d -catdir %s -hostdir %s -region %f %f %f %f", 99 99 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 100 100 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 101 101 102 char tmpline[1024]; 103 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 104 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 105 if (KH_FILE) { snprintf (tmpline, 1024, "%s -KH %s", command, KH_FILE); strcpy (command, tmpline); } 106 if (DCR_FILE) { snprintf (tmpline, 1024, "%s -DCR %s", command, DCR_FILE); strcpy (command, tmpline); } 107 if (CAM_FILE) { snprintf (tmpline, 1024, "%s -CAM %s", command, CAM_FILE); strcpy (command, tmpline); } 108 if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT); strcpy (command, tmpline); } 109 110 if (KH_RESET) { snprintf (tmpline, 1024, "%s -KH-reset", command); strcpy (command, tmpline); } 111 if (DCR_RESET) { snprintf (tmpline, 1024, "%s -DCR-reset", command); strcpy (command, tmpline); } 112 if (CAM_RESET) { snprintf (tmpline, 1024, "%s -CAM-reset", command); strcpy (command, tmpline); } 102 if (VERBOSE) { strextend (&command, "-v"); } 103 if (UPDATE) { strextend (&command, "-update"); } 104 if (KH_FILE) { strextend (&command, "-KH %s", KH_FILE); } 105 if (DCR_FILE) { strextend (&command, "-DCR %s", DCR_FILE); } 106 if (CAM_FILE) { strextend (&command, "-CAM %s", CAM_FILE); } 107 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 108 if (KH_RESET) { strextend (&command, "-KH-reset"); } 109 if (DCR_RESET) { strextend (&command, "-DCR-reset"); } 110 if (CAM_RESET) { strextend (&command, "-CAM-reset"); } 113 111 114 112 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_setgalmodel.c
r38352 r38391 91 91 table->hosts[i].pathname = tmppath; 92 92 93 char command[1024];94 s nprintf (command, 1024, "setgalmodel_client -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",93 char *command = NULL; 94 strextend (&command, "setgalmodel_client -hostID %d -catdir %s -hostdir %s -region %f %f %f %f", 95 95 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 96 96 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 97 97 98 if (VERBOSE) { strextend (&command, "-v"); } 99 if (TESTING) { strextend (&command, "-testing"); } 100 if (UPDATE) { strextend (&command, "-update"); } 101 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 102 98 103 fprintf (stderr, "command: %s\n", command); 99 100 char tmpline[1024];101 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); }102 if (TESTING) { snprintf (tmpline, 1024, "%s -testing", command); strcpy (command, tmpline); }103 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); }104 if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT); strcpy (command, tmpline); }105 104 106 105 if (PARALLEL_MANUAL) continue; -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_setphot.c
r38352 r38391 110 110 table->hosts[i].pathname = tmppath; 111 111 112 char command[1024];113 s nprintf (command, 1024, "setphot_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f",112 char *command = NULL; 113 strextend (&command, "setphot_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f", 114 114 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile, 115 115 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 116 116 117 if (VERBOSE) { strextend (&command, "-v"); } 118 if (RESET) { strextend (&command, "-reset"); } 119 if (UPDATE) { strextend (&command, "-update"); } 120 if (UBERCAL) { strextend (&command, "-ubercal"); } 121 117 122 fprintf (stderr, "command: %s\n", command); 118 119 char tmpline[1024];120 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); }121 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); }122 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); }123 if (UBERCAL) { snprintf (tmpline, 1024, "%s -ubercal", command); strcpy (command, tmpline); }124 123 125 124 if (PARALLEL_MANUAL) continue; -
branches/eam_branches/ohana.20150429/src/uniphot/src/update_dvo_setposangle.c
r38352 r38391 112 112 table->hosts[i].pathname = tmppath; 113 113 114 char command[1024];115 s nprintf (command, 1024, "setposangle_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f",114 char *command = NULL; 115 strextend (&command, "setposangle_client -hostID %d -catdir %s -hostdir %s -images %s -region %f %f %f %f", 116 116 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile, 117 117 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 118 118 119 if (VERBOSE) { strextend (&command, "-v"); } 120 if (UPDATE) { strextend (&command, "-update"); } 121 119 122 fprintf (stderr, "command: %s\n", command); 120 121 char tmpline[1024];122 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); }123 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); }124 123 125 124 if (PARALLEL_MANUAL) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
