Changeset 37807 for trunk/Ohana/src/opihi/cmd.astro
- Timestamp:
- Jan 11, 2015, 2:14:39 PM (12 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 12 edited
- 2 copied
-
. (modified) (1 prop)
-
src/opihi/cmd.astro/Makefile (modified) (1 diff)
-
src/opihi/cmd.astro/cdensify.c (modified) (1 diff)
-
src/opihi/cmd.astro/coords.c (modified) (1 diff)
-
src/opihi/cmd.astro/csystem.c (modified) (1 diff)
-
src/opihi/cmd.astro/fitplx.c (modified) (1 diff)
-
src/opihi/cmd.astro/fitpm.c (modified) (1 diff)
-
src/opihi/cmd.astro/gauss.c (modified) (1 diff)
-
src/opihi/cmd.astro/getcoords.c (modified) (2 diffs)
-
src/opihi/cmd.astro/init.c (modified) (2 diffs)
-
src/opihi/cmd.astro/objload.c (modified) (1 diff)
-
src/opihi/cmd.astro/region.c (modified) (4 diffs)
-
src/opihi/cmd.astro/shimage.c (copied) (copied from branches/eam_branches/ipp-20140904/Ohana/src/opihi/cmd.astro/shimage.c )
-
src/opihi/cmd.astro/vshimage.c (copied) (copied from branches/eam_branches/ipp-20140904/Ohana/src/opihi/cmd.astro/vshimage.c )
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/Makefile
r36489 r37807 71 71 $(SRC)/star.$(ARCH).o \ 72 72 $(SRC)/transform.$(ARCH).o \ 73 $(SRC)/vshimage.$(ARCH).o \ 74 $(SRC)/shimage.$(ARCH).o \ 73 75 $(SRC)/imsub.$(ARCH).o \ 74 76 $(SRC)/imfit.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.astro/cdensify.c
r36489 r37807 97 97 // generate the PSF in a local tangent plane 98 98 Coords coords; 99 coords.crpix1 = coords.crpix2 = 0.0; 100 coords.crval1 = coords.crval2 = 0.0; 101 coords.cdelt1 = coords.cdelt2 = 1.0; 102 coords.pc1_1 = coords.pc2_2 = 1.0; 103 coords.pc1_2 = coords.pc2_1 = 0.0; 104 coords.Npolyterms = 0; 105 strcpy (coords.ctype, "DEC--TAN"); 99 InitCoords (&coords, "DEC--TAN"); 106 100 107 101 r = vr[0].elements.Flt; -
trunk/Ohana/src/opihi/cmd.astro/coords.c
r33662 r37807 71 71 if ((mosbuffer = SelectBuffer (MOSAIC, OLDBUFFER, TRUE)) == NULL) goto escape; 72 72 GetCoords (&moscoords, &mosbuffer[0].header); 73 RegisterMosaic (&moscoords);73 coords.mosaic = &moscoords; 74 74 } 75 75 -
trunk/Ohana/src/opihi/cmd.astro/csystem.c
r34342 r37807 13 13 if (argc != 5) goto syntax; 14 14 15 switch (argv[1][0]) { 16 case 'C': input = COORD_CELESTIAL; break; 17 case 'G': input = COORD_GALACTIC; break; 18 case 'E': input = COORD_ECLIPTIC; break; 19 default: goto syntax; 15 if (!strcmp(argv[1], "G2004")) { 16 input = COORD_GALACTIC_REID_2004; 17 } else { 18 switch (argv[1][0]) { 19 case 'C': input = COORD_CELESTIAL; break; 20 case 'G': input = COORD_GALACTIC; break; 21 case 'E': input = COORD_ECLIPTIC; break; 22 default: goto syntax; 23 } 20 24 } 21 25 22 switch (argv[2][0]) { 23 case 'C': output = COORD_CELESTIAL; break; 24 case 'G': output = COORD_GALACTIC; break; 25 case 'E': output = COORD_ECLIPTIC; break; 26 default: goto syntax; 26 if (!strcmp(argv[2], "G2004")) { 27 output = COORD_GALACTIC_REID_2004; 28 } else { 29 switch (argv[2][0]) { 30 case 'C': output = COORD_CELESTIAL; break; 31 case 'G': output = COORD_GALACTIC; break; 32 case 'E': output = COORD_ECLIPTIC; break; 33 default: goto syntax; 34 } 27 35 } 28 36 -
trunk/Ohana/src/opihi/cmd.astro/fitplx.c
r36489 r37807 104 104 /* project coordinates to a plane centered on the object with units of arcsec */ 105 105 Coords coords; 106 InitCoords (&coords, "DEC--SIN"); 106 107 coords.crval1 = Rmean; 107 108 coords.crval2 = Dmean; 108 coords.crpix1 = 0;109 coords.crpix2 = 0;110 109 coords.cdelt1 = coords.cdelt2 = 1.0 / 3600.0; 111 coords.pc1_1 = coords.pc2_2 = 1.0;112 coords.pc1_2 = coords.pc2_1 = 0.0;113 coords.Npolyterms = 1;114 strcpy (coords.ctype, "DEC--SIN");115 110 116 111 double *X, *Y, *t, *pX, *pY, *dX, *dY; -
trunk/Ohana/src/opihi/cmd.astro/fitpm.c
r36489 r37807 100 100 /* project coordinates to a plane centered on the object with units of arcsec */ 101 101 Coords coords; 102 InitCoords (&coords, "DEC--SIN"); 102 103 coords.crval1 = Rmean; 103 104 coords.crval2 = Dmean; 104 coords.crpix1 = 0;105 coords.crpix2 = 0;106 105 coords.cdelt1 = coords.cdelt2 = 1.0 / 3600.0; 107 coords.pc1_1 = coords.pc2_2 = 1.0;108 coords.pc1_2 = coords.pc2_1 = 0.0;109 coords.Npolyterms = 1;110 strcpy (coords.ctype, "DEC--SIN");111 106 112 107 double *X, *Y, *t, *dX, *dY; -
trunk/Ohana/src/opihi/cmd.astro/gauss.c
r36679 r37807 30 30 if (!GetImageData (&data, &kapa, name)) return (FALSE); 31 31 FREE (name); 32 33 int channel = 0; 34 if ((N = get_argument (argc, argv, "-ch"))) { 35 channel = GetKapaChannelFromString (argv[N]); 36 if (!channel) return FALSE; 37 KiiSetChannel (kapa, channel - 1); 38 } 32 39 33 40 Nborder = 3; -
trunk/Ohana/src/opihi/cmd.astro/getcoords.c
r34345 r37807 54 54 if (!strcmp(&coords.ctype[4], "-WRP")) { 55 55 if (MOSAIC == NULL) { 56 gprint (GP_ERR, "must supply mosaic for WRP coords \n");56 gprint (GP_ERR, "must supply mosaic for WRP coords with -mosaic [buffer]\n"); 57 57 return (FALSE); 58 58 } … … 65 65 } 66 66 GetCoords (&moscoords, &mosbuffer[0].header); 67 RegisterMosaic (&moscoords);67 coords.mosaic = &moscoords; 68 68 } 69 69 -
trunk/Ohana/src/opihi/cmd.astro/init.c
r36489 r37807 61 61 int times PROTO((int, char **)); 62 62 int transform PROTO((int, char **)); 63 int vshimage PROTO((int, char **)); 64 int shimage PROTO((int, char **)); 63 65 64 66 static Command cmds[] = { … … 121 123 {1, "star", star, "star stats at rough coords"}, 122 124 {1, "transform", transform, "geometric transformation of image"}, 125 {1, "vshimage", vshimage, "generate images for vector spherical harmonic terms"}, 126 {1, "shimage", shimage, "generate images for spherical harmonic terms"}, 123 127 }; 124 128 -
trunk/Ohana/src/opihi/cmd.astro/objload.c
r34088 r37807 19 19 if (!GetImage (NULL, &kapa, name)) return (FALSE); 20 20 FREE (name); 21 22 int channel = 0; 23 if ((N = get_argument (argc, argv, "-ch"))) { 24 channel = GetKapaChannelFromString (argv[N]); 25 if (!channel) return FALSE; 26 KiiSetChannel (kapa, channel - 1); 27 } 21 28 22 29 Objtype = 0; -
trunk/Ohana/src/opihi/cmd.astro/region.c
r36489 r37807 17 17 if (!GetGraph (&graphmode, &kapa, name)) return (FALSE); 18 18 FREE (name); 19 20 int channel = 0; 21 if ((N = get_argument (argc, argv, "-ch"))) { 22 channel = GetKapaChannelFromString (argv[N]); 23 if (!channel) return FALSE; 24 KiiSetChannel (kapa, channel - 1); 25 } 19 26 20 27 NoClear = FALSE; … … 80 87 if (!ohana_str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE); 81 88 Radius = atof (argv[3]); 82 strcpy (graphmode.coords.ctype, "DEC--TAN"); 89 InitCoords (&graphmode.coords, "DEC--TAN"); 90 83 91 if (argc == 5) { 84 92 if (!strcasecmp (argv[4], "TAN")) … … 99 107 strcpy (graphmode.coords.ctype, "DEC--PAR"); 100 108 } 109 110 graphmode.coords.crval1 = Ra; 111 graphmode.coords.crval2 = Dec; 101 112 102 113 graphmode.coords.pc1_1 = (graphmode.flipeast) ? -1 : 1; 114 graphmode.coords.pc2_2 = (graphmode.flipnorth) ? -1 : 1; 115 103 116 /* ask kapa for coordinate limits, to get the right aspect ratio */ 104 117 KapaGetLimits (kapa, &dx, &dy); … … 132 145 set_int_variable ("NORTH_UP", !graphmode.flipnorth); 133 146 134 graphmode.coords.pc1_1 = (graphmode.flipeast) ? -1 : 1;135 graphmode.coords.pc2_2 = (graphmode.flipnorth) ? -1 : 1;136 137 graphmode.coords.pc1_2 = graphmode.coords.pc2_1 = 0.0;138 graphmode.coords.crval1 = Ra;139 graphmode.coords.crval2 = Dec;140 graphmode.coords.crpix1 = 0.0;141 graphmode.coords.crpix2 = 0.0;142 graphmode.coords.cdelt1 = graphmode.coords.cdelt2 = 1.0;143 144 147 if (!NoClear) KapaClearSections (kapa); 145 148 KapaSetLimits (kapa, &graphmode);
Note:
See TracChangeset
for help on using the changeset viewer.
