- Timestamp:
- Dec 17, 2015, 8:56:07 PM (11 years ago)
- Location:
- trunk/Ohana/src/relphot/src
- Files:
-
- 5 edited
-
ImageOps.c (modified) (5 diffs)
-
relphot_client.c (modified) (1 diff)
-
relphot_images.c (modified) (1 diff)
-
relphot_parallel_images.c (modified) (1 diff)
-
relphot_parallel_regions.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/src/ImageOps.c
r38466 r39289 410 410 } 411 411 412 // returns image.Mcal - ff(x,y) 412 // returns image.Mcal 413 // NOTE: static flat-field component is included in measure.Mflat 413 414 float getMcal (off_t meas, int cat, FlatCorrectionTable *flatcorr, Catalog *catalog) { 414 415 415 416 off_t i; 416 float value , offset;417 float value; 417 418 418 419 i = MeasureToImage[cat][meas]; … … 421 422 if (image[i].flags & IMAGE_BAD) return (NAN); 422 423 value = image[i].Mcal; 423 offset = 0.0;424 424 425 425 // to do this, I need to pass in the catalog and flatcorr pointers 426 int flat_id = image[i].photom_map_id; 427 if (flat_id) { 428 offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[cat].measureT[meas].Xccd, catalog[cat].measureT[meas].Yccd); 429 } 430 value -= offset; 426 // int flat_id = image[i].photom_map_id; 427 // float offset = 0.0; 428 // if (flat_id) { 429 // offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[cat].measureT[meas].Xccd, catalog[cat].measureT[meas].Yccd); 430 // } 431 // value -= offset; 431 432 432 433 return (value); … … 434 435 435 436 // returns image.Mcal - ff(x,y) 437 // NOTE: static flat-field component is included in measure.Mflat 436 438 float getMcal_alt (off_t meas, int cat, FlatCorrectionTable *flatcorr, float Xccd, float Yccd) { 437 439 438 440 off_t i; 439 float value , offset;441 float value; 440 442 441 443 i = MeasureToImage[cat][meas]; … … 444 446 if (image[i].flags & IMAGE_BAD) return (NAN); 445 447 value = image[i].Mcal; 446 offset = 0.0;447 448 448 449 // to do this, I need to pass in the catalog and flatcorr pointers 449 int flat_id = image[i].photom_map_id; 450 if (flat_id) { 451 offset = FlatCorrectionOffset (flatcorr, flat_id, Xccd, Yccd); 452 } 453 value -= offset; 450 // int flat_id = image[i].photom_map_id; 451 // float offset = 0.0; 452 // if (flat_id) { 453 // offset = FlatCorrectionOffset (flatcorr, flat_id, Xccd, Yccd); 454 // } 455 // value -= offset; 454 456 455 457 return (value); … … 564 566 if (i == -1) return (NAN); 565 567 566 float offset = 0.0; 568 float offset = catalog[cat].measureT[meas].Mflat; 569 if (!isfinite(offset)) { 570 offset = 0.0; 571 } 567 572 568 573 // to do this, I need to pass in the catalog and flatcorr pointers 569 int flat_id = image[i].photom_map_id;570 if (flat_id) {571 offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[cat].measureT[meas].Xccd, catalog[cat].measureT[meas].Yccd);572 }574 // int flat_id = image[i].photom_map_id; 575 // if (flat_id) { 576 // offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[cat].measureT[meas].Xccd, catalog[cat].measureT[meas].Yccd); 577 // } 573 578 574 579 return (offset); -
trunk/Ohana/src/relphot/src/relphot_client.c
r38986 r39289 72 72 73 73 // load the flat-field correction table from CATDIR 74 # if (0) 74 75 char flatcorrFile[1024]; 75 76 snprintf (flatcorrFile, 1024, "%s/flatcorr.fits", CATDIR); 76 77 FlatCorrectionTable *flatcorr = FlatCorrectionLoad (flatcorrFile, VERBOSE); 77 78 client_logger_message ("loaded flat-field correction data\n"); 78 79 # endif 80 FlatCorrectionTable *flatcorr = NULL; 79 81 reload_catalogs (skylist, flatcorr, HOST_ID, HOSTDIR); 80 82 client_logger_message ("updated catalogs\n"); -
trunk/Ohana/src/relphot/src/relphot_images.c
r38441 r39289 47 47 48 48 // load the flat correction table (if defined) 49 # if (0) 49 50 char flatcorrfile[256]; 50 51 sprintf (flatcorrfile, "%s/flatcorr.fits", CATDIR); 51 52 FlatCorrectionTable *flatcorr = FlatCorrectionLoad (flatcorrfile, VERBOSE); 53 # endif 54 FlatCorrectionTable *flatcorr = NULL; 52 55 53 56 if (NLOOP > 0) { -
trunk/Ohana/src/relphot/src/relphot_parallel_images.c
r38986 r39289 44 44 45 45 // load the flat correction table (if defined) 46 # if (0) 46 47 char flatcorrfile[256]; 47 48 sprintf (flatcorrfile, "%s/flatcorr.fits", CATDIR); 48 49 FlatCorrectionTable *flatcorr = FlatCorrectionLoad (flatcorrfile, VERBOSE); 50 # endif 51 FlatCorrectionTable *flatcorr = NULL; 49 52 50 53 SkyTable *sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, TRUE, SKY_DEPTH, VERBOSE); -
trunk/Ohana/src/relphot/src/relphot_parallel_regions.c
r38441 r39289 17 17 18 18 // load the flat correction table (if defined) 19 # if (0) 19 20 char flatcorrfile[256]; 20 21 sprintf (flatcorrfile, "%s/flatcorr.fits", CATDIR); 21 22 FlatCorrectionTable *flatcorr = FlatCorrectionLoad (flatcorrfile, VERBOSE); 23 # endif 24 FlatCorrectionTable *flatcorr = NULL; 22 25 23 26 // register database handle with shutdown procedure
Note:
See TracChangeset
for help on using the changeset viewer.
