Changeset 7394
- Timestamp:
- Jun 7, 2006, 7:21:31 AM (20 years ago)
- Location:
- trunk/Ohana/src/addstar
- Files:
-
- 5 edited
-
Makefile (modified) (6 diffs)
-
include/addstar.h (modified) (1 diff)
-
src/get2mass_dr2.c (modified) (1 diff)
-
src/mkacc-2mass.c (modified) (3 diffs)
-
src/sort_lists.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/Makefile
r6993 r7394 41 41 $(SRC)/get2mass_dr2.$(ARCH).o \ 42 42 $(SRC)/getgsc.$(ARCH).o \ 43 $(SRC)/gettycho.$(ARCH).o \44 43 $(SRC)/getusno.$(ARCH).o \ 45 44 $(SRC)/getusnob.$(ARCH).o \ 46 $(SRC)/g images.$(ARCH).o \45 $(SRC)/gettycho.$(ARCH).o \ 47 46 $(SRC)/greference.$(ARCH).o \ 48 47 $(SRC)/grefstars.$(ARCH).o \ 48 $(SRC)/gimages.$(ARCH).o \ 49 49 $(SRC)/gstars.$(ARCH).o \ 50 50 $(SRC)/image-db.$(ARCH).o \ … … 113 113 $(SRC)/getgsc.$(ARCH).o \ 114 114 $(SRC)/getusno.$(ARCH).o \ 115 $(SRC)/getusnob.$(ARCH).o \ 116 $(SRC)/gettycho.$(ARCH).o \ 115 117 $(SRC)/greference.$(ARCH).o \ 116 118 $(SRC)/gcatalog.$(ARCH).o \ … … 134 136 $(SRC)/NewImage.$(ARCH).o \ 135 137 $(SRC)/NewReflist.$(ARCH).o \ 138 $(SRC)/SkyTableFromTychoIndex.$(ARCH).o \ 136 139 $(SRC)/NewRefcat.$(ARCH).o 137 140 … … 158 161 $(SRC)/getgsc.$(ARCH).o \ 159 162 $(SRC)/getusno.$(ARCH).o \ 163 $(SRC)/getusnob.$(ARCH).o \ 164 $(SRC)/gettycho.$(ARCH).o \ 160 165 $(SRC)/greference.$(ARCH).o \ 161 166 $(SRC)/gcatalog.$(ARCH).o \ … … 177 182 $(SRC)/check_permissions.$(ARCH).o \ 178 183 $(SRC)/opening_angle.$(ARCH).o \ 184 $(SRC)/SkyTableFromTychoIndex.$(ARCH).o \ 179 185 $(SRC)/ListenClients_Thread.$(ARCH).o \ 180 186 $(SRC)/NewImage_Thread.$(ARCH).o \ … … 220 226 $(BIN)/mkacc-2mass.$(ARCH) : $(MKACC-2MASS) 221 227 mkacc-2mass.install : $(DESTBIN)/mkacc-2mass 228 229 all: addstar addstarc addstard addstart 222 230 223 231 INSTALL = addstar -
trunk/Ohana/src/addstar/include/addstar.h
r6993 r7394 179 179 Missing *sort_missing (Average *average, int Naverage, Missing *missing, int Nmissing, int *next_miss); 180 180 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 196 181 /** 197 182 there is an inconsistency to be resolved: fixed structures (like Image) -
trunk/Ohana/src/addstar/src/get2mass_dr2.c
r6424 r7394 96 96 } 97 97 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) 102 101 */ 103 102 /* don't bother to seek ahead : position is not sufficiently predictable -
trunk/Ohana/src/addstar/src/mkacc-2mass.c
r4299 r7394 6 6 int i, N, Nrefcat; 7 7 Stars *refcat; 8 GSCRegion *regions, accregion;8 SkyRegion *regions, accregion; 9 9 10 10 ConfigInit (&argc, argv); … … 33 33 34 34 good_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; 39 39 40 ALLOCATE (regions, GSCRegion, 1);40 ALLOCATE (regions, SkyRegion, 1); 41 41 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; 46 46 47 47 refcat = get2mass_AS_data (regions, &UserPatch, &Nrefcat); … … 50 50 51 51 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; 56 56 57 57 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); 62 62 } 63 63 64 64 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); 66 66 67 67 exit (0); -
trunk/Ohana/src/addstar/src/sort_lists.c
r3376 r7394 35 35 } 36 36 37 void sort_regions ( GSCRegion *region, int N) {37 void sort_regions (SkyRegion *region, int N) { 38 38 39 39 int l,j,ir,i; 40 GSCRegion tmp;40 SkyRegion tmp; 41 41 42 42 l = N >> 1; … … 57 57 j = (l << 1) + 1; 58 58 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) { 61 61 region[i] = region[j]; 62 62 j += (i=j) + 1;
Note:
See TracChangeset
for help on using the changeset viewer.
