IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16939


Ignore:
Timestamp:
Mar 11, 2008, 11:12:54 AM (18 years ago)
Author:
eugene
Message:

add USNO_N

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/getusnob.c

    r16810 r16939  
    1616  int spd, spd_start, spd_end;
    1717  int NUSNO, Nusno, Nstars;
    18   short int USNO_RED, USNO_BLUE;
     18  short int USNO_RED, USNO_BLUE, USNO_N;
    1919  e_time USNOepoch;
    2020  Stars *stars;
    2121
    2222  /* require photcode */
    23   NAMED_PHOTCODE (USNO_RED, "USNO_RED");
     23  NAMED_PHOTCODE (USNO_RED,  "USNO_RED");
    2424  NAMED_PHOTCODE (USNO_BLUE, "USNO_BLUE");
    25   if (photcode == USNO_RED) goto good_code;
     25  NAMED_PHOTCODE (USNO_N,    "USNO_N");
     26  if (photcode == USNO_RED)  goto good_code;
    2627  if (photcode == USNO_BLUE) goto good_code;
     28  if (photcode == USNO_N)    goto good_code;
    2729  Shutdown ("USNO photcode not specified");
    2830good_code:
     
    148150      stars[Nusno].t     = USNOepoch;
    149151
    150       /* one pass of addstar does either r or b */
     152      /* one pass of addstar does r, b, or n */
    151153      if (photcode == USNO_BLUE) {
    152         m1 = fabs(0.01 * (buf[5] % 10000)); /* 1st blue mag */
    153         m2 = fabs(0.01 * (buf[7] % 10000)); /* 1st blue mag */
    154         stars[Nusno].code  = USNO_BLUE;
    155       } else {
    156         m1 = fabs(0.01 * (buf[6] % 10000)); /* 1st red mag */
    157         m2 = fabs(0.01 * (buf[8] % 10000)); /* 2nd red mag */
    158         stars[Nusno].code  = USNO_RED;
    159       }
     154          m1 = fabs(0.01 * (buf[5] % 10000)); /* 1st blue mag */
     155          m2 = fabs(0.01 * (buf[7] % 10000)); /* 1st blue mag */
     156      }
     157      if (photcode == USNO_RED) {
     158          m1 = fabs(0.01 * (buf[6] % 10000)); /* 1st red mag */
     159          m2 = fabs(0.01 * (buf[8] % 10000)); /* 2nd red mag */
     160      }
     161      if (photcode == USNO_N) {
     162          m1 = fabs(0.01 * (buf[9] % 10000)); /* N (IR) survey */
     163          m2 = 0;
     164      }
     165      stars[Nusno].code = photcode;
    160166
    161167      /* if two mags are available, get an average */
Note: See TracChangeset for help on using the changeset viewer.