Changeset 6426
- Timestamp:
- Feb 14, 2006, 6:28:31 AM (20 years ago)
- Location:
- trunk/Ohana/src/gastro2
- Files:
-
- 4 edited
-
Makefile (modified) (1 diff)
-
include/gastro2.h (modified) (1 diff)
-
src/getusnob.c (modified) (4 diffs)
-
src/greference2.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/gastro2/Makefile
r5242 r6426 45 45 $(SRC)/greference2.$(ARCH).o \ 46 46 $(SRC)/getusno.$(ARCH).o \ 47 $(SRC)/getusnob.$(ARCH).o \ 47 48 $(SRC)/gcatalog.$(ARCH).o \ 48 49 $(SRC)/remove_clumps.$(ARCH).o \ -
trunk/Ohana/src/gastro2/include/gastro2.h
r6242 r6426 174 174 int getptolemy (CatStats *catstats, RefCatalog *Ref); 175 175 int getusno (CatStats *catstats, RefCatalog *Ref); 176 int getusnob (CatStats *catstats, RefCatalog *Ref, double epoch); 176 177 int get2mass (CatStats *catstats, RefCatalog *Ref); 177 178 int getgsc (CatStats *catstats, RefCatalog *Ref); -
trunk/Ohana/src/gastro2/src/getusnob.c
r6242 r6426 2 2 # define NZONE 180 3 3 4 int getusno (CatStats *catstats, RefCatalog *Ref, double epoch) {4 int getusnob (CatStats *catstats, RefCatalog *Ref, double epoch) { 5 5 6 6 long int offset; 7 7 int i, bin, first, last, nitems, Nitems, Nbins; 8 8 float hours[100]; 9 int start[100], number[100], *buffer, * ibuf;10 char filename[128], c , *cbuf;9 int start[100], number[100], *buffer, *buf; 10 char filename[128], c; 11 11 FILE *f; 12 12 double DEC1; 13 double uR, uD; 14 float mB1, mB2, mR1, mR2, mB, mR; 13 15 int iDEC0, iDEC1, iRA0, iRA1; 14 16 int spd, spd_start, spd_end, disk; 15 int NUSNO, Nusno ;17 int NUSNO, Nusno, Nstars; 16 18 StarData *stars; 17 19 … … 97 99 } 98 100 99 ibuf = buffer;101 buf = buffer; 100 102 /* print out data from slice within RA and DEC range */ 101 for (i = 0; i < Nstars; i++, buf+= 80) {103 for (i = 0; i < Nstars; i++, buf+=20) { 102 104 if (buf[0] < iRA0) continue; 103 105 if (buf[0] > iRA1) continue; … … 105 107 if (buf[1] > iDEC1) continue; 106 108 109 bzero (&stars[Nusno], sizeof(StarData)); 107 110 stars[Nusno].R = buf[0]/360000.0; 108 111 stars[Nusno].D = buf[1]/360000.0 - 90.0; 109 112 110 uR = (buf[2] % 10000) / 3600.0 * 0.002; 111 uD = ((buf[2] / 10000) % 10000) / 3600.0 * 0.002; 113 uR = (buf[2] % 10000); 114 uR = (uR - 5000.0) * 0.002 / 3600.0; 115 uD = ((buf[2] / 10000) % 10000); 116 uD = (uD - 5000.0) * 0.002 / 3600.0; 112 117 113 118 /* 1st blue mag */ … … 135 140 stars[Nusno].R += uR*(epoch - 2000.0); 136 141 stars[Nusno].D += uD*(epoch - 2000.0); 137 138 142 Nusno ++; 139 if (Nusno == NUSNO) { 140 NUSNO += 5000; 141 REALLOCATE (stars, StarData, NUSNO); 142 } 143 free (buffer); 143 CHECK_REALLOCATE (stars, StarData, NUSNO, Nusno, 5000); 144 144 } 145 free (buffer); 145 146 fclose (f); 146 147 } -
trunk/Ohana/src/gastro2/src/greference2.c
r6242 r6426 18 18 /* get stars from the USNO B catalog for the given region */ 19 19 if (!strcmp (REFCAT, "USNOB")) { 20 getusnob (&catstats, Ref, EPOCH);20 getusnob (&catstats, Ref, 2000.0); 21 21 /* calculate Ref[0].Moff from Target & Ref dMdN, Mo */ 22 22 }
Note:
See TracChangeset
for help on using the changeset viewer.
