Changeset 37522
- Timestamp:
- Oct 22, 2014, 10:24:23 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/addstar/src
- Files:
-
- 2 edited
-
loadstarpar_io.c (modified) (4 diffs)
-
loadstarpar_readstars.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadstarpar_io.c
r37417 r37522 28 28 gfits_define_bintable_column (&theader, "D", "RA", "", "degree", 1.0, 0.0); 29 29 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); 31 31 gfits_define_bintable_column (&theader, "D", "GLAT", "", "degree", 1.0, 0.0); 32 32 gfits_define_bintable_column (&theader, "E", "Ebv", "", "", 1.0, 0.0); … … 43 43 44 44 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 ; 49 49 float *Ebv = NULL; ALLOCATE (Ebv , float , Nstars); for (i = 0; i < Nstars; i++) Ebv [i] = stars[i].starpar.Ebv ; 50 50 float *dEbv = NULL; ALLOCATE (dEbv , float , Nstars); for (i = 0; i < Nstars; i++) dEbv [i] = stars[i].starpar.dEbv ; … … 136 136 GET_COLUMN(ra , "RA" , double); 137 137 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); 140 140 GET_COLUMN(Ebv , "Ebv" , float); 141 141 GET_COLUMN(dEbv , "dEbv" , float); … … 159 159 for (i = 0; i < Nrow; i++) { 160 160 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]; 162 164 stars[i].starpar.galLon = glon [i]; 163 165 stars[i].starpar.galLat = glat [i]; -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadstarpar_readstars.c
r37429 r37522 121 121 stars[Nstars].found = FALSE; 122 122 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; 123 129 stars[Nstars].starpar.galLon = glon[i]; 124 130 stars[Nstars].starpar.galLat = glat[i];
Note:
See TracChangeset
for help on using the changeset viewer.
