- Timestamp:
- Jan 12, 2015, 12:29:24 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-pv3-20140717-merge/Ohana
- Files:
-
- 8 edited
-
. (modified) (1 prop)
-
src/getstar (modified) (1 prop)
-
src/getstar/include/dvoImageOverlaps.h (modified) (1 diff)
-
src/getstar/src/MatchCoords.c (modified) (1 diff)
-
src/getstar/src/MatchImages.c (modified) (2 diffs)
-
src/getstar/src/ReadImageFiles.c (modified) (1 diff)
-
src/getstar/src/ReadImageHeader.c (modified) (3 diffs)
-
src/getstar/src/WriteImages.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-pv3-20140717-merge/Ohana
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar/include/dvoImageOverlaps.h
r27435 r37822 37 37 int edge_check (double *x1, double *y1, double *x2, double *y2); 38 38 double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3); 39 40 void initMosaicCoords (); 41 void saveMosaicCoords (Coords *input); -
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar/src/MatchCoords.c
r31238 r37822 29 29 if (!WITH_PHU && !strcmp (&dbImages[i].coords.ctype[4], "-DIS")) continue; 30 30 if ( SOLO_PHU && strcmp (&dbImages[i].coords.ctype[4], "-DIS")) continue; 31 32 /* if any of these images are WRP images, need to find matching DIS */33 if (!FindMosaicForImage (dbImages, NdbImages, i)) continue;34 31 35 32 /* define image corners */ -
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar/src/MatchImages.c
r36481 r37822 23 23 /* we keep the original crpix1,2 and crref1,2 */ 24 24 /* for mosaic astrometry, the grid should be w.r.t. the tangent-plane, not chip coords */ 25 InitCoords (&tcoords, "DEC--TAN"); 25 26 if (!strcmp (&image[0].coords.ctype[4], "-WRP")) { 26 // if the input image is a mosaic, we need to register that mosaic for the calculations below 27 if (MOSAIC == NULL) { 28 fprintf (stderr, "no mosaic for WRP image (use -mosaic)\n"); 29 return NULL; 30 } 31 RegisterMosaic (MOSAIC); 32 33 tcoords = MOSAIC[0]; 27 myAssert (image[0].coords.mosaic, "should already have tested this"); 28 tcoords = image[0].coords.mosaic[0]; 34 29 tcoords.cdelt1 = tcoords.cdelt2 = 1.0 / 3600.0; 35 tcoords.pc1_1 = tcoords.pc2_2 = 1.0;36 tcoords.pc1_2 = tcoords.pc2_1 = 0.0;37 tcoords.Npolyterms = 1;38 strcpy (tcoords.ctype, "DEC--TAN");39 30 /* register so image->sky conversions below have correct mosaic */ 40 31 } else { 41 32 tcoords = image[0].coords; 42 33 tcoords.cdelt1 = tcoords.cdelt2 = 1.0 / 3600.0; 43 tcoords.pc1_1 = tcoords.pc2_2 = 1.0;44 tcoords.pc1_2 = tcoords.pc2_1 = 0.0;45 tcoords.Npolyterms = 1;46 strcpy (tcoords.ctype, "DEC--TAN");47 34 } 48 35 … … 77 64 if (!WITH_PHU && !strcmp (&dbImages[i].coords.ctype[4], "-DIS")) continue; 78 65 if ( SOLO_PHU && strcmp (&dbImages[i].coords.ctype[4], "-DIS")) continue; 79 80 /* if any of these images are WRP images, need to find matching DIS */81 if (!FindMosaicForImage (dbImages, NdbImages, i)) continue;82 66 83 67 /* define image corners */ -
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar/src/ReadImageFiles.c
r36874 r37822 42 42 43 43 mode = GetFileMode (header); 44 45 initMosaicCoords (); 44 46 45 47 /*** load data from a single PHU or a collection of PHU files ***/ -
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar/src/ReadImageHeader.c
r21508 r37822 1 1 # include "dvoImageOverlaps.h" 2 3 // for DIS/WRP sets, we need to save the DIS set and supply it to the WRP entries 4 static Coords *mosaic = NULL; 5 6 void initMosaicCoords () { 7 mosaic = NULL; 8 } 9 10 void saveMosaicCoords (Coords *input) { 11 mosaic = input; 12 } 2 13 3 14 /* read an image header corresponding to a CMF / CMP data block */ … … 44 55 /* only load astrometry, NAXIS1,2, and time if this is a MOSAIC_PHU (ctype is ....-DIS) */ 45 56 if (!strcmp (&image[0].coords.ctype[4], "-DIS")) { 46 MOSAIC = &image[0].coords;57 saveMosaicCoords (&image[0].coords); 47 58 return (TRUE); 48 59 } … … 56 67 } 57 68 if (!strcmp (&image[0].coords.ctype[4], "-WRP")) { 58 if ( MOSAIC== NULL) {69 if (mosaic == NULL) { 59 70 fprintf (stderr, "no mosaic for WRP image (use -mosaic)\n"); 60 71 return (FALSE); 61 72 } 62 RegisterMosaic (MOSAIC);73 image[0].coords.mosaic = mosaic; 63 74 } else { 64 75 /* force image to lie in 0-360 range */ -
branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/getstar/src/WriteImages.c
r27435 r37822 5 5 6 6 int i, N; 7 int nWRP, newWRP,isWRP;7 int isWRP; 8 8 FILE *f; 9 9 … … 16 16 } 17 17 18 nWRP = -1;18 Image *mosaic = NULL; 19 19 isWRP = FALSE; 20 20 for (i = 0; i < Nmatches; i++) { 21 if (!strcmp (&images[0].coords.ctype[4], "-WRP")) { 22 if (!FindMosaicForImage (images, Nimages, i)) { 23 fprintf (stderr, "failed to find matching mosaic\n"); 24 exit (1); 25 } 21 N = matches[i]; 22 if (!strcmp (&images[N].coords.ctype[4], "-WRP")) { 26 23 if (isWRP) { 27 newWRP = GetRegisteredMosaic(); 28 if (newWRP != nWRP) { 24 if (mosaic != images[N].parent) { 29 25 fprintf (stderr, "only one mosaic allowed in an output file\n"); 30 26 exit (1); 31 27 } 32 28 } else { 33 nWRP = GetRegisteredMosaic(); 34 isWRP = TRUE; 29 mosaic = images[N].parent; 35 30 } 36 31 } … … 38 33 39 34 if (isWRP) { 40 WriteImageFITS (f, &images[nWRP]);35 WriteImageFITS (f, mosaic); 41 36 } else { 42 37 // write a blank
Note:
See TracChangeset
for help on using the changeset viewer.
