IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38464


Ignore:
Timestamp:
Jun 12, 2015, 10:27:23 PM (11 years ago)
Author:
eugene
Message:

merge changes from EAM branch ipp-20150419

Location:
trunk/Ohana/src/uniphot
Files:
6 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/uniphot/Makefile

    r38062 r38464  
    112112$(SRC)/setastrom.$(ARCH).o          \
    113113$(SRC)/initialize_setastrom.$(ARCH).o \
     114$(SRC)/tyc_correction.$(ARCH).o \
    114115$(SRC)/cam_correction.$(ARCH).o \
    115116$(SRC)/dcr_correction.$(ARCH).o \
    116117$(SRC)/kh_correction.$(ARCH).o \
    117118$(SRC)/astrom_correction.$(ARCH).o \
     119$(SRC)/repair_tycho_setastrom.$(ARCH).o \
    118120$(SRC)/update_dvo_setastrom.$(ARCH).o \
    119121$(SRC)/update_catalog_setastrom.$(ARCH).o \
     
    128130$(SRC)/update_dvo_setastrom.$(ARCH).o \
    129131$(SRC)/update_catalog_setastrom.$(ARCH).o \
     132$(SRC)/tyc_correction.$(ARCH).o \
    130133$(SRC)/cam_correction.$(ARCH).o \
    131134$(SRC)/dcr_correction.$(ARCH).o \
    132135$(SRC)/kh_correction.$(ARCH).o \
     136$(SRC)/repair_tycho_setastrom.$(ARCH).o \
    133137$(SRC)/astrom_correction.$(ARCH).o \
    134138$(SRC)/initialize_setastrom.$(ARCH).o
  • trunk/Ohana/src/uniphot/include/setastrom.h

    r38062 r38464  
    4949char        *DCR_FILE;
    5050char        *CAM_FILE;
     51char        *TYC_FILE;
    5152
    5253int          KH_RESET;
    5354int          DCR_RESET;
    5455int          CAM_RESET;
     56int          TYC_RESET;
    5557
    5658SkyRegion    UserPatch;
     
    9193int load_cam_correction (char *filename);
    9294int get_cam_correction (int chipID, int filter, float Xccd, float Yccd, double *dX, double *dY);
     95
     96int load_tyc_correction (char *filename);
     97int get_tyc_correction (double **R, double **D, int *N);
     98int repair_tycho_setastrom (Catalog *catalog, SkyRegion *region);
  • trunk/Ohana/src/uniphot/src/initialize_setastrom.c

    r38062 r38464  
    77    fprintf (stderr, "    -DCR (file) : supply DCR correction splines\n");
    88    fprintf (stderr, "    -CAM (file) : supply camera-static correction file\n");
     9    fprintf (stderr, "    -TYC (file) : supply tycho-fix file (no pm stars)\n");
    910    fprintf (stderr, "    -v : verbose mode\n");
    1011    fprintf (stderr, "    -region Rmin Rmax Dmin Dmax\n");
     
    9192  }
    9293
     94  TYC_FILE = NULL;
     95  if ((N = get_argument (argc, argv, "-TYC"))) {
     96    remove_argument (N, &argc, argv);
     97    char *tmpfile = strcreate (argv[N]);
     98    TYC_FILE = abspath (tmpfile, DVO_MAX_PATH);
     99    remove_argument (N, &argc, argv);
     100  }
     101  TYC_RESET = FALSE;
     102  if ((N = get_argument (argc, argv, "-TYC-reset"))) {
     103    remove_argument (N, &argc, argv);
     104    TYC_RESET = TRUE;
     105  }
     106
    93107  SINGLE_CPT = NULL;
    94108  if ((N = get_argument (argc, argv, "-cpt"))) {
     
    160174  }
    161175
    162   if (!KH_FILE && !DCR_FILE && !CAM_FILE) {
    163     fprintf (stderr, "WARNING: none of -CAM, -KH, -DCR supplied\n");
     176  if (!KH_FILE && !DCR_FILE && !CAM_FILE && !TYC_FILE) {
     177    fprintf (stderr, "WARNING: none of -CAM, -KH, -DCR, -TYC supplied\n");
    164178  }
    165179
     
    175189  fprintf (stderr, "    -DCR (file) : supply DCR correction splines\n");
    176190  fprintf (stderr, "    -CAM (file) : supply camera-static correction file\n");
     191  fprintf (stderr, "    -TYC (file) : supply tycho-fix file (no pm stars)\n");
    177192  fprintf (stderr, "    -region Rmin Rmax Dmin Dmax\n");
    178193  fprintf (stderr, "    -update-catformat (format) : change database schema on output\n");
     
    247262    remove_argument (N, &argc, argv);
    248263    CAM_RESET = TRUE;
     264  }
     265
     266  TYC_FILE = NULL;
     267  if ((N = get_argument (argc, argv, "-TYC"))) {
     268    remove_argument (N, &argc, argv);
     269    char *tmpfile = strcreate (argv[N]);
     270    TYC_FILE = abspath (tmpfile, DVO_MAX_PATH);
     271    remove_argument (N, &argc, argv);
     272  }
     273  TYC_RESET = FALSE;
     274  if ((N = get_argument (argc, argv, "-TYC-reset"))) {
     275    remove_argument (N, &argc, argv);
     276    TYC_RESET = TRUE;
    249277  }
    250278
     
    308336  if (!CATDIR) usage_setastrom_client();
    309337
    310   if (!KH_FILE && !DCR_FILE && !CAM_FILE) {
    311     fprintf (stderr, "WARNING: none of -CAM, -KH, -DCR supplied\n");
     338  if (!KH_FILE && !DCR_FILE && !CAM_FILE && !TYC_FILE) {
     339    fprintf (stderr, "WARNING: none of -CAM, -KH, -DCR, -TYC supplied\n");
    312340  }
    313341
  • trunk/Ohana/src/uniphot/src/setastrom.c

    r35103 r38464  
    88  initialize_setastrom (argc, argv);
    99
    10   // argv[1] holds the correction file
    11   status = update_dvo_setastrom (argv[1]);
     10  status = update_dvo_setastrom ();
    1211
    1312  if (!status) exit (1);
  • trunk/Ohana/src/uniphot/src/setphot.c

    r38441 r38464  
    2121  if (UBERCAL) {
    2222    zpts = load_zpt_ubercal (argv[1], &Nzpts, &flatcorrTable);
     23    if (!zpts) Shutdown ("failed to load zero points from ubercal table");
    2324
    2425    char flatcorrfile[DVO_MAX_PATH];
  • trunk/Ohana/src/uniphot/src/update_dvo_setastrom.c

    r38441 r38464  
    2020  if (DCR_FILE) if (!load_dcr_correction (DCR_FILE)) { fprintf (stderr, "failed to load DCR correction %s\n", DCR_FILE); exit (1); }
    2121  if (CAM_FILE) if (!load_cam_correction (CAM_FILE)) { fprintf (stderr, "failed to load CAM correction %s\n", CAM_FILE); exit (1); }
     22  if (TYC_FILE) if (!load_tyc_correction (TYC_FILE)) { fprintf (stderr, "failed to load TYC correction %s\n", TYC_FILE); exit (1); }
    2223
    2324  // determine the populated SkyRegions overlapping the requested area (default depth)
     
    5657    }
    5758
     59    if (TYC_FILE) {
     60      repair_tycho_setastrom (&catalog, skylist[0].regions[i]);
     61    }
    5862    update_catalog_setastrom (&catalog);
    5963
Note: See TracChangeset for help on using the changeset viewer.