Changeset 23352 for branches/cnb_branches/cnb_branch_20090301/Ohana
- Timestamp:
- Mar 17, 2009, 12:08:50 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 6 deleted
- 20 edited
- 3 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/Makefile.in (modified) (3 diffs)
-
Ohana/src/addrefs (deleted)
-
Ohana/src/addspphot (deleted)
-
Ohana/src/addstar/doc/ps1.tessellation.tamas.pdf (copied) (copied from trunk/Ohana/src/addstar/doc/ps1.tessellation.tamas.pdf )
-
Ohana/src/addstar/include/skycells.h (modified) (3 diffs)
-
Ohana/src/addstar/src/args_skycells.c (modified) (2 diffs)
-
Ohana/src/addstar/src/get2mass_full.c (modified) (10 diffs)
-
Ohana/src/addstar/src/sky_tessalation.c (modified) (3 diffs)
-
Ohana/src/libdummy (deleted)
-
Ohana/src/libdvo (modified) (1 prop)
-
Ohana/src/libdvo/lib (modified) (1 prop)
-
Ohana/src/libfits/lib (modified) (1 prop)
-
Ohana/src/libkapa/lib (modified) (1 prop)
-
Ohana/src/libohana/lib (modified) (1 prop)
-
Ohana/src/libohana/src/CommOps.c (modified) (1 diff)
-
Ohana/src/libtap/lib (modified) (1 prop)
-
Ohana/src/opihi/dimm/Analysis.c (modified) (1 diff)
-
Ohana/src/opihi/dimm/Makefile (modified) (2 diffs)
-
Ohana/src/opihi/dimm/analysis.c (deleted)
-
Ohana/src/opihi/dimm/camera.c (deleted)
-
Ohana/src/opihi/dimm/camera_cmds.c (copied) (copied from trunk/Ohana/src/opihi/dimm/camera_cmds.c ) (1 prop)
-
Ohana/src/opihi/dimm/telescope.c (deleted)
-
Ohana/src/opihi/dimm/telescope_cmds.c (copied) (copied from trunk/Ohana/src/opihi/dimm/telescope_cmds.c ) (1 prop)
-
Ohana/src/opihi/lib (modified) (1 prop)
-
Ohana/src/opihi/pantasks/CheckTasks.c (modified) (1 diff)
-
Ohana/src/opihi/pantasks/task_threads.c (modified) (2 diffs)
-
Ohana/src/opihi/pcontrol/CheckIdleHost.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk merged eligible /branches/eam_branches/eam_branch_20090303 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/Ohana
-
Property svn:mergeinfo
set to
/trunk/Ohana merged eligible
-
Property svn:mergeinfo
set to
-
branches/cnb_branches/cnb_branch_20090301/Ohana/Makefile.in
r19682 r23352 75 75 mkdir -p $(DESTLIB) 76 76 mkdir -p $(DESTBIN) 77 for i in $(LIBS); do make $$i.install || exit ; done77 for i in $(LIBS); do make $$i.install || exit 1; done 78 78 chmod +x ohana-config 79 79 cp -f ohana-config $(DESTBIN)/ … … 83 83 84 84 all: 85 make libs || exit 86 for i in $(PROGRAM); do make $$i || exit ; done85 make libs || exit 1 86 for i in $(PROGRAM); do make $$i || exit 1; done 87 87 88 88 extras: 89 for i in $(EXTRAS); do make $$i || exit ; done89 for i in $(EXTRAS); do make $$i || exit 1; done 90 90 91 91 pantasks: 92 make libs || exit 93 cd src/opihi; make pclient.install && exit 94 cd src/opihi; make pcontrol.install && exit 95 cd src/opihi; make pantasks.install && exit 92 make libs || exit 1 93 cd src/opihi; make pclient.install && exit 1 94 cd src/opihi; make pcontrol.install && exit 1 95 cd src/opihi; make pantasks.install && exit 1 96 96 97 97 mana: 98 98 make libs 99 99 make kapa2.install 100 cd src/opihi; make mana.install && exit 100 cd src/opihi; make mana.install && exit 1 101 101 102 102 dvoshell: 103 103 make libs 104 104 make kapa2.install 105 cd src/opihi; make dvo.install && exit 105 cd src/opihi; make dvo.install && exit 1 106 106 107 107 clean: 108 108 @if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi 109 for i in $(LIBS); do make $$i.clean || exit ; done110 for i in $(PROGRAM); do make $$i.clean || exit ; done111 for i in $(EXTRAS); do make $$i.clean || exit ; done109 for i in $(LIBS); do make $$i.clean || exit 1; done 110 for i in $(PROGRAM); do make $$i.clean || exit 1; done 111 for i in $(EXTRAS); do make $$i.clean || exit 1; done 112 112 @rm -f `find . -name .mana` 113 113 @rm -f `find . -name .dvo` … … 116 116 dist: 117 117 @if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi 118 for i in $(LIBS); do make $$i.dist || exit ; done119 for i in $(PROGRAM); do make $$i.dist || exit ; done118 for i in $(LIBS); do make $$i.dist || exit 1; done 119 for i in $(PROGRAM); do make $$i.dist || exit 1; done 120 120 @echo -n -e "\0033]0; *** Ohana: done $@ *** \0007" \ 121 121 122 122 install: 123 123 @if [ "$(ARCH)" = "" ]; then echo ""; echo " *** please define ARCH ***"; echo; exit 1; fi 124 for i in $(LIBS); do make $$i.install || exit ; done125 for i in $(PROGRAM); do make $$i.install || exit ; done124 for i in $(LIBS); do make $$i.install || exit 1; done 125 for i in $(PROGRAM); do make $$i.install || exit 1; done 126 126 @echo -n -e "\0033]0; *** Ohana: done $@ *** \0007" \ 127 127 128 128 install.extras: 129 for i in $(EXTRAS); do make $$i.install || exit ; done129 for i in $(EXTRAS); do make $$i.install || exit 1; done 130 130 @echo -n -e "\0033]0; *** Ohana: done $@ *** \0007" \ 131 131 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/include/skycells.h
r21508 r23352 12 12 # include <glob.h> 13 13 14 enum {SQUARES, TRIANGLES, LOCAL };14 enum {SQUARES, TRIANGLES, LOCAL, RINGS}; 15 15 enum {TETRAHEDRON, CUBE, OCTOHEDRON, DODECAHEDRON, ICOSAHEDRON}; 16 16 … … 67 67 double SCALE; 68 68 double PADDING; 69 double CELLSIZE; 69 70 int LEVEL; 70 71 … … 84 85 int sky_tessellation PROTO((FITS_DB *db, int level, int Nmax, int mode, double scale)); 85 86 int sky_tessellation_init PROTO((double scale)); 87 86 88 int sky_tessellation_local PROTO((FITS_DB *db, int level, int Nmax)); 87 89 int sky_tessellation_triangles PROTO((FITS_DB *db, int level, int Nmax)); 88 90 int sky_tessellation_squares PROTO((FITS_DB *db, int level, int Nmax)); 91 int sky_tessellation_rings PROTO((FITS_DB *db, int level, int Nmax)); 92 89 93 int sky_triangle_to_image PROTO((Image *image, SkyTriangle *triangle)); 90 94 int sky_triangle_to_rectangle PROTO((SkyRectangle *image, SkyTriangle *triangle)); 95 91 96 int sky_rectangle_local PROTO((SkyRectangle *rectangle)); 92 97 int sky_subdivide_image PROTO((Image *output, SkyRectangle *input, int Nx, int Ny)); 93 98 int sky_triangle_coords PROTO((SkyTriangle *triangle)); 99 100 SkyRectangle *sky_rectangle_ring PROTO((float dec, float dDEC, int *nring)); 101 94 102 SkyTriangle *sky_divide_triangles PROTO((SkyTriangle *in, int *ntriangles)); 95 103 SkyTriangle *sky_base_triangles PROTO((int *ntriangles)); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/src/args_skycells.c
r21048 r23352 35 35 MODE = LOCAL; 36 36 } 37 if (!strcasecmp (argv[N], "rings")) { 38 MODE = RINGS; 39 } 37 40 remove_argument (N, &argc, argv); 38 41 } … … 140 143 141 144 LEVEL = 8; 142 if ((MODE != LOCAL) && (N = get_argument (argc, argv, "-level"))) { 143 remove_argument (N, &argc, argv); 144 LEVEL = strtol (argv[N], &ptr, 10); 145 remove_argument (N, &argc, argv); 146 if ((*ptr != 0) || (LEVEL < 0)) { 147 fprintf (stderr, "-level requires an integer (>= 0) argument\n"); 145 if ((MODE == SQUARES) || (MODE == TRIANGLES)) { 146 if ((N = get_argument (argc, argv, "-level"))) { 147 remove_argument (N, &argc, argv); 148 LEVEL = strtol (argv[N], &ptr, 10); 149 remove_argument (N, &argc, argv); 150 if ((*ptr != 0) || (LEVEL < 0)) { 151 fprintf (stderr, "-level requires an integer (>= 0) argument\n"); 152 help (); 153 } 154 } 155 } 156 157 CELLSIZE = 4.0; 158 if ((MODE == RINGS) && (N = get_argument (argc, argv, "-cellsize"))) { 159 remove_argument (N, &argc, argv); 160 CELLSIZE = strtod (argv[N], &ptr); 161 if ((*ptr != 0) || (CELLSIZE < 0.0)) { 162 fprintf (stderr, "-level requires a floating-point argument\n"); 148 163 help (); 149 164 } 165 remove_argument (N, &argc, argv); 150 166 } 151 167 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/src/get2mass_full.c
r21508 r23352 1 1 # include "addstar.h" 2 2 # include "2mass.h" 3 4 // XXX check to see if desired output format is PS1_V1 or later? (use 16bit version if not?) 3 5 4 6 // fill in the data for a JHK triplet star. takes a pointer to the start of the line the … … 171 173 172 174 switch (qual) { 173 case ' X': star[0].measure.photFlags |= 0x0000; break;174 case ' U': star[0].measure.photFlags |= 0x0001; break;175 case ' F': star[0].measure.photFlags |= 0x0002; break;176 case ' E': star[0].measure.photFlags |= 0x0003; break;177 case ' A': star[0].measure.photFlags |= 0x0004; break;178 case ' B': star[0].measure.photFlags |= 0x0005; break;179 case ' C': star[0].measure.photFlags |= 0x0006; break;180 case ' D': star[0].measure.photFlags |= 0x0007; break;175 case 'A': star[0].measure.photFlags |= 0x00000001; break; // was: 0x0004 176 case 'B': star[0].measure.photFlags |= 0x00000002; break; // was: 0x0005 177 case 'C': star[0].measure.photFlags |= 0x00000004; break; // was: 0x0006 178 case 'D': star[0].measure.photFlags |= 0x00000008; break; // was: 0x0007 179 case 'E': star[0].measure.photFlags |= 0x00000010; break; // was: 0x0003 180 case 'F': star[0].measure.photFlags |= 0x00000020; break; // was: 0x0002 181 case 'U': star[0].measure.photFlags |= 0x00000040; break; // was: 0x0001 182 case 'X': star[0].measure.photFlags |= 0x00000080; break; // was: 0x0000 181 183 default: 182 184 fprintf (stderr, "error!\n"); … … 189 191 190 192 switch (qual) { 191 case '0': star[0].measure.photFlags |= 0x0000 ; break;192 case '1': star[0].measure.photFlags |= 0x00 10; break;193 case '2': star[0].measure.photFlags |= 0x00 20; break;194 case '3': star[0].measure.photFlags |= 0x00 30; break;195 case '4': star[0].measure.photFlags |= 0x00 40; break;196 case '6': star[0].measure.photFlags |= 0x00 50; break;197 case '9': star[0].measure.photFlags |= 0x00 60; break;193 case '0': star[0].measure.photFlags |= 0x00000100; break; // was: 0x0000 194 case '1': star[0].measure.photFlags |= 0x00000200; break; // was: 0x0010 195 case '2': star[0].measure.photFlags |= 0x00000400; break; // was: 0x0020 196 case '3': star[0].measure.photFlags |= 0x00000800; break; // was: 0x0030 197 case '4': star[0].measure.photFlags |= 0x00001000; break; // was: 0x0040 198 case '6': star[0].measure.photFlags |= 0x00002000; break; // was: 0x0050 199 case '9': star[0].measure.photFlags |= 0x00004000; break; // was: 0x0060 198 200 default: 199 201 fprintf (stderr, "error!\n"); … … 206 208 207 209 switch (qual) { 208 case 'p': star[0].measure.photFlags |= 0x000 0; break;209 case 'c': star[0].measure.photFlags |= 0x0 100; break;210 case 'd': star[0].measure.photFlags |= 0x0 200; break;211 case 's': star[0].measure.photFlags |= 0x0 300; break;212 case 'b': star[0].measure.photFlags |= 0x0 400; break;213 case '0': star[0].measure.photFlags |= 0x0 500; break;210 case 'p': star[0].measure.photFlags |= 0x00010000; break; // was: 0x0000 211 case 'c': star[0].measure.photFlags |= 0x00020000; break; // was: 0x0100 212 case 'd': star[0].measure.photFlags |= 0x00040000; break; // was: 0x0200 213 case 's': star[0].measure.photFlags |= 0x00080000; break; // was: 0x0300 214 case 'b': star[0].measure.photFlags |= 0x00010000; break; // was: 0x0400 215 case '0': star[0].measure.photFlags |= 0x00020000; break; // was: 0x0500 214 216 default: 215 217 fprintf (stderr, "error!\n"); … … 222 224 223 225 switch (qual) { 224 case '0': star[0].measure.photFlags &= ~0x00 08; break;225 case '1': star[0].measure.photFlags &= ~0x0008; break;226 default: star[0].measure.photFlags |= 0x00 08; break;226 case '0': star[0].measure.photFlags &= ~0x00300000; break; // was: ~0x0008 227 case '1': star[0].measure.photFlags |= 0x00100000; break; // was: ~0x0008 228 default: star[0].measure.photFlags |= 0x00200000; break; // was: 0x0008 227 229 } 228 230 return (TRUE); … … 232 234 233 235 switch (qual) { 234 case '0': star[0].measure.photFlags &= ~0x0080; break; 235 case '1': star[0].measure.photFlags &= ~0x0080; break; 236 default: 237 star[0].measure.photFlags |= 0x0080; 236 case '0': star[0].measure.photFlags &= ~0x00c00000; break; // was: ~0x0080 237 case '1': star[0].measure.photFlags |= 0x00400000; break; // was: ~0x0080 238 default: star[0].measure.photFlags |= 0x00800000; // was: 0x0080 238 239 star[0].measure.extNsigma = 100.0; 239 240 break; … … 245 246 246 247 switch (qual) { 247 case '0': star[0].measure.photFlags &= ~0x0 800; break;248 case '1': star[0].measure.photFlags &= ~0x0800; break;249 default: star[0].measure.photFlags |= 0x0 800; break;248 case '0': star[0].measure.photFlags &= ~0x03000000; break; // was: ~0x0800 249 case '1': star[0].measure.photFlags |= 0x01000000; break; // was: ~0x0800 250 default: star[0].measure.photFlags |= 0x02000000; break; // was: 0x0800 250 251 } 251 252 return (TRUE); … … 255 256 256 257 switch (qual) { 257 case '0': star[0].measure.photFlags &= ~0x 1000; break;258 case '1': star[0].measure.photFlags &= ~0x1000; break;259 default: star[0].measure.photFlags |= 0x 1000; break;258 case '0': star[0].measure.photFlags &= ~0x0c000000; break; // was: ~0x1000 259 case '1': star[0].measure.photFlags |= 0x04000000; break; // was: ~0x1000 260 default: star[0].measure.photFlags |= 0x08000000; break; // was: 0x1000 260 261 } 261 262 return (TRUE); … … 265 266 266 267 switch (qual) { 267 case '0': star[0].measure.photFlags &= ~0x 2000; break;268 case '1': star[0].measure.photFlags |= 0x 2000; break;268 case '0': star[0].measure.photFlags &= ~0x10000000; break; // was: ~0x2000 269 case '1': star[0].measure.photFlags |= 0x10000000; break; // was: 0x2000 269 270 default: abort(); 270 271 } … … 272 273 } 273 274 275 // unused photFlags: 276 // 0x0000.8000 277 // 0x0004.0000 278 // 0x0008.0000 279 // 0x2000.0000 280 // 0x4000.0000 281 // 0x8000.0000 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/src/sky_tessalation.c
r21508 r23352 11 11 sky_tessellation_init (scale); 12 12 13 if (mode == SQUARES) { 14 sky_tessellation_squares (db, level, Nmax); 15 return TRUE; 16 } 17 18 if (mode == TRIANGLES) { 19 sky_tessellation_triangles (db, level, Nmax); 20 return TRUE; 21 } 22 23 if (mode == LOCAL) { 24 sky_tessellation_local (db, level, Nmax); 25 return TRUE; 13 switch (mode) { 14 case SQUARES: 15 sky_tessellation_squares (db, level, Nmax); 16 return TRUE; 17 case TRIANGLES: 18 sky_tessellation_triangles (db, level, Nmax); 19 return TRUE; 20 case LOCAL: 21 sky_tessellation_local (db, level, Nmax); 22 return TRUE; 23 case RINGS: 24 sky_tessellation_rings (db, level, Nmax); 25 return TRUE; 26 default: 27 break; 26 28 } 27 29 … … 222 224 223 225 free (image); 226 return (TRUE); 227 } 228 229 // the RINGS tessellation uses the declination zones proposed by Tamas Budavari 230 // we generate projects on uniform rings of constant dec height 231 int sky_tessellation_rings (FITS_DB *db, int level, int Nmax) { 232 233 int j, nDEC, Nimage, Nring; 234 float dec, dDEC; 235 SkyRectangle *ring; 236 Image *image; 237 238 // The tessellation has one input parameter: the approximate cell size. Starting with 239 // the cell size, determine the optimal projection cell height (dDEC) that results in an 240 // integer number of dec zones between -90 and +90 241 242 // in fact, we place a single image on each pole, so the real range of dec is 180.0 - CELLSIZE: 243 244 nDEC = (180.0 - CELLSIZE) / CELLSIZE; 245 dDEC = (180.0 - CELLSIZE) / nDEC; 246 nDEC += 2; 247 248 // a test 249 // for (dec = 0.0 + 0.5*dDEC; dec < +90.0; dec += dDEC) { 250 251 // generate the a collection of rectangles for each ring 252 for (dec = -90.0; dec < +90.0 + 0.5*dDEC; dec += dDEC) { 253 254 ring = sky_rectangle_ring (dec, dDEC, &Nring); 255 if (!ring) continue; 256 257 // subdivide each image (Nx x Ny subcells) 258 Nimage = NX_SUB*NY_SUB*Nring; 259 ALLOCATE (image, Image, Nimage); 260 for (j = 0; j < Nring; j++) { 261 // convert the SkyRectangles to Images for output 262 sky_subdivide_image (&image[j*NX_SUB*NY_SUB], &ring[j], NX_SUB, NY_SUB); 263 } 264 265 /* add the new images and save */ 266 dvo_image_addrows (db, image, Nimage); 267 SetProtect (TRUE); 268 dvo_image_update (db, VERBOSE); 269 SetProtect (FALSE); 270 dvo_image_clear_vtable (db); 271 272 free (ring); 273 free (image); 274 } 224 275 return (TRUE); 225 276 } … … 480 531 481 532 return (TRUE); 533 } 534 535 // define the parameters of a single sky projection center 536 SkyRectangle *sky_rectangle_ring (float dec, float dDEC, int *nring) { 537 538 int i, NX, NY, nRA; 539 SkyRectangle *ring; 540 float theta, dRA; 541 542 // 'dec' is a guess at the center of the cell; in fact, we need to choose decLower and 543 // decUpper to ensure complete overlap of the cells 544 545 // we can determine the 'lower' bound (bound closest to the equator): 546 float decLower = (dec > 0.0) ? dec - 0.5*dDEC : dec + 0.5*dDEC; 547 548 // solve for actual cellsize (\theta): tan(\delta_{n+1} - \theta/2) = tan(\delta_n + \theta/2)cos(\alpha_n / 2) 549 float decUpper = (dec > 0.0) ? dec + dDEC : dec - dDEC; 550 551 if (fabs(dec) + 0.5*dDEC > 90.0) { 552 // onPole = TRUE; 553 theta = dDEC; 554 nRA = 1; 555 dRA = theta / cos(decLower*RAD_DEG); // make a square at the pole 556 } else { 557 // onPole = FALSE; 558 // Subdivide the 'lower' bound into an integer number of segments: 559 nRA = cos(RAD_DEG*decLower) * 360.0 / CELLSIZE; // CELLSIZE is a projection size 560 dRA = 360.0 / nRA; // dRA is a size in RA degrees == \alpha_n 561 562 // tan(decUpper - theta/2) = tan(dec + theta/2) cos(dRA / 2); 563 564 // we solve this equation for theta (fairly ugly: expand the tangents into sin/cos, expand the 565 // sum-of-angle sine and cosine, multiply through, convert via half-angle formulae and write 566 // as a quadratic expression in sine(theta/2) 567 568 float sd1 = sin(RAD_DEG*decUpper); 569 float cd1 = cos(RAD_DEG*decUpper); 570 float sd2 = sin(RAD_DEG*dec); 571 float cd2 = cos(RAD_DEG*dec); 572 float k = cos(RAD_DEG*dRA/2.0); 573 574 float c1 = (sd1*cd2 + sd2*cd1)*(1.0 - k); 575 float c2 = (sd1*cd2 - sd2*cd1)*(1.0 + k); 576 float c3 = -(sd1*sd2 + cd1*cd2)*(1.0 + k); 577 578 float A = SQ(c3) + SQ(c2); 579 float B = 2*c1*c3; 580 float C = SQ(c1) - SQ(c2); 581 582 float arg = SQ(B) - 4.0*A*C; 583 584 float root; 585 586 if (dec >= 0.0) { 587 root = (-B + sqrt (arg)) / (2.0*A); 588 theta = +DEG_RAD*asin(root); 589 } else { 590 root = (-B - sqrt (arg)) / (2.0*A); 591 theta = -DEG_RAD*asin(root); 592 } 593 594 // the negative solution yields a negative cellsize 595 // float root2 = (-B - sqrt (arg)) / (2.0*A); 596 // float theta2 = DEG_RAD*asin(root2); 597 598 // test lines: 599 // float r1 = tan(RAD_DEG*(decUpper - 0.5*theta1)); 600 // float r2 = tan(RAD_DEG*(dec + 0.5*theta1)); 601 // fprintf (stdout, "%f %f %f %f %f %f %f %f %f %f %f\n", dec, decUpper, dRA, arg, root1, root2, theta1, theta2, r1, r2, k*r2); 602 } 603 fprintf (stdout, "%f %f %f x %f (%d)\n", dec, decUpper, dRA, theta, nRA); 604 605 // I think we need to return the value of dec for the next ring, but I am not sure... 606 607 ALLOCATE (ring, SkyRectangle, nRA); 608 609 for (i = 0; i < nRA; i++) { 610 memset (&ring[i], 0, sizeof(SkyRectangle)); 611 memset (&ring[i].coords, 0, sizeof(Coords)); 612 ring[i].coords.crval1 = i*dRA; 613 ring[i].coords.crval2 = dec; 614 615 ring[i].coords.pc1_1 = +1.0; 616 ring[i].coords.pc1_2 = +0.0; 617 ring[i].coords.pc2_1 = -0.0; 618 ring[i].coords.pc2_2 = +1.0; 619 620 // range values are in projected degrees 621 NX = cos(decLower*RAD_DEG) * dRA * 3600.0 / SCALE; 622 NY = theta * 3600.0 / SCALE; 623 624 // crpix1,crpix2 is the projection center 625 ring[i].coords.crpix1 = 0.5*NX; 626 ring[i].coords.crpix2 = 0.5*NY; 627 628 ring[i].coords.cdelt1 = SCALE / 3600.0; 629 ring[i].coords.cdelt2 = SCALE / 3600.0; 630 631 strcpy (ring[i].coords.ctype, "DEC--TAN"); 632 633 ring[i].NX = NX; 634 ring[i].NY = NY; 635 ring[i].photcode = 1; // this needs to be set more sensibly 636 637 638 // fprintf (stderr, "%f %f : %f %f\n", 639 // ring[i].coords.crval1, ring[i].coords.crval2, 640 // ring[i].coords.crpix1, ring[i].coords.crpix2); 641 } 642 643 *nring = nRA; 644 return (ring); 482 645 } 483 646 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libdvo
- Property svn:ignore
-
old new 1 lib 1
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libdvo/lib
- Property svn:ignore
-
old new 1 *.linux 2 *.lin64 3 *.sol 4 *.sun 5 *.sid 6 *.hp 7 *.irix 8 *.darwin.dylib 9 *.darwin_x86.dylib 1 *.a 2 *.so
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libfits/lib
- Property svn:ignore
-
old new 1 *.linux 2 *.lin64 3 *.sol 4 *.sun 5 *.sid 6 *.hp 7 *.irix 8 *.darwin.dylib 9 *.darwin_x86.dylib 1 *.a 2 *.so
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libkapa/lib
- Property svn:ignore
-
old new 1 *.linux 2 *.lin64 3 *.sol 4 *.sun 5 *.sid 6 *.hp 7 *.irix 8 *.darwin.dylib 9 *.darwin_x86.dylib 1 *.a 2 *.so
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libohana/lib
- Property svn:ignore
-
old new 1 *.linux 2 *.lin64 3 *.sol 4 *.sun 5 *.sid 6 *.hp 7 *.irix 8 *.darwin.dylib 9 *.darwin_x86.dylib 1 *.a 2 *.so
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libohana/src/CommOps.c
r8385 r23352 14 14 return (status); 15 15 } 16 // fprintf (stderr, "resp: %s\n", command.buffer); 16 17 17 18 /* buffer contains an EOL NULL, we can just sscan it */ -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libtap/lib
- Property svn:ignore
-
old new 1 *.linux 2 *.lin64 3 *.sol 4 *.sun 5 *.sid 6 *.hp 7 *.irix 8 *.darwin.dylib 9 *.darwin_x86.dylib 1 *.a 2 *.so
-
- Property svn:ignore
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dimm/Analysis.c
r2598 r23352 86 86 } 87 87 88 /* find contiguous trigger pixels in row from starting point */ 89 90 int fillrow (float *buffer, int Nx, int offset, int sx, int *xs, int *xe) { 91 92 trigger = FALSE; 93 for (i = sx, pix = offset + i; buffer[pix] && (i < Nx); i++, pix++) { 94 addpix (pix); 95 buffer[pix] = 0; 96 trigger = TRUE; 97 *xe = i; 98 } 99 for (i = sx - 1, pix = offset + i; (i >= 0) && buffer[pix]; i--, pix--) { 100 addpix (pix); 101 buffer[pix] = 0; 102 trigger = TRUE; 103 *xs = i; 104 } 105 return (trigger); 106 } 107 108 static int Npix = 0; 109 static int *Pix = (int *) NULL; 110 111 addpix (int pix) { 112 Npix ++; 113 if (Pix == (int *) NULL) { 114 ALLOCATE (Pix, int, MAX (1, Npix)); 115 } else { 116 REALLOCATE (Pix, int, MAX (1, Npix)); 117 } 118 Pix[Npix - 1] = pix; 119 } 120 121 clearpix () { 122 Npix = 0; 123 REALLOCATE (Pix, int, 1); 124 } 125 126 statpix (double *x, double *y, float *buffer, int Nx) { 127 128 int X, Y; 129 double Sx, Sy, So; 130 131 So = Sx = Sy = 0; 132 for (i = 0; i < Npix; i++) { 133 Y = pix / Nx; 134 X = pix % Nx; 135 So += buffer[pix]; 136 Sx += X * buffer[pix]; 137 Sy += Y * buffer[pix]; 138 } 139 *x = Sx / So; 140 *y = Sy / So; 141 } 142 143 /* find stars: 144 - binarize @ threshold 145 - find all contiguous blobs 146 - find geom center of each blob 147 */ 148 149 150 151 /* 152 153 ..................... 154 ....x................ 155 ...xxx............... 156 ..........xxx.......... 157 .........xx.......... 158 ..................... 159 ..................... 160 ..................... 161 ..................... 162 ..................... 163 164 165 */ 166 88 167 # endif 89 168 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dimm/Makefile
r17283 r23352 26 26 $(SRC)/init.$(ARCH).o \ 27 27 $(SRC)/dimm.$(ARCH).o \ 28 $(SRC)/camera .$(ARCH).o \28 $(SRC)/camera_cmds.$(ARCH).o \ 29 29 $(SRC)/findstars.$(ARCH).o \ 30 $(SRC)/telescope .$(ARCH).o \30 $(SRC)/telescope_cmds.$(ARCH).o \ 31 31 $(SRC)/version.$(ARCH).o 32 32 … … 64 64 .PHONY: dimm 65 65 66 # are these used or replaced? 67 # $(SRC)/analysis.$(ARCH).o \ 66 # these have not been finished: should be used for analysis of the extracted images 68 67 # $(SRC)/Analysis.$(ARCH).o \ 69 68 # $(SRC)/Image.$(ARCH).o \ -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dimm/camera_cmds.c
- Property svn:mergeinfo changed
/trunk/Ohana/src/opihi/dimm/camera_cmds.c (added) merged: 22723-23289
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dimm/telescope_cmds.c
- Property svn:mergeinfo changed
/trunk/Ohana/src/opihi/dimm/telescope_cmds.c (added) merged: 22723-23289
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/lib
-
Property svn:ignore
set to
*.a
*.so
-
Property svn:ignore
set to
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/pantasks/CheckTasks.c
r15872 r23352 48 48 // add random offset between 0 and 5% of exec_period 49 49 // XXX this should be optional 50 fuzz = 0. 05*task[0].exec_period*drand48() + 1e-6*task[0].last.tv_usec;50 fuzz = 0.1*task[0].exec_period*drand48(); 51 51 task[0].last.tv_usec = 1e6*(fuzz - (int)fuzz); 52 52 task[0].last.tv_sec += (int) fuzz; -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/pantasks/task_threads.c
r15791 r23352 2 2 3 3 /** things related to CheckTasks **/ 4 void ResetTaskTimers (); 4 5 5 6 static int CheckTasksRun = FALSE; 6 7 7 8 void CheckTasksSetState (int state) { 9 if (state && !CheckTasksRun) { 10 ResetTaskTimers (); 11 } 8 12 CheckTasksRun = state; 9 13 } … … 51 55 // timeout. this enforces a certain granularity in the task creation, but prevents the task 52 56 // thread from driving the load up to silly levels. 57 58 // reset all of the task timers, with a bit of fuzz. this is called 59 // whenever we transition from 'stop' to 'run' 60 void ResetTaskTimers () { 61 62 Task *task; 63 struct timeval now; 64 float fuzz; 65 66 // get the current time 67 gettimeofday (&now, NULL); 68 69 // check all tasks 70 while ((task = NextTask ()) != NULL) { 71 task[0].last.tv_usec = now.tv_usec; 72 task[0].last.tv_sec = now.tv_sec; 73 74 // add random offset between 0 and 10% of exec_period 75 // XXX this should be optional 76 fuzz = task[0].exec_period*drand48(); 77 task[0].last.tv_usec += 1e6*(fuzz - (int)fuzz); 78 task[0].last.tv_sec += (int) fuzz; 79 80 // gprint (GP_LOG, "fuzz: %f, last: %d %d\n", fuzz, task[0].last.tv_sec, task[0].last.tv_usec); 81 } 82 return; 83 } -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/pcontrol/CheckIdleHost.c
r22675 r23352 40 40 host[0].job = (struct Job *) job; 41 41 42 if (logfile) fprintf (logfile, "start needhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);42 // if (logfile) fprintf (logfile, "start needhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 43 43 44 44 /* take the job off the stack and unlock the stack */ … … 60 60 host[0].job = (struct Job *) job; 61 61 62 if (logfile) fprintf (logfile, "start wanthost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);62 // if (logfile) fprintf (logfile, "start wanthost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 63 63 64 64 /* take the job off the stack and unlock the stack */ … … 78 78 host[0].job = (struct Job *) job; 79 79 80 if (logfile) fprintf (logfile, "start anyhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);80 // if (logfile) fprintf (logfile, "start anyhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]); 81 81 82 82 /* take the job off the stack and unlock the stack */
Note:
See TracChangeset
for help on using the changeset viewer.
