IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6684 for trunk/Ohana/src/opihi


Ignore:
Timestamp:
Mar 26, 2006, 1:14:47 PM (20 years ago)
Author:
eugene
Message:

removed IMAGE_CATALOG from config, finished proper-motion additions, minor fixes in graphing

Location:
trunk/Ohana/src/opihi
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/Makefile.Common

    r6683 r6684  
    2626$(DESTLIB)/%.a: $(LIB)/%.$(ARCH).a
    2727        @if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi
    28         @echo ""
    29         @echo "current: $^"
    30         @echo "current: $*"
    31         @echo "current: $@"
    3228        rm -f $@
    33         cp $^ $@
     29        cp $< $@
    3430
    3531lib%.clean:
  • trunk/Ohana/src/opihi/cmd.data/Makefile

    r6642 r6684  
    2626$(SDIR)/clear.$(ARCH).o         \
    2727$(SDIR)/clip.$(ARCH).o          \
     28$(SDIR)/close.$(ARCH).o         \
    2829$(SDIR)/concat.$(ARCH).o        \
    2930$(SDIR)/contour.$(ARCH).o       \
  • trunk/Ohana/src/opihi/cmd.data/box.c

    r5919 r6684  
    66  Graphdata graphmode;
    77 
     8  Ngraph = -1;
     9  if ((N = get_argument (argc, argv, "-n"))) {
     10    remove_argument (N, &argc, argv);
     11    Ngraph = atof (argv[N]);
     12    remove_argument (N, &argc, argv);
     13  }
     14  if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);
     15
    816  strcpy (graphmode.ticks, "2222");
    917  if ((N = get_argument (argc, argv, "-ticks"))) {
     
    3846    }
    3947  }
    40 
    41   Ngraph = -1;
    42   if ((N = get_argument (argc, argv, "-n"))) {
    43     remove_argument (N, &argc, argv);
    44     Ngraph = atof (argv[N]);
    45     remove_argument (N, &argc, argv);
    46   }
    47   if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);
    4848
    4949  if (argc != 1) goto usage;
  • trunk/Ohana/src/opihi/cmd.data/init.c

    r6642 r6684  
    99int clear            PROTO((int, char **));
    1010int clip             PROTO((int, char **));
     11int close_device     PROTO((int, char **));
    1112int concat           PROTO((int, char **));
    1213int contour          PROTO((int, char **));
     
    115116  {"clear",        clear,            "erase plot"},
    116117  {"clip",         clip,             "clip values in a buffer to be within a range"},
     118  {"close",        close_device,     "close the current display device"},
    117119  {"concat",       concat,           "reduce vector dimension"},
    118120  {"contour",      contour,          "create contour from image"},
  • trunk/Ohana/src/opihi/dvo/LoadImages.c

    r4864 r6684  
    33Image *LoadImages (int *nimage) {
    44
    5   char filename[256];
     5  char *catdir, filename[256];
    66  Image *image;
    77  FITS_DB db;
    88 
    9   VarConfig ("IMAGE_CATALOG", "%s", filename);
     9  /* VarConfig ("IMAGE_CATALOG", "%s", filename); */
     10
     11  catdir = GetCATDIR ();
     12  sprintf (filename, "%s/Images.dat", catdir);
    1013
    1114  fits_db_init (&db);
  • trunk/Ohana/src/opihi/dvo/catdir.c

    r5900 r6684  
    33int catdir_define (int argc, char **argv) {
    44 
     5  char *current;
    56  int status, N, VERBOSE;
    67
     
    1415    fprintf (stderr, "USAGE: catdir (name)\n");
    1516    fprintf (stderr, "       (name) may be a path or 'default'\n");
     17    current = GetCATDIR ();
     18    if (current == NULL) {
     19      fprintf (stderr, "catdir not defined\n");
     20    } else {
     21      fprintf (stderr, "current: %s\n", current);
     22    }
    1623    return (FALSE);
    1724  }
  • trunk/Ohana/src/opihi/dvo/region_list.c

    r5996 r6684  
    1111
    1212  char *newpath;
    13   char catdir[256];
     13  char catdir_config[256];
    1414  char gscfile[256];
    1515  char skyfile[256];
     
    1818  /* find CATDIR in config system */
    1919  if (path == NULL) {
    20     if (VarConfig ("CATDIR", "%s", catdir) == NULL) return (FALSE);
    21     newpath = catdir;
     20    if (VarConfig ("CATDIR", "%s", catdir_config) == NULL) return (FALSE);
     21    newpath = catdir_config;
    2222  } else {
    2323    newpath = path;
     
    3232
    3333  if (verbose) {
    34       fprintf (stderr, "CATDIR %s\n", catdir);
     34      fprintf (stderr, "CATDIR %s\n", CATDIR);
    3535      fprintf (stderr, "GSCFILE %s\n", gscfile);
    3636      fprintf (stderr, "SKYFILE %s\n", skyfile);
     
    4242
    4343  if (sky != NULL) SkyTableFree (sky);
    44   sky = SkyTableLoadOptimal (catdir, skyfile, gscfile, skydepth, verbose);
     44  sky = SkyTableLoadOptimal (CATDIR, skyfile, gscfile, skydepth, verbose);
    4545  if (sky == NULL) return FALSE;
    4646
    47   SkyTableSetFilenames (sky, catdir, "cpt");
     47  SkyTableSetFilenames (sky, CATDIR, "cpt");
    4848
    4949  return (TRUE);
     50}
     51
     52char *GetCATDIR () {
     53  if (CATDIR == NULL) {
     54    SetCATDIR (NULL, FALSE);
     55  }
     56  return (CATDIR);
    5057}
    5158
  • trunk/Ohana/src/opihi/include/display.h

    r5850 r6684  
    2424void          InitGraph             PROTO((void));
    2525int           open_graph            PROTO((int N));
     26int           close_graph           PROTO((int N));
    2627void          QuitGraph             PROTO((void));
    2728void          SetGraph              PROTO((Graphdata data));
     
    3536void          InitImage             PROTO((void));
    3637int           open_image            PROTO((int N));
     38int           close_image           PROTO((int N));
    3739void          QuitImage             PROTO((void));
    3840void          SetImageDevice        PROTO((int state));
  • trunk/Ohana/src/opihi/include/dvo1.h

    r6683 r6684  
    7373SkyList      *SkyListLoadFile       PROTO((char *filename));
    7474int           SetCATDIR             PROTO((char *path, int verbose));
     75char *        GetCATDIR             PROTO(());
    7576SkyTable     *GetSkyTable           PROTO(());
    7677SkyList      *SkyListFromFile       PROTO((char *filename));
  • trunk/Ohana/src/opihi/lib.data/open_graph.c

    r5919 r6684  
    88static int       Xgraph[NXGRAPH]; 
    99static Graphdata graphdata[NXGRAPH];
    10 
    11 
    1210
    1311void QuitGraph () {
     
    8078
    8179  Xgraph[N] = fd;
     80  return (TRUE);
     81}
     82
     83int close_graph (int N) {
     84
     85  if (N <  0) return (FALSE);
     86  if (N >= NXGRAPH) return (FALSE);
     87
     88  KiiClose (Xgraph[N]);
     89  Xgraph[N] = -1;
    8290  return (TRUE);
    8391}
  • trunk/Ohana/src/opihi/lib.data/open_image.c

    r5919 r6684  
    3333}
    3434
    35 
    36 
    37 
    38 
    39 
    40 
    41 
    42 
    43 
    44 
    45 
    46 
    47 
    48 
    49 
    50 
    51 
    52 
    5335/* set SIGPIPE to this function to close cleanly */
    5436void XImageDead (int input) {
     
    8062
    8163  Ximage[N] = fd;
     64  return (TRUE);
     65}
     66
     67int close_image (int N) {
     68
     69  if (N <  0) return (FALSE);
     70  if (N >= NXIMAGE) return (FALSE);
     71
     72  KiiClose (Ximage[N]);
     73  Ximage[N] = -1;
    8274  return (TRUE);
    8375}
Note: See TracChangeset for help on using the changeset viewer.