Changeset 37478
- Timestamp:
- Oct 9, 2014, 5:55:15 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/fakeastro
- Files:
-
- 1 added
- 7 edited
-
include/fakeastro.h (modified) (2 diffs)
-
src/ConfigInit.c (modified) (1 diff)
-
src/fakeastro_galaxy.c (modified) (1 diff)
-
src/fit_fake_stars.c (modified) (2 diffs)
-
src/make_fake_images.c (modified) (1 diff)
-
src/make_fake_stars_catalog.c (modified) (1 diff)
-
src/make_fakeqsos.c (added)
-
src/make_fakestars.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/include/fakeastro.h
r37477 r37478 30 30 Average average; 31 31 Measure measure; 32 Lensing *lensing; // optionally carry out the lensing measurements33 32 int found; 34 33 } Stars; … … 87 86 88 87 int FORCE; 88 89 int FAKEASTRO_NLOOP; 90 int FAKEASTRO_NSTARS; 91 float FAKEASTRO_ZGAL; // parsec 92 float FAKEASTRO_RGAL; // parsec 93 char FAKEASTRO_REF_EPOCH[80]; 89 94 90 95 float RADIUS; -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/ConfigInit.c
r37477 r37478 34 34 if (!ScanConfig (config, "SKY_DEPTH", "%d", 0, &SKY_DEPTH)) SKY_DEPTH = 2; 35 35 if (!ScanConfig (config, "SKY_TABLE", "%s", 0, SKY_TABLE)) SKY_TABLE[0] = 0; 36 37 38 if (!ScanConfig (config, "FAKEASTRO_NLOOP", "%d", 0, &FAKEASTRO_NLOOP)) { 39 FAKEASTRO_NLOOP = 1; 40 } 41 if (!ScanConfig (config, "FAKEASTRO_NSTARS", "%d", 0, &FAKEASTRO_NSTARS)) { 42 FAKEASTRO_NSTARS = 5000000; 43 } 44 if (!ScanConfig (config, "FAKEASTRO_ZGAL", "%f", 0, &FAKEASTRO_ZGAL)) { 45 FAKEASTRO_ZGAL = 500.0; // parsec 46 } 47 if (!ScanConfig (config, "FAKEASTRO_RGAL", "%f", 0, &FAKEASTRO_RGAL)) { 48 FAKEASTRO_RGAL = 2000.0; // parsec 49 } 50 if (!ScanConfig (config, "FAKEASTRO_REF_EPOCH", "%s", 0, FAKEASTRO_REF_EPOCH)) { 51 strcpy (FAKEASTRO_REF_EPOCH, "2011/05/11,00:00:00"); // epoch of reference catalog 52 } 36 53 37 54 /* set the default search radius */ -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/fakeastro_galaxy.c
r37467 r37478 29 29 } 30 30 31 int Nloop = 1; 32 int Nstars = 5000000; 33 34 for (n = 0; n < Nloop; n++) { 31 for (n = 0; n < FAKEASTRO_NLOOP; n++) { 35 32 36 33 INITTIME; 37 34 35 int Nstars = FAKEASTRO_NSTARS; 38 36 FakeAstro_Stars *stars = make_fakestars (Nstars); 37 38 FakeAstro_Stars *qso_icrf = make_fakeqsos (Nstars); 39 39 40 40 MARKTIME ("generate %d fake stars in %f sec\n", Nstars, dtime); -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/fit_fake_stars.c
r37477 r37478 3 3 int fit_fake_stars (Stars *stars, int Nstars, Image *image) { 4 4 5 // XXX I should set this based on Nstars 6 int order_use = 6; 5 // if we are doing imagemap or high-order polynomial fits, this is the order we should 6 // use 7 int order_use = 0; 8 if (Nstars > 5) order_use = 1; // 5 stars per cell 9 if (Nstars > 24) order_use = 2; // 6 stars per cell 10 if (Nstars > 63) order_use = 3; // 7 stars per cell 11 if (Nstars > 128) order_use = 4; // 8 stars per cell 12 if (Nstars > 225) order_use = 5; // 9 stars per cell 13 if (Nstars > 360) order_use = 6; // 10 stars per cell 7 14 8 15 // I have Nstars with "reference" positions stars[].Rref,Dref and … … 12 19 13 20 int CHIPMAP = (image[0].coords.Npolyterms == -1); 14 i f (CHIPMAP) image[0].coords.Npolyterms = -1;21 image[0].coords.Npolyterms = CHIPMAP ? -1 : order_use; 15 22 16 23 CoordFit *fit = fit_init (image[0].coords.Npolyterms); -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_images.c
r37471 r37478 59 59 fakeImage[N].coords.Npolyterms = 1; 60 60 61 // XXX add higher order polynomials or imagemaps here 62 61 63 fakeImage[N].coords.mosaic = &fakeImage[0].coords; 62 64 -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_stars_catalog.c
r37477 r37478 20 20 int Nstars = *nstars; 21 21 22 time_t timeRef = ohana_date_to_sec( "2011/05/11,00:00:00");22 time_t timeRef = ohana_date_to_sec(FAKEASTRO_REF_EPOCH); 23 23 24 24 if (!stars) { -
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fakestars.c
r37471 r37478 1 1 # include "fakeastro.h" 2 3 // # define Z_GAL 500.04 # define Z_GAL 2000.05 # define R_GAL 2000.06 2 7 3 static double iFkap = 0.001 / 4.74047; // (km/sec/kpc) / (arcsec/ year) … … 41 37 int inPatch = FALSE; 42 38 while (!inPatch) { 43 z = rnd_gauss (0.0, Z_GAL);44 r = sqrt(drand48()) * R_GAL;39 z = rnd_gauss (0.0, FAKEASTRO_ZGAL); 40 r = sqrt(drand48()) * FAKEASTRO_RGAL; 45 41 Lrad = drand48() * 2 * M_PI; 46 42 Brad = atan2(z,r);
Note:
See TracChangeset
for help on using the changeset viewer.
