Changeset 30812
- Timestamp:
- Mar 6, 2011, 2:34:55 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213
- Files:
-
- 50 edited
- 2 copied
-
Ohana/src/addstar/src/ReadStarsFITS.c (modified) (9 diffs)
-
Ohana/src/dvomerge/src/merge_catalogs_old.c (modified) (1 diff)
-
Ohana/src/getstar/src/MatchCoords.c (modified) (6 diffs)
-
Ohana/src/libohana/include/ohana_allocate.h (modified) (2 diffs)
-
PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (1 diff)
-
ippMonitor/raw/czartool_labels.php (modified) (1 diff)
-
ippMonitor/raw/site.php.in (modified) (1 diff)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippScripts/scripts/magic_destreak_cleanup.pl (modified) (3 diffs)
-
ippScripts/scripts/magic_destreak_revert.pl (modified) (9 diffs)
-
ippScripts/scripts/register_imfile.pl (modified) (1 diff)
-
ippTasks/destreak.pro (modified) (2 diffs)
-
ippTasks/pstamp.pro (modified) (3 diffs)
-
ippTasks/register.pro (modified) (1 diff)
-
ippToPsps/src/Batch.h (modified) (1 diff)
-
ippToPsps/src/DifferenceBatch.c (modified) (1 diff)
-
ippTools/share/camtool_find_pendingimfile.sql (modified) (1 prop)
-
ippTools/share/magicdstool_todestreak_raw.sql (modified) (2 diffs)
-
ippTools/share/magicdstool_torevert_diff.sql (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/addtool.c (modified) (1 diff)
-
ippTools/src/bgtool.c (modified) (2 diffs)
-
ippTools/src/camtool.c (modified) (1 diff)
-
ippTools/src/camtoolConfig.c (modified) (2 diffs)
-
ippTools/src/chiptool.c (modified) (1 diff)
-
ippTools/src/chiptoolConfig.c (modified) (1 diff)
-
ippTools/src/diffphottool.c (modified) (1 diff)
-
ippTools/src/difftool.c (modified) (1 diff)
-
ippTools/src/difftoolConfig.c (modified) (1 diff)
-
ippTools/src/faketool.c (modified) (1 diff)
-
ippTools/src/magicdstool.c (modified) (1 diff)
-
ippTools/src/magictool.c (modified) (1 prop)
-
ippTools/src/pubtool.c (modified) (3 diffs)
-
ippTools/src/pubtool.h (modified) (1 diff)
-
ippTools/src/pubtoolConfig.c (modified) (2 diffs)
-
ippTools/src/pxtools.c (modified) (2 diffs)
-
ippTools/src/pxtools.h (modified) (1 diff)
-
ippTools/src/stacktool.c (modified) (1 diff)
-
ippTools/src/staticskytool.c (modified) (1 diff)
-
ippTools/src/warptool.c (modified) (1 diff)
-
ippTools/src/warptoolConfig.c (modified) (2 diffs)
-
ippconfig (modified) (1 prop)
-
ippconfig/gpc1/format_20100228.config (copied) (copied from trunk/ippconfig/gpc1/format_20100228.config )
-
ippconfig/gpc1/format_20100723.config (copied) (copied from trunk/ippconfig/gpc1/format_20100723.config )
-
ippconfig/recipes/nightly_science.config (modified) (1 diff)
-
pstamp/scripts/pstamp_checkdependent.pl (modified) (6 diffs)
-
pstamp/scripts/pstampparse.pl (modified) (5 diffs)
-
pstamp/scripts/pstampstopfaulted (modified) (1 diff)
-
tools/czartool/Config.pm (modified) (14 diffs)
-
tools/czartool/czarconfig.xml (modified) (5 diffs)
-
tools/roboczar.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/Ohana/src/addstar/src/ReadStarsFITS.c
r30613 r30812 45 45 } 46 46 if (!strcmp (type, "PS1_V2")) { 47 if (table.header[0].Naxis[0] == 20) { 48 // skip the invalid DETEFF tables which were mistakenly labeled as PS1_V2 49 return (NULL); 50 } 47 51 stars = Convert_PS1_V2 (&table, &Nstars); 48 52 } … … 51 55 } 52 56 if (stars == NULL) { 53 fprintf (stderr, " ERROR:invalid table type %s\n", type);57 fprintf (stderr, "invalid table type %s\n", type); 54 58 return (NULL); 55 59 } … … 212 216 Stars *stars; 213 217 CMF_PS1_V1 *ps1data; 218 219 // CMF_PS1_V1 was modified 2009.05.26 (r24251) to use doubles for ra & dec. this was a 220 // mistake in two ways: a new format should have been defined (eg, CMF_PS1_V2), and the 221 // layout used did not have clean byte-boundaries for the corresponding structure. The 222 // former means we have two varieties of CMF_PS1_V1 out there; the latter means that the 223 // autocode tools do not work to read in the new version, even if we recognize it. Here we 224 // test for the existence of the broken version (table[0].headers[0].Naxis[0] == 136), and 225 // call a special conversion function if it is found. 226 227 if (table[0].header[0].Naxis[0] == 136) { 228 stars = Convert_PS1_V1_Alt (table, nstars); 229 return (stars); 230 } 231 232 ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL); 233 if (!ps1data) { 234 fprintf (stderr, "skipping inconsistent entry\n"); 235 return (NULL); 236 } 237 ZeroPt = GetZeroPoint(); 238 239 ALLOCATE (stars, Stars, Nstars); 240 for (i = 0; i < Nstars; i++) { 241 InitStar (&stars[i]); 242 stars[i].measure.Xccd = ps1data[i].X; 243 stars[i].measure.Yccd = ps1data[i].Y; 244 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 245 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 246 247 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 248 stars[i].measure.pltscale = ps1data[i].pltscale; 249 250 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 251 stars[i].measure.M = NAN; 252 } else { 253 stars[i].measure.M = ps1data[i].M + ZeroPt; 254 } 255 stars[i].measure.dM = ps1data[i].dM; 256 stars[i].measure.dMcal = ps1data[i].dMcal; 257 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 258 259 stars[i].measure.Sky = ps1data[i].sky; 260 stars[i].measure.dSky = ps1data[i].dSky; 261 262 stars[i].measure.psfChisq = ps1data[i].psfChisq; 263 stars[i].measure.psfQual = ps1data[i].psfQual; 264 stars[i].measure.psfNdof = ps1data[i].psfNdof; 265 stars[i].measure.psfNpix = ps1data[i].psfNpix; 266 stars[i].measure.crNsigma = ps1data[i].crNsigma; 267 stars[i].measure.extNsigma = ps1data[i].extNsigma; 268 269 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 270 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 271 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 272 273 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 274 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 275 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 276 277 stars[i].measure.photFlags = ps1data[i].flags; 278 279 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 280 stars[i].measure.detID = ps1data[i].detID; 281 282 // the Average fields and the following Measure fields are set in FilterStars after 283 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 284 // averef is set in find_matches, dbFlags is zero on ingest. 285 286 // the following fields are currently not being set anywhere: t_msec 287 } 288 *nstars = Nstars; 289 return (stars); 290 } 291 292 Stars *Convert_PS1_V1_Alt (FTable *table, unsigned int *nstars) { 293 294 off_t Nstars; 295 unsigned int i; 296 double ZeroPt; 297 Stars *stars; 298 CMF_PS1_V2 *ps1data; 214 299 215 300 // CMF_PS1_V1 was modified 2009.05.26 (r24251) to use doubles for ra & dec. this was a … … 221 306 // call a special conversion function if it is found. 222 307 223 if (table[0].header[0].Naxis[0] == 136) { 224 stars = Convert_PS1_V1_Alt (table, nstars); 225 return (stars); 226 } 227 228 ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL); 308 ps1data = gfits_table_get_CMF_PS1_V1_Alt (table, &Nstars, NULL); 229 309 if (!ps1data) { 230 310 fprintf (stderr, "skipping inconsistent entry\n"); … … 286 366 } 287 367 288 Stars *Convert_PS1_V 1_Alt(FTable *table, unsigned int *nstars) {368 Stars *Convert_PS1_V2 (FTable *table, unsigned int *nstars) { 289 369 290 370 off_t Nstars; … … 294 374 CMF_PS1_V2 *ps1data; 295 375 296 // CMF_PS1_V1 was modified 2009.05.26 (r24251) to use doubles for ra & dec. this was a 297 // mistake in two ways: a few format should have been defined (eg, CMF_PS1_V2), and the 298 // layout used did not have clean byte-boundaries for the corresponding structure. The 299 // former means we have two varieties of CMF_PS1_V1 out there; the latter means that the 300 // autocode tools do not work to read in the new version, even if we recognize it. Here we 301 // test for the existence of the broken version (table[0].headers[0].Naxis[0] == 136), and 302 // call a special conversion function if it is found. 303 304 ps1data = gfits_table_get_CMF_PS1_V1_Alt (table, &Nstars, NULL); 376 ps1data = gfits_table_get_CMF_PS1_V2 (table, &Nstars, NULL); 305 377 if (!ps1data) { 306 378 fprintf (stderr, "skipping inconsistent entry\n"); … … 362 434 } 363 435 364 Stars *Convert_PS1_V 2(FTable *table, unsigned int *nstars) {436 Stars *Convert_PS1_V3 (FTable *table, unsigned int *nstars) { 365 437 366 438 off_t Nstars; … … 368 440 double ZeroPt; 369 441 Stars *stars; 370 CMF_PS1_V 2*ps1data;371 372 ps1data = gfits_table_get_CMF_PS1_V 2(table, &Nstars, NULL);442 CMF_PS1_V3 *ps1data; 443 444 ps1data = gfits_table_get_CMF_PS1_V3 (table, &Nstars, NULL); 373 445 if (!ps1data) { 374 446 fprintf (stderr, "skipping inconsistent entry\n"); … … 429 501 return (stars); 430 502 } 431 432 Stars *Convert_PS1_V3 (FTable *table, unsigned int *nstars) {433 434 off_t Nstars;435 unsigned int i;436 double ZeroPt;437 Stars *stars;438 CMF_PS1_V3 *ps1data;439 440 ps1data = gfits_table_get_CMF_PS1_V3 (table, &Nstars, NULL);441 if (!ps1data) {442 fprintf (stderr, "skipping inconsistent entry\n");443 return (NULL);444 }445 ZeroPt = GetZeroPoint();446 447 ALLOCATE (stars, Stars, Nstars);448 for (i = 0; i < Nstars; i++) {449 InitStar (&stars[i]);450 stars[i].measure.Xccd = ps1data[i].X;451 stars[i].measure.Yccd = ps1data[i].Y;452 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX);453 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY);454 455 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle);456 stars[i].measure.pltscale = ps1data[i].pltscale;457 458 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) {459 stars[i].measure.M = NAN;460 } else {461 stars[i].measure.M = ps1data[i].M + ZeroPt;462 }463 stars[i].measure.dM = ps1data[i].dM;464 stars[i].measure.dMcal = ps1data[i].dMcal;465 stars[i].measure.Map = ps1data[i].Map + ZeroPt;466 467 stars[i].measure.Sky = ps1data[i].sky;468 stars[i].measure.dSky = ps1data[i].dSky;469 470 stars[i].measure.psfChisq = ps1data[i].psfChisq;471 stars[i].measure.psfQual = ps1data[i].psfQual;472 stars[i].measure.psfNdof = ps1data[i].psfNdof;473 stars[i].measure.psfNpix = ps1data[i].psfNpix;474 stars[i].measure.crNsigma = ps1data[i].crNsigma;475 stars[i].measure.extNsigma = ps1data[i].extNsigma;476 477 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx);478 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy);479 stars[i].measure.theta = ToShortDegrees(ps1data[i].df);480 481 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx);482 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy);483 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy);484 485 stars[i].measure.photFlags = ps1data[i].flags;486 487 // this is may optionally be replaced by the internal sequence (see FilterStars.c)488 stars[i].measure.detID = ps1data[i].detID;489 490 // the Average fields and the following Measure fields are set in FilterStars after491 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID,492 // averef is set in find_matches, dbFlags is zero on ingest.493 494 // the following fields are currently not being set anywhere: t_msec495 }496 *nstars = Nstars;497 return (stars);498 } -
branches/eam_branches/ipp-20110213/Ohana/src/dvomerge/src/merge_catalogs_old.c
r29938 r30812 219 219 } 220 220 if (fabs(output[0].measure[Nmeas].dR) > 10*RADIUS) { 221 fprintf (stderr, "error: %10.6f,%10.6f vs %10.6f,%10.6f (%f,%f vs %f,%f)\n", 222 output[0].average[n].R, output[0].average[n].D, Rin, Din, 223 X1[i], X2[Jmin], Y1[i], Y2[Jmin]); 224 // XXX abort on this? -- this is a bad failure... 221 // ok take declination into account and check again. 222 double cosD = cos(RAD_DEG*Din); 223 if (fabs(output[0].measure[Nmeas].dR*cosD) > 10*RADIUS) { 224 225 fprintf (stderr, "error: %10.6f,%10.6f vs %10.6f,%10.6f (%f,%f vs %f,%f)\n", 226 output[0].average[n].R, output[0].average[n].D, Rin, Din, 227 X1[i], X2[Jmin], Y1[i], Y2[Jmin]); 228 229 // XXX abort on this? -- this is a bad failure... 230 } 225 231 } 226 232 input[0].found[N] = Nmeas; -
branches/eam_branches/ipp-20110213/Ohana/src/getstar/src/MatchCoords.c
r30499 r30812 3 3 # define FLT_MAX 1e32 4 4 # endif 5 int ComputeLMLimits(double xmin, double xmax, double ymin, double ymax, 6 double *Lmin, double *Lmax, double *Mmin, double *Mmax, Coords *coords); 5 7 6 8 /* given coordinate, find images in list that contain the point */ … … 12 14 double Xi[4], Yi[4]; /* image and original corners */ 13 15 double xmin, xmax, ymin, ymax; 16 double Lmin, Lmax, Mmin, Mmax; 14 17 15 18 … … 20 23 also define the vtable entries for the images we keep */ 21 24 25 int haveLimits = 0; 22 26 for (i = 0; i < NdbImages; i++) { 27 haveLimits = 0; 23 28 24 29 if (!WITH_PHU && !strcmp (&dbImages[i].coords.ctype[4], "-DIS")) continue; … … 30 35 /* define image corners */ 31 36 SetImageCorners (Xi, Yi, &dbImages[i]); 32 // Xi[ 4] = Xi[0]; Yi[4] = Yi[0];37 // Xi[3] = Xi[0]; Yi[3] = Yi[0]; 33 38 34 39 ymin = xmin = +FLT_MAX; … … 52 57 continue; 53 58 } 54 55 59 56 if (VERBOSE) fprintf(stderr, "%ld%8.1f %8.1f %s\n", i, x, y, dbImages[i].name);60 if (VERBOSE) fprintf(stderr, OFF_T_FMT" %8.1f %8.1f %s\n", i, x, y, dbImages[i].name); 57 61 58 62 if ((x >= xmin && x <= xmax) && (y >= ymin && y <= ymax)) { 63 if (VERBOSE) fprintf(stderr, "\tpotential overlap for point %d image %i\n", j, (int) i); 64 65 // We may be using the astrometry far outside it's range of validity. 66 // As a sanity check make sure that the focal plane coords are in bounds. 67 // See ticket 1381 68 if (!haveLimits) { 69 // We defer computing the focal plane limits until we need them 70 status = ComputeLMLimits(xmin, xmax, ymin, ymax, 71 &Lmin, &Lmax, &Mmin, &Mmax, &dbImages[i].coords); 72 if (!status) { 73 continue; 74 } 75 haveLimits = 1; 76 } 77 78 double L, M; 79 status = RD_to_LM(&L, &M, pt->ra, pt->dec, &dbImages[i].coords); 80 if (!status) { 81 // This won't happen because RD_to_XY succeeded above 82 continue; 83 } 84 85 if (VERBOSE) fprintf(stderr, "L: %f M: %f\n", L, M); 86 87 if (L < Lmin || L > Lmax || M < Mmin || M > Mmax) { 88 if (VERBOSE) fprintf(stderr, "\trejecting match for because focal plane coordinates are out of range\n"); 89 continue; 90 } 91 if (VERBOSE) fprintf(stderr, "\tmatch confirmed\n"); 92 59 93 totalMatches++; 60 94 … … 88 122 } 89 123 } 124 125 // compute bounding box of this image in focal plane coordinates 126 int ComputeLMLimits(double xmin, double xmax, double ymin, double ymax, 127 double *Lmin, double *Lmax, double *Mmin, double *Mmax, Coords *coords) 128 { 129 double L0, L1, M0, M1; 130 int status = XY_to_LM(&L0, &M0, xmin, ymin, coords); 131 if (!status) { 132 fprintf(stderr, "failed to transform image corner to LM\n"); 133 return 0; 134 } 135 status = XY_to_LM(&L1, &M1, xmax, ymax, coords); 136 if (!status) { 137 fprintf(stderr, "failed to transform image corner to LM\n"); 138 return 0; 139 } 140 141 if (L1 > L0) { 142 *Lmin = L0; 143 *Lmax = L1; 144 } else { 145 *Lmin = L1; 146 *Lmax = L0; 147 } 148 if (M1 > M0) { 149 *Mmin = M0; 150 *Mmax = M1; 151 } else { 152 *Mmin = M1; 153 *Mmax = M0; 154 } 155 if (VERBOSE) fprintf(stderr, "Lmin: %f Lmax: %f Mmin: %f Mmax: %f\n", *Lmin, *Lmax, *Mmin, *Mmax); 156 return 1; 157 } -
branches/eam_branches/ipp-20110213/Ohana/src/libohana/include/ohana_allocate.h
r30602 r30812 49 49 50 50 # define REALLOCATE(PTR,TYPE,SIZE) { \ 51 PTR = (TYPE *) realloc(PTR,( unsigned)(MAX(((SIZE)*((int)sizeof(TYPE))),1))); \51 PTR = (TYPE *) realloc(PTR,(size_t)(MAX(((SIZE)*((int)sizeof(TYPE))),1))); \ 52 52 if (PTR == NULL) { \ 53 53 fprintf(stderr,"failed realloc at %d in %s\n", __LINE__, __FILE__); \ … … 57 57 if ((NCURR) >= (SIZE)) { \ 58 58 SIZE += DELTA; \ 59 PTR = (TYPE *) realloc(PTR,( unsigned)(MAX(((SIZE)*((int)sizeof(TYPE))),1))); \59 PTR = (TYPE *) realloc(PTR,(size_t)(MAX(((SIZE)*((int)sizeof(TYPE))),1))); \ 60 60 if (PTR == NULL) { \ 61 61 fprintf(stderr,"failed realloc increment at %d in %s\n", __LINE__, __FILE__); \ -
branches/eam_branches/ipp-20110213/PS-IPP-Config/lib/PS/IPP/Config.pm
r30676 r30812 1209 1209 if ($@) { 1210 1210 carp "nebulous delete for $todelete failed. Ignoring.\n"; 1211 return $PS_EXIT_SYS_ERROR;1212 1211 } 1213 1212 } -
branches/eam_branches/ipp-20110213/ippMonitor/raw/czartool_labels.php
r30393 r30812 220 220 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 221 221 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); 222 222 showReplicationsStatus($REPL_HOST_PSTAMP, $REPL_USER_PSTAMP, $REPL_PASSWORD_PSTAMP, $REPL_DBNAME_PSTAMP); 223 223 echo "</table>"; 224 224 echo "</td>\n"; -
branches/eam_branches/ipp-20110213/ippMonitor/raw/site.php.in
r30034 r30812 32 32 $REPL_DBNAME_NEBULOUS = "Nebulous"; 33 33 34 $REPL_HOST_PSTAMP = "ippc19.IfA.Hawaii.Edu"; 35 $REPL_USER_PSTAMP = "ippMonitor"; 36 $REPL_PASSWORD_PSTAMP = "ippMonitor"; 37 $REPL_DBNAME_PSTAMP = "ippRequestServer"; 38 34 39 ?> -
branches/eam_branches/ipp-20110213/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20110213/ippScripts/scripts/magic_destreak_cleanup.pl
r30676 r30812 102 102 my $cam_path_base = $run->{cam_path_base}; 103 103 my $cam_reduction = $run->{cam_reduction}; 104 my $replace = $run->{re_place}; 104 105 $cam_reduction = 'DEFAULT' if !$cam_reduction or ($cam_reduction eq 'NULL'); 105 106 … … 111 112 112 113 &my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_cleaned"; 113 &my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";114 &my_die("cleanup not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw" and $replace; 114 115 115 116 my $recipe_psastro; … … 217 218 # $bsources = $ipprc->filename("$name.SOURCES", $backup_path_base); 218 219 } 220 } elsif ($stage eq "raw") { 221 if ($backup_path_base) { 222 if ($backup_path_base =~ /fits/) { 223 $bimage = $backup_path_base; 224 } else { 225 $bimage = $backup_path_base . ".fits"; 226 } 227 } 219 228 } 220 229 -
branches/eam_branches/ipp-20110213/ippScripts/scripts/magic_destreak_revert.pl
r30700 r30812 78 78 defined $outroot; 79 79 80 &my_die("bytes and md5sum are is required for raw stage stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($stage eq 'raw' and (!$bytes or !$md5sum)); 80 if (defined($replace) and ($replace eq "T")) { 81 $replace = 1; 82 } else { 83 $replace = 0; 84 } 85 86 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 87 88 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile; 89 90 &my_die("bytes and md5sum are is required for raw stage stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($replace and $stage eq 'raw' and (!$bytes or !$md5sum)); 81 91 82 92 &my_die("cam_path_base is required for chip stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($stage eq 'chip' and !$cam_path_base); … … 84 94 85 95 86 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration87 88 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;89 96 90 97 $cam_reduction = 'DEFAULT' if !defined $cam_reduction or ($cam_reduction eq "NULL"); … … 118 125 my $basename = basename($path_base); 119 126 my $nebulousInput = inNebulous($dirname); 120 121 if (defined($replace) and ($replace eq "T")) {122 $replace = 1;123 } else {124 $replace = 0;125 }126 127 127 128 &my_die("replace not allowed for non-nebulous files", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) … … 162 163 $image = $path_base . ".fits"; 163 164 } 164 $bimage = $backup_path_base . ".fits"; 165 if ($backup_path_base =~ /.*\.fits$/) { 166 $bimage = $backup_path_base; 167 } else { 168 $bimage = $backup_path_base . ".fits"; 169 } 165 170 } elsif ($stage eq "chip") { 166 171 # Check to see if we're using dynamic masks … … 302 307 sub revert_files { 303 308 my $replace = shift; 304 return if !$replace;309 # return if !$replace; 305 310 306 311 my $image = shift; … … 316 321 317 322 if ($image) { 318 revert_file($ image, $bimage) or323 revert_file($replace, $image, $bimage) or 319 324 &my_die("failed to restore image file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 320 325 } 321 326 322 327 if ($mask) { 323 if (!revert_file($ mask, $bmask)) {328 if (!revert_file($replace, $mask, $bmask)) { 324 329 &my_die("failed to restore mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 325 330 } … … 327 332 328 333 if ($ch_mask) { 329 if (!revert_file($ ch_mask, $bch_mask)) {334 if (!revert_file($replace, $ch_mask, $bch_mask)) { 330 335 &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 331 336 } … … 334 339 335 340 if ($weight) { 336 revert_file($ weight, $bweight) or341 revert_file($replace, $weight, $bweight) or 337 342 &my_die("failed to restore variance image", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 338 343 } 339 344 340 345 if ($sources) { 341 revert_file($ sources, $bsources) or346 revert_file($replace, $sources, $bsources) or 342 347 &my_die("failed to restore sources file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 343 348 } 344 349 345 350 if ($astrom) { 346 revert_file($ astrom, $bastrom) or351 revert_file($replace, $astrom, $bastrom) or 347 352 &my_die("failed to restore astrometry file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 348 353 } … … 366 371 sub revert_file 367 372 { 373 my $replace = shift; 368 374 my $original = shift; 369 375 my $backup = shift; 370 376 my $force = 1; # force deletion of backup files in nebulous 377 378 if (!$replace) { 379 # we don't need to do all of this checking unless the destreak run is 380 # replace mode just delete the backup 381 my $error_code = $ipprc->kill_file($backup); 382 if ($error_code) { 383 print STDERR "failed to kill $backup: error_code $error_code\n"; 384 return 0; 385 } else { 386 return 1; 387 } 388 } 371 389 372 390 my $o_path = $ipprc->file_resolve($original); -
branches/eam_branches/ipp-20110213/ippScripts/scripts/register_imfile.pl
r30676 r30812 181 181 if (uc(&value_for_flag ($cmdflags, "NULL", "-exp_type")) eq "NULL") { &my_die_for_add ("exp_type not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); } 182 182 my $dateobs = &value_for_flag($cmdflags, 0.0, "-dateobs"); 183 my $exp_type = &value_for_flag($cmdflags, "NULL", "-exp_type"); 183 184 184 185 my $command = "$regtool -addprocessedimfile"; -
branches/eam_branches/ipp-20110213/ippTasks/destreak.pro
r30676 r30812 204 204 book getword magicToDS $pageName dbname -var DBNAME 205 205 206 sprintf logfile "%s/%s.mds.%s.%s.%s.log" $OUTROOT $EXP_ID $MAGIC_DS_ID $STAGE_ID $COMPONENT207 206 208 207 substr $COMPONENT 0 3 COMP_HEAD 209 208 if ("$COMP_HEAD" == "sky") 210 209 set.host.for.skycell $COMPONENT 210 set.workdir.by.skycell $COMPONENT $OUTROOT $default_host WORKDIR 211 211 else 212 212 # assume component is a class_id, if not we will default to anyhost 213 213 set.host.for.camera $CAMERA $COMPONENT 214 end 214 set.workdir.by.camera $CAMERA $COMPONENT $OUTROOT $default_host WORKDIR 215 end 216 217 sprintf logfile "%s/%s.mds.%s.%s.%s.log" $WORKDIR $EXP_ID $MAGIC_DS_ID $STAGE_ID $COMPONENT 215 218 216 219 # TODO: do not add recoveryroot or replace if they are null or zero 217 220 218 $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --exp_id $EXP_ID --streaks_path_base $STREAKS_PATH_BASE --inv_streaks_path_base $INV_STREAKS_PATH_BASE --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $ OUTROOT--logfile $logfile --recoveryroot $RECROOT --replace $REPLACE --magicked $MAGICKED --run-state $RUN_STATE221 $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --exp_id $EXP_ID --streaks_path_base $STREAKS_PATH_BASE --inv_streaks_path_base $INV_STREAKS_PATH_BASE --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $WORKDIR --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE --magicked $MAGICKED --run-state $RUN_STATE 219 222 220 223 add_standard_args run … … 407 410 book getword magicDSToRevert $pageName dbname -var DBNAME 408 411 409 sprintf logfile "%s/%s.mds.revert.%s.%s.%s.log" $OUTROOT $EXP_ID $MAGIC_DS_ID $STAGE_ID $COMPONENT410 411 412 substr $COMPONENT 0 3 COMP_HEAD 412 413 if ("$COMP_HEAD" == "sky") 413 414 set.host.for.skycell $COMPONENT 415 set.workdir.by.skycell $COMPONENT $OUTROOT $default_host WORKDIR 414 416 else 415 417 # assume component is a class_id, if not we will default to anyhost 416 418 set.host.for.camera $CAMERA $COMPONENT 417 end 418 419 $run = magic_destreak_revert.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $OUTROOT --logfile $logfile --replace $REPLACE --bothways $BOTHWAYS --magicked $MAGICKED --run-state $RUN_STATE --recovery_path_base $RECOVERY_PATH_BASE 419 set.workdir.by.camera $CAMERA $COMPONENT $OUTROOT $default_host WORKDIR 420 end 421 sprintf logfile "%s/%s.mds.revert.%s.%s.%s.log" $WORKDIR $EXP_ID $MAGIC_DS_ID $STAGE_ID $COMPONENT 422 423 $run = magic_destreak_revert.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $WORKDIR --logfile $logfile --replace $REPLACE --bothways $BOTHWAYS --magicked $MAGICKED --run-state $RUN_STATE --recovery_path_base $RECOVERY_PATH_BASE 420 424 421 425 add_standard_args run -
branches/eam_branches/ipp-20110213/ippTasks/pstamp.pro
r30567 r30812 19 19 20 20 # give up on dependents with fault_count >= $PSTAMP_MAX_FAULT_COUNT 21 $PSTAMP_MAX_FAULT_COUNT = 521 $PSTAMP_MAX_FAULT_COUNT = 3 22 22 macro set.max.fault.count 23 23 $PSTAMP_MAX_FAULT_COUNT = $1 … … 717 717 718 718 $MYLOGFILE = $OUTDIR/checkdep.$DEP_ID.log 719 stdout $MYLOGFILE719 stdout NULL 720 720 stderr $MYLOGFILE 721 721 722 $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT 722 $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT --logfile $MYLOGFILE 723 723 724 724 add_standard_args run … … 928 928 929 929 task.exec 930 stdout $LOGSUBDIR/pstamp.stopfaulted.log 930 931 stderr $LOGSUBDIR/pstamp.stopfaulted.log 931 stderr $LOGSUBDIR/pstamp.stopfaulted.log 932 $run = pstampstopfaulted 932 $run = pstampstopfaulted -fault_count $PSTAMP_MAX_FAULT_COUNT 933 933 if ($DB:n == 0) 934 934 option DEFAULT -
branches/eam_branches/ipp-20110213/ippTasks/register.pro
r30472 r30812 203 203 $regRevertImfile_DB = 0 204 204 $regPendingExp_DB = 0 205 205 $reg_datePAGE = 0 206 206 # select images ready for register analysis 207 207 # new entries are added to regPendingImfile -
branches/eam_branches/ipp-20110213/ippToPsps/src/Batch.h
r30192 r30812 14 14 #include <psmodules.h> 15 15 #include <dvo_util.h> 16 #include " ippToPspsConfig.h"16 #include "Config.h" 17 17 #include <libxml/parser.h> 18 18 #include <libxml/tree.h> -
branches/eam_branches/ipp-20110213/ippToPsps/src/DifferenceBatch.c
r30147 r30812 8 8 9 9 #include "ippToPsps.h" 10 #include " ippToPspsConfig.h"10 #include "Config.h" 11 11 #include "ippToPspsDiffEnums.h" 12 12 -
branches/eam_branches/ipp-20110213/ippTools/share/camtool_find_pendingimfile.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20110213/ippTools/share/magicdstool_todestreak_raw.sql
r29561 r30812 24 24 re_place, 25 25 remove, 26 10000AS priority26 IFNULL(Label.priority, 10000) AS priority 27 27 FROM magicDSRun 28 28 JOIN magicMask USING (magic_id) … … 35 35 ON magicDSRun.magic_ds_id = magicDSFile.magic_ds_id 36 36 AND magicDSFile.component = rawImfile.class_id 37 LEFT JOIN Label ON magicDSRun.label = Label.label 37 38 WHERE 38 39 magicDSRun.state = 'new' 39 40 AND magicDSRun.stage = 'raw' 40 41 AND magicDSFile.component IS NULL 42 AND (Label.active OR Label.active IS NULL) 43 -
branches/eam_branches/ipp-20110213/ippTools/share/magicdstool_torevert_diff.sql
r30675 r30812 13 13 magicDSFile.recovery_path_base, 14 14 "NULL" AS cam_path_base, 15 recovery_path_base,16 15 CAST(diffRun.bothways AS SIGNED) AS bothways, 17 16 0 AS bytes, -
branches/eam_branches/ipp-20110213/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20110213/ippTools/src
- Property svn:mergeinfo changed
/trunk/ippTools/src merged: 30728-30729,30733,30768-30769,30805
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110213/ippTools/src/addtool.c
r29423 r30812 324 324 // pxUpdateRun gets parameters from config->args and runs the update query 325 325 bool result = pxUpdateRun(config, where, &query, "addRun", "add_id", 326 "addProcessedExp", false );326 "addProcessedExp", false, false); 327 327 328 328 psFree(query); -
branches/eam_branches/ipp-20110213/ippTools/src/bgtool.c
r29671 r30812 501 501 psString query = psStringCopy("UPDATE chipBackgroundRun"); 502 502 bool result = pxUpdateRun(config, where, &query, "chipBackgroundRun", "chip_bg_id", 503 "chipBackgroundImfile", true );503 "chipBackgroundImfile", true, true); 504 504 505 505 psFree(query); … … 1471 1471 psString query = psStringCopy("UPDATE warpBackgroundRun"); 1472 1472 bool result = pxUpdateRun(config, where, &query, "warpBackgroundRun", "warp_bg_id", 1473 "warpBackgroundSkyfile", true );1473 "warpBackgroundSkyfile", true, true); 1474 1474 1475 1475 psFree(query); -
branches/eam_branches/ipp-20110213/ippTools/src/camtool.c
r29902 r30812 283 283 284 284 // pxUpdateRun gets parameters from config->args and updates 285 bool result = pxUpdateRun(config, where, &query, "camRun", "cam_id", "camProcessedExp", true );285 bool result = pxUpdateRun(config, where, &query, "camRun", "cam_id", "camProcessedExp", true, true); 286 286 if (!result) { 287 287 psError(psErrorCodeLast(), false, "pxUpdateRun failed"); -
branches/eam_branches/ipp-20110213/ippTools/src/camtoolConfig.c
r29902 r30812 86 86 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_dist_group", 0, "define new dist_group", NULL); 87 87 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_note", 0, "define new note", NULL); 88 pxmagicAddArguments(updaterunArgs); 88 89 89 90 // -pendingexp … … 299 300 PXOPT_ADD_MODE("-addprocessedexp", "add a processed exposure", CAMTOOL_MODE_ADDPROCESSEDEXP, addprocessedexpArgs); 300 301 PXOPT_ADD_MODE("-processedexp", "show processed exposures", CAMTOOL_MODE_PROCESSEDEXP, processedexpArgs); 301 PXOPT_ADD_MODE("-revertprocessedexp", " change procesed exp properties", CAMTOOL_MODE_REVERTPROCESSEDEXP, revertprocessedexpArgs);302 PXOPT_ADD_MODE("-updateprocessedexp", " undo a processed exposure", CAMTOOL_MODE_UPDATEPROCESSEDEXP,updateprocessedexpArgs);302 PXOPT_ADD_MODE("-revertprocessedexp", "undo a processed exposure", CAMTOOL_MODE_REVERTPROCESSEDEXP, revertprocessedexpArgs); 303 PXOPT_ADD_MODE("-updateprocessedexp", "changed processed exp properties", CAMTOOL_MODE_UPDATEPROCESSEDEXP,updateprocessedexpArgs); 303 304 PXOPT_ADD_MODE("-block", "set a label block", CAMTOOL_MODE_BLOCK, blockArgs); 304 305 PXOPT_ADD_MODE("-masked", "show blocked labels", CAMTOOL_MODE_MASKED, maskedArgs); -
branches/eam_branches/ipp-20110213/ippTools/src/chiptool.c
r30544 r30812 443 443 444 444 // pxUpdateRun gets parameters from config->args and updates 445 bool result = pxUpdateRun(config, where, &query, "chipRun", "chip_id", "chipProcessedImfile", true );445 bool result = pxUpdateRun(config, where, &query, "chipRun", "chip_id", "chipProcessedImfile", true, true); 446 446 if (!result) { 447 447 psError(psErrorCodeLast(), false, "pxUpdateRun failed"); -
branches/eam_branches/ipp-20110213/ippTools/src/chiptoolConfig.c
r30049 r30812 99 99 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_dist_group", 0, "set dist group", NULL); 100 100 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_note", 0, "set note", NULL); 101 pxmagicAddArguments(updaterunArgs); 101 102 102 103 // -setimfiletoupdate -
branches/eam_branches/ipp-20110213/ippTools/src/diffphottool.c
r28488 r30812 228 228 229 229 // pxUpdateRun gets parameters from config->args and updates 230 bool result = pxUpdateRun(config, where, &query, "diffPhotRun", "diff_phot_id", "diffPhotSkyfile", true );230 bool result = pxUpdateRun(config, where, &query, "diffPhotRun", "diff_phot_id", "diffPhotSkyfile", true, false); 231 231 232 232 psFree(query); -
branches/eam_branches/ipp-20110213/ippTools/src/difftool.c
r30594 r30812 224 224 225 225 // pxUpdateRun gets parameters from config->args and updates 226 bool result = pxUpdateRun(config, where, &query, "diffRun", "diff_id", "diffSkyfile", true );226 bool result = pxUpdateRun(config, where, &query, "diffRun", "diff_id", "diffSkyfile", true, true); 227 227 228 228 psFree(query); -
branches/eam_branches/ipp-20110213/ippTools/src/difftoolConfig.c
r30070 r30812 73 73 psMetadataAddS16(updaterunArgs, PS_LIST_TAIL, "-set_diff_mode", 0, "specify type of difference (WW=1,WS=2,SW=3,SS=4)", 0); 74 74 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_note", 0, "define new note", NULL); 75 pxmagicAddArguments(updaterunArgs); 75 76 76 77 // -addinputskyfile -
branches/eam_branches/ipp-20110213/ippTools/src/faketool.c
r27391 r30812 348 348 349 349 // pxUpdateRun gets parameters from config->args and updates 350 bool result = pxUpdateRun(config, where, &query, "fakeRun", "fake_id", "fakeProcessedImfile", true );350 bool result = pxUpdateRun(config, where, &query, "fakeRun", "fake_id", "fakeProcessedImfile", true, false); 351 351 if (!result) { 352 352 psError(psErrorCodeLast(), false, "pxUpdateRun failed"); -
branches/eam_branches/ipp-20110213/ippTools/src/magicdstool.c
r30700 r30812 1395 1395 (strcmp(state, "full") == 0) || 1396 1396 (strcmp(state, "drop") == 0) || 1397 (strcmp(state, "wait") == 0) || 1397 1398 (strcmp(state, "failed_revert") == 0) || 1398 1399 (strcmp(state, "error_cleaned") == 0) || -
branches/eam_branches/ipp-20110213/ippTools/src/magictool.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20110213/ippTools/src/pubtool.c
r30376 r30812 37 37 static bool addMode(pxConfig *config); 38 38 static bool revertMode(pxConfig *config); 39 static bool updaterunMode(pxConfig *config); 39 40 40 41 # define MODECASE(caseName, func) \ … … 63 64 MODECASE(PUBTOOL_MODE_ADD, addMode); 64 65 MODECASE(PUBTOOL_MODE_REVERT, revertMode); 66 MODECASE(PUBTOOL_MODE_UPDATERUN, updaterunMode); 65 67 default: 66 68 psAbort("invalid option (this should not happen)"); … … 459 461 } 460 462 463 static bool updaterunMode(pxConfig *config) 464 { 465 PS_ASSERT_PTR_NON_NULL(config, false); 466 467 psMetadata *where = psMetadataAlloc(); // WHERE conditions 468 PXOPT_COPY_S64(config->args, where, "-pub_id", "pub_id", "=="); 469 PXOPT_COPY_S64(config->args, where, "-client_id", "client_id", "=="); 470 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 471 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 472 PXOPT_COPY_STR(config->args, where, "-fault", "fault", "=="); 473 474 PXOPT_LOOKUP_STR(state, config->args, "-set_state", true, false); 475 476 psString query = NULL; // Query to run 477 psStringAppend(&query, "UPDATE publishRun LEFT JOIN publishDone using(pub_id) SET state = '%s'", state); 478 479 if (psListLength(where->list)) { 480 psString clause = psDBGenerateWhereConditionSQL(where, NULL); 481 psStringAppend(&query, "\n WHERE %s", clause); 482 psFree(clause); 483 } else { 484 psError(PS_ERR_UNKNOWN, false, "select arguments are required"); 485 return false; 486 } 487 psFree(where); 488 489 if (!p_psDBRunQuery(config->dbh, query)) { 490 psError(PS_ERR_UNKNOWN, false, "Database error"); 491 psFree(query); 492 return false; 493 } 494 psFree(query); 495 496 long numUpdated = psDBAffectedRows(config->dbh); 497 psLogMsg("pubtool", PS_LOG_INFO, "%ld rows updated.", numUpdated); 498 499 return true; 500 } -
branches/eam_branches/ipp-20110213/ippTools/src/pubtool.h
r25929 r30812 31 31 PUBTOOL_MODE_ADD, 32 32 PUBTOOL_MODE_REVERT, 33 PUBTOOL_MODE_UPDATERUN, 33 34 } pubtoolMode; 34 35 -
branches/eam_branches/ipp-20110213/ippTools/src/pubtoolConfig.c
r30376 r30812 102 102 psMetadataAddStr(revertArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search on label", NULL); 103 103 104 // -updaterun 105 psMetadata *updaterunArgs = psMetadataAlloc(); 106 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "new value for state (required)", NULL); 107 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 108 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-pub_id", 0, "search on pub_id", 0); 109 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-client_id", 0, "search on client_id", 0); 110 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "search by label", NULL); 111 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-fault", 0, "search by fault", NULL); 112 104 113 105 114 psMetadata *argSets = psMetadataAlloc(); … … 112 121 PXOPT_ADD_MODE("-add", "", PUBTOOL_MODE_ADD, addArgs); 113 122 PXOPT_ADD_MODE("-revert", "", PUBTOOL_MODE_REVERT, revertArgs); 123 PXOPT_ADD_MODE("-updaterun", "", PUBTOOL_MODE_UPDATERUN, updaterunArgs); 114 124 115 125 if (!pxGetOptions(stderr, argc, argv, config, modes, argSets)) { -
branches/eam_branches/ipp-20110213/ippTools/src/pxtools.c
r28486 r30812 278 278 279 279 // shared code for updating the various strings for a Run 280 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, psString runTable, psString idColumn, psString fileTable, bool has_dist_group )280 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, psString runTable, psString idColumn, psString fileTable, bool has_dist_group, bool has_magicked) 281 281 { 282 282 PS_ASSERT_PTR_NON_NULL(config, false); … … 360 360 if (fileWhere) { 361 361 psStringAppend(pQuery, "%s", fileWhere); 362 } 363 if (has_magicked) { 364 pxmagicAddWhere(config, pQuery, runTable); 362 365 } 363 366 -
branches/eam_branches/ipp-20110213/ippTools/src/pxtools.h
r30544 r30812 84 84 bool pxGetOptions(FILE *stream, int argc, char **argv, pxConfig *config, psMetadata *modes, psMetadata *argSets); 85 85 86 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, psString runTable, psString idColumn, psString fileTable, bool has_dist_group );86 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, psString runTable, psString idColumn, psString fileTable, bool has_dist_group, bool has_magicked); 87 87 88 88 #define PXOPT_ADD_MODE(option, comment, modeval, argset) \ -
branches/eam_branches/ipp-20110213/ippTools/src/stacktool.c
r30429 r30812 750 750 751 751 // pxUpdateRun gets parameters from config->args and updates 752 bool result = pxUpdateRun(config, where, &query, "stackRun", "stack_id", "stackSumSkyfile", true );752 bool result = pxUpdateRun(config, where, &query, "stackRun", "stack_id", "stackSumSkyfile", true, false); 753 753 754 754 psFree(query); -
branches/eam_branches/ipp-20110213/ippTools/src/staticskytool.c
r29066 r30812 360 360 361 361 // pxUpdateRun gets parameters from config->args and updates 362 bool result = pxUpdateRun(config, where, &query, "staticskyRun", "sky_id", "staticskyResult", true );362 bool result = pxUpdateRun(config, where, &query, "staticskyRun", "sky_id", "staticskyResult", true, false); 363 363 psFree(query); 364 364 psFree(where); -
branches/eam_branches/ipp-20110213/ippTools/src/warptool.c
r30556 r30812 435 435 436 436 // pxUpdateRun gets parameters from config->args and updates 437 bool result = pxUpdateRun(config, where, &query, "warpRun", "warp_id", "warpSkyfile", true );437 bool result = pxUpdateRun(config, where, &query, "warpRun", "warp_id", "warpSkyfile", true, true); 438 438 439 439 psFree(query); -
branches/eam_branches/ipp-20110213/ippTools/src/warptoolConfig.c
r29416 r30812 141 141 psMetadataAddTime(updaterunArgs, PS_LIST_TAIL, "-registered_begin", 0, "search for runs by registration time (>=)", NULL); 142 142 psMetadataAddTime(updaterunArgs, PS_LIST_TAIL, "-registered_end", 0, "search for runs by registration time (<)", NULL); 143 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL, "-destreaked", 0, "search for runs that have been destreaked", false);144 143 psMetadataAddBool(updaterunArgs, PS_LIST_TAIL, "-pretend", 0, "only pretend to run the query", false); 145 144 … … 149 148 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_dist_group", 0, "define new dist_group", NULL); 150 149 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_note", 0, "define new note", NULL); 150 pxmagicAddArguments(updaterunArgs); 151 151 152 152 // -exp -
branches/eam_branches/ipp-20110213/ippconfig
- Property svn:mergeinfo changed
/trunk/ippconfig merged: 30730-30731
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110213/ippconfig/recipes/nightly_science.config
r30470 r30812 2 2 CLEAN_MODES METADATA 3 3 MODE STR CHIP 4 COMMAND STR chiptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ 4 COMMAND STR chiptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ -destreaked 5 5 RETENTION_TIME U16 21 6 6 END 7 7 CLEAN_MODES METADATA 8 8 MODE STR WARP 9 COMMAND STR warptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ 9 COMMAND STR warptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ -destreaked 10 10 RETENTION_TIME U16 7 11 11 END 12 12 CLEAN_MODES METADATA 13 13 MODE STR DIFF 14 COMMAND STR difftool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ 14 COMMAND STR difftool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ -destreaked 15 15 RETENTION_TIME S16 21 16 16 END -
branches/eam_branches/ipp-20110213/pstamp/scripts/pstamp_checkdependent.pl
r30676 r30812 27 27 my $IPP_DIFF_MODE_STACK_STACK = 4; 28 28 29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic, $fault_count, $max_fault_count );29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile); 30 30 my ($dbname, $ps_dbserver, $verbose, $save_temps, $no_update); 31 31 … … 40 40 'fault_count=i' => \$fault_count, 41 41 'max_fault_count=i' => \$max_fault_count, 42 'logfile=s' => \$logfile, 42 43 'dbname=s' => \$dbname, # postage stamp server dbname 43 44 'dbserver=s' => \$ps_dbserver, # postage stamp server dbserver … … 68 69 my $ipprc = PS::IPP::Config->new(); 69 70 71 if ($logfile) { 72 $ipprc->redirect_output($logfile); 73 } 74 70 75 if (!$ps_dbserver) { 71 76 $ps_dbserver = metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER'); … … 314 319 my $data_state = $metadata->{data_state}; 315 320 321 # The update system currently requires that data that has been magicked be destreaked 322 # at chip stage so it needs magic even if the customer doesn't. 323 if ($metadata->{magicked} != 0) { 324 $need_magic = 1; 325 } 326 316 327 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or 317 328 ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) { … … 350 361 foreach my $chip (@$data) { 351 362 $chip_id = $chip->{chip_id}; 352 if (($chip->{data_state} ne 'full') or ($need_magic and ($chip->{magicked} <= 0))) { 363 364 # if chip has been magicked before require it to be magicked again 365 # because the warp pending query requires it. 366 if ($chip->{magicked} < 0) { 367 print "Input has been destreaked so we must destreak before warping\n"; 368 $need_magic = 1 369 } 370 371 if ($need_magic and ($chip->{magicked} eq 0)) { 372 my_die("Client requires magic, but chip never magicked. How did this dependent get queued?", $PS_EXIT_PROG_ERROR); 373 } 374 375 if (($chip->{data_state} ne 'full') or ($need_magic and ($chip->{magicked} < 0))) { 353 376 $chips_ready = 0; 354 377 $chip->{fault} = $chip->{chip_fault}; … … 399 422 my $skycell = $metadata; 400 423 my $skycell_id = $skycell->{skycell_id}; 424 425 # The update system currently requires that data that has been magicked be destreaked 426 # at chip stage so it needs magic even if the customer doesn't. 427 if ($metadata->{magicked} != 0) { 428 $need_magic = 1; 429 } 401 430 402 431 if ($diff_mode == $IPP_DIFF_MODE_WARP_STACK ) { -
branches/eam_branches/ipp-20110213/pstamp/scripts/pstampparse.pl
r30565 r30812 31 31 my $no_update; 32 32 my $dest_requires_magic; 33 34 # set this to true to disable update processing 35 my $no_updates_allowed = 0; 33 36 34 37 GetOptions( … … 424 427 # and this user's data store destination is allowed uncensored stamps, so accept the request 425 428 $need_magic = 0; 429 430 # Since user can get unmagicked data "by coordinate" requests can go back in time 431 # to dredge unusable data from the "dark days"... 432 if ($req_type eq 'bycoord' and $mjd_min eq 0) { 433 # ... so unless the user sets mjd_min clamp it to 2009-04-01 434 # XXX: This value should live in the pstampProject table not be hardcoded here 435 $mjd_min = 54922; 436 } 426 437 } else { 427 438 print STDERR "Error row $rownum: User not authorized to to request uncensored stamps.\n"; … … 465 476 print "Time to locate_images for row $rownum $dtime_locate\n"; 466 477 467 # handle this XXX: what did I mean by this comment 478 # handle this 479 # XXX: what did I mean by that comment? 468 480 $row->{need_magic} = $need_magic; 469 481 470 482 $num_jobs += queueJobs($mode, \@rowList, $imageList); 471 483 472 # if a row slipped through with no jobs add one484 # if a row slipped through with no jobs add a faulted one 473 485 foreach my $row (@rowList) { 474 486 if ($row->{job_num} == 0) { … … 495 507 my $option_mask = $row->{OPTION_MASK}; 496 508 my $components = $row->{components}; 509 510 $option_mask |= $PSTAMP_NO_WAIT_FOR_UPDATE if $no_updates_allowed; 497 511 498 512 my $roi_string; … … 668 682 my $rownum = $row->{ROWNUM}; 669 683 my $option_mask = $row->{OPTION_MASK}; 684 685 $option_mask |= $PSTAMP_NO_WAIT_FOR_UPDATE if $no_updates_allowed; 670 686 671 687 # For dist_bundle we need -
branches/eam_branches/ipp-20110213/pstamp/scripts/pstampstopfaulted
r29428 r30812 1 #!/bin/bash 2 # 3 # script executed by the task pstamp.stopfaulted to stop proceessing of jobs 4 # and dependents that have fault_count >= some maximum value. That value is expected 5 # to be passed in as an argument otherwise the default in pstamptool is used 6 # All arguments are passed to pstamptool 1 7 2 # script executed by the task pstamp.stopfaulted to stop proceessing of jobs 3 # and dependents that have faulted 5 or more times 4 # all arguments to this script are passed to pstamptool 5 6 # 25 is PSTAMP_NOT_AVAILABLE 8 # note: 25 is PSTAMP_NOT_AVAILABLE 7 9 fault_code=25 8 fault_count=39 10 10 11 date 11 12 echo stopping faulted dependent jobs 12 pstamptool -stopdependentjob -set_fault $fault_code -fault_count $fault_count $* 13 cmd="pstamptool -stopdependentjob -set_fault $fault_code $*" 14 echo $cmd 15 $cmd 13 16 14 17 echo stopping faulted jobs 15 pstamptool -updatejob -state run -set_state stop -set_fault $fault_code -fault_count $fault_count $* 18 cmd="pstamptool -updatejob -state run -set_state stop -set_fault $fault_code $*" 19 echo $cmd 20 $cmd -
branches/eam_branches/ipp-20110213/tools/czartool/Config.pm
r30274 r30812 66 66 $self->{roboczaremail} = $xc->findvalue('//roboczar/email'); 67 67 $self->{roboczarserverinterval} = $xc->findvalue('//roboczar/serverinterval'); 68 69 68 $self->{roboczarinterestedservers} = $xc->findvalue('//roboczar/interestedservers'); 70 69 } 71 70 … … 126 125 ########################################################################### 127 126 # 127 # Returns array of servers we are interested in for roboczar 128 # 129 ########################################################################### 130 sub getRoboczarInterestedServers { 131 my ($self) = @_; 132 133 my @servers = split('\s+', $self->{roboczarinterestedservers}); 134 135 return @servers; 136 } 137 138 ########################################################################### 139 # 128 140 # Returns the email to which roboczar should send its warnings 129 141 # … … 136 148 ########################################################################### 137 149 # 138 # Returns 150 # Returns font for gnuplot 139 151 # 140 152 ########################################################################### … … 146 158 ########################################################################### 147 159 # 148 # Returns 160 # Returns font size for gnuplot 149 161 # 150 162 ########################################################################### … … 156 168 ########################################################################### 157 169 # 158 # Returns 170 # Returns save location for metrics 159 171 # 160 172 ########################################################################### … … 166 178 ########################################################################### 167 179 # 168 # Returns 180 # Returns daily start time for metrics 169 181 # 170 182 ########################################################################### … … 176 188 ########################################################################### 177 189 # 178 # Returns 190 # Returns name for gpc1 Db 179 191 # 180 192 ########################################################################### … … 186 198 ########################################################################### 187 199 # 188 # Returns 200 # Returns host for gpc1 Db 189 201 # 190 202 ########################################################################### … … 196 208 ########################################################################### 197 209 # 198 # Returns 210 # Returns user for gpc1 Db 199 211 # 200 212 ########################################################################### … … 206 218 ########################################################################### 207 219 # 208 # Returns 220 # Returns password for gpc1 Db 209 221 # 210 222 ########################################################################### … … 216 228 ########################################################################### 217 229 # 218 # Returns 230 # Returns czar Db name 219 231 # 220 232 ########################################################################### … … 226 238 ########################################################################### 227 239 # 228 # Returns 240 # Returns host for czar Db 229 241 # 230 242 ########################################################################### … … 236 248 ########################################################################### 237 249 # 238 # Returns 250 # Returns username for czar Db 239 251 # 240 252 ########################################################################### … … 246 258 ########################################################################### 247 259 # 248 # Returns 260 # Returns password for czar Db 249 261 # 250 262 ########################################################################### -
branches/eam_branches/ipp-20110213/tools/czartool/czarconfig.xml
r30274 r30812 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 3 <!-- Global config for all czartool stuff --> 2 4 3 5 <czarconfig> 4 6 7 <!-- Gnuplot config section --> 5 8 <gnuplot> 6 9 <font>/usr/share/fonts/corefonts/arial.ttf</font> … … 8 11 </gnuplot> 9 12 13 <!-- Metrics section --> 10 14 <metrics> 11 15 <savelocation>/data/ipp004.0/ipp/ippMetrics</savelocation> … … 13 17 </metrics> 14 18 19 <!-- gpc1 Db section --> 15 20 <gpc1database> 16 21 <name>gpc1</name> … … 20 25 </gpc1database> 21 26 27 <!-- Czar Db section --> 22 28 <czardatabase> 23 29 <name>czardb</name> … … 28 34 </czardatabase> 29 35 36 <!-- Roboczar section --> 30 37 <roboczar> 31 38 <email>ps-ipp-ops@ifa.hawaii.edu</email> 39 <!-- How often should ropbczar check status? (MySQL 'interval' format please, eg 20 MINUTE, 1 HOUR etc) check--> 32 40 <serverinterval>20 MINUTE</serverinterval> 41 <!-- whitespace-separated server list for servers we want roboczar to check --> 42 <!-- <interestedservers>stdscience distribution summitcopy registration pstamp</interestedservers> --> 43 <interestedservers>pstamp</interestedservers> 33 44 </roboczar> 45 34 46 </czarconfig> -
branches/eam_branches/ipp-20110213/tools/roboczar.pl
r30250 r30812 22 22 23 23 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO get from Pantasks 24 my @serversWeCareAbout = ("stdscience", "distribution", "summitcopy", "registration", "pstamp");25 24 25 my @interestedServers = $config->getRoboczarInterestedServers(); 26 26 27 27 my $stuckMessage; … … 115 115 ${$message} = "Pantasks servers:\n"; 116 116 117 foreach $server (@ serversWeCareAbout) {117 foreach $server (@interestedServers) { 118 118 119 119 # is server alice?
Note:
See TracChangeset
for help on using the changeset viewer.
