Changeset 16937
- Timestamp:
- Mar 11, 2008, 11:12:16 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/addstar/src/ReadStarsSDSS.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/ReadStarsSDSS.c
r16810 r16937 1 1 # include "addstar.h" 2 int SetSDSSFlags (Stars *star, unsigned int flags1, unsigned int flags2); 3 2 4 # define NFILTER 5 3 5 # define dCOS(A) ((double) cos ((double)RAD_DEG*A)) … … 150 152 stars[N].extNsigma = 0.0; 151 153 stars[N].detID = N; 152 stars[N].flags = flags[N] & 0x0000ffff; // XXX totally arbitrary bits153 154 stars[N].R = ra[i] + dCOS(dec[i]) * offsetRa[N] / 3600.0; 154 155 stars[N].D = dec[i] + offsetDec[N] / 3600.0; … … 165 166 stars[N].dt = 53.907456; // is this 2048*clockRate ? 166 167 168 SetSDSSFlags (&stars[N], flags[N], flags2[N]); 169 167 170 // longitude and latitude for SDSS: 168 171 // Latitude 32° 46' 49.30" N, Longitude 105° 49' 13.50" W … … 284 287 return TRUE; 285 288 } 289 290 int SetSDSSFlags (Stars *star, unsigned int flags1, unsigned int flags2) { 291 292 // XXX this is wrong, need to roll left to set the correct bit 293 if (flags1 & 0x00000002) star[0].flags |= 0x0001; // BRIGHT - 1 1 294 if (flags1 & 0x00000004) star[0].flags |= 0x0002; // EDGE - 1 2 295 if (flags1 & 0x00000008) star[0].flags |= 0x0004; // BLENDED - 1 3 296 if (flags1 & 0x00000010) star[0].flags |= 0x0008; // CHILD - 1 4 297 if (flags1 & 0x00000020) star[0].flags |= 0x0010; // PEAKCENTER - 1 5 298 if (flags1 & 0x00000040) star[0].flags |= 0x0020; // NODEBLEND - 1 6 299 if (flags1 & 0x00040000) star[0].flags |= 0x0040; // SATUR - 1 18 300 if (flags1 & 0x00080000) star[0].flags |= 0x0080; // NOTCHECKED - 1 19 301 if (flags1 & 0x10000000) star[0].flags |= 0x0100; // BINNED1 - 1 28 302 if (flags1 & 0x20000000) star[0].flags |= 0x0200; // BINNED2 - 1 29 303 if (flags1 & 0x40000000) star[0].flags |= 0x0400; // BINNED4 - 1 30 304 if (flags2 & 0x00000040) star[0].flags |= 0x0800; // LOCAL_EDGE - 2 7 305 if (flags2 & 0x00000800) star[0].flags |= 0x1000; // INTERP_CENTER - 2 12 306 if (flags2 & 0x00002000) star[0].flags |= 0x2000; // DEBLEND_NOPEAK - 2 14 307 if (flags2 & 0x02000000) star[0].flags |= 0x4000; // NOTCHECKED_CENTER - 2 26 308 return (TRUE); 309 310 }
Note:
See TracChangeset
for help on using the changeset viewer.
