IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34619


Ignore:
Timestamp:
Oct 28, 2012, 2:04:03 PM (14 years ago)
Author:
eugene
Message:

update mkcmf & add stack test

Location:
branches/eam_branches/ipp-20120905/Ohana/src/addstar
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/Ohana/src/addstar/src/mkcmf.c

    r34405 r34619  
    178178  }
    179179   
     180  gauss_init (2048);
     181
    180182  // load test stars from a file:
    181183  Nstars = 0;
     
    254256  gfits_modify (&header, "NASTRO",   "%d", 1, 10);
    255257
    256   gfits_modify (&header, "IMAGEID",  "%d", 1, (int)(1000*drand48()));
    257   gfits_modify (&header, "SOURCEID", "%d", 1, (int)(100*drand48()));
     258  int imageID = 1000.0*drand48();
     259  int sourceID = 100.0*drand48();
     260
     261  gfits_modify (&header, "IMAGEID",  "%d", 1, imageID);
     262  gfits_modify (&header, "SOURCEID", "%d", 1, sourceID);
    258263
    259264  PutCoords (&coords, &header);
     
    396401  // this needs to make different output 'stars' entries depending on the desired type
    397402  ALLOCATE (stars, PS1_DEV_0, Nstars);
    398   gauss_init (2048);
    399403  for (i = 0; i < Nstars; i++) {
    400404    stars[i].detID = i;
     
    441445  // this needs to make different output 'stars' entries depending on the desired type
    442446  ALLOCATE (stars, PS1_DEV_1, Nstars);
    443   gauss_init (2048);
    444447  for (i = 0; i < Nstars; i++) {
    445448    stars[i].detID = i;
     
    489492  // this needs to make different output 'stars' entries depending on the desired type
    490493  ALLOCATE (stars, CMF_PS1_V1, Nstars);
    491   gauss_init (2048);
    492494  for (i = 0; i < Nstars; i++) {
    493495    stars[i].detID = i;
     
    537539  // this needs to make different output 'stars' entries depending on the desired type
    538540  ALLOCATE (stars, CMF_PS1_V2, Nstars);
    539   gauss_init (2048);
    540541  for (i = 0; i < Nstars; i++) {
    541542    stars[i].detID = i;
     
    591592  // this needs to make different output 'stars' entries depending on the desired type
    592593  ALLOCATE (stars, CMF_PS1_V3, Nstars);
    593   gauss_init (2048);
    594594  for (i = 0; i < Nstars; i++) {
    595595    stars[i].detID = i;
     
    649649  // this needs to make different output 'stars' entries depending on the desired type
    650650  ALLOCATE (stars, CMF_PS1_V4, Nstars);
    651   gauss_init (2048);
    652651  for (i = 0; i < Nstars; i++) {
    653652    stars[i].detID = i;
     
    660659    stars[i].M = M[i];
    661660    stars[i].Map = M[i] - 0.05;
     661    stars[i].MapRaw = M[i] - 0.10;
     662
     663    stars[i].Flux = flux;
     664    stars[i].dFlux = flux * fSN;
     665
     666    stars[i].apFlux = pow(10.0, -0.4*stars[i].Map);
     667    stars[i].apFluxErr = stars[i].apFlux * fSN;
    662668
    663669    if (ADDNOISE) {
Note: See TracChangeset for help on using the changeset viewer.