Changeset 42166
- Timestamp:
- Apr 8, 2022, 5:04:42 PM (4 years ago)
- Location:
- branches/eam_branches/ipp-20220316
- Files:
-
- 62 edited
- 1 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/addstar/include/WISE.h (modified) (3 diffs)
-
Ohana/src/addstar/include/ukirt_uhs.h (modified) (1 diff)
-
Ohana/src/addstar/src/args_loadwise.c (modified) (5 diffs)
-
Ohana/src/addstar/src/loadukirt_uhs_readstars_ugcs.c (modified) (8 diffs)
-
Ohana/src/addstar/src/loadukirt_uhs_readstars_ugps.c (modified) (7 diffs)
-
Ohana/src/addstar/src/loadukirt_uhs_readstars_uhs.c (modified) (2 diffs)
-
Ohana/src/addstar/src/loadukirt_uhs_readstars_ulas.c (modified) (7 diffs)
-
Ohana/src/addstar/src/loadwise.c (modified) (1 diff)
-
Ohana/src/addstar/src/loadwise_ops.c (modified) (2 diffs)
-
Ohana/src/addstar/src/loadwise_rawdata.c (modified) (7 diffs)
-
Ohana/src/addstar/src/loadwise_star_full.c (modified) (3 diffs)
-
Ohana/src/dvomerge/include/dvomerge.h (modified) (1 diff)
-
Ohana/src/dvomerge/src/args.c (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvo_image_merge_dbs.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvomergeUpdate.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c (modified) (2 diffs)
-
Ohana/src/libohana/src/errors.c (modified) (1 diff)
-
Ohana/src/opihi (modified) (1 prop)
-
Ohana/src/opihi/cmd.data/Makefile (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/create.c (modified) (4 diffs)
-
Ohana/src/opihi/cmd.data/init.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.data/mlayer.c (copied) (copied from trunk/Ohana/src/opihi/cmd.data/mlayer.c )
-
Ohana/src/opihi/cmd.data/mslice.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/write_vectors.c (modified) (2 diffs)
-
Ohana/src/opihi/lib.shell/VectorIO.c (modified) (1 diff)
-
Ohana/src/relphot (modified) (1 prop)
-
Ohana/src/relphot/include/relphot.h (modified) (1 diff)
-
Ohana/src/relphot/src/ResetOps.c (modified) (1 diff)
-
Ohana/src/relphot/src/args.c (modified) (6 diffs)
-
Ohana/src/relphot/src/help.c (modified) (3 diffs)
-
Ohana/src/relphot/src/initialize.c (modified) (1 diff)
-
Ohana/src/relphot/src/relphot_images.c (modified) (1 diff)
-
Ohana/src/relphot/src/setMrelCatalog.c (modified) (2 diffs)
-
Ohana/src/relphot/src/setMrelFinal.c (modified) (1 diff)
-
doc/release.2015/ps1.datasystem/datasystem.tex (modified) (1 diff)
-
ippScripts/scripts/register_exp.pl (modified) (1 diff)
-
ippTests (modified) (1 prop)
-
ippTests/ippCheck/cammask.pro (modified) (2 diffs)
-
ippTests/ippCheck/camstats.pro (modified) (4 diffs)
-
ippTests/ippCheck/diffmask.pro (modified) (1 diff)
-
ippTests/ippCheck/ippCheck (modified) (2 diffs)
-
ippTests/ippCheck/warpmask.pro (modified) (1 diff)
-
ippTests/ippCheck/warpstats.pro (modified) (3 diffs)
-
ippTools (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/pztoolConfig.c (modified) (2 diffs)
-
ippconfig (modified) (1 prop)
-
ippconfig/megacam/psphot.config (modified) (1 diff)
-
ippconfig/recipes/filerules-mef.mdc (modified) (2 diffs)
-
ippconfig/recipes/filerules-simple.mdc (modified) (1 diff)
-
ppImage/src/ppImageDetrendPattern.c (modified) (1 diff)
-
ppImage/src/ppImageLoop.c (modified) (1 diff)
-
ppViz/src/ppCoord/ppCoord.h (modified) (1 diff)
-
ppViz/src/ppCoord/ppCoordArguments.c (modified) (3 diffs)
-
ppViz/src/ppCoord/ppCoordData.c (modified) (2 diffs)
-
ppViz/src/ppCoord/ppCoordLoop.c (modified) (4 diffs)
-
psModules (modified) (1 prop)
-
psModules/src/objects/pmPSF_IO.c (modified) (3 diffs)
-
pswarp/src/pswarpMapGrid.c (modified) (4 diffs)
-
pswarp/src/pswarpTransformReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20220316
- Property svn:mergeinfo changed
/trunk (added) merged: 42122,42124-42136,42142,42146,42149-42152,42154-42155
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/Ohana
- Property svn:mergeinfo changed
/trunk/Ohana (added) merged: 42124,42126-42128,42131-42136,42146,42149-42151
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/Ohana/src/addstar/include/WISE.h
r38986 r42166 21 21 short WISE_W1, WISE_W2, WISE_W3, WISE_W4; 22 22 23 enum {MODE_NONE, MODE_ ALLWISE, MODE_ALLSKY, MODE_PRELIM};23 enum {MODE_NONE, MODE_CATWISE, MODE_ALLWISE, MODE_ALLSKY, MODE_PRELIM}; 24 24 int MODE; 25 25 26 AddstarClientOptions args_loadwise (int argc, char **argv, AddstarClientOptions options);26 AddstarClientOptions args_loadwise (int *argc, char **argv, AddstarClientOptions options); 27 27 28 28 int loadwise_rawdata (SkyList *skytable, char *filename, AddstarClientOptions options); … … 38 38 int loadwise_star_allsky (Measure *measure, char *line, int Nmax); 39 39 int loadwise_star_allwise (Measure *measure, char *line, int Nmax); 40 40 int loadwise_star_catwise (Measure *measure, char *line, int Nmax, double Rs, double Ds); 41 41 42 42 char *nextWISEfield (char *line); … … 49 49 int setWISE_dup_flag (Measure *measure, char qual); 50 50 int setWISE_use_flag (Measure *measure, char qual); 51 int setWISE_sat_flag (Measure *measure, char *ptr); 52 53 int setCatWISE_sat_flag (Measure *measure, char *ptr, int start, int end); 54 int setCatWISE_blend_flag (Measure *measure, char *line); 51 55 52 56 char *skipNbounds (char *line, char bound, int Nbound, int Nbyte); 57 58 char *getLineSegment (char *line, int start, int end); 59 double getDoubleRAW (char *line, int start, int end); 60 double getDoubleNAN (char *line, int start, int end); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/include/ukirt_uhs.h
r42077 r42166 3 3 4 4 # define NSTARS_MAX 10000000 5 //# define NSTARS_MAX 5000 5 6 // # define NSTARS_MAX 10 6 7 -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/args_loadwise.c
r38062 r42166 3 3 static void help (void); 4 4 5 AddstarClientOptions args_loadwise (int argc, char **argv, AddstarClientOptions options) {5 AddstarClientOptions args_loadwise (int *argc, char **argv, AddstarClientOptions options) { 6 6 7 7 int N; 8 8 9 9 /* check for help request */ 10 if (get_argument ( argc, argv, "-help") ||11 get_argument ( argc, argv, "-h")) {10 if (get_argument (*argc, argv, "-help") || 11 get_argument (*argc, argv, "-h")) { 12 12 help (); 13 13 } … … 29 29 /* only add to existing regions */ 30 30 options.existing_regions = FALSE; 31 if ((N = get_argument ( argc, argv, "-existing-regions"))) {31 if ((N = get_argument (*argc, argv, "-existing-regions"))) { 32 32 options.existing_regions = TRUE; 33 remove_argument (N, &argc, argv);33 remove_argument (N, argc, argv); 34 34 } 35 35 /* only add to existing objects */ 36 36 options.only_match = FALSE; 37 if ((N = get_argument ( argc, argv, "-only-match"))) {37 if ((N = get_argument (*argc, argv, "-only-match"))) { 38 38 options.only_match = TRUE; 39 remove_argument (N, &argc, argv);39 remove_argument (N, argc, argv); 40 40 } 41 41 /* replace measurement, don't duplicate (ref/cat only) */ 42 42 options.replace = FALSE; 43 if ((N = get_argument ( argc, argv, "-replace"))) {43 if ((N = get_argument (*argc, argv, "-replace"))) { 44 44 options.replace = TRUE; 45 remove_argument (N, &argc, argv);45 remove_argument (N, argc, argv); 46 46 } 47 47 48 48 /* extra error messages */ 49 49 VERBOSE = FALSE; 50 if ((N = get_argument ( argc, argv, "-v"))) {50 if ((N = get_argument (*argc, argv, "-v"))) { 51 51 VERBOSE = TRUE; 52 remove_argument (N, &argc, argv);52 remove_argument (N, argc, argv); 53 53 } 54 54 55 55 /* load the prelim data dump */ 56 MODE = MODE_ ALLWISE;57 if ((N = get_argument ( argc, argv, "-mode"))) {58 MODE = MODE_NONE;59 remove_argument (N, &argc, argv);56 MODE = MODE_NONE; 57 if ((N = get_argument (*argc, argv, "-mode"))) { 58 remove_argument (N, argc, argv); 59 if (!strcasecmp(argv[N], "catwise")) MODE = MODE_CATWISE; 60 60 if (!strcasecmp(argv[N], "allwise")) MODE = MODE_ALLWISE; 61 61 if (!strcasecmp(argv[N], "allsky")) MODE = MODE_ALLSKY; … … 65 65 exit (2); 66 66 } 67 remove_argument (N, &argc, argv);67 remove_argument (N, argc, argv); 68 68 } 69 69 … … 85 85 DUMP = NULL; 86 86 87 if ( argc < 2) {87 if (*argc < 2) { 88 88 fprintf (stderr, "USAGE: loadwise [options] (wisefile) [..more files]\n"); 89 89 exit (2); … … 94 94 static void help () { 95 95 96 fprintf (stderr, "USAGE: loadwise [ options] (wisefile) [..more files]\n");96 fprintf (stderr, "USAGE: loadwise [-mode MODE] [options] (wisefile) [..more files]\n"); 97 97 fprintf (stderr, " add data from WISE catalog to DVO\n\n"); 98 99 fprintf (stderr, " MODE may be : catwise, allwise, allsky, prelim\n"); 98 100 99 101 fprintf (stderr, " optional flags:\n"); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_ugcs.c
r42077 r42166 467 467 NELEM += 1000; 468 468 469 REALLOCATE (sourceID, uint64_t, NELEM); 469 REALLOCATE (sourceID, uint64_t, NELEM); 470 470 REALLOCATE (frameSetID, uint64_t, NELEM); 471 471 REALLOCATE (ra, double, NELEM); 472 472 REALLOCATE (dec, double, NELEM); 473 REALLOCATE (epoch, double, NELEM); 473 474 REALLOCATE (priOrSec, uint64_t, NELEM); 474 475 REALLOCATE (mergedClass, int, NELEM); 475 476 REALLOCATE (pStar, double, NELEM); 476 477 REALLOCATE (pGalaxy, double, NELEM); 478 477 479 REALLOCATE (zHallMag, double, NELEM); 478 480 REALLOCATE (zHallMagErr, double, NELEM); … … 485 487 REALLOCATE (zppErrBits, int, NELEM); 486 488 REALLOCATE (zSeqNum, int, NELEM); 489 487 490 REALLOCATE (yHallMag, double, NELEM); 488 491 REALLOCATE (yHallMagErr, double, NELEM); … … 495 498 REALLOCATE (yppErrBits, int, NELEM); 496 499 REALLOCATE (ySeqNum, int, NELEM); 500 497 501 REALLOCATE (jHallMag, double, NELEM); 498 502 REALLOCATE (jHallMagErr, double, NELEM); … … 505 509 REALLOCATE (jppErrBits, int, NELEM); 506 510 REALLOCATE (jSeqNum, int, NELEM); 511 507 512 REALLOCATE (hHallMag, double, NELEM); 508 513 REALLOCATE (hHallMagErr, double, NELEM); … … 515 520 REALLOCATE (hppErrBits, int, NELEM); 516 521 REALLOCATE (hSeqNum, int, NELEM); 522 517 523 REALLOCATE (k1HallMag, double, NELEM); 518 524 REALLOCATE (k1HallMagErr, double, NELEM); … … 525 531 REALLOCATE (k1ppErrBits, int, NELEM); 526 532 REALLOCATE (k1SeqNum, int, NELEM); 533 527 534 REALLOCATE (k2HallMag, double, NELEM); 528 535 REALLOCATE (k2HallMagErr, double, NELEM); … … 541 548 } 542 549 } 550 fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars); 543 551 544 552 // Nelem is now the number of items (objects,stars) read from the Gaia CSV file … … 715 723 Nstars ++; 716 724 717 if (N STARS >= Nstars) {725 if (Nstars >= NSTARS) { 718 726 NSTARS += 10000; 719 727 REALLOCATE (stars, UKIRT_Stars, NSTARS); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_ugps.c
r42077 r42166 388 388 NELEM += 1000; 389 389 390 REALLOCATE (sourceID, uint64_t, NELEM); 390 REALLOCATE (sourceID, uint64_t, NELEM); 391 391 REALLOCATE (frameSetID, uint64_t, NELEM); 392 392 REALLOCATE (ra, double, NELEM); 393 393 REALLOCATE (dec, double, NELEM); 394 REALLOCATE (epoch, double, NELEM); 394 395 REALLOCATE (priOrSec, uint64_t, NELEM); 395 396 REALLOCATE (mergedClass, int, NELEM); 396 397 REALLOCATE (pStar, double, NELEM); 397 398 REALLOCATE (pGalaxy, double, NELEM); 399 398 400 REALLOCATE (jAperMag1, double, NELEM); 399 401 REALLOCATE (jAperMag1Err, double, NELEM); … … 406 408 REALLOCATE (jppErrBits, int, NELEM); 407 409 REALLOCATE (jSeqNum, int, NELEM); 410 408 411 REALLOCATE (hAperMag1, double, NELEM); 409 412 REALLOCATE (hAperMag1Err, double, NELEM); … … 416 419 REALLOCATE (hppErrBits, int, NELEM); 417 420 REALLOCATE (hSeqNum, int, NELEM); 421 418 422 REALLOCATE (k1AperMag1, double, NELEM); 419 423 REALLOCATE (k1AperMag1Err, double, NELEM); … … 426 430 REALLOCATE (k1ppErrBits, int, NELEM); 427 431 REALLOCATE (k1SeqNum, int, NELEM); 432 428 433 REALLOCATE (k2AperMag1, double, NELEM); 429 434 REALLOCATE (k2AperMag1Err, double, NELEM); … … 436 441 REALLOCATE (k2ppErrBits, int, NELEM); 437 442 REALLOCATE (k2SeqNum, int, NELEM); 443 438 444 REALLOCATE (h2AperMag1, double, NELEM); 439 445 REALLOCATE (h2AperMag1Err, double, NELEM); … … 452 458 } 453 459 } 460 fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars); 454 461 455 462 // Nelem is now the number of items (objects,stars) read from the Gaia CSV file … … 606 613 Nstars ++; 607 614 608 if (N STARS >= Nstars) {615 if (Nstars >= NSTARS) { 609 616 NSTARS += 10000; 610 617 REALLOCATE (stars, UKIRT_Stars, NSTARS); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_uhs.c
r42077 r42166 234 234 } 235 235 } 236 fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars); 236 237 237 238 // Nelem is now the number of items (objects,stars) read from the Gaia CSV file … … 307 308 Nstars ++; 308 309 309 if (N STARS >= Nstars) {310 if (Nstars >= NSTARS) { 310 311 NSTARS += 10000; 311 312 REALLOCATE (stars, UKIRT_Stars, NSTARS); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_ulas.c
r42077 r42166 415 415 NELEM += 1000; 416 416 417 REALLOCATE (sourceID, uint64_t, NELEM); 417 REALLOCATE (sourceID, uint64_t, NELEM); 418 418 REALLOCATE (frameSetID, uint64_t, NELEM); 419 419 REALLOCATE (ra, double, NELEM); 420 420 REALLOCATE (dec, double, NELEM); 421 REALLOCATE (epoch, double, NELEM); 421 422 REALLOCATE (priOrSec, uint64_t, NELEM); 422 423 REALLOCATE (mergedClass, int, NELEM); 423 424 REALLOCATE (pStar, double, NELEM); 424 425 REALLOCATE (pGalaxy, double, NELEM); 426 425 427 REALLOCATE (yHallMag, double, NELEM); 426 428 REALLOCATE (yHallMagErr, double, NELEM); … … 433 435 REALLOCATE (yppErrBits, int, NELEM); 434 436 REALLOCATE (ySeqNum, int, NELEM); 437 435 438 REALLOCATE (j1HallMag, double, NELEM); 436 439 REALLOCATE (j1HallMagErr, double, NELEM); … … 443 446 REALLOCATE (j1ppErrBits, int, NELEM); 444 447 REALLOCATE (j1SeqNum, int, NELEM); 448 445 449 REALLOCATE (j2HallMag, double, NELEM); 446 450 REALLOCATE (j2HallMagErr, double, NELEM); … … 453 457 REALLOCATE (j2ppErrBits, int, NELEM); 454 458 REALLOCATE (j2SeqNum, int, NELEM); 459 455 460 REALLOCATE (hHallMag, double, NELEM); 456 461 REALLOCATE (hHallMagErr, double, NELEM); … … 463 468 REALLOCATE (hppErrBits, int, NELEM); 464 469 REALLOCATE (hSeqNum, int, NELEM); 470 465 471 REALLOCATE (kHallMag, double, NELEM); 466 472 REALLOCATE (kHallMagErr, double, NELEM); … … 479 485 } 480 486 } 487 fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars); 481 488 482 489 // Nelem is now the number of items (objects,stars) read from the Gaia CSV file … … 633 640 Nstars ++; 634 641 635 if (N STARS >= Nstars) {642 if (Nstars >= NSTARS) { 636 643 NSTARS += 10000; 637 644 REALLOCATE (stars, UKIRT_Stars, NSTARS); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise.c
r38986 r42166 22 22 SetSignals (); 23 23 options = ConfigInit (&argc, argv); 24 options = args_loadwise ( argc, argv, options);24 options = args_loadwise (&argc, argv, options); 25 25 26 26 // load the full sky description table: -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise_ops.c
r33653 r42166 17 17 char *ptr = line; 18 18 19 ptr = skipNbounds (ptr, '|', 1, Nmax); 20 *R = strtod (ptr, NULL); 21 ptr = skipNbounds (ptr, '|', 1, Nmax); 22 *D = strtod (ptr, NULL); 19 if (MODE == MODE_CATWISE) { 20 // copy the string ranges and then use strtod (not necessary?) 21 *R = strtod (&ptr[47], NULL); // safe to use the strtod on the line because it is white-space separated 22 *D = strtod (&ptr[59], NULL); 23 } else { 24 ptr = skipNbounds (ptr, '|', 1, Nmax); 25 *R = strtod (ptr, NULL); 26 ptr = skipNbounds (ptr, '|', 1, Nmax); 27 *D = strtod (ptr, NULL); 28 } 23 29 if (*D > 90) Shutdown ("weird DEC value: something is wrong"); 24 30 … … 91 97 } 92 98 99 /* return a pointer to the first char after Nbound of value bound */ 100 char *getLineSegment (char *line, int start, int end) { 101 102 // do NOT damage the buffer by seting the end byte to NULL 103 if (0) { line[end] = 0; } 104 char *ptr = &line[start]; 105 return (ptr); 106 } 107 108 double getDoubleRAW (char *line, int start, int end) { 109 char *ptr = getLineSegment(line, start, end); 110 double value = strtod (ptr, NULL); 111 return value; 112 } 113 114 double getDoubleNAN (char *line, int start, int end) { 115 char *endpoint = NULL; 116 char *ptr = getLineSegment(line, start, end); 117 double value = strtod (ptr, &endpoint); 118 if (endpoint == ptr) { value = NAN; } 119 return value; 120 } 121 93 122 /* watch for patches which cross 0,360 boundary */ 94 123 SkyTable *loadWISE_acc (char *path, char *accel) { -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise_rawdata.c
r38986 r42166 28 28 getWISE_setup (); 29 29 30 int NMeasPerStar = (MODE == MODE_CATWISE) ? 2 : 4; 31 30 32 ALLOCATE (buffer, char, NBYTE); 31 33 … … 34 36 if (f == NULL) Shutdown ("can't read WISE data file: %s", filename); 35 37 // test if this is a raw datafile or gzipped... 38 39 int skipHeader = TRUE; 36 40 37 41 Nextra = 0; // number excess bytes from lsat partial row … … 59 63 Dmax = -90.0; 60 64 65 // XXX buffer is being reread instead of continuing. 66 61 67 // scan through entire buffer for star coords 62 68 while (1) { 69 70 if (skipHeader && (MODE == MODE_CATWISE)) { 71 if (*p == '\\') goto skip_header; 72 if (*p == '|') goto skip_header; 73 } 74 if (skipHeader && (MODE == MODE_CATWISE)) { 75 // once we get past the header, do not skip any more 76 skipHeader = FALSE; 77 } 78 63 79 getWISE_coords (p, &tstars[Ntstars].R, &tstars[Ntstars].D, Nbyte - offset); 64 80 tstars[Ntstars].offset = offset; // offset within scan … … 74 90 Ntstars ++; 75 91 CHECK_REALLOCATE (tstars, WISE_Stars, NTSTARS, Ntstars, 10000); 92 93 skip_header: 76 94 77 95 /* start of the next line */ … … 143 161 if (tstars[j].D > UserPatch.Dmax) continue; 144 162 163 // offset is bytes to start of line from start of buffer 145 164 offset = tstars[j].offset; 146 165 147 166 dvo_average_init (&newcat->average[Nave]); 148 for (k = 0; k < 4; k++) {167 for (k = 0; k < NMeasPerStar; k++) { 149 168 dvo_measure_init (&newcat->measure[Nmeas+k]); 150 169 } … … 163 182 loadwise_star_allwise (&newcat->measure[Nmeas], &buffer[offset], Nbyte - offset); 164 183 break; 184 case MODE_CATWISE: 185 loadwise_star_catwise (&newcat->measure[Nmeas], &buffer[offset], Nbyte - offset, tstars[j].R, tstars[j].D); 186 break; 165 187 default: 166 188 break; … … 169 191 tstars[j].flag = TRUE; 170 192 171 newcat->average[Nave].Nmeasure = 4;193 newcat->average[Nave].Nmeasure = NMeasPerStar; 172 194 newcat->average[Nave].measureOffset = Nmeas; 173 195 174 196 Nave ++; 175 Nmeas += 4;197 Nmeas += NMeasPerStar; 176 198 177 199 CHECK_REALLOCATE (newcat->average, Average, NAVE, Nave, 1000); -
branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise_star_full.c
r38986 r42166 2 2 # include "WISE.h" 3 3 4 int setWISE_ph_qual (Measure *measure, char qual);5 4 int setWISE_var_flag_allsky (Measure *measure, char qual); 6 5 int setWISE_ext_flag_allsky (Measure *measure, char ptr); 7 6 int setWISE_var_flag_prelim (Measure *measure, char qual); 8 7 int setWISE_ext_flag_prelim (Measure *measure, char ptr); 9 int setWISE_cc_flag (Measure *measure, char qual);10 int setWISE_sat_flag (Measure *measure, char *ptr);11 8 int setWISE_blend_flag (Measure *measure, char *ptr); 9 10 // fill in the data for a CatWISE double star. takes a pointer to the start of the line the 11 // RA and DEC have already been set 12 int loadwise_star_catwise (Measure *measure, char *line, int Nmax, double Rs, double Ds) { 13 14 if (line == NULL) Shutdown ("format error in WISE"); 15 16 /*** CATWISE has fixed width data, not pipe-separated, etc ***/ 17 18 // https://irsa.ipac.caltech.edu/data/WISE/CatWISE/gator_docs/catwise_colDescriptions.html 19 20 // We are supplied a pointer (line) to the start of a full line of data. The CatWISE 21 // format uses fixed-width fields with white-space separators. The ra & dec values have 22 // already been extracted. 23 24 measure[0].R = Rs; 25 measure[0].D = Ds; 26 measure[1].R = Rs; 27 measure[1].D = Ds; 28 29 // I can assign dRA and dDEC to dX and dY if I can consistently set posangle and pltscale 30 measure[0].dXccd = ToShortPixels(getDoubleRAW (line, 71, 79) + 0.005); // sig_ra -- add 5/1000 to avoid truncation 31 measure[0].dYccd = ToShortPixels(getDoubleRAW (line, 80, 88) + 0.005); // sig_dec 32 measure[0].posangle = 0.0; 33 measure[0].pltscale = 1.0; 34 35 // we only know a single set of values for both bands 36 measure[1].dXccd = measure[0].dXccd; 37 measure[1].dYccd = measure[0].dYccd; 38 measure[1].posangle = measure[0].posangle; 39 measure[1].pltscale = measure[0].pltscale; 40 41 measure[0].Xccd = getDoubleRAW (line, 98, 106); // wx 42 measure[0].Yccd = getDoubleRAW (line, 107, 115); // wy 43 measure[1].Xccd = measure[0].Xccd; 44 measure[1].Yccd = measure[0].Yccd; 45 46 // W1 47 measure[0].M = getDoubleNAN (line, 248, 254); // w1mpro 48 measure[0].dM = getDoubleNAN (line, 255, 264); // w1sigmpro 49 measure[0].psfChisq = getDoubleRAW (line, 265, 275); // w1rchi2 50 measure[0].psfQF = measure[0].psfChisq; 51 measure[0].photFlags = 0; 52 53 // W2 54 measure[1].M = getDoubleNAN (line, 276, 282); // w2mpro 55 measure[1].dM = getDoubleNAN (line, 283, 292); // w2sigmpro 56 measure[1].psfChisq = getDoubleRAW (line, 293, 303); // w2rchi2 57 measure[1].psfQF = measure[1].psfChisq; 58 measure[1].photFlags = 0; 59 60 setCatWISE_blend_flag (measure, line); // w1sat 61 62 setCatWISE_sat_flag (&measure[0], line, 323, 330); // w1sat 63 setCatWISE_sat_flag (&measure[1], line, 331, 338); // w2sat 64 65 // cc_flags? 1642 - 1657 66 // setWISE_cc_flag (&measure[0], ptr[i]); // cc_flags 67 68 // set ext flags for all 4 measures 69 // setCatWISE_ext_flag_allsky (measure, ptr[0]); // ext_flg 70 71 // setWISE_var_flag_allsky (&measure[0], ptr[i]); // var_flg 72 73 // setWISE_ph_qual (&measure[i], ptr[i]); // ph_qual 74 75 double mjdmean = getDoubleRAW (line, 1126, 1138); // MeanObsMJD 76 77 // the release is based on data taken in the period 14 January 2010 to 29 April 2010 78 if (mjdmean == 0.0) { 79 measure[0].t = 0; 80 } else { 81 measure[0].t = ohana_mjd_to_sec (mjdmean); 82 } 83 measure[1].t = measure[0].t; 84 85 measure[0].photcode = WISE_W1; 86 measure[0].detID = 0; 87 measure[0].imageID = 0; 88 89 measure[1].photcode = WISE_W2; 90 measure[1].detID = 0; 91 measure[1].imageID = 0; 92 93 return TRUE; 94 } 12 95 13 96 // fill in the data for a WISE quad star. takes a pointer to the start of the line the … … 458 541 } 459 542 543 int setCatWISE_blend_flag (Measure *measure, char *line) { 544 545 // na 546 int nb = atoi(getLineSegment(line, 315, 318)); // nb 547 int na = atoi(getLineSegment(line, 319, 322)); // na 548 549 if (nb != 1) { 550 if (na == 0) { 551 measure[0].photFlags |= FLAG_BLEND_ACTIVE; 552 measure[1].photFlags |= FLAG_BLEND_ACTIVE; 553 } else { 554 measure[0].photFlags |= FLAG_BLEND_PASSIVE; 555 measure[1].photFlags |= FLAG_BLEND_PASSIVE; 556 } 557 } 558 return TRUE; 559 } 560 460 561 int setWISE_sat_flag (Measure *measure, char *ptr) { 461 562 … … 465 566 } 466 567 return TRUE; 568 } 569 570 int setCatWISE_sat_flag (Measure *measure, char *ptr, int start, int end) { 571 572 float sat = getDoubleRAW (ptr, start, end); 573 if (sat > 0.0) { 574 measure[0].photFlags |= FLAG_SATURATED_PIX; 575 } 576 return TRUE; 467 577 } 468 578 -
branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/include/dvomerge.h
r41341 r42166 65 65 int RESET_LENSING; 66 66 67 int SKIP_IMAGES; 67 68 int SKIP_MEASURE; 68 69 int SKIP_MISSING; -
branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/args.c
r41341 r42166 39 39 remove_argument (N, argc, argv); 40 40 } 41 42 /* extra error messages */ 43 MATCHED_TABLES = FALSE; 41 SKIP_IMAGES = FALSE; 42 if ((N = get_argument (*argc, argv, "-skip-images"))) { 43 SKIP_IMAGES = TRUE; 44 remove_argument (N, argc, argv); 45 } 46 47 /* extra error messages */ 48 MATCHED_TABLES = TRUE; 44 49 if ((N = get_argument (*argc, argv, "-matched-tables"))) { 45 50 MATCHED_TABLES = TRUE; 51 remove_argument (N, argc, argv); 52 } 53 if ((N = get_argument (*argc, argv, "-unmatched-tables"))) { 54 MATCHED_TABLES = FALSE; 46 55 remove_argument (N, argc, argv); 47 56 } … … 77 86 SKIP_GALPHOT = TRUE; 78 87 remove_argument (N, argc, argv); 88 } 89 90 if (SKIP_IMAGES && !(SKIP_MEASURE || SKIP_LENSING)) { 91 fprintf (stderr, "WARNING: skipping images but merging measure and lensing tables: imageIDs will not be correct\n"); 92 fprintf (stderr, "type Ctrl-C within 5 seconds to cancel\n"); 93 for (int i = 5; i > 0; i--) { 94 fprintf (stderr, "%d.. ", i); 95 usleep (1000000); 96 } 97 fprintf (stderr, "\n"); 79 98 } 80 99 -
branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c
r39329 r42166 404 404 off_t i; 405 405 406 for (i = 0; i < IDmap->oldIDmax + 1; i++) {406 for (i = 0; IDmap->notFoundMeasure && (i < IDmap->oldIDmax + 1); i++) { 407 407 if (!IDmap->notFoundMeasure[i]) continue; 408 408 fprintf (stderr, "SKIP IMAGE MEASURE: "OFF_T_FMT", %d measures\n", i, IDmap->notFoundMeasure[i]); 409 409 } 410 for (i = 0; i < IDmap->oldIDmax + 1; i++) {410 for (i = 0; IDmap->notFoundLensing && (i < IDmap->oldIDmax + 1); i++) { 411 411 if (!IDmap->notFoundLensing[i]) continue; 412 412 fprintf (stderr, "SKIP IMAGE LENSING: "OFF_T_FMT", %d lensings\n", i, IDmap->notFoundLensing[i]); -
branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvomergeUpdate.c
r39301 r42166 81 81 } 82 82 83 if (CONTINUE) { 84 // need to determine the mapping from the input to the output images 85 dvomergeImagesGetMap (&IDmap, input, output); 86 } else { 87 dvomergeImagesUpdate (&IDmap, input, output); 88 if (IMAGES_ONLY) exit (0); 83 // do not merge the images unless requested 84 if (!SKIP_IMAGES) { 85 if (CONTINUE) { 86 // need to determine the mapping from the input to the output images 87 dvomergeImagesGetMap (&IDmap, input, output); 88 } else { 89 dvomergeImagesUpdate (&IDmap, input, output); 90 if (IMAGES_ONLY) exit (0); 91 } 89 92 } 90 93 91 94 // load the sky table for the existing database 92 95 insky = SkyTableLoadOptimal (input, NULL, NULL, FALSE, SKY_DEPTH_HST, VERBOSE); -
branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c
r41341 r42166 163 163 } 164 164 165 // for SKIP_IMAGES, this is a NO-OP 165 166 dvo_update_image_IDs (IDmap, &incatalog); 166 167 -
branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c
r38986 r42166 69 69 LoadCatalog (&outcatalog, outlist[0].regions[j], outlist[0].filename[j], "w", threadData->NsecfiltOutput); 70 70 71 // for SKIP_IMAGES, this is a NO-OP 71 72 dvo_update_image_IDs (threadData->IDmap, &incatalog); 72 73 merge_catalogs_old (&threadData->outsky->regions[j], &outcatalog, &incatalog, RADIUS, threadData->secfiltMap); … … 183 184 } 184 185 185 if (CONTINUE) { 186 // need to determine the mapping from the input to the output images 187 dvomergeImagesGetMap (&IDmap, input, output); 188 } else { 189 dvomergeImagesUpdate (&IDmap, input, output); 190 if (IMAGES_ONLY) exit (0); 186 if (!SKIP_IMAGES) { 187 if (CONTINUE) { 188 // need to determine the mapping from the input to the output images 189 dvomergeImagesGetMap (&IDmap, input, output); 190 } else { 191 dvomergeImagesUpdate (&IDmap, input, output); 192 if (IMAGES_ONLY) exit (0); 193 } 191 194 } 192 195 -
branches/eam_branches/ipp-20220316/Ohana/src/libohana/src/errors.c
r41468 r42166 26 26 27 27 int push_error (char *line) { 28 29 if (!errorlines) { 30 NLINE = 10; 31 ALLOCATE (errorlines, char *, NLINE); 32 for (int i = 0; i < NLINE; i++) { 33 errorlines[i] = NULL; 34 } 35 } 28 36 29 37 errorlines[Nline] = strcreate (line); -
branches/eam_branches/ipp-20220316/Ohana/src/opihi
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/Makefile
r42082 r42166 106 106 $(SRC)/mget3d.$(ARCH).o \ 107 107 $(SRC)/mslice.$(ARCH).o \ 108 $(SRC)/mlayer.$(ARCH).o \ 108 109 $(SRC)/minterpolate.$(ARCH).o \ 109 110 $(SRC)/medimage.$(ARCH).o \ -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/create.c
r41341 r42166 3 3 int create (int argc, char **argv) { 4 4 5 int i, N , INT;5 int i, N; 6 6 opihi_flt start, end, delta; 7 7 Vector *vec; … … 34 34 } 35 35 36 INT = FALSE;36 int INT = FALSE; 37 37 if ((N = get_argument (argc, argv, "-int"))) { 38 38 INT = TRUE; … … 40 40 } 41 41 42 if ((argc != 5) && (argc != 4)) { 43 gprint (GP_ERR, "USAGE: create vector start end [delta] [-int]\n"); 44 gprint (GP_ERR, " -int : resulting vector is integer type (delta must be integer)\n"); 45 gprint (GP_ERR, " -str : resulting vector is string type (only give number of elements)\n"); 46 return (FALSE); 42 int EMPTY = FALSE; 43 if ((N = get_argument (argc, argv, "-empty"))) { 44 EMPTY = TRUE; 45 remove_argument (N, &argc, argv); 47 46 } 48 47 48 if (!EMPTY && (argc != 5) && (argc != 4)) goto usage; 49 if (EMPTY && (argc != 2)) goto usage; 50 49 51 if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) return (FALSE); 52 if (EMPTY) { 53 ResetVector (vec, (INT ? OPIHI_INT : OPIHI_FLT), 0); 54 return TRUE; 55 } 50 56 51 57 delta = 1; … … 91 97 92 98 return (TRUE); 99 100 usage: 101 gprint (GP_ERR, "USAGE: create vector start end [delta] [-int]\n"); 102 gprint (GP_ERR, " -int : resulting vector is integer type (delta must be integer)\n"); 103 gprint (GP_ERR, " -str : resulting vector is string type (only give number of elements)\n"); 104 gprint (GP_ERR, "OR: create vector -empty (creates vector of length zero)\n"); 105 return (FALSE); 93 106 } -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/init.c
r42082 r42166 97 97 int mget3d PROTO((int, char **)); 98 98 int mslice PROTO((int, char **)); 99 int mlayer PROTO((int, char **)); 99 100 int minterp PROTO((int, char **)); 100 101 int medimage_command PROTO((int, char **)); … … 296 297 {1, "mget3d", mget3d, "extract a vector from a 3D image"}, 297 298 {1, "mslice", mslice, "extract an image plane from a 3D image"}, 299 {1, "mlayer", mlayer, "insert an image plane into a 3D image"}, 298 300 {1, "imget", mget, "extract a vector from an image"}, 299 301 {1, "minterp", minterp, "interpolate image pixels"}, -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/mslice.c
r40334 r42166 31 31 if (argc != 4) { 32 32 gprint (GP_ERR, "USAGE: mslice <input> <output> plane [-x,-y,-z]\n"); 33 gprint (GP_ERR, " extract 2D image from 3D cube (opposite of mlayer)\n"); 33 34 gprint (GP_ERR, " -z is default\n"); 34 35 return (FALSE); -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/write_vectors.c
r41341 r42166 102 102 if (argc < 3) { 103 103 gprint (GP_ERR, "USAGE: write [options] file vector vector ...\n"); 104 gprint (GP_ERR, "OPTIONS: [-header ] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n");104 gprint (GP_ERR, "OPTIONS: [-header [buf]] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n"); 105 105 return (FALSE); 106 106 } … … 289 289 usage: 290 290 gprint (GP_ERR, "USAGE: write [options] file vector vector ...\n"); 291 gprint (GP_ERR, "OPTIONS: [-header ] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n\n");291 gprint (GP_ERR, "OPTIONS: [-header [buf]] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n\n"); 292 292 293 293 gprint (GP_ERR, "OPTIONS: \n"); 294 gprint (GP_ERR, " -header : add a descriptive header line to ascii or csv output \n");294 gprint (GP_ERR, " -header : add a descriptive header line to ascii or csv output (see below for FITS)\n"); 295 295 gprint (GP_ERR, " -append : write to the end of the existing file\n"); 296 296 gprint (GP_ERR, " -fits NAME : write a fits table (extention name is NAME, column names match vector names)\n"); -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/lib.shell/VectorIO.c
r41422 r42166 267 267 } 268 268 269 static char *rawkeywords[] = {"SIMPLE", "BITPIX", "NAXIS", "PCOUNT", "GCOUNT", "EXTEND", "EXTNAME", "BSCALE", "BZERO", "TFIELDS", "TFORM", "T ZERO", "TSCAL", " ", NULL};269 static char *rawkeywords[] = {"SIMPLE", "BITPIX", "NAXIS", "PCOUNT", "GCOUNT", "EXTEND", "EXTNAME", "BSCALE", "BZERO", "TFIELDS", "TFORM", "TTYPE", "TZERO", "TSCAL", " ", NULL}; 270 270 271 271 // write a set of vectors to a FITS file (vectors names become fits column names) -
branches/eam_branches/ipp-20220316/Ohana/src/relphot
- Property svn:mergeinfo changed
/trunk/Ohana/src/relphot (added) merged: 42124,42132,42134-42135,42151
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/Ohana/src/relphot/include/relphot.h
r42112 r42166 721 721 int relphot_images (SkyList *skylist); 722 722 723 void relphot_usage ( void);723 void relphot_usage (int argc, char **argv); 724 724 void relphot_help (int argc, char **argv); 725 725 -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/ResetOps.c
r41946 r42166 123 123 124 124 for (off_t i = 0; i < catalog->Naverage; i++) { 125 catalog->average[i].psfQF = NAN; // force recalculation in setMrelCatalog 126 catalog->average[i].psfQFperf = NAN; // force recalculation in setMrelCatalog 127 catalog->average[i].stargal = NAN; // force recalculation in setMrelCatalog 128 catalog->average[i].photFlagsUpper = 0; // reset (will be re-calculated) 129 catalog->average[i].photFlagsLower = 0; // reset (will be re-calculated) 130 catalog->average[i].NwarpOK = 0; // reset (will be re-calculated) 125 if (STAGES & STAGE_CHIP) { 126 catalog->average[i].psfQF = NAN; // force recalculation in setMrelCatalog 127 catalog->average[i].psfQFperf = NAN; // force recalculation in setMrelCatalog 128 catalog->average[i].stargal = NAN; // force recalculation in setMrelCatalog 129 catalog->average[i].photFlagsUpper = 0; // reset (will be re-calculated) 130 catalog->average[i].photFlagsLower = 0; // reset (will be re-calculated) 131 } 132 133 if (STAGES & STAGE_WARP) { 134 catalog->average[i].NwarpOK = 0; // reset (will be re-calculated) 135 } 131 136 132 137 // RESET_FLATCORR independent of RESET? -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/args.c
r42112 r42166 203 203 remove_argument (N, &argc, argv); 204 204 TEST_IMAGE1 = strtol(argv[N], &endptr, 0); 205 if (*endptr) relphot_usage ( );205 if (*endptr) relphot_usage (argc, argv); 206 206 remove_argument (N, &argc, argv); 207 207 } … … 211 211 remove_argument (N, &argc, argv); 212 212 TEST_IMAGE2 = strtol(argv[N], &endptr, 0); 213 if (*endptr) relphot_usage ( );213 if (*endptr) relphot_usage (argc, argv); 214 214 remove_argument (N, &argc, argv); 215 215 } … … 584 584 remove_argument (N, &argc, argv); 585 585 mode = PARALLEL_IMAGES; 586 if (N >= argc) relphot_usage( );586 if (N >= argc) relphot_usage(argc, argv); 587 587 IMAGE_TABLE = strcreate (argv[N]); 588 588 remove_argument (N, &argc, argv); 589 if (!REGION_FILE) relphot_usage( );589 if (!REGION_FILE) relphot_usage(argc, argv); 590 590 } 591 591 … … 594 594 remove_argument (N, &argc, argv); 595 595 mode = PARALLEL_REGIONS; 596 if (!REGION_FILE) relphot_usage( );596 if (!REGION_FILE) relphot_usage(argc, argv); 597 597 if ((N = get_argument (argc, argv, "-parallel-regions-manual"))) { 598 598 remove_argument (N, &argc, argv); … … 609 609 // note: initialize sets PhotcodeList to the full set of average photcodes 610 610 // if the mode is UPDATE_AVERAGES 611 if (argc != 1) relphot_usage();612 break;611 // if (argc != 1) relphot_usage(argc, argv); 612 // break; 613 613 614 if (argc == 1) break; // if no photcodes are given, use them all? 615 614 616 case UPDATE_IMAGES: 615 617 case PARALLEL_IMAGES: … … 623 625 default: 624 626 fprintf (stderr, "no valid mode selected\n"); 625 relphot_usage( );627 relphot_usage(argc, argv); 626 628 break; 627 629 } 628 if (argc != 1) relphot_usage ( );630 if (argc != 1) relphot_usage (argc, argv); 629 631 630 632 // if we supplied a file, we need to load it now -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/help.c
r38062 r42166 1 1 # include "relphot.h" 2 2 3 void relphot_usage ( void) {3 void relphot_usage (int argc, char **argv) { 4 4 fprintf (stderr, "ERROR: USAGE: relphot (photcodes) -images\n"); 5 5 fprintf (stderr, " or: relphot -averages\n"); … … 11 11 fprintf (stderr, " or: -catalog (name)\n"); 12 12 fprintf (stderr, " use -h for more usage information\n"); 13 14 fprintf (stderr, "unparsed arguments: "); 15 for (int i = 0; i < argc; i++) { 16 fprintf (stderr, "%s ", argv[i]); 17 } 18 fprintf (stderr, "\n"); 19 13 20 exit (2); 14 21 } … … 19 26 if (get_argument (argc, argv, "-help")) goto show_help; 20 27 if (get_argument (argc, argv, "-h")) goto show_help; 21 if (argc == 1) relphot_usage( );28 if (argc == 1) relphot_usage(0, NULL); 22 29 return; 23 30 -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/initialize.c
r41647 r42166 9 9 if (!mode) exit (2); 10 10 11 // UPDATE_AVERAGES always operates on all photcodes? 12 if (mode == UPDATE_AVERAGES) { 11 // UPDATE_AVERAGES used to always operate on all photcodes 12 // now, if a list of photcodes are given that is used, otherwise 13 // all will be used 14 if (!photcodes) { 13 15 char tmpline1[256]; 14 16 int Ns; -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/relphot_images.c
r42112 r42166 132 132 133 133 // if (GRID_ZEROPT) dump_grid (); 134 setMcal (catalog); 135 setMmos (catalog); 136 setMgrp (catalog); 134 137 135 138 setMcal (catalog); -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/setMrelCatalog.c
r42010 r42166 266 266 // overlaps). Msys + measure.Mcal is our best guess of the true magnitude 267 267 Mcal = measureT[k].McalPSF; // check that this is zero for loaded REF value 268 // but external reference photometry might not have Mcal set, so set to 0.0 in that case. 269 if (isnan(Mcal)) Mcal = 0.0; 268 270 } else { 269 271 // getMcal returns image[].Mcal … … 412 414 413 415 // XXX hardwired grizy = (01234) JHK = (567) w = (8) 414 if ( (Nsec < 5) || (Nsec == 8)) {416 if (Nsec < 5) { 415 417 secfilt[Nsec].Ncode = results->NexpPS1[Nsec]; 416 418 } else { -
branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/setMrelFinal.c
r41647 r42166 11 11 int Nsecfilt = GetPhotcodeNsecfilt (); 12 12 13 // this resets values only if -reset is used 13 14 ResetAverageAndMeasure (catalog); 14 15 -
branches/eam_branches/ipp-20220316/doc/release.2015/ps1.datasystem/datasystem.tex
r41236 r42166 116 116 The CCDs each consist of an $8\times8$ grid of $590 \times 598$ 117 117 pixel readout regions, yielding an effective $4846 \times 4868$ 118 detector. Initial performance assessments are presented in 118 detector. 119 \textadd{The GPC1 CCDs have the ability to move charge in both 120 dimensions on the detector and are thus referred to as Orthogonal Transfer Arrays (OTAs).} 121 Initial performance assessments are presented in 119 122 \cite{2008SPIE.7014E..0DO}. Routine observations are conducted remotely from the 120 123 Advanced Technology Research Center in Kula, the main facility of the -
branches/eam_branches/ipp-20220316/ippScripts/scripts/register_exp.pl
r32841 r42166 200 200 return(undef,undef,undef,"reg",undef,undef,undef); 201 201 } 202 if ($obsmode eq 'ENGINEERING') {203 print "Skipping because we don't queue engineering data to chip\n";204 return(undef,undef,undef,"reg",undef,undef,undef);205 }206 202 # Grab the configuration data. 207 203 my %nightlyscience_config = (); -
branches/eam_branches/ipp-20220316/ippTests
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/IPP-308_move_backups_folder/ippTests merged eligible /branches/czw_branch/20160809/ippTests merged eligible /branches/czw_branch/20170908/ippTests merged eligible /branches/eam_branches/ipp-20191011/ippTests merged eligible /branches/eam_branches/ipp-20211108/ippTests merged eligible /branches/eam_branches/ipp-dev-20210817/ippTests merged eligible /tags/ipp-ops-20220303-rc/ippTests merged eligible /tags/ipp-ps1-20210510/ippTests merged eligible /tags/ipp-ps1-20210708/ippTests merged eligible /trunk/ippTests merged eligible /branches/ipp-259_genericise_backups/ippTests 40910-40966
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/eam_branches/ipp-20220316/ippTests/ippCheck/cammask.pro
r42114 r42166 78 78 if ($table:Ny == 0) 79 79 echo "ERROR: no reference sources found in $refsrcs" 80 81 # generate an empty output file 82 $OUT_FIELDS = 83 foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM 84 $OUT_FIELDS = $OUT_FIELDS $field\_out 85 create -empty $field\_out 86 end 87 88 sprintf output "%s/%s.%s.cam.stf" $OUTDIR $expname $OUTVERSION 89 write -fits DATA $output $OUT_FIELDS 90 91 # save this name for warp and diff analysis, if desired 92 $CAMSOURCE = $output 93 80 94 break 81 95 end … … 271 285 if ($COPYMASKS) exec neb-copy $camMask:$i $OUTDIR 272 286 $j ++ 273 end 274 $camMask:n = $chipName:n 287 if ($j >= $tmpName:n) last 288 end 289 $camMask:n = $tmpName:n 275 290 end 276 291 -
branches/eam_branches/ipp-20220316/ippTests/ippCheck/camstats.pro
r41981 r42166 38 38 # results in magFound, fracFound, numFound 39 39 calc.camstats 40 if ( $i== 0)40 if (numTotal_sum?[] == 0) 41 41 set numTotal_sum = numTotal 42 42 set numFound_sum = numFound … … 57 57 end 58 58 59 set numTotal = numTotal_sum 60 set numFound = numFound_sum 61 set numPoss = numPoss_sum 62 set numGood = numGood_sum 63 delete numTotal_sum numFound_sum numPoss_sum numGood_sum 59 if (numTotal_sum?[] == 0) 60 calc.camstats 61 else 62 set numTotal = numTotal_sum 63 set numFound = numFound_sum 64 set numPoss = numPoss_sum 65 set numGood = numGood_sum 66 delete numTotal_sum numFound_sum numPoss_sum numGood_sum 67 end 64 68 65 69 set fracFound = (numTotal > 0) ? numFound / numTotal : zero(numTotal) … … 79 83 $BST2 = -tickpad 0.2 -xpad 3.5 -labelpadx 3.0 -ypad 0.5 -labelpady 0.0 +ypad 4.5 +labelpady 4.0 -labels 1001 80 84 81 section aM 0.00 0.66 0.65 0.33 82 section aR 0.00 0.33 0.65 0.33 83 section aD 0.00 0.00 0.65 0.33 84 85 section bM 0.65 0.66 0.35 0.33 86 section bR 0.65 0.33 0.35 0.33 87 section bD 0.65 0.00 0.35 0.33 85 section aM 0.00 0.66 0.65 0.33; label -x mag -y "&sd&h mag" 86 section aR 0.00 0.33 0.65 0.33; label -x mag -y "&sd&h R.A." 87 section aD 0.00 0.00 0.65 0.33; label -x mag -y "&sd&h Dec" 88 89 section bM 0.65 0.66 0.35 0.33; label -x mag -y "&sd&h mag" 90 section bR 0.65 0.33 0.35 0.33; label -x mag -y "&sd&h R.A." 91 section bD 0.65 0.00 0.35 0.33; label -x mag -y "&sd&h Dec" 92 93 if (RA_PSF?[] == 0) 94 echo "no sources in datafile" 95 return 96 end 88 97 89 98 set dR = 3600*(RA_PSF - Rref)*dcos(Dref) … … 256 265 $Mdel = 0.25 257 266 267 if (Mref_out?[] == 0) 268 create magBin $Mmin $Mmax $Mdel 269 set numTotal = zero(magBin) 270 set numFound = zero(magBin) 271 set numPoss = zero(magBin) 272 set numGood = zero(magBin) 273 return 274 end 275 258 276 delete -q magBin numTotal numPoss numFound numGood 259 277 for mag $Mmin $Mmax $Mdel -
branches/eam_branches/ipp-20220316/ippTests/ippCheck/diffmask.pro
r41941 r42166 51 51 # load the reference source table 52 52 # how to choose the name of the filter? 53 data $refsrcs; 53 data $refsrcs 54 55 # first check if the FITS table has any entries 56 read -fits DATA -sizes 57 if ($table:Ny == 0) 58 echo "WARNING: empty reference table $refsrcs" 59 60 $OUT_FIELDS = 61 foreach field $SMF_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF 62 $OUT_FIELDS = $OUT_FIELDS $field\_out 63 create -empty $field\_out 64 end 65 66 sprintf output "%s/%s.%s.dif.stf" $OUTDIR $expname $OUTVERSION 67 write -fits DATA $output $OUT_FIELDS 68 return 69 end 70 54 71 if ($USE_CAMSOURCE) 55 72 read -fits DATA Rref_out Dref_out Mref_out -
branches/eam_branches/ipp-20220316/ippTests/ippCheck/ippCheck
r42058 r42166 59 59 getargs -no-warp BOOL -var SKIP_WARP 60 60 getargs -no-diff BOOL -var SKIP_DIFF 61 getargs - do-plots BOOL -var DO_PLOTS;61 getargs -no-plots BOOL -var SKIP_PLOTS; 62 62 getargs -use-refs BOOL -var USE_REFSOURCE 63 63 getargs -camera VALUE -var CAMERA; … … 97 97 end 98 98 99 if ( $DO_PLOTS) plot.exposure.real $expname99 if (not($SKIP_PLOTS)) plot.exposure.real $expname 100 100 end 101 101 -
branches/eam_branches/ipp-20220316/ippTests/ippCheck/warpmask.pro
r41941 r42166 44 44 # NOTE: Mref is chosen to match filter for this exposure 45 45 data $refsrcs ; 46 47 # first check if the FITS table has any entries 48 read -fits DATA -sizes 49 if ($table:Ny == 0) 50 echo "WARNING: empty reference table $refsrcs" 51 52 # generate empty output vectors for output file 53 $OUT_FIELDS = 54 foreach field $REF_FIELDS_WRP $XTR_FIELDS_WRP 55 $OUT_FIELDS = $OUT_FIELDS $field\_out 56 create -empty $field\_out 57 end 58 59 sprintf output "%s/%s.%s.wrp.stf" $OUTDIR $expname $OUTVERSION 60 write -fits DATA $output $OUT_FIELDS 61 62 return 63 end 64 46 65 if ($USE_CAMSOURCE) 47 66 read -fits DATA Rref_out Dref_out Mref_out -
branches/eam_branches/ipp-20220316/ippTests/ippCheck/warpstats.pro
r41941 r42166 24 24 # results in magFound, fracFound, numFound 25 25 calc.warpstats 26 if ( $i== 0)26 if (numTotal_sum?[] == 0) 27 27 set numTotal_sum = numTotal 28 28 set numPoss_sum = numPoss … … 39 39 end 40 40 41 set numTotal = numTotal_sum 42 set numPoss = numPoss_sum 43 delete numTotal_sum numPoss_sum 41 if (numTotal_sum?[] == 0) 42 # generate vectors for empty inputs 43 calc.warpstats 44 else 45 set numTotal = numTotal_sum 46 set numPoss = numPoss_sum 47 delete numTotal_sum numPoss_sum 48 end 44 49 45 50 set fracPoss = (numTotal > 0) ? numPoss / numTotal : zero(numTotal) … … 89 94 $Mdel = 0.25 90 95 96 if (Mref_out?[] == 0) 97 create magBin $Mmin $Mmax $Mdel 98 set numTotal = zero(magBin) 99 set numPoss = zero(magBin) 100 return 101 end 102 91 103 delete -q magBin numTotal numPoss 92 104 for mag $Mmin $Mmax $Mdel -
branches/eam_branches/ipp-20220316/ippTools
- Property svn:mergeinfo changed
/trunk/ippTools (added) merged: 42154
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/ippTools/src
- Property svn:mergeinfo changed
/trunk/ippTools/src (added) merged: 42154
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/ippTools/src/pztoolConfig.c
r41598 r42166 171 171 psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-set_state", 0, "define new state (required)", NULL); 172 172 173 # if (0)174 173 // -updatesummitexp 175 174 psMetadata *updatesummitexpArgs = psMetadataAlloc(); … … 179 178 psMetadataAddStr(updatesummitexpArgs, PS_LIST_TAIL, "-telescope", 0, "search by telescope (required)", NULL); 180 179 psMetadataAddS32(updatesummitexpArgs, PS_LIST_TAIL, "-set_fault", 0, "define new fault (required)", 0); 181 # endif182 180 183 181 // -updatenewexp -
branches/eam_branches/ipp-20220316/ippconfig
- Property svn:mergeinfo changed
/trunk/ippconfig (added) merged: 42130,42152
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/ippconfig/megacam/psphot.config
r41357 r42166 40 40 IMSTATS_NPIX S32 100000 41 41 SKY_STAT STR ROBUST_MEDIAN 42 43 PSF.TREND.MODE STR MAP 44 PSF.TREND.NX S32 2 45 PSF.TREND.NY S32 3 46 47 APTREND.ORDER.MAX S32 1 42 48 END -
branches/eam_branches/ipp-20220316/ippconfig/recipes/filerules-mef.mdc
r41898 r42166 191 191 PPBGRESTORE.INPUT INPUT @FILES CHIP IMAGE 192 192 PPBGRESTORE.BACKMDL INPUT @FILES CHIP IMAGE 193 194 PPVIZPATTERN.INPUT INPUT @FILES CHIP PATTERN 193 195 194 196 PPBACKGROUND.IMAGE INPUT @FILES CHIP IMAGE … … 425 427 PPBGRESTORE.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE COMP_IMG CHIP TRUE NONE 426 428 427 PPBACKGROUND.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE COMP_IMG CHIP TRUE NONE 428 PPBACKGROUND.OUTPUT.MASK OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits MASK COMP_MASK CHIP TRUE NONE 429 PPVIZPSF.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE NONE CHIP TRUE NONE 430 PPVIZPATTERN.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE NONE CHIP TRUE NONE 431 PPVIZPATTERN.CHIP OUTPUT {OUTPUT}.{CHIP.NAME}.ch.fits IMAGE NONE CHIP TRUE NONE 432 433 PPBACKGROUND.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE COMP_IMG CHIP TRUE NONE 434 PPBACKGROUND.OUTPUT.MASK OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits MASK COMP_MASK CHIP TRUE NONE 429 435 PPBACKGROUND.CONFIG OUTPUT {OUTPUT}.{CHIP.NAME}.ppBackground.mdc TEXT NONE CHIP TRUE NONE 430 436 PPBACKGROUND.STATS OUTPUT {OUTPUT}.{CHIP.NAME}.stats STATS NONE CHIP TRUE NONE -
branches/eam_branches/ipp-20220316/ippconfig/recipes/filerules-simple.mdc
r41417 r42166 407 407 PPBGRESTORE.OUTPUT OUTPUT {OUTPUT}.fits IMAGE NONE FPA TRUE NONE 408 408 409 PPVIZPSF.OUTPUT OUTPUT {OUTPUT}.fits IMAGE NONE CHIP TRUE NONE 410 PPVIZPATTERN.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE NONE CHIP TRUE NONE 411 PPVIZPATTERN.CHIP OUTPUT {OUTPUT}.{CHIP.NAME}.ch.fits IMAGE NONE CHIP TRUE NONE 412 409 413 PPBACKGROUND.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE NONE FPA TRUE NONE 410 414 PPBACKGROUND.OUTPUT.MASK OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits MASK NONE FPA TRUE NONE -
branches/eam_branches/ipp-20220316/ppImage/src/ppImageDetrendPattern.c
r41894 r42166 327 327 } 328 328 329 psVector *ppImageDetrendPatternCellFailures(pmFPAfile *input, const pmFPAview *inputView) { 330 331 bool status = false; 332 pmCell *cell = NULL; 333 334 pmFPAview *view = pmFPAviewAlloc(0); // View for local processing 335 *view = *inputView; 336 337 // extract the MEDIAN_CELL_BACKGROUND values to check for problems 338 psVector *cellBackground = psVectorAllocEmpty (64, PS_DATA_F32); 339 while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) { 340 if (!cell->process || !cell->file_exists || !cell->data_exists) { 341 psVectorAppend (cellBackground, NAN); 342 continue; 343 } 344 345 // select the HDU for this cell 346 pmHDU *hdu = pmHDUFromCell(cell); // HDU of interest 347 348 psF32 value = psMetadataLookupF32(&status, hdu->header, "BACK_VAL"); 349 psVectorAppend (cellBackground, value); 350 } 351 return cellBackground; 352 } -
branches/eam_branches/ipp-20220316/ppImage/src/ppImageLoop.c
r39501 r42166 170 170 ESCAPE("Unable to free detrend images"); 171 171 } 172 173 // Apply the pattern correction 174 // XX if (options->checkCellFailures) { 175 // XX if (!ppImageDetrendPatternCellFailures(config,chip,view,options)) { 176 // XX ESCAPE("Unable to apply pattern corrections"); 177 // XX } 178 // XX } 179 172 180 173 181 // Apply the fringe correction -
branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoord.h
r27978 r42166 14 14 psString rawName; // Filename with raw image (or NULL) 15 15 psString pixelsName; // Filename with pixel coordinates 16 psString fpaName; // Filename with FPA coordinates 16 17 psString chipName; // Name of chip of interest 17 18 psString radecName; // Filename with sky coordinates -
branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoordArguments.c
r41899 r42166 49 49 psMetadataAddStr(arguments, PS_LIST_TAIL, "-raw", 0, "Filename with raw data", NULL); 50 50 psMetadataAddStr(arguments, PS_LIST_TAIL, "-pixels", 0, "Filename with pixel coordinates", NULL); 51 psMetadataAddStr(arguments, PS_LIST_TAIL, "-fpa", 0, "Filename with FPA coordinates", NULL); 51 52 psMetadataAddStr(arguments, PS_LIST_TAIL, "-chip", 0, "Chip for pixel coordinates", NULL); 52 53 psMetadataAddStr(arguments, PS_LIST_TAIL, "-radec", 0, "Filename with RA,Dec (default decimal degrees)", NULL); … … 66 67 data->rawName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-raw")); 67 68 data->pixelsName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-pixels")); 69 data->fpaName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-fpa")); 68 70 data->chipName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-chip")); 69 71 data->radecName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-radec")); … … 96 98 } 97 99 98 if (!data->pixelsName && !data->radecName && !data-> streaksName && !data->clustersName) {99 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Neither -pixels nor -radec provided.");100 if (!data->pixelsName && !data->radecName && !data->fpaName && !data->streaksName && !data->clustersName) { 101 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Neither -pixels nor -radec nor -fpa provided."); 100 102 return false; 101 103 } -
branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoordData.c
r27609 r42166 16 16 psFree(data->rawName); 17 17 psFree(data->pixelsName); 18 psFree(data->fpaName); 18 19 psFree(data->chipName); 19 20 psFree(data->radecName); … … 37 38 data->rawName = NULL; 38 39 data->pixelsName = NULL; 40 data->fpaName = NULL; 39 41 data->chipName = NULL; 40 42 data->radecName = NULL; -
branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoordLoop.c
r41899 r42166 79 79 NULL; // File with raw image 80 80 81 psArray *pixels = NULL, *radec = NULL, * streaks = NULL, *clusters = NULL; // Array of coordinate vectors82 psArray *radecOut = NULL, *streaksOut = NULL, *clustersOut = NULL; // Output for sky coordinates81 psArray *pixels = NULL, *radec = NULL, *fpas = NULL, *streaks = NULL, *clusters = NULL; // Array of coordinate vectors 82 psArray *radecOut = NULL,*fpaOut = NULL, *streaksOut = NULL, *clustersOut = NULL; // Output for sky coordinates 83 83 if (data->pixelsName) { 84 84 pixels = psVectorsReadFromFile(data->pixelsName, "%f %f"); … … 107 107 psVectorInit(radecOut->data[1], NAN); 108 108 psVectorInit(radecOut->data[2], NAN); 109 } 110 111 if (data->fpaName) { 112 fpas = psVectorsReadFromFile(data->fpaName, "%f %f"); 113 if (!fpas || fpas->n != 2) { 114 psError(psErrorCodeLast(), false, "Unable to read FPA coordinates"); 115 return false; 116 } 117 psVector *fpa_x = fpas->data[0]; // FPA x coordinates 118 long num = fpa_x->n; // Number of coordinates 119 fpaOut = psArrayAlloc(6); 120 fpaOut->data[0] = psArrayAlloc(num); 121 fpaOut->data[1] = psVectorAlloc(num, PS_TYPE_F32); 122 fpaOut->data[2] = psVectorAlloc(num, PS_TYPE_F32); 123 fpaOut->data[3] = psArrayAlloc(num); 124 fpaOut->data[4] = psVectorAlloc(num, PS_TYPE_F32); 125 fpaOut->data[5] = psVectorAlloc(num, PS_TYPE_F32); 126 psVectorInit(fpaOut->data[1], NAN); 127 psVectorInit(fpaOut->data[2], NAN); 128 psVectorInit(fpaOut->data[4], NAN); 129 psVectorInit(fpaOut->data[5], NAN); 109 130 } 110 131 … … 394 415 yTP->data.F32[i] = src.tp.y; 395 416 } 417 } 418 419 if (fpas) { 420 psVector *fpa_x = fpas->data[0], *fpa_y = fpas->data[1]; // FPA coordinates 421 long num = fpa_x->n; // Number of coordinates 422 423 int numCols = psMetadataLookupS32(NULL, hdu->header, "IMNAXIS1"); // Number of columns 424 int numRows = psMetadataLookupS32(NULL, hdu->header, "IMNAXIS2"); // Number of rows 425 if (numCols <= 0 || numRows <= 0) { 426 psError(psErrorCodeLast(), false, "Unable to read size of chip."); 427 return false; 428 } 429 430 psArray *chipPix = fpaOut->data[0]; // Chip for pixels 431 psVector *xPix = fpaOut->data[1]; // x coordinate for pixels 432 psVector *yPix = fpaOut->data[2]; // y coordinate for pixels 433 psArray *cellPix = fpaOut->data[3]; // Cell for pixels 434 psVector *xCell = fpaOut->data[4]; // x coordinate for cell 435 psVector *yCell = fpaOut->data[5]; // y coordinate for cell 436 437 psPlane *pix = psPlaneAlloc(); // Pixel coordinates on chip 438 psPlane *fp = psPlaneAlloc(); // Focal plane coordinates 439 440 for (long i = 0; i < num; i++) { 441 float x, y; // Pixel coordinates 442 fp->x = fpa_x->data.F32[i]; 443 fp->y = fpa_y->data.F32[i]; 444 445 psPlaneTransformApply(pix, chip->fromFPA, fp); 446 psTrace("ppCoord",2,"fpa2pix tr1: %f %f\n",pix->x,pix->y); 447 448 x = pix->x; 449 y = pix->y; 450 451 if ((x < 0 || x > numCols || y < 0 || y > numRows)) { 452 // Not on this chip 453 continue; 454 } 455 456 chipPix->data[i] = psStringCopy(chipName); 457 xPix->data.F32[i] = x; 458 yPix->data.F32[i] = y; 459 460 if (rawChip) { 461 psString cellName = NULL; // Name of cell 462 coordChip2Cell(&cellName, &x, &y, x, y, cellNames, cellBounds, 463 cellX0, cellY0, cellParityX, cellParityY, cellBinX, cellBinY); 464 cellPix->data[i] = cellName; 465 xCell->data.F32[i] = x; 466 yCell->data.F32[i] = y; 467 } 468 469 } 470 psFree(pix); 471 psFree(fp); 396 472 } 397 473 … … 556 632 } 557 633 634 if (fpaOut) { 635 psArray *chipPix = fpaOut->data[0]; // Chip for pixels 636 psVector *xPix = fpaOut->data[1]; // x coordinate for pixels 637 psVector *yPix = fpaOut->data[2]; // y coordinate for pixels 638 psArray *cellPix = fpaOut->data[3]; // Cell for pixels 639 psVector *xCell = fpaOut->data[4]; // x coordinate for pixels 640 psVector *yCell = fpaOut->data[5]; // y coordinate for pixels 641 psVector *fpa_x = fpas->data[0]; // FPA x coordinate 642 psVector *fpa_y = fpas->data[1]; // FPA y coordinate 643 644 for (long i = 0; i < chipPix->n; i++) { 645 const char *chipName = chipPix->data[i]; // Name of chip 646 const char *cellName = cellPix->data[i]; // Name of cell, or NULL 647 if (!data->all && (!isfinite(xPix->data.F32[i]) || !isfinite(yPix->data.F32[i]) || 648 !chipName || (rawFile && !cellName))) { 649 continue; 650 } 651 if (!rawFile && data->ds9) { 652 // Region file is only appropriate if we're not mapping all the way back to cell coordinates 653 fprintf(data->ds9, "image;circle(%f,%f,%f) # color=%s\n", 654 xPix->data.F32[i], yPix->data.F32[i], data->ds9radius, data->ds9color); 655 } else if (rawFile) { 656 fprintf(stdout, "%.3f %.3f --> %.3f %.3f %s %.3f %.3f %s\n", 657 fpa_x->data.F32[i], fpa_y->data.F32[i], xPix->data.F32[i], yPix->data.F32[i], 658 chipName ? chipName : "UNKNOWN", 659 xCell->data.F32[i], yCell->data.F32[i], 660 cellName ? cellName : "UNKNOWN"); 661 } else { 662 fprintf(stdout, "%.3f %.3f --> %.3f %.3f %s\n", 663 fpa_x->data.F32[i], fpa_y->data.F32[i], xPix->data.F32[i], yPix->data.F32[i], 664 chipName ? chipName : "UNKNOWN"); 665 } 666 } 667 } 668 558 669 if (streaksOut) { 559 670 psArray *chipPix1 = streaksOut->data[0]; // Chip for point 1 -
branches/eam_branches/ipp-20220316/psModules
- Property svn:mergeinfo changed
/trunk/psModules (added) merged: 42129
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20220316/psModules/src/objects/pmPSF_IO.c
r40553 r42166 903 903 // load the PSF model parameters from the FITS table 904 904 char *modelName = psMetadataLookupStr (&status, header, "PSF_NAME"); 905 if (!modelName) { 906 psError(PS_ERR_UNKNOWN, true, "missing model name in psf file %s", file->filename); 907 return false; 908 } 909 905 910 options->type = pmModelClassGetType (modelName); 906 911 if (options->type == -1) { … … 939 944 // check the number of expected parameters 940 945 int nPar = psMetadataLookupS32 (&status, header, "PSF_NPAR"); 946 if (!status) { 947 psError(PS_ERR_UNKNOWN, true, "PSF file %s missing PSF_NPAR value", file->filename); 948 return false; 949 } 950 941 951 if (nPar != pmModelClassParameterCount (psf->type)) 942 952 psAbort("mismatch model par count"); … … 1051 1061 1052 1062 int xBin = psMetadataLookupS32 (&status, header, "XBIN"); 1063 if (!status) { 1064 psError(psErrorCodeLast(), false, "XBIN not set in PSF residual image header."); 1065 return false; 1066 } 1053 1067 int yBin = psMetadataLookupS32 (&status, header, "YBIN"); 1068 if (!status) { 1069 psError(psErrorCodeLast(), false, "YBIN not set in PSF residual image header."); 1070 return false; 1071 } 1054 1072 1055 1073 int xSize = Nx / xBin; -
branches/eam_branches/ipp-20220316/pswarp/src/pswarpMapGrid.c
r41897 r42166 38 38 int nYpts = (int)(Ny / nYpix) + 1; 39 39 40 psLogMsg("pswarp", 3, "in grid sampling\n"); 40 41 // create the grid of maps 41 42 pswarpMapGrid *grid = pswarpMapGridAlloc (nXpts, nYpts); … … 49 50 } 50 51 51 if (0) {52 //if (0) { 52 53 // test the transformation sky<->chip for chip in smf: 53 54 if (fout == NULL) { fout = fopen ("map.grid.txt", "w"); } … … 88 89 fprintf (fout, "%f %f < %f %f < %f %f \n", TP1->x, TP1->y, FP1->x, FP1->y, CH1->x, CH1->y); 89 90 91 psLogMsg("pswarp", 3, "testing grid sampling\n"); 92 psLogMsg("pswarp", 3, "%f %f > %f %f > %f %f > %f %f | ", CH0->x, CH0->y, FP0->x, FP0->y, TP0->x, TP0->y, sky->r*180/M_PI, sky->d*180/M_PI); 93 psLogMsg("pswarp", 3, "%f %f < %f %f < %f %f \n", TP1->x, TP1->y, FP1->x, FP1->y, CH1->x, CH1->y); 94 90 95 } 91 96 } … … 101 106 102 107 psFree (sky); 103 }108 //} 104 109 105 110 grid->nXpix = nXpix; -
branches/eam_branches/ipp-20220316/pswarp/src/pswarpTransformReadout.c
r41707 r42166 104 104 // pswarpMapGridFromImage builds a set of locally-linear maps which convert the 105 105 // output coordinates to input coordinates 106 psLogMsg("pswarp", 3, "going into MapGrid \n"); 106 107 pswarpMapGrid *grid = pswarpMapGridFromImage(input, output, nGridX, nGridY); 107 108
Note:
See TracChangeset
for help on using the changeset viewer.
