IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37478


Ignore:
Timestamp:
Oct 9, 2014, 5:55:15 PM (12 years ago)
Author:
eugene
Message:

updates

Location:
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/include/fakeastro.h

    r37477 r37478  
    3030  Average  average;
    3131  Measure  measure;
    32   Lensing *lensing; // optionally carry out the lensing measurements
    3332  int found;
    3433} Stars;
     
    8786
    8887int    FORCE;
     88
     89int FAKEASTRO_NLOOP;
     90int FAKEASTRO_NSTARS;
     91float FAKEASTRO_ZGAL; // parsec
     92float FAKEASTRO_RGAL; // parsec
     93char FAKEASTRO_REF_EPOCH[80];
    8994
    9095float  RADIUS;
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/ConfigInit.c

    r37477 r37478  
    3434  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) SKY_DEPTH = 2;
    3535  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  }
    3653
    3754  /* set the default search radius */
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/fakeastro_galaxy.c

    r37467 r37478  
    2929  }
    3030
    31   int Nloop = 1;
    32   int Nstars = 5000000;
    33 
    34   for (n = 0; n < Nloop; n++) {
     31  for (n = 0; n < FAKEASTRO_NLOOP; n++) {
    3532
    3633    INITTIME;
    3734
     35    int Nstars = FAKEASTRO_NSTARS;
    3836    FakeAstro_Stars *stars = make_fakestars (Nstars);
     37
     38    FakeAstro_Stars *qso_icrf = make_fakeqsos (Nstars);
    3939
    4040    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  
    33int fit_fake_stars (Stars *stars, int Nstars, Image *image) {
    44
    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
    714
    815  // I have Nstars with "reference" positions stars[].Rref,Dref and
     
    1219
    1320  int CHIPMAP = (image[0].coords.Npolyterms == -1);
    14   if (CHIPMAP) image[0].coords.Npolyterms = -1;
     21  image[0].coords.Npolyterms = CHIPMAP ? -1 : order_use;
    1522
    1623  CoordFit *fit = fit_init (image[0].coords.Npolyterms);
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_images.c

    r37471 r37478  
    5959      fakeImage[N].coords.Npolyterms = 1;
    6060
     61      // XXX add higher order polynomials or imagemaps here
     62
    6163      fakeImage[N].coords.mosaic = &fakeImage[0].coords;
    6264
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_stars_catalog.c

    r37477 r37478  
    2020  int Nstars = *nstars;
    2121 
    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);
    2323 
    2424  if (!stars) {
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fakestars.c

    r37471 r37478  
    11# include "fakeastro.h"
    2 
    3 // # define Z_GAL 500.0
    4 # define Z_GAL 2000.0
    5 # define R_GAL 2000.0
    62
    73static double iFkap = 0.001 / 4.74047; // (km/sec/kpc) / (arcsec/ year)
     
    4137    int inPatch = FALSE;
    4238    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;
    4541      Lrad = drand48() * 2 * M_PI;
    4642      Brad = atan2(z,r);
Note: See TracChangeset for help on using the changeset viewer.