Changeset 34898 for branches/eam_branches/ipp-20121219/Ohana
- Timestamp:
- Jan 9, 2013, 1:19:08 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src
- Files:
-
- 9 edited
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/dvo_tiny_values.c (modified) (1 diff)
-
opihi/cmd.data/spline.c (modified) (4 diffs)
-
opihi/cmd.data/spline_commands.c (modified) (1 diff)
-
relastro/include/relastro.h (modified) (1 diff)
-
relastro/src/BrightCatalog.c (modified) (7 diffs)
-
relastro/src/ConfigInit.c (modified) (1 diff)
-
relastro/src/ImageOps.c (modified) (3 diffs)
-
relastro/src/StarMaps.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/include/dvo.h
r34872 r34898 367 367 float Xccd; 368 368 float Yccd; 369 float Xfix; 370 float Yfix; 369 371 float dt; 370 372 int t; -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dvo_tiny_values.c
r34088 r34898 20 20 measureT[0].Xccd = measure[0].Xccd; 21 21 measureT[0].Yccd = measure[0].Yccd; 22 measureT[0].Xfix = measure[0].Xfix; 23 measureT[0].Yfix = measure[0].Yfix; 22 24 measureT[0].t = measure[0].t; 23 25 measureT[0].dt = measure[0].dt; -
branches/eam_branches/ipp-20121219/Ohana/src/opihi/cmd.data/spline.c
r34895 r34898 2 2 3 3 int spline_list (int argc, char **argv); 4 int spline_help (int argc, char **argv); 4 5 int spline_create (int argc, char **argv); 5 6 int spline_apply (int argc, char **argv); … … 7 8 int spline_save (int argc, char **argv); 8 9 int spline_delete (int argc, char **argv); 10 int spline_rename (int argc, char **argv); 9 11 int spline_getspline (int argc, char **argv); 10 12 11 13 static Command spline_commands[] = { 14 {1, "help", spline_help, "list spline help info"}, 12 15 {1, "list", spline_list, "list splines"}, 13 16 {1, "create", spline_create, "create a spline"}, … … 16 19 {1, "save", spline_save, "read a spline from a FITS file"}, 17 20 {1, "delete", spline_delete, "delete a spline"}, 21 {1, "rename", spline_rename, "rename a spline"}, 18 22 }; 23 24 int spline_help (int argc, char **argv) { 25 26 gprint (GP_ERR, "USAGE: spline (command)\n"); 27 gprint (GP_ERR, " spline help : this listing\n"); 28 gprint (GP_ERR, " spline list : list splines\n"); 29 gprint (GP_ERR, " spline create (spline) (Xknots) (Yknots) : create a spline\n"); 30 gprint (GP_ERR, " spline apply (spline) (Xpts) (Ypts) : apply a spline to Xpts to get Ypts\n"); 31 gprint (GP_ERR, " spline delete (spline) : delete named spline\n"); 32 gprint (GP_ERR, " spline rename (spline) (new) : change spline name to new name\n"); 33 gprint (GP_ERR, " spline load (spline) (filename) : load a spline from a FITS file\n"); 34 gprint (GP_ERR, " spline save (spline) (filename) [-append] : save a spline in FITS format\n"); 35 36 return FALSE; 37 } 19 38 20 39 int spline_command (int argc, char **argv) { … … 23 42 24 43 if (argc < 2) { 25 gprint (GP_ERR, "USAGE: spline (command)\n"); 26 gprint (GP_ERR, " spline list : list splines\n"); 27 gprint (GP_ERR, " spline create (spline) (Xknots) (Yknots) : create a spline\n"); 28 gprint (GP_ERR, " spline apply (spline) (Xpts) (Ypts) : apply a spline to Xpts to get Ypts\n"); 29 gprint (GP_ERR, " spline delete (spline) : delete named spline\n"); 30 gprint (GP_ERR, " spline load (spline) (filename) : load a spline from a FITS file\n"); 31 gprint (GP_ERR, " spline save (spline) (filename) [-append] : save a spline in FITS format\n"); 44 spline_help(0,NULL); 32 45 return (FALSE); 33 46 } -
branches/eam_branches/ipp-20121219/Ohana/src/opihi/cmd.data/spline_commands.c
r34584 r34898 126 126 } 127 127 128 int spline_rename (int argc, char **argv) { 129 130 Spline *spline; 131 132 if (argc != 3) { 133 gprint (GP_ERR, "USAGE: spline rename (spline) (newname)\n"); 134 return FALSE; 135 } 136 137 spline = FindSpline (argv[1]); 138 if (spline == NULL) { 139 gprint (GP_ERR, "spline %s not found\n", argv[1]); 140 return FALSE; 141 } 142 143 free (spline->name); 144 spline->name = strcreate (argv[2]); 145 return TRUE; 146 } 147 128 148 /* 129 149 int spline_listspline (int argc, char **argv) { -
branches/eam_branches/ipp-20121219/Ohana/src/relastro/include/relastro.h
r34576 r34898 157 157 int VERBOSE; 158 158 int VERBOSE2; 159 160 int USE_FIXED_PIXCOORDS; 159 161 160 162 int RESET; -
branches/eam_branches/ipp-20121219/Ohana/src/relastro/src/BrightCatalog.c
r34405 r34898 76 76 GET_COLUMN(Xccd, "X_CCD", float); 77 77 GET_COLUMN(Yccd, "Y_CCD", float); 78 GET_COLUMN(Xfix, "X_FIX", float); 79 GET_COLUMN(Yfix, "Y_FIX", float); 78 80 GET_COLUMN(dt, "EXPTIME", float); 79 81 GET_COLUMN(t, "TIME", int); … … 98 100 measure[i].Xccd = Xccd[i]; 99 101 measure[i].Yccd = Yccd[i]; 102 measure[i].Xfix = Xfix[i]; 103 measure[i].Yfix = Yfix[i]; 100 104 measure[i].dt = dt[i]; 101 105 measure[i].t = t[i]; … … 117 121 free (Xccd ); 118 122 free (Yccd ); 123 free (Xfix ); 124 free (Yfix ); 119 125 free (dt ); 120 126 free (t ); … … 363 369 float *Xccd ; ALLOCATE (Xccd , float, catalog->Nmeasure); 364 370 float *Yccd ; ALLOCATE (Yccd , float, catalog->Nmeasure); 371 float *Xfix ; ALLOCATE (Xfix , float, catalog->Nmeasure); 372 float *Yfix ; ALLOCATE (Yfix , float, catalog->Nmeasure); 365 373 float *dt ; ALLOCATE (dt , float, catalog->Nmeasure); 366 374 int *t ; ALLOCATE (t , int , catalog->Nmeasure); … … 383 391 Xccd[i] = measure[i].Xccd ; 384 392 Yccd[i] = measure[i].Yccd ; 393 Xfix[i] = measure[i].Xfix ; 394 Yfix[i] = measure[i].Yfix ; 385 395 dt[i] = measure[i].dt ; 386 396 t[i] = measure[i].t ; … … 402 412 gfits_set_bintable_column (&theader, &ftable, "X_CCD", Xccd, catalog->Nmeasure); 403 413 gfits_set_bintable_column (&theader, &ftable, "Y_CCD", Yccd, catalog->Nmeasure); 414 gfits_set_bintable_column (&theader, &ftable, "X_FIX", Xfix, catalog->Nmeasure); 415 gfits_set_bintable_column (&theader, &ftable, "Y_FIX", Yfix, catalog->Nmeasure); 404 416 gfits_set_bintable_column (&theader, &ftable, "EXPTIME", dt, catalog->Nmeasure); 405 417 gfits_set_bintable_column (&theader, &ftable, "TIME", t, catalog->Nmeasure); … … 419 431 free (Xccd ); 420 432 free (Yccd ); 433 free (Xfix ); 434 free (Yfix ); 421 435 free (dt ); 422 436 free (t ); -
branches/eam_branches/ipp-20121219/Ohana/src/relastro/src/ConfigInit.c
r34749 r34898 35 35 GetConfig (config, "RELASTRO_DPOS_MAX", "%lf", 0, &DPOS_MAX); 36 36 GetConfig (config, "ADDSTAR_RADIUS", "%lf", 0, &ADDSTAR_RADIUS); 37 38 if (!ScanConfig (config, "USE_FIXED_PIXCOORDS", "%d", 0, &USE_FIXED_PIXCOORDS)) { 39 USE_FIXED_PIXCOORDS = FALSE; 40 } 37 41 38 42 // force CATDIR to be absolute (so parallel mode will work) -
branches/eam_branches/ipp-20121219/Ohana/src/relastro/src/ImageOps.c
r34749 r34898 446 446 Measure *measure = &catalog[c].measure[m]; 447 447 448 X = measure[0].Xccd; 449 Y = measure[0].Yccd; 448 if (USE_FIXED_PIXCOORDS) { 449 X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd; 450 Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd; 451 } else { 452 X = measure[0].Xccd; 453 Y = measure[0].Yccd; 454 } 450 455 n = measure[0].averef; 451 456 … … 570 575 Measure *measure = &catalog[c].measure[m]; 571 576 572 X = measure[0].Xccd; 573 Y = measure[0].Yccd; 577 if (USE_FIXED_PIXCOORDS) { 578 X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd; 579 Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd; 580 } else { 581 X = measure[0].Xccd; 582 Y = measure[0].Yccd; 583 } 574 584 n = measure[0].averef; 575 585 … … 635 645 636 646 /* apply the current image transformation or use the current value of R+dR, D+dD? */ 637 raw[i].X = measure[0].Xccd; 638 raw[i].Y = measure[0].Yccd; 647 if (USE_FIXED_PIXCOORDS) { 648 raw[i].X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd; 649 raw[i].Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd; 650 } else { 651 raw[i].X = measure[0].Xccd; 652 raw[i].Y = measure[0].Yccd; 653 } 639 654 640 655 raw[i].Mag = measure[0].M; -
branches/eam_branches/ipp-20121219/Ohana/src/relastro/src/StarMaps.c
r34088 r34898 73 73 if (N < 0) continue; 74 74 75 // NOTE: we use Xccd,Yccd even if USE_FIXED_PIXCOORDS is true: the difference is too 76 // small to be relevant for this analysis 75 77 xbin = measure[0].Xccd / starmap[N].Nx; 76 78 ybin = measure[0].Yccd / starmap[N].Ny;
Note:
See TracChangeset
for help on using the changeset viewer.
