IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39166


Ignore:
Timestamp:
Nov 19, 2015, 12:15:53 PM (11 years ago)
Author:
eugene
Message:

squash NAN values in drizzle; allow regions with an angle

Location:
branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro
Files:
2 edited

Legend:

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

    r19823 r39166  
    141141
    142142          if (Vmk && Vmk[Ni]) continue;
     143          if (!isfinite(Vin[Ni])) continue;
     144
    143145          Vout[No] += Vin[Ni];
    144146          Vwt[No] ++;
     
    195197
    196198          if (Vmk && Vmk[Ni]) continue;
     199          if (!isfinite(Vin[Ni])) continue;
    197200          Vout[No] += Vin[Ni];
    198201          Vwt[No] ++;
  • branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro/region.c

    r37807 r39166  
    7474  }
    7575
     76  float Angle = 0.0;
     77  if ((N = get_argument (argc, argv, "-angle"))) {
     78    remove_argument (N, &argc, argv);
     79    Angle = atof(argv[N]);
     80    remove_argument (N, &argc, argv);
     81  }
     82
    7683  if ((argc != 4) && (argc != 5)) {
    7784    gprint (GP_ERR, "USAGE: region Ra Dec Radius [projection] [orientation]\n");
     
    111118  graphmode.coords.crval2 = Dec;
    112119
    113   graphmode.coords.pc1_1 = (graphmode.flipeast) ? -1 : 1;
    114   graphmode.coords.pc2_2 = (graphmode.flipnorth) ? -1 : 1;
     120  float pc1_1 = (graphmode.flipeast)  ? -1 : 1;
     121  float pc2_2 = (graphmode.flipnorth) ? -1 : 1;
     122
     123  graphmode.coords.pc1_1 =  cos(Angle*RAD_DEG)*pc1_1;
     124  graphmode.coords.pc1_2 =  sin(Angle*RAD_DEG)*pc2_2;
     125  graphmode.coords.pc2_1 = -sin(Angle*RAD_DEG)*pc1_1;
     126  graphmode.coords.pc2_2 =  cos(Angle*RAD_DEG)*pc2_2;
    115127
    116128  /* ask kapa for coordinate limits, to get the right aspect ratio */
Note: See TracChangeset for help on using the changeset viewer.