Changeset 37621
- Timestamp:
- Nov 17, 2014, 8:02:39 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/fakeastro
- Files:
-
- 3 edited
-
include/fakeastro.h (modified) (1 diff)
-
src/args.c (modified) (1 diff)
-
src/make_fake_images.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/include/fakeastro.h
r37564 r37621 88 88 int VERBOSE2; 89 89 int TESTING; 90 int ONE_BIG_CHIP; 90 91 91 92 int FORCE; -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/args.c
r37564 r37621 30 30 remove_argument (N, argc, argv); 31 31 TESTING = TRUE; 32 } 33 ONE_BIG_CHIP = FALSE; 34 if ((N = get_argument (*argc, argv, "-one-big-chip"))) { 35 remove_argument (N, argc, argv); 36 ONE_BIG_CHIP = TRUE; 32 37 } 33 38 -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_images.c
r37531 r37621 23 23 int N = 1; 24 24 25 int ix, iy; 26 for (ix = 0; ix < 8; ix++) { 27 for (iy = 0; iy < 8; iy++) { 25 if (ONE_BIG_CHIP) { 26 fakeImage[N] = fakeImage[0]; 27 28 // coords map relative to image center: 29 fakeImage[N].coords.crval1 = 0.0; 30 fakeImage[N].coords.crval2 = 0.0; 31 32 fakeImage[N].coords.crpix1 = 0.5*8*5000; 33 fakeImage[N].coords.crpix2 = 0.5*8*5000; 34 fakeImage[N].coords.pc1_1 = 1.0; 35 fakeImage[N].coords.pc2_2 = 1.0; 36 37 fakeImage[N].coords.cdelt1 = 1.0; 38 fakeImage[N].coords.cdelt2 = 1.0; 39 40 fakeImage[N].coords.pc1_2 = 0.0; 41 fakeImage[N].coords.pc2_1 = 0.0; 42 43 strcpy (fakeImage[N].coords.ctype, "DEC--WRP"); 44 fakeImage[N].coords.Npolyterms = 1; 45 46 fakeImage[N].coords.mosaic = &fakeImage[0].coords; 47 48 fakeImage[N].NX = 8*5000; 49 fakeImage[N].NY = 8*5000; 50 51 fakeImage[N].imageID = IMAGE_ID; 52 IMAGE_ID ++; 53 54 // gpc1-specific (assumes grizy map to 10101, etc) 55 fakeImage[N].photcode = fakeImage[0].photcode + 01; 56 57 char *ptr = strstr (fakeImage[N].name, "[PHU]"); 58 if (ptr) { 59 snprintf (ptr, 7, "[XY01]"); 60 } 61 N++; 62 } else { 63 int ix, iy; 64 for (ix = 0; ix < 8; ix++) { 65 for (iy = 0; iy < 8; iy++) { 28 66 29 if ((ix == 0) && (iy == 0)) continue;30 if ((ix == 7) && (iy == 0)) continue;31 if ((ix == 0) && (iy == 7)) continue;32 if ((ix == 7) && (iy == 7)) continue;67 if ((ix == 0) && (iy == 0)) continue; 68 if ((ix == 7) && (iy == 0)) continue; 69 if ((ix == 0) && (iy == 7)) continue; 70 if ((ix == 7) && (iy == 7)) continue; 33 71 34 fakeImage[N] = fakeImage[0];72 fakeImage[N] = fakeImage[0]; 35 73 36 // coords map relative to image center:37 fakeImage[N].coords.crval1 = 0.0;38 fakeImage[N].coords.crval2 = 0.0;74 // coords map relative to image center: 75 fakeImage[N].coords.crval1 = 0.0; 76 fakeImage[N].coords.crval2 = 0.0; 39 77 40 if (ix < 4) {41 fakeImage[N].coords.crpix1 = (ix - 3)*5000;42 fakeImage[N].coords.crpix2 = (iy - 3)*5100;43 fakeImage[N].coords.pc1_1 = 1.0;44 fakeImage[N].coords.pc2_2 = 1.0;45 } else {46 fakeImage[N].coords.crpix1 = (4 - ix)*5000;47 fakeImage[N].coords.crpix2 = (4 - iy)*5100;48 fakeImage[N].coords.pc1_1 = -1.0;49 fakeImage[N].coords.pc2_2 = -1.0;50 }78 if (ix < 4) { 79 fakeImage[N].coords.crpix1 = (ix - 3)*5000; 80 fakeImage[N].coords.crpix2 = (iy - 3)*5100; 81 fakeImage[N].coords.pc1_1 = 1.0; 82 fakeImage[N].coords.pc2_2 = 1.0; 83 } else { 84 fakeImage[N].coords.crpix1 = (4 - ix)*5000; 85 fakeImage[N].coords.crpix2 = (4 - iy)*5100; 86 fakeImage[N].coords.pc1_1 = -1.0; 87 fakeImage[N].coords.pc2_2 = -1.0; 88 } 51 89 52 fakeImage[N].coords.cdelt1 = 1.0;53 fakeImage[N].coords.cdelt2 = 1.0;90 fakeImage[N].coords.cdelt1 = 1.0; 91 fakeImage[N].coords.cdelt2 = 1.0; 54 92 55 fakeImage[N].coords.pc1_2 = 0.0;56 fakeImage[N].coords.pc2_1 = 0.0;93 fakeImage[N].coords.pc1_2 = 0.0; 94 fakeImage[N].coords.pc2_1 = 0.0; 57 95 58 strcpy (fakeImage[N].coords.ctype, "DEC--WRP");59 fakeImage[N].coords.Npolyterms = 1;96 strcpy (fakeImage[N].coords.ctype, "DEC--WRP"); 97 fakeImage[N].coords.Npolyterms = 1; 60 98 61 // XXX add higher order polynomials or imagemaps here99 // XXX add higher order polynomials or imagemaps here 62 100 63 fakeImage[N].coords.mosaic = &fakeImage[0].coords;101 fakeImage[N].coords.mosaic = &fakeImage[0].coords; 64 102 65 fakeImage[N].NX = 4850;66 fakeImage[N].NY = 4850;103 fakeImage[N].NX = 4850; 104 fakeImage[N].NY = 4850; 67 105 68 fakeImage[N].imageID = IMAGE_ID;69 IMAGE_ID ++;106 fakeImage[N].imageID = IMAGE_ID; 107 IMAGE_ID ++; 70 108 71 // gpc1-specific (assumes grizy map to 10101, etc)72 fakeImage[N].photcode = fakeImage[0].photcode + iy*10 + ix;109 // gpc1-specific (assumes grizy map to 10101, etc) 110 fakeImage[N].photcode = fakeImage[0].photcode + iy*10 + ix; 73 111 74 char *ptr = strstr (fakeImage[N].name, "[PHU]"); 75 if (ptr) { 76 snprintf (ptr, 7, "[XY%d%d]", ix, iy); 112 char *ptr = strstr (fakeImage[N].name, "[PHU]"); 113 if (ptr) { 114 snprintf (ptr, 7, "[XY%d%d]", ix, iy); 115 } 116 N++; 77 117 } 78 N++;79 118 } 80 119 }
Note:
See TracChangeset
for help on using the changeset viewer.
