IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7394


Ignore:
Timestamp:
Jun 7, 2006, 7:21:31 AM (20 years ago)
Author:
eugene
Message:

converting to SkyRegions

Location:
trunk/Ohana/src/addstar
Files:
5 edited

Legend:

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

    r6993 r7394  
    4141$(SRC)/get2mass_dr2.$(ARCH).o \
    4242$(SRC)/getgsc.$(ARCH).o \
    43 $(SRC)/gettycho.$(ARCH).o \
    4443$(SRC)/getusno.$(ARCH).o \
    4544$(SRC)/getusnob.$(ARCH).o \
    46 $(SRC)/gimages.$(ARCH).o \
     45$(SRC)/gettycho.$(ARCH).o \
    4746$(SRC)/greference.$(ARCH).o \
    4847$(SRC)/grefstars.$(ARCH).o \
     48$(SRC)/gimages.$(ARCH).o \
    4949$(SRC)/gstars.$(ARCH).o \
    5050$(SRC)/image-db.$(ARCH).o \
     
    113113$(SRC)/getgsc.$(ARCH).o \
    114114$(SRC)/getusno.$(ARCH).o \
     115$(SRC)/getusnob.$(ARCH).o \
     116$(SRC)/gettycho.$(ARCH).o \
    115117$(SRC)/greference.$(ARCH).o \
    116118$(SRC)/gcatalog.$(ARCH).o \
     
    134136$(SRC)/NewImage.$(ARCH).o \
    135137$(SRC)/NewReflist.$(ARCH).o \
     138$(SRC)/SkyTableFromTychoIndex.$(ARCH).o \
    136139$(SRC)/NewRefcat.$(ARCH).o
    137140
     
    158161$(SRC)/getgsc.$(ARCH).o \
    159162$(SRC)/getusno.$(ARCH).o \
     163$(SRC)/getusnob.$(ARCH).o \
     164$(SRC)/gettycho.$(ARCH).o \
    160165$(SRC)/greference.$(ARCH).o \
    161166$(SRC)/gcatalog.$(ARCH).o \
     
    177182$(SRC)/check_permissions.$(ARCH).o \
    178183$(SRC)/opening_angle.$(ARCH).o \
     184$(SRC)/SkyTableFromTychoIndex.$(ARCH).o \
    179185$(SRC)/ListenClients_Thread.$(ARCH).o \
    180186$(SRC)/NewImage_Thread.$(ARCH).o \
     
    220226$(BIN)/mkacc-2mass.$(ARCH) : $(MKACC-2MASS)
    221227mkacc-2mass.install        : $(DESTBIN)/mkacc-2mass
     228
     229all: addstar addstarc addstard addstart
    222230
    223231INSTALL = addstar
  • trunk/Ohana/src/addstar/include/addstar.h

    r6993 r7394  
    179179Missing *sort_missing (Average *average, int Naverage, Missing *missing, int Nmissing, int *next_miss);
    180180
    181 /* functions which use GSCRegion, now deprecated */
    182 void       sort_regions           PROTO((GSCRegion *region, int N));
    183 GSCRegion *LoadRegions            PROTO((int *nregions));
    184 int        FindDecBand            PROTO((double dec, double *DEC0, double *DEC1));
    185 int        FindRegionByPoint      PROTO((GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc));
    186 int        FindRegionDecBandStart PROTO((GSCRegion *region, int Nregion, double dec));
    187 int        FindRegionDecBandStop  PROTO((GSCRegion *region, int Nregion, double dec));
    188 void       aregion                PROTO((GSCRegion *region, FILE *f, double ra, double dec));
    189 GSCRegion *gregion_image          PROTO((Image *image, Coords *mosaic, int *Nregions));
    190 GSCRegion *gregion_match          PROTO((GSCRegion *regions, int *nregions));
    191 GSCRegion *gregion_patch          PROTO((GSCRegion *patch, int *nregions));
    192 void       gregion_star           PROTO((Stars *star, GSCRegion *region));
    193 GSCRegion *gregion_stars          PROTO((Stars *stars, int Nstars, int *Nregion));
    194 GSCRegion *gregions               PROTO((Image *image, int *Nregions));
    195 
    196181/**
    197182    there is an inconsistency to be resolved: fixed structures (like Image)
  • trunk/Ohana/src/addstar/src/get2mass_dr2.c

    r6424 r7394  
    9696}
    9797
    98 /* this just scans along in the file.  file is sorted by dec, so we
    99    should be skipping large chunks - but we would need to have
    100    the size from the accel file (won't fit in GSCRegion) and need
    101    to use gzseek, if it exists.
     98/* this just scans along in the file.  file is sorted by dec, so we should be
     99   skipping large chunks - but we would need to have the size from the accel
     100   file in (and need to use gzseek, if the data is compressed)
    102101*/
    103102/* don't bother to seek ahead : position is not sufficiently predictable
  • trunk/Ohana/src/addstar/src/mkacc-2mass.c

    r4299 r7394  
    66  int i, N, Nrefcat;
    77  Stars *refcat;
    8   GSCRegion *regions, accregion;
     8  SkyRegion *regions, accregion;
    99
    1010  ConfigInit (&argc, argv);
     
    3333
    3434good_code:
    35   UserPatch.RA[0] = 0;
    36   UserPatch.RA[1] = 360;
    37   UserPatch.DEC[0] = -90;
    38   UserPatch.DEC[1] = +90;
     35  UserPatch.RAmin = 0;
     36  UserPatch.RAmax = 360;
     37  UserPatch.DECmin = -90;
     38  UserPatch.DECmax = +90;
    3939
    40   ALLOCATE (regions, GSCRegion, 1);
     40  ALLOCATE (regions, SkyRegion, 1);
    4141  strcpy (regions[0].filename, argv[1]);
    42   regions[0].RA[0] = 0;
    43   regions[0].RA[1] = 360;
    44   regions[0].DEC[0] = -90;
    45   regions[0].DEC[1] = +90;
     42  regions[0].RAmin = 0;
     43  regions[0].RAmax = 360;
     44  regions[0].DECmin = -90;
     45  regions[0].DECmax = +90;
    4646
    4747  refcat = get2mass_AS_data (regions, &UserPatch, &Nrefcat);
     
    5050
    5151  strcpy (accregion.filename, regions[0].filename);
    52   accregion.RA[0]  = 360;
    53   accregion.RA[1]  =   0;
    54   accregion.DEC[0] = +90;
    55   accregion.DEC[1] = -90;
     52  accregion.RAmin  = 360;
     53  accregion.RAmax  =   0;
     54  accregion.DECmin = +90;
     55  accregion.DECmax = -90;
    5656
    5757  for (i = 0; i < Nrefcat; i++) {
    58     accregion.RA[0]  = MIN (refcat[i].R, accregion.RA[0]);
    59     accregion.RA[1]  = MAX (refcat[i].R, accregion.RA[1]);
    60     accregion.DEC[0] = MIN (refcat[i].D, accregion.DEC[0]);
    61     accregion.DEC[1] = MAX (refcat[i].D, accregion.DEC[1]);
     58    accregion.RAmin  = MIN (refcat[i].R, accregion.RAmin);
     59    accregion.RAmax  = MAX (refcat[i].R, accregion.RAmax);
     60    accregion.DECmin = MIN (refcat[i].D, accregion.DECmin);
     61    accregion.DECmax = MAX (refcat[i].D, accregion.DECmax);
    6262  }
    6363
    6464  fprintf (stderr, "%s %10.6f %10.6f  %10.6f %10.6f  %d\n",
    65            accregion.filename, accregion.RA[0]/15.0, accregion.RA[1]/15.0, accregion.DEC[0], accregion.DEC[1], Nrefcat);
     65           accregion.filename, accregion.RAmin/15.0, accregion.RAmax/15.0, accregion.DECmin, accregion.DECmax, Nrefcat);
    6666
    6767  exit (0);
  • trunk/Ohana/src/addstar/src/sort_lists.c

    r3376 r7394  
    3535}
    3636
    37 void sort_regions (GSCRegion *region, int N) {
     37void sort_regions (SkyRegion *region, int N) {
    3838
    3939  int l,j,ir,i;
    40   GSCRegion tmp;
     40  SkyRegion tmp;
    4141 
    4242  l = N >> 1;
     
    5757    j = (l << 1) + 1;
    5858    while (j <= ir) {
    59       if (j < ir && region[j].DEC[0] < region[j+1].DEC[0]) j++;
    60       if (tmp.DEC[0] < region[j].DEC[0]) {
     59      if (j < ir && region[j].DECmin < region[j+1].DECmin) j++;
     60      if (tmp.DECmin < region[j].DECmin) {
    6161        region[i] = region[j];
    6262        j += (i=j) + 1;
Note: See TracChangeset for help on using the changeset viewer.