IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 17, 2014, 3:05:08 PM (12 years ago)
Author:
eugene
Message:

add medimage function set; add impeaks function; add verbosity options to star and gauss; add min,max functions to dvomath

Location:
branches/eam_branches/ipp-20140402/Ohana/src/opihi
Files:
5 added
8 edited

Legend:

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

    r34088 r36675  
    1010  Buffer *buf;
    1111  KapaImageData data;
     12  int VERBOSE;
     13
     14  VERBOSE = TRUE;
     15  if ((N = get_argument (argc, argv, "-q"))) {
     16    VERBOSE = FALSE;
     17    remove_argument (N, &argc, argv);
     18  }
     19  if ((N = get_argument (argc, argv, "-quiet"))) {
     20    VERBOSE = FALSE;
     21    remove_argument (N, &argc, argv);
     22  }
    1223
    1324  name = NULL;
     
    5869    KiiCursorRead (kapa, &X, &Y, &ZP, &RA, &DEC, key);
    5970    if (!strcasecmp (key, "Q")) break;
    60     get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);
     71    get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max, VERBOSE);
    6172  }
    6273  KiiCursorOff (kapa);
     
    6475}
    6576
     77
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/cmd.astro/star.c

    r34088 r36675  
    66  double max;
    77  Buffer *buf;
     8  int VERBOSE;
     9
     10  VERBOSE = TRUE;
     11  if ((N = get_argument (argc, argv, "-q"))) {
     12    VERBOSE = FALSE;
     13    remove_argument (N, &argc, argv);
     14  }
     15  if ((N = get_argument (argc, argv, "-quiet"))) {
     16    VERBOSE = FALSE;
     17    remove_argument (N, &argc, argv);
     18  }
    819
    920  Nborder = 3;
     
    3647  }
    3748
    38   get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);
     49  get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max, VERBOSE);
    3950 
    4051  return (TRUE);
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/cmd.data/Makefile

    r36489 r36675  
    6464$(SRC)/imcut.$(ARCH).o          \
    6565$(SRC)/imhist.$(ARCH).o \
     66$(SRC)/impeaks.$(ARCH).o        \
    6667$(SRC)/imsmooth.$(ARCH).o       \
    6768$(SRC)/imsmooth.generic.$(ARCH).o       \
     
    8889$(SRC)/mget.$(ARCH).o           \
    8990$(SRC)/minterpolate.$(ARCH).o   \
     91$(SRC)/medimage.$(ARCH).o       \
     92$(SRC)/medimage_commands.$(ARCH).o \
    9093$(SRC)/mset.$(ARCH).o           \
    9194$(SRC)/peak.$(ARCH).o           \
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/cmd.data/init.c

    r36489 r36675  
    5353int imcut            PROTO((int, char **));
    5454int imhist           PROTO((int, char **));
     55int impeaks          PROTO((int, char **));
    5556int imsmooth         PROTO((int, char **));
    5657int imsmooth_generic PROTO((int, char **));
     
    7879int mget             PROTO((int, char **));
    7980int minterp          PROTO((int, char **));
     81int medimage_command PROTO((int, char **));
    8082int mset             PROTO((int, char **));
    8183int peak             PROTO((int, char **));
     
    211213  {1, "imcut",        imcut,            "linear image cut between arbitrary coords"},
    212214  {1, "imhistogram",  imhist,           "histogram of an image region"},
     215  {1, "impeaks",      impeaks,          "find peaks in an image (return vectors)"},
    213216  {1, "imsmooth",     imsmooth,         "circular gaussian smoothing"},
    214217  {1, "imsmooth.generic", imsmooth_generic, "circular non-gaussian smoothing"},
     
    233236  {1, "minterp",      minterp,          "interpolate image pixels"},
    234237  {1, "iminterp",     minterp,          "interpolate image pixels"},
     238  {1, "medimage",     medimage_command, "median image manipulation"},
    235239  {1, "matrix",       matrix,           "matrix math operations"},
    236240  {1, "match2d",      match2d,          "match 2 pairs of X,Y vectors and return matched indexes"},
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/include/data.h

    r34584 r36675  
    3333  char **pageIDs;
    3434} Book;
     35
     36// the interpolating spline has valu
     37typedef struct {
     38  int Nknots;
     39  opihi_flt *xk;
     40  opihi_flt *yk;
     41  opihi_flt *y2;
     42  char *name;
     43} Spline;
     44
     45typedef struct {
     46  char *name;
     47  int Ninput;
     48  int Nx;
     49  int Ny;
     50  float **buffers;
     51} MedImageType;
    3552
    3653void InitData (void);
     
    144161
    145162/* starfuncs.c */
    146 double get_aperture_stats (Matrix *matrix, int X, int Y, int Npix, int Nborder, double max);
     163double get_aperture_stats (Matrix *matrix, int X, int Y, int Npix, int Nborder, double max, int VERBOSE);
    147164int set_rough_radii (double Ra, double Ri, double Ro);
    148165int get_rough_star (float *data, int Nx, int Ny, int x, int y, opihi_flt *xc, opihi_flt *yc, opihi_flt *sx, opihi_flt *sy, opihi_flt *sxy, opihi_flt *zs, opihi_flt *zp, opihi_flt *sk);
     
    170187void FreeQueues (void);
    171188void FreeBooks (void);
    172 
    173 // the interpolating spline has valu
    174 typedef struct {
    175   int Nknots;
    176   opihi_flt *xk;
    177   opihi_flt *yk;
    178   opihi_flt *y2;
    179   char *name;
    180 } Spline;
    181189
    182190/* in SplineOps.c */
     
    207215double hermitian_10(double x);
    208216
     217/* in MedImageOps.c */
     218void InitMedImages ();
     219void FreeMedImages ();
     220void FreeMedImage (MedImageType *medimage);
     221MedImageType *FindMedImage (char *name);
     222MedImageType *CreateMedImage (char *name, int Nx, int Ny);
     223int DeleteMedImage (MedImageType *medimage);
     224void ListMedImages ();
     225
    209226# endif
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/lib.data/Makefile

    r34584 r36675  
    2424$(SDIR)/spline.$(ARCH).o                \
    2525$(SDIR)/SplineOps.$(ARCH).o             \
     26$(SDIR)/MedImageOps.$(ARCH).o           \
    2627$(SDIR)/mrqmin.$(ARCH).o                \
    2728$(SDIR)/mrq2dmin.$(ARCH).o              \
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/lib.data/starfuncs.c

    r34088 r36675  
    11# include "data.h"
    22
    3 double get_aperture_stats (Matrix *matrix, int X, int Y, int Npix, int Nborder, double max) {
     3double get_aperture_stats (Matrix *matrix, int X, int Y, int Npix, int Nborder, double max, int VERBOSE) {
    44
    55  double *ring;
     
    9595  set_int_variable ("Npts", Npts);
    9696 
    97   gprint (GP_LOG, "%f %f %f %f %f %f %f %f\n", x, y, FWHMx, FWHMy, sky, I, mag, dmag);
     97  if (VERBOSE) gprint (GP_LOG, "%f %f %f %f %f %f %f %f\n", x, y, FWHMx, FWHMy, sky, I, mag, dmag);
    9898
    9999  return (mag);
  • branches/eam_branches/ipp-20140402/Ohana/src/opihi/lib.shell/convert_to_RPN.c

    r36489 r36675  
    7070    if (!strcmp (argv[i], "^"))      { type = ST_POWER; goto gotit; }
    7171
     72    if (!strcmp (argv[i], "max"))    { type = ST_BINARY; strcpy (argv[i], "U"); goto gotit; }
     73    if (!strcmp (argv[i], "min"))    { type = ST_BINARY; strcpy (argv[i], "D"); goto gotit; }
    7274    if (!strcmp (argv[i], "atan2"))  { type = ST_BINARY; goto gotit; }
    7375    if (!strcmp (argv[i], ","))      { type = ST_COMMA; goto gotit; }
Note: See TracChangeset for help on using the changeset viewer.