IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37522


Ignore:
Timestamp:
Oct 22, 2014, 10:24:23 AM (12 years ago)
Author:
eugene
Message:

add R,D to starpar

Location:
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadstarpar_io.c

    r37417 r37522  
    2828  gfits_define_bintable_column (&theader, "D", "RA",       "", "degree", 1.0, 0.0);
    2929  gfits_define_bintable_column (&theader, "D", "DEC",      "", "degree", 1.0, 0.0);
    30   gfits_define_bintable_column (&theader, "D", "GLON",     "", "degree", 1.0, 0.0);
     30  gfits_define_bintable_column (&theader, "E", "GLON",     "", "degree", 1.0, 0.0);
    3131  gfits_define_bintable_column (&theader, "D", "GLAT",     "", "degree", 1.0, 0.0);
    3232  gfits_define_bintable_column (&theader, "E", "Ebv",      "", "", 1.0, 0.0);
     
    4343
    4444  int i;
    45   double       *ra       = NULL; ALLOCATE (ra      , double      , Nstars); for (i = 0; i < Nstars; i++) ra      [i] = stars[i].R              ;
    46   double       *dec      = NULL; ALLOCATE (dec     , double      , Nstars); for (i = 0; i < Nstars; i++) dec     [i] = stars[i].D              ;
    47   double       *glon     = NULL; ALLOCATE (glon    , double      , Nstars); for (i = 0; i < Nstars; i++) glon    [i] = stars[i].starpar.galLon  ;
    48   double       *glat     = NULL; ALLOCATE (glat    , double      , Nstars); for (i = 0; i < Nstars; i++) glat    [i] = stars[i].starpar.galLat  ;
     45  double       *ra       = NULL; ALLOCATE (ra      , double      , Nstars); for (i = 0; i < Nstars; i++) ra      [i] = stars[i].starpar.R ;
     46  double       *dec      = NULL; ALLOCATE (dec     , double      , Nstars); for (i = 0; i < Nstars; i++) dec     [i] = stars[i].starpar.D ;
     47  float        *glon     = NULL; ALLOCATE (glon    , float       , Nstars); for (i = 0; i < Nstars; i++) glon    [i] = stars[i].starpar.galLon  ;
     48  float        *glat     = NULL; ALLOCATE (glat    , float       , Nstars); for (i = 0; i < Nstars; i++) glat    [i] = stars[i].starpar.galLat  ;
    4949  float        *Ebv      = NULL; ALLOCATE (Ebv     , float       , Nstars); for (i = 0; i < Nstars; i++) Ebv     [i] = stars[i].starpar.Ebv     ;
    5050  float        *dEbv     = NULL; ALLOCATE (dEbv    , float       , Nstars); for (i = 0; i < Nstars; i++) dEbv    [i] = stars[i].starpar.dEbv    ;
     
    136136  GET_COLUMN(ra      , "RA"        ,   double);
    137137  GET_COLUMN(dec     , "DEC"       ,   double);
    138   GET_COLUMN(glon    , "GLON"      ,   double);
    139   GET_COLUMN(glat    , "GLAT"      ,   double);
     138  GET_COLUMN(glon    , "GLON"      ,   float);
     139  GET_COLUMN(glat    , "GLAT"      ,   float);
    140140  GET_COLUMN(Ebv     , "Ebv"       ,   float);
    141141  GET_COLUMN(dEbv    , "dEbv"      ,   float);
     
    159159  for (i = 0; i < Nrow; i++) {
    160160    stars[i].R                = ra      [i];
    161     stars[i].D                = dec     [i];
     161    stars[i].D                = dec     [i];
     162    stars[i].starpar.R        = ra      [i];
     163    stars[i].starpar.D        = dec     [i];
    162164    stars[i].starpar.galLon   = glon    [i];
    163165    stars[i].starpar.galLat   = glat    [i];
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadstarpar_readstars.c

    r37429 r37522  
    121121    stars[Nstars].found = FALSE;
    122122
     123    // NOTE that we have both stars.R,D and stars.starpar.R,D.  stars.R,D are used
     124    // here (in parallel with addstar) to locate the objects.  BUT, in the database,
     125    // starpar.R,D is the authoratative position for the object (either that coming
     126    // from Greg / Eddie's table or that coming from the simulation)
     127    stars[Nstars].starpar.R      = R;
     128    stars[Nstars].starpar.D      = D;
    123129    stars[Nstars].starpar.galLon = glon[i];
    124130    stars[Nstars].starpar.galLat = glat[i];
Note: See TracChangeset for help on using the changeset viewer.