IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37569


Ignore:
Timestamp:
Nov 8, 2014, 7:34:12 PM (12 years ago)
Author:
eugene
Message:

save fake qsos in ICRF format file

Location:
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/ConfigInit.c

    r37564 r37569  
    5555  }
    5656  if (!ScanConfig (config, "FAKEASTRO_REF_EPOCH", "%s", 0, FAKEASTRO_REF_EPOCH)) {
    57     strcpy (FAKEASTRO_REF_EPOCH, "2011/05/11,00:00:00"); // epoch of reference catalog
     57    strcpy (FAKEASTRO_REF_EPOCH, "2000/01/01,00:00:00"); // epoch of truth positions
    5858  }
    5959  if (!ScanConfig (config, "FAKEASTRO_2MASS_EPOCH", "%s", 0, FAKEASTRO_2MASS_EPOCH)) {
    60     strcpy (FAKEASTRO_2MASS_EPOCH, "2000/01/01,00:00:00"); // epoch of reference catalog
     60    strcpy (FAKEASTRO_2MASS_EPOCH, "2000/01/01,00:00:00"); // epoch of 2MASS astrometry
    6161  }
    6262
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_2mass_measures.c

    r37564 r37569  
    1111  Measure *measure = catalog->measure;
    1212 
     13  // we have starpar.R,D, which represent the true positions at the reference epoch, FAKEASTRO_REF_EPOCH
     14  // the 2MASS stars are generated at locations for the 2MASS EPOCH
    1315  time_t timeRef = ohana_date_to_sec(FAKEASTRO_REF_EPOCH);
    1416  time_t tzero_2mass = ohana_date_to_sec(FAKEASTRO_2MASS_EPOCH);
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_stars_catalog.c

    r37532 r37569  
    2020  int Nstars = *nstars;
    2121 
     22  // we have starpar.R,D, which represent the true positions at the reference epoch, FAKEASTRO_REF_EPOCH
    2223  time_t timeRef = ohana_date_to_sec(FAKEASTRO_REF_EPOCH);
    2324 
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fakeqsos.c

    r37564 r37569  
    1414
    1515  CoordTransform *transback = InitTransform (COORD_CELESTIAL, COORD_GALACTIC);
     16
     17  FILE *f = NULL;
     18  if (ICRF) {
     19    f = fopen ("fake.icrf.dat", "w");
     20    if (!f) {
     21      fprintf (stderr, "unable to open fake.icrf.dat\n");
     22    }
     23  } else {
     24    f = fopen ("fake.zero.dat", "w");
     25    if (!f) {
     26      fprintf (stderr, "unable to open fake.zero.dat\n");
     27    }
     28  }
    1629
    1730  int i;
     
    6881    stars[i].starpar.uRA  = 0.0;
    6982    stars[i].starpar.uDEC = 0.0;
     83
     84/*
     85#                       hr mn seconds   deg mn seconds      mas    mas                   Jy     Jy      Jy     Jy      Jy     Jy     Jy     Jy      Jy     Jy
     86C  2357+080 J0000+0816  00 00 07.031141 +08 16 45.05175    0.46   0.85   0.758     41  -1.00  -1.00   -1.00  -1.00    0.020 <0.014  -1.00  -1.00   -1.00  -1.00   X    rfc_2014c
     8701234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
     880         1         2         3         4         5         6         7         8         9         0         1         2         3         4         5         6         
     89*/
     90
     91    if (f) {
     92      char Rline[32], Dline[32];
     93      {
     94        int flag = SIGN(R);
     95        double hours = fabs(R / 15.0);  /* convert from degrees to hours */
     96        int h = hours;
     97        int m = 60.000001*(hours - h);
     98        float s = 3600*(hours - h - m / 60.0);
     99        if (flag > 0) {
     100          snprintf (Rline, 32, " %02d %02d %09.6f  ", h, m, s);
     101        } else {
     102          snprintf (Rline, 32, "-%02d %02d %09.6f  ", h, m, s);
     103        }       
     104      }
     105      {
     106        int flag = SIGN(D);
     107        double dec = fabs(D);
     108        int d = dec;
     109        int m = 60.000001*(dec - d);
     110        float s = 3600*(dec - d - m / 60.0);
     111        if (flag > 0) {
     112          snprintf (Dline, 32, " %02d %02d %09.6f  ", d, m, s);
     113        } else {
     114          snprintf (Dline, 32, "-%02d %02d %09.6f  ", d, m, s);
     115        }       
     116      }
     117
     118      fprintf (f, "C  2357+080 J0000+0816 %16s %15s    0.46   0.85   0.758     41  -1.00  -1.00   -1.00  -1.00    0.020 <0.014  -1.00  -1.00   -1.00  -1.00   X    rfc_2014c\n", Rline, Dline);
     119    }
    70120  }
    71121  fprintf (stderr, "\n");
Note: See TracChangeset for help on using the changeset viewer.