Changeset 34489 for branches/czw_branch/20120906/pswarp/src/pswarpLoop.c
- Timestamp:
- Sep 28, 2012, 4:56:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/pswarp/src/pswarpLoop.c
r34487 r34489 605 605 } 606 606 607 // Pull information from the header of the background files so we can use it to set values. 608 pmHDU *hdu = pmFPAviewThisHDU(view,input->fpa); 609 psMetadata *header = hdu->header; 610 611 int IMAXIS1 = psMetadataLookupS32(NULL,header,"IMNAXIS1"); 612 int IMAXIS2 = psMetadataLookupS32(NULL,header,"IMNAXIS2"); 613 int NAXIS1 = psMetadataLookupS32(NULL,header,"NAXIS1"); 614 int NAXIS2 = psMetadataLookupS32(NULL,header,"NAXIS2"); 615 char *CCDSUM = psMetadataLookupStr(NULL,header,"CCDSUM"); 616 int CCDSUM1 = atoi(strtok(CCDSUM," ")); 617 int CCDSUM2 = atoi(strtok(NULL," ")); 618 619 psMetadataAddF32(config->arguments,PS_LIST_TAIL,"BKG_WARP_XOFFSET", PS_META_REPLACE, 620 "xoffset for background model data", (NAXIS1 * CCDSUM1 - IMAXIS1) / (2.0 * CCDSUM1)); 621 psMetadataAddF32(config->arguments,PS_LIST_TAIL,"BKG_WARP_YOFFSET", PS_META_REPLACE, 622 "yoffset for background model data", (NAXIS2 * CCDSUM2 - IMAXIS2) / (2.0 * CCDSUM2)); 623 psTrace("pswarp",5,"%d %d %d %d %d %d %g %g %d %d", 624 psMetadataLookupS32(NULL,header,"IMNAXIS1"), 625 psMetadataLookupS32(NULL,header,"IMNAXIS2"), 626 psMetadataLookupS32(NULL,header,"NAXIS1"), 627 psMetadataLookupS32(NULL,header,"NAXIS2"), 628 CCDSUM1,CCDSUM2, 629 psMetadataLookupF32(NULL,config->arguments,"BKG_WARP_XOFFSET"), 630 psMetadataLookupF32(NULL,config->arguments,"BKG_WARP_YOFFSET"), 631 psMetadataLookupS32(NULL,config->arguments,"BKG.XGRID"), 632 psMetadataLookupS32(NULL,config->arguments,"BKG.YGRID")); 633 634 607 635 // read WCS data from the corresponding header 608 pmHDU *hdu = pmFPAviewThisHDU (view, astrom->fpa);636 hdu = pmFPAviewThisHDU (view, astrom->fpa); 609 637 610 638 pmAstromWCS *WCS = pmAstromWCSfromHeader(hdu->header); 611 639 612 double cd1f = 1.0 * 400;613 double cd2f = 1.0 * 400;640 double cd1f = (1.0 * CCDSUM1);// * (1.0 * psMetadataLookupS32(NULL,config->arguments,"BKG.XGRID")); 641 double cd2f = (1.0 * CCDSUM2);// * (1.0 * psMetadataLookupS32(NULL,config->arguments,"BKG.YGRID")); 614 642 615 643 WCS->cdelt1 *= cd1f; … … 681 709 682 710 psMetadataAddS32(config->arguments,PS_LIST_TAIL, "INTERPOLATION.MODE", PS_META_REPLACE, "", 8); 683 fprintf(stderr,"Transforming Readout!\n");684 711 685 712 psMetadataAddBool(config->arguments,PS_LIST_TAIL, "BACKGROUND_WARPING", PS_META_REPLACE, "", true); 686 713 pswarpTransformReadout(output, readout, config); 687 714 psMetadataAddBool(config->arguments,PS_LIST_TAIL, "BACKGROUND_WARPING", PS_META_REPLACE, "", false); 715 688 716 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) { 689 717 psError(psErrorCodeLast(), false, "Unable to write files."); … … 701 729 } 702 730 } 703 fprintf(stderr,"End readout transformations!\n");704 731 if (!output->data_exists) { 705 732 psWarning("No overlap between input and skycell.");
Note:
See TracChangeset
for help on using the changeset viewer.
