IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5903


Ignore:
Timestamp:
Jan 5, 2006, 1:03:06 PM (21 years ago)
Author:
eugene
Message:

fixed time?

File:
1 edited

Legend:

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

    r5451 r5903  
    3636  if (photcode == TM_J) {
    3737      FilterSkip = 6;
    38       TimeSkip = 23;
     38      // TimeSkip = 23;
     39      TimeSkip = 28;
    3940      Qentry   = 0;
    4041  }
    4142  if (photcode == TM_H) {
    4243      FilterSkip = 10;
    43       TimeSkip = 19;
     44      // TimeSkip = 19;
     45      TimeSkip = 24;
    4446      Qentry   = 1;
    4547  }
    4648  if (photcode == TM_K) {
    4749      FilterSkip = 14;
    48       TimeSkip = 15;
     50      // looks like this should be 20, not 15...
     51      // TimeSkip = 15;
     52      TimeSkip = 20;
    4953      Qentry   = 2;
    5054  }
     
    163167}
    164168 
    165 e_time get2mass_time (char *ptr, char *buffer, int Nbound, int Nbyte) {
     169// this function retrieves the time from the DATE field
     170e_time get2mass_date (char *ptr, char *buffer, int Nbound, int Nbyte) {
    166171
    167172  e_time time;
     
    174179  *end = 0;
    175180  time = date_to_sec (ptr);
     181  *end = '|';
     182
     183  return (time);
     184}
     185
     186// this function retrieves the time from the JDATE field (%12.4f)
     187e_time get2mass_time (char *ptr, char *buffer, int Nbound, int Nbyte) {
     188
     189  e_time time;
     190  double jd;
     191  char *p, *end;
     192
     193  p = skipNbounds (ptr, '|', Nbound, Nbyte - (ptr - buffer));
     194  if (p == NULL) Shutdown ("format error in 2mass");
     195  end = memchr (p, '|', Nbyte - (p - buffer));
     196  if (end == NULL) Shutdown ("format error in 2mass");
     197  *end = 0;
     198  jd = strtod (p, NULL);
     199  time = jd_to_sec (jd);
    176200  *end = '|';
    177201
Note: See TracChangeset for help on using the changeset viewer.