IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2013, 10:31:05 AM (13 years ago)
Author:
eugene
Message:

make Coords.ctype consistently use the CTYPE2 value; cdensify generates WCS keywords

Location:
branches/eam_branches/ipp-20131211/Ohana/src/opihi
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/cmd.astro/cdensify.c

    r36387 r36398  
    7676  Ny = (Ymax - Ymin) / dY + 1;
    7777 
     78  Coords newcoords = graphmode.coords;
     79  newcoords.cdelt1 *= dX;
     80  newcoords.cdelt2 *= dY;
     81  newcoords.crpix1 = (newcoords.crpix1 - Xmin) / dX;
     82  newcoords.crpix2 = (newcoords.crpix2 - Ymin) / dY;
     83
    7884  gfits_free_matrix (&bf[0].matrix);
    7985  gfits_free_header (&bf[0].header);
    8086  CreateBuffer (bf, Nx, Ny, -32, 0.0, 1.0);
    8187  strcpy (bf[0].file, "(empty)");
     88  PutCoords (&newcoords, &bf[0].header);
    8289 
    8390  float scalescale = scale*scale;
     
    96103  coords.pc1_2  = coords.pc2_1  = 0.0;
    97104  coords.Npolyterms = 0;
    98   strcpy (coords.ctype, "RA---TAN");
     105  strcpy (coords.ctype, "DEC--TAN");
    99106
    100107  r = vr[0].elements.Flt;
     
    113120        Xb = (x - Xmin) / dX;
    114121        Yb = (y - Ymin) / dY;
     122
     123        RD_to_XY (&x, &y, rn, *d, &newcoords);
     124        Xb = (int) x;
     125        Yb = (int) y;
    115126        if (Xb >= Nx) continue;
    116127        if (Yb >= Ny) continue;
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/cmd.astro/fitplx.c

    r36375 r36398  
    112112  coords.pc1_2  = coords.pc2_1 = 0.0;
    113113  coords.Npolyterms = 1;
    114   strcpy (coords.ctype, "RA---SIN");
     114  strcpy (coords.ctype, "DEC--SIN");
    115115
    116116  double *X, *Y, *t, *pX, *pY, *dX, *dY;
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/cmd.astro/region.c

    r31160 r36398  
    8080  if (!ohana_str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE);
    8181  Radius = atof (argv[3]);
    82   strcpy (graphmode.coords.ctype, "RA---TAN");
     82  strcpy (graphmode.coords.ctype, "DEC--TAN");
    8383  if (argc == 5) {
    8484    if (!strcasecmp (argv[4], "TAN"))
    85       strcpy (graphmode.coords.ctype, "RA---TAN");
     85      strcpy (graphmode.coords.ctype, "DEC--TAN");
    8686    if (!strcasecmp (argv[4], "SIN"))
    87       strcpy (graphmode.coords.ctype, "RA---SIN");
     87      strcpy (graphmode.coords.ctype, "DEC--SIN");
    8888    if (!strcasecmp (argv[4], "ARC"))
    89       strcpy (graphmode.coords.ctype, "RA---ARC");
     89      strcpy (graphmode.coords.ctype, "DEC--ARC");
    9090    if (!strcasecmp (argv[4], "STG"))
    91       strcpy (graphmode.coords.ctype, "RA---STG");
     91      strcpy (graphmode.coords.ctype, "DEC--STG");
    9292    if (!strcasecmp (argv[4], "ZEA"))
    93       strcpy (graphmode.coords.ctype, "RA---ZEA");
     93      strcpy (graphmode.coords.ctype, "DEC--ZEA");
    9494    if (!strcasecmp (argv[4], "AIT"))
    95       strcpy (graphmode.coords.ctype, "RA---AIT");
     95      strcpy (graphmode.coords.ctype, "DEC--AIT");
    9696    if (!strcasecmp (argv[4], "GLS"))
    97       strcpy (graphmode.coords.ctype, "RA---GLS");
     97      strcpy (graphmode.coords.ctype, "DEC--GLS");
    9898    if (!strcasecmp (argv[4], "PAR"))
    99       strcpy (graphmode.coords.ctype, "RA---PAR");
     99      strcpy (graphmode.coords.ctype, "DEC--PAR");
    100100  }
    101101
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/dvo/find_matches.c

    r29759 r36398  
    5050  tcoords.pc1_2 = tcoords.pc2_1 = 0.0;
    5151  tcoords.Npolyterms = 1;
    52   strcpy (tcoords.ctype, "RA---ARC");
     52  strcpy (tcoords.ctype, "DEC--ARC");
    5353
    5454  // this region includes a boundary layer of size RADIUS
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/dvo/gimages.c

    r34844 r36398  
    136136      local.pc2_1 = local.pc1_2 = 0.0;
    137137      local.Npolyterms = 1;
    138       strcpy (local.ctype, "RA---TAN");
     138      strcpy (local.ctype, "DEC--TAN");
    139139
    140140      if (typehash == DistortImage) {
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/dvo/showtile.c

    r34584 r36398  
    3434  coords.pc1_2  = coords.pc2_1  = 0.0;
    3535  coords.Npolyterms = 0;
    36   strcpy (coords.ctype, "RA---TAN");
     36  strcpy (coords.ctype, "DEC--TAN");
    3737 
    3838  /* fill in top-left region */
  • branches/eam_branches/ipp-20131211/Ohana/src/opihi/dvo/simage.c

    r34584 r36398  
    4343  /* get astrometry information */
    4444  strcpy (coords.ctype, "NONE");
    45   gfits_scan (&header, "CTYPE1",   "%s",  1, coords.ctype);
    46   if (strcmp (coords.ctype, "RA---PLY")) {
     45  gfits_scan (&header, "CTYPE2",   "%s",  1, coords.ctype);
     46  if (strcmp (coords.ctype, "DEC--PLY")) {
    4747    gprint (GP_ERR, "ERROR: wrong astrometric info in header\n");
    4848    return (FALSE);
Note: See TracChangeset for help on using the changeset viewer.