IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33655


Ignore:
Timestamp:
Apr 1, 2012, 3:06:30 PM (14 years ago)
Author:
eugene
Message:

support for parallel dvo; support to set output mode and format

Location:
trunk/Ohana/src/photdbc
Files:
7 edited
19 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/photdbc/Makefile

    r17284 r33655  
    1 default: photdbc
     1default: photdbc photdbc_client dvodist
    22help:
    3         @echo "make options: photdbc (default)"
     3        @echo "make options: photdbc photdbc_client dvodist"
    44
    55include ../../Makefile.System
     
    1818
    1919photdbc: $(BIN)/photdbc.$(ARCH)
    20 install: $(DESTBIN)/photdbc
     20photdbc_client: $(BIN)/photdbc_client.$(ARCH)
     21
     22dvodist: $(BIN)/dvodist.$(ARCH)
     23
     24install: $(DESTBIN)/photdbc $(DESTBIN)/photdbc_client $(DESTBIN)/dvodist
    2125
    2226PHOTDBC = \
    2327$(SRC)/photdbc.$(ARCH).o           \
     28$(SRC)/photdbc_catalogs.$(ARCH).o  \
    2429$(SRC)/initialize.$(ARCH).o        \
    2530$(SRC)/ConfigInit.$(ARCH).o        \
     
    2934$(SRC)/join_stars.$(ARCH).o        \
    3035$(SRC)/make_subcatalog.$(ARCH).o       
     36
     37PHOTDBC_CLIENT = \
     38$(SRC)/photdbc_client.$(ARCH).o    \
     39$(SRC)/photdbc_catalogs.$(ARCH).o  \
     40$(SRC)/initialize.$(ARCH).o        \
     41$(SRC)/ConfigInit.$(ARCH).o        \
     42$(SRC)/args.$(ARCH).o              \
     43$(SRC)/copy_images.$(ARCH).o       \
     44$(SRC)/Shutdown.$(ARCH).o          \
     45$(SRC)/join_stars.$(ARCH).o        \
     46$(SRC)/make_subcatalog.$(ARCH).o       
     47
     48DVODIST = \
     49$(SRC)/dvodist.$(ARCH).o                \
     50$(SRC)/initialize_dvodist.$(ARCH).o     \
     51$(SRC)/Shutdown_dvodist.$(ARCH).o       \
     52$(SRC)/SetSignals.$(ARCH).o             \
     53$(SRC)/md5_ops.$(ARCH).o                \
     54$(SRC)/md5.$(ARCH).o                    \
     55$(SRC)/memstr.$(ARCH).o                 \
     56$(SRC)/HostTableLoad.$(ARCH).o          \
     57$(SRC)/AssignSkyToHost.$(ARCH).o        \
     58$(SRC)/CopyBackupToHost.$(ARCH).o     \
     59$(SRC)/UseBackupForHost.$(ARCH).o     \
     60$(SRC)/CopyToHostLocation.$(ARCH).o     \
     61$(SRC)/CopyFromHostLocation.$(ARCH).o   \
     62$(SRC)/FixSkyForHost.$(ARCH).o   \
     63$(SRC)/PclientCommands.$(ARCH).o
    3164
    3265OLD = \
     
    5083$(SRC)/wcatalog.$(ARCH).o
    5184
    52 
    5385$(PHOTDBC): $(INC)/photdbc.h
    5486$(BIN)/photdbc.$(ARCH): $(PHOTDBC)
     87
     88$(PHOTDBC_CLIENT): $(INC)/photdbc.h
     89$(BIN)/photdbc_client.$(ARCH): $(PHOTDBC_CLIENT)
     90
     91$(DVODIST): $(INC)/dvodist.h
     92$(BIN)/dvodist.$(ARCH): $(DVODIST)
  • trunk/Ohana/src/photdbc/include/photdbc.h

    r31635 r33655  
    2121} StatType;
    2222
     23int    PARALLEL;
     24int    PARALLEL_MANUAL;
     25int    PARALLEL_SERIAL;
     26
     27int          HOST_ID;
     28char        *HOSTDIR;
     29
    2330// need to get RADIUS from Config
     31
     32# define MAX_PATH_LENGTH 1024
    2433
    2534/* global variables */
     
    2938double UNIQ_RADIUS;
    3039double DMCAL_MIN;;
    31 char   ImageCat[256];
    32 char   GSCFILE[256];
    33 char   CATDIR[256];
    34 char   CATMODE[16];    /* raw, mef, split, mysql */
    35 char   CATFORMAT[16];  /* internal, elixir, loneos, panstarrs */
    36 char   PhotCodeFile[256];
     40char   ImageCat[MAX_PATH_LENGTH];
     41char   GSCFILE[MAX_PATH_LENGTH];
     42char   CATDIR[MAX_PATH_LENGTH];
     43char  *CATMODE;    /* raw, mef, split, mysql */
     44char  *CATFORMAT;  /* internal, elixir, loneos, panstarrs */
     45char   PhotCodeFile[MAX_PATH_LENGTH];
    3746
    3847double RMIN;
     
    124133int copy_images (char *outdir);
    125134void usage();
     135
     136int photdbc_catalogs (char *outroot, SkyList *skylist, int hostID);
     137int photdbc_parallel (char *outroot, SkyList *skylist);
     138int args_client (int argc, char **argv);
     139void initialize_client (int argc, char **argv);
  • trunk/Ohana/src/photdbc/src/ConfigInit.c

    r30616 r33655  
    5252  ScanConfig (config, "NMEAS_MIN_FILTERED",     "%d",  0, &NMEAS_MIN_FILTERED);
    5353
    54   WarnConfig (config, "GSCFILE",                "%s",  0, GSCFILE);
     54  // do not apply this limit for now
     55  NCODE_MIN = 0;
     56
    5557  WarnConfig (config, "CATDIR",                 "%s",  0, CATDIR);
    56   ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    57   ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
     58  char *tmpcatdir = abspath (CATDIR, MAX_PATH_LENGTH);
     59  strcpy (CATDIR, tmpcatdir);
     60  free (tmpcatdir);
     61
    5862  ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    5963
     
    6771  }
    6872
    69   if (*CATMODE == 0) strcpy (CATMODE, "RAW");
    70   if (*CATFORMAT == 0) strcpy (CATFORMAT, "ELIXIR");
    71 
    7273  /* XXX this does not yet write out the master photcode table */
    7374  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    74   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    75     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     75  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {
     76    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    7677    exit (1);
    7778  }
  • trunk/Ohana/src/photdbc/src/args.c

    r30616 r33655  
    4040    remove_argument (N, &argc, argv);
    4141    MAX_MIN_MAG = atof(argv[N]);
     42    remove_argument (N, &argc, argv);
     43  }
     44
     45  // override input catalog format (PS1_V1, PS1_REF, etc)
     46  CATFORMAT = NULL;
     47  if ((N = get_argument (argc, argv, "-set-format"))) {
     48    remove_argument (N, &argc, argv);
     49    CATFORMAT = strcreate (argv[N]);
     50    remove_argument (N, &argc, argv);
     51  }
     52
     53  // override input catalog mode (raw, mef, split, mysql)
     54  CATMODE = NULL;
     55  if ((N = get_argument (argc, argv, "-set-mode"))) {
     56    remove_argument (N, &argc, argv);
     57    CATMODE = strcreate (argv[N]);
    4258    remove_argument (N, &argc, argv);
    4359  }
     
    8096    remove_argument (N, &argc, argv);
    8197    PHOTCODE_SKIP_LIST = strcreate(argv[N]);
     98    remove_argument (N, &argc, argv);
     99  }
     100
     101  // XXX for the moment, make this selection manual.  it needs to be automatic
     102  // based on the state of the SkyTable
     103  PARALLEL = FALSE;
     104  if ((N = get_argument (argc, argv, "-parallel"))) {
     105    PARALLEL = TRUE;
     106    remove_argument (N, &argc, argv);
     107  }
     108  // this is a test mode : rather than launching the remote jobs and waiting for completion,
     109  // relphot will simply list the remote command and wait for the user to signal completion
     110  PARALLEL_MANUAL = FALSE;
     111  if ((N = get_argument (argc, argv, "-parallel-manual"))) {
     112    PARALLEL = TRUE; // -parallel-manual implies -parallel
     113    PARALLEL_MANUAL = TRUE;
     114    remove_argument (N, &argc, argv);
     115  }
     116  // this is a test mode : rather than launching the relphot_client jobs remotely, they are
     117  // run in serial via 'system'
     118  PARALLEL_SERIAL = FALSE;
     119  if ((N = get_argument (argc, argv, "-parallel-serial"))) {
     120    if (PARALLEL_MANUAL) {
     121      fprintf (stderr, "ERROR: cannot mix -parallel-manual and -parallel-serial\n");
     122      exit (1);
     123    }
     124    PARALLEL = TRUE; // -parallel-serial implies -parallel
     125    PARALLEL_SERIAL = TRUE;
    82126    remove_argument (N, &argc, argv);
    83127  }
     
    99143}
    100144
     145int args_client (int argc, char **argv) {
     146
     147  int N;
     148
     149  PARALLEL = FALSE;
     150  PARALLEL_MANUAL = FALSE;
     151  PARALLEL_SERIAL = FALSE;
     152
     153  HOST_ID = 0;
     154  if ((N = get_argument (argc, argv, "-hostID"))) {
     155    remove_argument (N, &argc, argv);
     156    HOST_ID = atoi (argv[N]);
     157    remove_argument (N, &argc, argv);
     158  }
     159  if (!HOST_ID) usage();
     160
     161  HOSTDIR = NULL;
     162  if ((N = get_argument (argc, argv, "-hostdir"))) {
     163    remove_argument (N, &argc, argv);
     164    HOSTDIR = strcreate (argv[N]);
     165    remove_argument (N, &argc, argv);
     166  }
     167  if (!HOSTDIR) usage();
     168
     169  VERBOSE = FALSE;
     170  if ((N = get_argument (argc, argv, "-v"))) {
     171    VERBOSE = TRUE;
     172    remove_argument (N, &argc, argv);
     173  }
     174
     175  SHOW_PARAMS = FALSE;
     176  if ((N = get_argument (argc, argv, "-params"))) {
     177    remove_argument (N, &argc, argv);
     178    SHOW_PARAMS = TRUE;
     179  }
     180
     181  ExcludeByInstMag = FALSE;
     182  if ((N = get_argument (argc, argv, "-instmag"))) {
     183    ExcludeByInstMag = TRUE;
     184    remove_argument (N, &argc, argv);
     185    INST_MAG_MIN = atof(argv[N]);
     186    remove_argument (N, &argc, argv);
     187    INST_MAG_MAX = atof(argv[N]);
     188    remove_argument (N, &argc, argv);
     189  }
     190
     191  ExcludeByMinSigma = FALSE;
     192  if ((N = get_argument (argc, argv, "-min-sigma"))) {
     193    ExcludeByMinSigma = TRUE;
     194    remove_argument (N, &argc, argv);
     195    SIGMA_MIN_KEEP = atof(argv[N]);
     196    remove_argument (N, &argc, argv);
     197  }
     198
     199  ExcludeByMaxMinMag = FALSE;
     200  if ((N = get_argument (argc, argv, "-maxminmag"))) {
     201    ExcludeByMaxMinMag = TRUE;
     202    remove_argument (N, &argc, argv);
     203    MAX_MIN_MAG = atof(argv[N]);
     204    remove_argument (N, &argc, argv);
     205  }
     206
     207  // override input catalog format (PS1_V1, PS1_REF, etc)
     208  CATFORMAT = NULL;
     209  if ((N = get_argument (argc, argv, "-set-format"))) {
     210    remove_argument (N, &argc, argv);
     211    CATFORMAT = strcreate (argv[N]);
     212    remove_argument (N, &argc, argv);
     213  }
     214
     215  // override input catalog mode (raw, mef, split, mysql)
     216  CATMODE = NULL;
     217  if ((N = get_argument (argc, argv, "-set-mode"))) {
     218    remove_argument (N, &argc, argv);
     219    CATMODE = strcreate (argv[N]);
     220    remove_argument (N, &argc, argv);
     221  }
     222
     223  /* specify portion of the sky */
     224  REGION.Rmin = 0;
     225  REGION.Rmax = 360;
     226  REGION.Dmin = -90;
     227  REGION.Dmax = +90;
     228  if ((N = get_argument (argc, argv, "-region"))) {
     229    remove_argument (N, &argc, argv);
     230    REGION.Rmin = atof (argv[N]);
     231    remove_argument (N, &argc, argv);
     232    REGION.Rmax = atof (argv[N]);
     233    remove_argument (N, &argc, argv);
     234    REGION.Dmin = atof (argv[N]);
     235    remove_argument (N, &argc, argv);
     236    REGION.Dmax = atof (argv[N]);
     237    remove_argument (N, &argc, argv);
     238
     239    if (REGION.Rmin == REGION.Rmax) {
     240      fprintf (stderr, "ERROR: selected region is ill-defined: Rmin == Rmax\n");
     241      exit (2);
     242    }
     243    if (REGION.Dmin == REGION.Dmax) {
     244      fprintf (stderr, "ERROR: selected region is ill-defined: Dmin == Dmax\n");
     245      exit (2);
     246    }
     247  }
     248
     249  PHOTCODE_DROP_LIST = NULL;
     250  if ((N = get_argument (argc, argv, "-photcode-drop"))) {
     251    remove_argument (N, &argc, argv);
     252    PHOTCODE_DROP_LIST = strcreate(argv[N]);
     253    remove_argument (N, &argc, argv);
     254  }
     255
     256  PHOTCODE_SKIP_LIST = NULL;
     257  if ((N = get_argument (argc, argv, "-photcode-skip"))) {
     258    remove_argument (N, &argc, argv);
     259    PHOTCODE_SKIP_LIST = strcreate(argv[N]);
     260    remove_argument (N, &argc, argv);
     261  }
     262
     263  if (argc != 2) usage();
     264
     265  if ((REGION.Rmin == 0) && (REGION.Rmax == 360) && (REGION.Dmin == -90) && (REGION.Dmax == +90)) {
     266    int i;
     267    fprintf (stderr, "you have requested a copy of the entire sky in one pass\n");
     268    fprintf (stderr, "this could be a time consuming operation.  type Ctrl-C within 5 seconds to cancel\n");
     269    for (i = 5; i > 0; i--) {
     270      fprintf (stderr, "%d.. ", i);
     271      usleep (1000000);
     272    }
     273    fprintf (stderr, "\n");
     274  }
     275
     276  return (TRUE);
     277}
     278
    101279void usage() {
    102280
  • trunk/Ohana/src/photdbc/src/copy_images.c

    r29001 r33655  
    4141  if (out.dbstate != LCK_EMPTY) Shutdown ("ERROR: image table exists %s", ImageOut);
    4242
    43   out.mode   = dvo_catalog_catmode (CATMODE);
    44   out.format = dvo_catalog_catformat (CATFORMAT);
     43  out.mode   = CATMODE   ? dvo_catalog_catmode (CATMODE)     : in.mode;
     44  out.format = CATFORMAT ? dvo_catalog_catformat (CATFORMAT) : in.format;
    4545  dvo_image_create (&out, ZERO_POINT);
    4646   
  • trunk/Ohana/src/photdbc/src/initialize.c

    r30616 r33655  
    22
    33void initialize (int argc, char **argv) {
    4 
    5   int NPHOTCODES;
    6   char *codename, *ptr, *list;
    74
    85  /* are these set correctly? */
     
    1512  args (argc, argv);
    1613
    17   NphotcodesDrop = 0;
    18   photcodesDrop = NULL;
    19   if (PHOTCODE_DROP_LIST != NULL) {
    20     NPHOTCODES = 10;
    21     ALLOCATE (photcodesDrop, PhotCode *, NPHOTCODES);
    22 
    23     /* parse the comma-separated list of photcodesDrop */
    24     list = PHOTCODE_DROP_LIST;
    25     while ((codename = strtok_r (list, ",", &ptr)) != NULL) {
    26       list = NULL; // pass NULL on successive strtok_r calls
    27       fprintf (stderr, "PHOTCODE_LIST: %s\n", PHOTCODE_DROP_LIST);
    28       fprintf (stderr, "codename: %s\n", codename);
    29       if ((photcodesDrop[NphotcodesDrop] = GetPhotcodebyName (codename)) == NULL) {
    30         fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
    31         exit (1);
    32       }
    33       NphotcodesDrop ++;
    34       CHECK_REALLOCATE (photcodesDrop, PhotCode *, NPHOTCODES, NphotcodesDrop, 10);
    35     }
    36   }
    37 
    38   NphotcodesSkip = 0;
    39   photcodesSkip = NULL;
    40   if (PHOTCODE_SKIP_LIST != NULL) {
    41     NPHOTCODES = 10;
    42     ALLOCATE (photcodesSkip, PhotCode *, NPHOTCODES);
    43 
    44     /* parse the comma-separated list of photcodesSkip */
    45     list = PHOTCODE_SKIP_LIST;
    46     while ((codename = strtok_r (list, ",", &ptr)) != NULL) {
    47       list = NULL; // pass NULL on successive strtok_r calls
    48       fprintf (stderr, "PHOTCODE_LIST: %s\n", PHOTCODE_SKIP_LIST);
    49       fprintf (stderr, "codename: %s\n", codename);
    50       if ((photcodesSkip[NphotcodesSkip] = GetPhotcodebyName (codename)) == NULL) {
    51         fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
    52         exit (1);
    53       }
    54       NphotcodesSkip ++;
    55       CHECK_REALLOCATE (photcodesSkip, PhotCode *, NPHOTCODES, NphotcodesSkip, 10);
    56     }
    57   }
     14  photcodesDrop = ParsePhotcodeList (PHOTCODE_DROP_LIST, &NphotcodesDrop, FALSE);
     15  photcodesSkip = ParsePhotcodeList (PHOTCODE_SKIP_LIST, &NphotcodesSkip, FALSE);
    5816
    5917  if (SHOW_PARAMS) {
     
    8442}
    8543
     44void initialize_client (int argc, char **argv) {
     45
     46  /* are these set correctly? */
     47  if (get_argument (argc, argv, "-h")) usage();
     48  if (get_argument (argc, argv, "--h")) usage();
     49  if (get_argument (argc, argv, "-help")) usage();
     50  if (get_argument (argc, argv, "--help")) usage();
     51
     52  ConfigInit (&argc, argv);
     53  args_client (argc, argv);
     54
     55  photcodesDrop = ParsePhotcodeList (PHOTCODE_DROP_LIST, &NphotcodesDrop, FALSE);
     56  photcodesSkip = ParsePhotcodeList (PHOTCODE_SKIP_LIST, &NphotcodesSkip, FALSE);
     57
     58  if (SHOW_PARAMS) {
     59    fprintf (stderr, "current parameter settings:\n");
     60    fprintf (stderr, "VERBOSE:                %d\n", VERBOSE);
     61    fprintf (stderr, "JOIN_RADIUS:           %lf\n", JOIN_RADIUS);
     62    fprintf (stderr, "UNIQ_RADIUS:           %lf\n", UNIQ_RADIUS);
     63                                                     
     64    fprintf (stderr, "XMIN:                  %lf\n", XMIN);
     65    fprintf (stderr, "XMAX:                  %lf\n", XMAX);
     66    fprintf (stderr, "YMIN:                  %lf\n", YMIN);
     67    fprintf (stderr, "YMAX:                  %lf\n", YMAX);
     68    fprintf (stderr, "MMIN:                  %lf\n", MMIN);
     69    fprintf (stderr, "MMAX:                  %lf\n", MMAX);
     70    fprintf (stderr, "DMCAL_MIN:             %lf\n", DMCAL_MIN);
     71    fprintf (stderr, "DMSYS:                 %lf\n", DMSYS);
     72                                                     
     73    fprintf (stderr, "CHISQ_MAX:             %lf\n", CHISQ_MAX);
     74    fprintf (stderr, "NMEAS_MIN:             %d\n",  NMEAS_MIN);
     75
     76    fprintf (stderr, "IMAGE_CATALOG          %s\n",  ImageCat);
     77    fprintf (stderr, "GSCFILE                %s\n",  GSCFILE);
     78    fprintf (stderr, "CATDIR                 %s\n",  CATDIR);
     79    fprintf (stderr, "PHOTCODE_FILE          %s\n",  PhotCodeFile);
     80
     81    exit (0);
     82  }
     83}
  • trunk/Ohana/src/photdbc/src/photdbc.c

    r31635 r33655  
    33int main (int argc, char **argv) {
    44
    5   int i;
    6   char *skyfile;
    7   Catalog incatalog;
    8   Catalog outcatalog;
    95  SkyTable *sky;
    106  SkyList *skylist;
     
    1713
    1814  // the output catalog needs to inherit the SKY_DEPTH of the input catalog
    19   sky = SkyTableLoadOptimal (CATDIR, NULL, GSCFILE, TRUE, SKY_DEPTH_HST, VERBOSE);
     15  sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, TRUE, 0, VERBOSE);
    2016  SkyTableSetFilenames (sky, CATDIR, "cpt");
    2117  skylist = SkyListByPatch (sky, -1, &REGION);
    22   for (i = 0; i < skylist[0].Nregions; i++) {
    23     if (VERBOSE) fprintf (stderr, "%s\n", skylist[0].regions[i][0].name);
    2418
    25     // set the parameters which guide catalog open/load/create
    26     incatalog.filename = skylist[0].filename[i];
    27     incatalog.Nsecfilt = GetPhotcodeNsecfilt ();
    28     incatalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
     19  // hostID is 0 for master program
     20  photdbc_catalogs (argv[1], skylist, 0);
    2921
    30     // an error exit status here is a significant error
    31     if (!dvo_catalog_open (&incatalog, skylist[0].regions[i], VERBOSE, "r")) {
    32       fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", incatalog.filename);
    33       exit (2);
    34     }
    35     // skip empty input catalogs
    36     if (!incatalog.Naves_disk) {
    37       dvo_catalog_unlock (&incatalog);
    38       dvo_catalog_free (&incatalog);
    39       continue;
    40     }
    41 
    42     // create output catalog filename
    43     outcatalog.filename = strsubs (incatalog.filename, CATDIR, argv[1]);
    44     if (outcatalog.filename == NULL) Shutdown ("error with input catalog name");
    45 
    46     // define outcatalog open parameters
    47     outcatalog.catformat = dvo_catalog_catformat (CATFORMAT);  // set the default catformat from config data
    48     outcatalog.catmode   = dvo_catalog_catmode (CATMODE);      // set the default catmode from config data
    49     outcatalog.Nsecfilt  = incatalog.Nsecfilt;                 // inherit from the incatalog
    50     outcatalog.catflags  = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
    51 
    52     // output catalogs always represent the same skyregions as the input catalogs
    53     if (!dvo_catalog_open (&outcatalog, skylist[0].regions[i], VERBOSE, "w")) {
    54       fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", outcatalog.filename);
    55       exit (2);
    56     }
    57 
    58     // the output catalog needs to have the same values for 'objID' and 'sorted' as the input
    59     outcatalog.objID = incatalog.objID;
    60     outcatalog.sorted = incatalog.sorted;
    61     if (!incatalog.sorted) {
    62       fprintf (stderr, "ERROR: input db must be sorted: %s\n", incatalog.filename);
    63       exit (2);
    64     }
    65 
    66     /* limit number of measures based on selections */
    67     make_subcatalog (&outcatalog, &incatalog, skylist[0].regions[i]);
    68        
    69     // XXX add other filters here:
    70     // join_stars (&outcatalog);
    71     // unique_measures (catalog);
    72     // flag_measures (&db, catalog);
    73     // get_mags (catalog);
    74 
    75     dvo_catalog_save (&outcatalog, VERBOSE);
    76     dvo_catalog_unlock (&outcatalog);
    77     dvo_catalog_free (&outcatalog);
    78 
    79     dvo_catalog_unlock (&incatalog);
    80     dvo_catalog_free (&incatalog);
    81   }
    82 
    83   ALLOCATE (skyfile, char, strlen(argv[1]) + strlen("/SkyTable.fits") + 1);
    84   sprintf (skyfile, "%s/SkyTable.fits", argv[1]);
     22  char *skyfile = SkyTableFilename (argv[1]);
    8523  SkyTableSave (sky, skyfile);
    8624  exit (0);
Note: See TracChangeset for help on using the changeset viewer.