IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38539


Ignore:
Timestamp:
Jun 24, 2015, 5:32:30 PM (11 years ago)
Author:
eugene
Message:

fix the load-from-list bit

Location:
branches/eam_branches/ipp-20150616/Ohana/src/addstar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/Makefile

    r38525 r38539  
    3737mkcmf        : $(BIN)/mkcmf.$(ARCH)
    3838
    39 all: addstar addstar_client sedstar load2mass loadgalphot loadstarpar loadstarpar_client loadICRF loadICRF_client skycells mkcmf loadwise loadtycho loadsupercos dumpskycells findskycell
    40 
    41 INSTALL = addstar addstar_client sedstar load2mass loadgalphot loadstarpar loadstarpar_client loadICRF loadICRF_client skycells mkcmf loadwise loadtycho loadsupercos dumpskycells findskycell
     39all: addstar addstar_client sedstar load2mass loadstarpar loadstarpar_client loadICRF loadICRF_client skycells mkcmf loadwise loadtycho loadsupercos dumpskycells findskycell
     40
     41INSTALL = addstar addstar_client sedstar load2mass loadstarpar loadstarpar_client loadICRF loadICRF_client skycells mkcmf loadwise loadtycho loadsupercos dumpskycells findskycell
    4242
    4343# I need to fix the client/server version of addstar now that I have dropped Stars
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadFilenames.c

    r38522 r38539  
    33AddstarFile *LoadFilenames (int *nfile, char *filename, AddstarClientOptions *options) {
    44
    5   int i, Nfile, NFILE;
     5  int i, n, Nfile, NFILE;
    66  glob_t globList;
    77  AddstarFile *file;
     
    1616    }
    1717
     18    Nfile = 0;
    1819    NFILE = 10;
    1920    ALLOCATE (file, AddstarFile, NFILE);
    2021    for (i = 0; (scan_line (f, line) != EOF); i++) {
    2122      // find first non-whitespace char & skip commented lines
    22       for (i = 0; OHANA_WHITESPACE (line[i]); i++);
    23       if (line[i] == '#') continue;
    24       if (line[i] == 0) continue;
     23      for (n = 0; OHANA_WHITESPACE (line[n]); n++);
     24      if (line[n] == '#') continue;
     25      if (line[n] == 0) continue;
    2526
    2627      // file lines may have:
     
    3940          exit (3);
    4041        }
    41         file[i].filename  = strcreate (word1);
    42         file[i].imagename = filebasename (word2);
     42        file[Nfile].filename  = strcreate (word1);
     43        file[Nfile].imagename = filebasename (word2);
    4344      } else {
    44         file[i].filename  = strcreate (word1);
    45         file[i].imagename = filebasename (word1);
     45        file[Nfile].filename  = strcreate (word1);
     46        file[Nfile].imagename = filebasename (word1);
    4647      }
    47       CHECK_REALLOCATE (file, AddstarFile, NFILE, i, 10);
     48      ohana_memcheck (TRUE);
     49      fprintf (stderr, "file: %s = %s\n", file[Nfile].filename, file[Nfile].imagename);
     50      Nfile ++;
     51      CHECK_REALLOCATE (file, AddstarFile, NFILE, Nfile, 10);
    4852    }
    4953    fclose (f);
    50     Nfile = i;
    5154  } else {
    5255    // parse the filename as a glob
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/loadgalphot_readstars.c

    r38518 r38539  
    280280  // validate the square dimensions??
    281281
    282   int Nx = nearbyint((MajorMax - MajorMin) / MajorDel) + 1;
    283   int Ny = nearbyint((MinorMax - MinorMin) / MinorDel) + 1;
     282  // int Nx = nearbyint((MajorMax - MajorMin) / MajorDel) + 1;
     283  // int Ny = nearbyint((MinorMax - MinorMin) / MinorDel) + 1;
     284
     285  int Nx = lrint((MajorMax - MajorMin) / MajorDel) + 1;
     286  int Ny = lrint((MinorMax - MinorMin) / MinorDel) + 1;
     287
    284288  myAssert (Nx*Ny == Npts, "inconsistent grid");
    285289 
Note: See TracChangeset for help on using the changeset viewer.