Changeset 37467
- Timestamp:
- Oct 8, 2014, 1:24:42 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src
- Files:
-
- 5 edited
-
fakeastro_galaxy.c (modified) (1 diff)
-
get_image_patch.c (modified) (1 diff)
-
make_fake_images.c (modified) (1 diff)
-
make_fake_stars_catalog.c (modified) (8 diffs)
-
make_fakestars.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/fakeastro_galaxy.c
r37463 r37467 30 30 31 31 int Nloop = 1; 32 int Nstars = 2000000;32 int Nstars = 5000000; 33 33 34 34 for (n = 0; n < Nloop; n++) { -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/get_image_patch.c
r37464 r37467 36 36 } 37 37 38 // region has region of Rmin <= R < Rmax, Dmin <= D < Dmax 38 39 int SkyRegionHasPoint (SkyRegion *region, double R, double D) { 39 40 40 if (D >=region->Dmin) return FALSE;41 if (D <region->Dmax) return FALSE;42 if (R >=region->Rmin) return FALSE;43 if (R <region->Rmax) return FALSE;41 if (D < region->Dmin) return FALSE; 42 if (D >= region->Dmax) return FALSE; 43 if (R < region->Rmin) return FALSE; 44 if (R >= region->Rmax) return FALSE; 44 45 return TRUE; 45 46 } -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_images.c
r37463 r37467 48 48 49 49 fakeImage[N].coords.pc1_2 = 0.0; 50 fakeImage[N].coords.pc 1_2= 0.0;50 fakeImage[N].coords.pc2_1 = 0.0; 51 51 52 52 strcpy (fakeImage[N].coords.ctype, "DEC--WRP"); -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_stars_catalog.c
r37464 r37467 11 11 12 12 /* used in find_matches, find_matches_refstars */ 13 # define IN_PATCH(REGION,R,D) ( \14 ((D) >= REGION[0].Dmin) && ((D) < REGION[0].Dmax) &&\15 ((R) >= REGION[0].Rmin) && ((R) < REGION[0].Rmax))13 # define IN_PATCH(REGION,R,D) ( \ 14 ((D) >= REGION[0].Dmin) && ((D) < REGION[0].Dmax) && \ 15 ((R) >= REGION[0].Rmin) && ((R) < REGION[0].Rmax)) 16 16 17 17 // region corresponds to the catalog … … 19 19 20 20 int Nstars = *nstars; 21 21 22 22 time_t timeRef = ohana_date_to_sec("2011/05/11,00:00:00"); 23 23 24 24 if (!stars) { 25 25 ALLOCATE (stars, Stars, catalog->Naverage); … … 27 27 REALLOCATE (stars, Stars, Nstars + catalog->Naverage); 28 28 } 29 29 30 30 int Nsecfilt = GetPhotcodeNsecfilt (); 31 31 32 32 // use photcode to get zero point 33 33 PhotCode *code = GetPhotcodebyCode (image->photcode); 34 34 int Nsec = GetPhotcodeNsec (code->equiv); 35 35 myAssert (Nsec >= 0, "undefined Nsec?"); 36 36 37 37 float Mtime = 2.5*log10(image->exptime); 38 38 39 39 // XXX fix this!! 40 40 double plateScale = 0.257; … … 43 43 float ZP = SCALE*code->C - image->Mcal + Mtime; 44 44 // float ZP = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal; 45 45 46 46 // generate a set of measurements for each star entry 47 47 … … 49 49 SecFilt *secfilt = catalog->secfilt; 50 50 StarPar *starpar = catalog->starpar; 51 51 52 52 int i; 53 53 for (i = 0; i < catalog->Naverage; i++) { … … 74 74 // * proper motion 75 75 // * gaussian scatter (~ seeing) 76 double uR = starpar[nStar].uRA / 1000.0; // starpar are (currently) in mas/ year77 double uD = starpar[nStar].uDEC / 1000.0;76 double uR = starpar[nStar].uRA; // starpar are in arcsec / year 77 double uD = starpar[nStar].uDEC; 78 78 79 79 // tzero, timeRef are in UNIX seconds, Toffset should be in years … … 91 91 double dDoff = (dDpm + dDsee) / 3600.0; 92 92 93 double Robs = Rtru + dRoff / cos(Dtru* DEG_RAD);93 double Robs = Rtru + dRoff / cos(Dtru*RAD_DEG); 94 94 double Dobs = Dtru + dDoff; 95 95 … … 119 119 stars[Nstars].measure.photFlags2 = 0; 120 120 121 stars[Nstars].average.R = Robs; 122 stars[Nstars].average.D = Dobs; 123 124 /* 125 XXX need to set these? 126 stars[N].measure.airmass = airmass (image[0].secz, stars[N].average.R, stars[N].average.D, image[0].sidtime, image[0].latitude); 127 stars[N].measure.az = azimuth (15.0*image[0].sidtime - stars[N].average.R, stars[N].average.D, image[0].latitude); 128 stars[N].measure.Mcal = image[0].Mcal; 129 stars[N].measure.t = image[0].tzero + 1e-4*stars[N].measure.Yccd*image[0].trate; // trate is in 0.1 msec / row 130 stars[N].measure.dt = MTIME; 131 */ 132 121 133 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 122 134 stars[Nstars].measure.detID = Nstars + 1; -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fakestars.c
r37463 r37467 1 1 # include "fakeastro.h" 2 2 3 # define Z_GAL 500.0 3 // # define Z_GAL 500.0 4 # define Z_GAL 2000.0 4 5 # define R_GAL 2000.0 5 6 6 static double iFkap = 1.0 / 4.74047; // (km/sec/kpc) / (milli-arcsec/ year)7 static double iFkap = 0.001 / 4.74047; // (km/sec/kpc) / (arcsec/ year) 7 8 static double A_oort = +14.5; // km/sec/kpc 8 9 static double B_oort = -13.0; // km/sec/kpc
Note:
See TracChangeset
for help on using the changeset viewer.
