IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2005, 2:40:16 PM (21 years ago)
Author:
eugene
Message:

moving options from global to AddstarClientOptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/find_matches.c

    r5287 r5322  
    11# include "addstar.h"
    22
    3 void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap) {
     3void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, AddstarClientOptions options) {
    44
    55  int i, j, n, N, J;
     
    8585
    8686  /* choose a radius for matches */
    87   if (DEFAULT_RADIUS == 0) {
    88     RADIUS = NSIGMA * 0.02 * image[0].cerror;  /* 0.02 corrects cerror to arcsec from storage units */
     87  if (options.radius == 0) {
     88    RADIUS = options.Nsigma * 0.02 * image[0].cerror;  /* 0.02 corrects cerror to arcsec from storage units */
    8989  } else {
    90     RADIUS = DEFAULT_RADIUS; /* provided by config */
     90    RADIUS = options.radius; /* provided by config */
    9191  }
    9292  RADIUS2 = RADIUS*RADIUS;
     
    162162
    163163      /* adds the measurement to the calibration if appropriate color terms are found */
    164       if (CALIBRATE) {
     164      if (options.calibrate) {
    165165        AddToCalibration (&catalog[0].average[n], catalog[0].measure, &catalog[0].measure[Nmeas], next_meas, N);
    166166      }
     
    190190      Nmeas ++;
    191191
    192       if (!UPDATE) {
     192      if (!options.update) {
    193193        /* in UPDATE mode, newly calculated coordinates are not saved */
    194194        update_coords (&catalog[0].average[n], &catalog[0].measure[0], next_meas);
     
    200200  /* add reference for undetected catalog stars */
    201201  if (!strcmp (&image[0].coords.ctype[4], "-WRP")) RegisterMosaic (MOSAIC);
    202   for (j = 0; (j < Nave) && !SKIP_MISSED; j++) {
     202  for (j = 0; (j < Nave) && !options.skip_missed; j++) {
    203203    n = N2[j];
    204204    if (catalog[0].found[n] < 0) {
     
    224224  /* incorporate unmatched image stars, if this star is in field of this catalog */
    225225  /* these new entries are all written out in UPDATE mode */
    226   for (i = 0; (i < Nstars) && !ONLY_MATCH; i++) {
     226  for (i = 0; (i < Nstars) && !options.only_match; i++) {
    227227    /* make sure there is space for next entry */
    228228    if (Nmeas >= NMEAS) {
     
    285285
    286286    /** now add references from all previous non-detection observations of this spot on the sky */
    287     for (j = 0; (j < Noverlap) && !SKIP_MISSED; j++) {
     287    for (j = 0; (j < Noverlap) && !options.skip_missed; j++) {
    288288      /* make sure there is space for next entry */
    289289      if (Nmiss >= NMISS) {
     
    316316  REALLOCATE (catalog[0].missing, Missing, Nmiss);
    317317 
    318   if (NOSORT) {
     318  if (options.nosort) {
    319319    catalog[0].sorted = FALSE;
    320320  } else {
Note: See TracChangeset for help on using the changeset viewer.