IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38282


Ignore:
Timestamp:
May 16, 2015, 5:32:17 AM (11 years ago)
Author:
eugene
Message:

add bisection func to libohana; add tycho correction code to setastrom

Location:
branches/eam_branches/ipp-20150419/Ohana/src
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src/libohana/Makefile

    r37807 r38282  
    3030$(SRC)/ohana_allocate.$(ARCH).o  \
    3131$(SRC)/sorts.$(ARCH).o           \
     32$(SRC)/bisection.$(ARCH).o               \
    3233$(SRC)/string.$(ARCH).o          \
    3334$(SRC)/findexec.$(ARCH).o        \
  • branches/eam_branches/ipp-20150419/Ohana/src/libohana/include/ohana.h

    r37807 r38282  
    478478void VSHtermsForLM (VSHterms *terms, double R, double D, int l, int m);
    479479
    480 # endif
     480/* in bisection.c */
     481int ohana_bisection_double (double *values, int Nvalues, double threshold);
     482
     483# endif
  • branches/eam_branches/ipp-20150419/Ohana/src/opihi/cmd.data/Makefile

    r38062 r38282  
    2525$(SRC)/book.$(ARCH).o           \
    2626$(SRC)/book_commands.$(ARCH).o  \
     27$(SRC)/bisection.$(ARCH).o              \
    2728$(SRC)/cast.$(ARCH).o           \
    2829$(SRC)/center.$(ARCH).o \
  • branches/eam_branches/ipp-20150419/Ohana/src/opihi/cmd.data/init.c

    r38062 r38282  
    99int box              PROTO((int, char **));
    1010int book_command     PROTO((int, char **));
     11int bisection        PROTO((int, char **));
    1112int center           PROTO((int, char **));
    12 int parity           PROTO((int, char **));
    1313int cast             PROTO((int, char **));
    1414int circstats        PROTO((int, char **));
     
    8989int plot             PROTO((int, char **));
    9090int dot              PROTO((int, char **));
     91int parity           PROTO((int, char **));
    9192int point            PROTO((int, char **));
    9293int ps               PROTO((int, char **));
     
    175176  {1, "applyfit2d",   applyfit2d,       "apply 2-d fit to new vector"},
    176177  {1, "applyfit3d",   applyfit3d,       "apply 3-d fit to new vector"},
     178  {1, "bisection",    bisection,        "use bisection to find threshold in vector"},
    177179  {1, "book",         book_command,     "commands to manipulate book/page/word data"},
    178180  {1, "box",          box,              "draw a box on the plot"},
  • branches/eam_branches/ipp-20150419/Ohana/src/uniphot/include/setastrom.h

    r38062 r38282  
    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;
  • branches/eam_branches/ipp-20150419/Ohana/src/uniphot/src/initialize_setastrom.c

    r38062 r38282  
    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
  • branches/eam_branches/ipp-20150419/Ohana/src/uniphot/src/setastrom.c

    r35103 r38282  
    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);
  • branches/eam_branches/ipp-20150419/Ohana/src/uniphot/src/update_dvo_setastrom.c

    r38062 r38282  
    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.