IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 11, 2015, 2:14:39 PM (12 years ago)
Author:
eugene
Message:

merge changes from eam branch ipp-20140904

Location:
trunk/Ohana
Files:
12 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/opihi/cmd.astro/Makefile

    r36489 r37807  
    7171$(SRC)/star.$(ARCH).o              \
    7272$(SRC)/transform.$(ARCH).o         \
     73$(SRC)/vshimage.$(ARCH).o         \
     74$(SRC)/shimage.$(ARCH).o         \
    7375$(SRC)/imsub.$(ARCH).o             \
    7476$(SRC)/imfit.$(ARCH).o             \
  • trunk/Ohana/src/opihi/cmd.astro/cdensify.c

    r36489 r37807  
    9797  // generate the PSF in a local tangent plane
    9898  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");
    106100
    107101  r = vr[0].elements.Flt;
  • trunk/Ohana/src/opihi/cmd.astro/coords.c

    r33662 r37807  
    7171    if ((mosbuffer = SelectBuffer (MOSAIC, OLDBUFFER, TRUE)) == NULL) goto escape;
    7272    GetCoords (&moscoords, &mosbuffer[0].header);
    73     RegisterMosaic (&moscoords);
     73    coords.mosaic = &moscoords;
    7474  }
    7575 
  • trunk/Ohana/src/opihi/cmd.astro/csystem.c

    r34342 r37807  
    1313  if (argc != 5) goto syntax;
    1414
    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    }
    2024  }
    2125
    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    }
    2735  }
    2836
  • trunk/Ohana/src/opihi/cmd.astro/fitplx.c

    r36489 r37807  
    104104  /* project coordinates to a plane centered on the object with units of arcsec */
    105105  Coords coords;
     106  InitCoords (&coords, "DEC--SIN");
    106107  coords.crval1 = Rmean;
    107108  coords.crval2 = Dmean;
    108   coords.crpix1 = 0;
    109   coords.crpix2 = 0;
    110109  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");
    115110
    116111  double *X, *Y, *t, *pX, *pY, *dX, *dY;
  • trunk/Ohana/src/opihi/cmd.astro/fitpm.c

    r36489 r37807  
    100100  /* project coordinates to a plane centered on the object with units of arcsec */
    101101  Coords coords;
     102  InitCoords (&coords, "DEC--SIN");
    102103  coords.crval1 = Rmean;
    103104  coords.crval2 = Dmean;
    104   coords.crpix1 = 0;
    105   coords.crpix2 = 0;
    106105  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");
    111106
    112107  double *X, *Y, *t, *dX, *dY;
  • trunk/Ohana/src/opihi/cmd.astro/gauss.c

    r36679 r37807  
    3030  if (!GetImageData (&data, &kapa, name)) return (FALSE);
    3131  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  }
    3239
    3340  Nborder = 3;
  • trunk/Ohana/src/opihi/cmd.astro/getcoords.c

    r34345 r37807  
    5454  if (!strcmp(&coords.ctype[4], "-WRP")) {
    5555    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");
    5757      return (FALSE);
    5858    }
     
    6565    }
    6666    GetCoords (&moscoords, &mosbuffer[0].header);
    67     RegisterMosaic (&moscoords);
     67    coords.mosaic = &moscoords;
    6868  }
    6969 
  • trunk/Ohana/src/opihi/cmd.astro/init.c

    r36489 r37807  
    6161int times                   PROTO((int, char **));
    6262int transform               PROTO((int, char **));
     63int vshimage                PROTO((int, char **));
     64int shimage                 PROTO((int, char **));
    6365
    6466static Command cmds[] = { 
     
    121123  {1, "star",        star,         "star stats at rough coords"},
    122124  {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"},
    123127};
    124128
  • trunk/Ohana/src/opihi/cmd.astro/objload.c

    r34088 r37807  
    1919  if (!GetImage (NULL, &kapa, name)) return (FALSE);
    2020  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  }
    2128
    2229  Objtype = 0;
  • trunk/Ohana/src/opihi/cmd.astro/region.c

    r36489 r37807  
    1717  if (!GetGraph (&graphmode, &kapa, name)) return (FALSE);
    1818  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  }
    1926
    2027  NoClear = FALSE;
     
    8087  if (!ohana_str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE);
    8188  Radius = atof (argv[3]);
    82   strcpy (graphmode.coords.ctype, "DEC--TAN");
     89  InitCoords (&graphmode.coords, "DEC--TAN");
     90
    8391  if (argc == 5) {
    8492    if (!strcasecmp (argv[4], "TAN"))
     
    99107      strcpy (graphmode.coords.ctype, "DEC--PAR");
    100108  }
     109 
     110  graphmode.coords.crval1 = Ra;
     111  graphmode.coords.crval2 = Dec;
    101112
    102  
     113  graphmode.coords.pc1_1 = (graphmode.flipeast) ? -1 : 1;
     114  graphmode.coords.pc2_2 = (graphmode.flipnorth) ? -1 : 1;
     115
    103116  /* ask kapa for coordinate limits, to get the right aspect ratio */
    104117  KapaGetLimits (kapa, &dx, &dy);
     
    132145  set_int_variable ("NORTH_UP", !graphmode.flipnorth);
    133146
    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 
    144147  if (!NoClear) KapaClearSections (kapa);
    145148  KapaSetLimits (kapa, &graphmode);
Note: See TracChangeset for help on using the changeset viewer.