IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2012, 9:46:37 AM (14 years ago)
Author:
eugene
Message:

add getcoords function; avoid truncation problems with large 32bit ints

Location:
branches/eam_branches/ipp-20120805/Ohana/src/opihi/cmd.astro
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120805/Ohana/src/opihi/cmd.astro/Makefile

    r33963 r34339  
    4343$(SRC)/galsectors.$(ARCH).o        \
    4444$(SRC)/galprofiles.$(ARCH).o       \
     45$(SRC)/getcoords.$(ARCH).o         \
    4546$(SRC)/elliprofile.$(ARCH).o       \
    4647$(SRC)/ringflux.$(ARCH).o          \
  • branches/eam_branches/ipp-20120805/Ohana/src/opihi/cmd.astro/csystem.c

    r20936 r34339  
    1111  CoordTransform *transform;
    1212
    13   if (argc != 5) {
    14     gprint (GP_ERR, "USAGE: csystems [C/G/E/H] [C/G/E/H] X Y\n");
    15     return (FALSE);
    16   }
     13  if (argc != 5) goto syntax;
    1714
    1815  switch (argv[1][0]) {
     
    2017    case 'G': input = COORD_GALACTIC; break;
    2118    case 'E': input = COORD_ECLIPTIC; break;
    22     default: abort();
     19    default: goto syntax;
    2320  }
    2421
     
    2724    case 'G': output = COORD_GALACTIC; break;
    2825    case 'E': output = COORD_ECLIPTIC; break;
    29     default: abort();
     26    default: goto syntax;
    3027  }
    3128
     
    6663  return (TRUE);
    6764
     65syntax:
     66  gprint (GP_ERR, "USAGE: csystems [C/G/E/H] [C/G/E/H] X Y\n");
     67  return (FALSE);
    6868}
  • branches/eam_branches/ipp-20120805/Ohana/src/opihi/cmd.astro/init.c

    r33963 r34339  
    2929int galradius               PROTO((int, char **));
    3030int galradbins              PROTO((int, char **));
     31int getcoords               PROTO((int, char **));
    3132int elliprofile             PROTO((int, char **));
    3233int ringflux                PROTO((int, char **));
     
    8687  {1, "galradius",   galradius,    "generate radial vectors with interpolation along paths"},
    8788  {1, "galradbins",  galradbins,   "generate radial vectors with interpolation along paths"},
     89  {1, "getcoords",   getcoords,    "generate images containing the RA,DEC coord for each pixel"},
    8890  {1, "elliprofile", elliprofile,  "generate radial vectors with interpolation along paths"},
    8991  {1, "ringflux",    ringflux,     "mean flux in a ring"},
Note: See TracChangeset for help on using the changeset viewer.