IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3689


Ignore:
Timestamp:
Apr 8, 2005, 10:08:50 AM (21 years ago)
Author:
eugene
Message:

minor cleanups

Location:
trunk/Ohana/src/opihi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/calextract.c

    r3462 r3689  
    9494    /* extract values, assign to vectors */
    9595    for (i = 0; i < catalog.Naverage; i++) {
     96      if (i && !(i % 10000)) { fprintf (stderr, ","); }
    9697      m = catalog.average[i].offset;
    9798
     
    125126      if (N == NSTAR) {
    126127        NSTAR += 100;
    127         for (i = 0; i < NVEC; i++) {
    128           REALLOCATE (vec[i][0].elements, float, NSTAR);
     128        for (j = 0; j < NVEC; j++) {
     129          REALLOCATE (vec[j][0].elements, float, NSTAR);
    129130        }
    130131      }
  • trunk/Ohana/src/opihi/dvo/ddmags.c

    r3462 r3689  
    2222  catalog.measure = NULL;
    2323
     24  /* find CATDIR in config system */
     25  VarConfig ("CATDIR", "%s", catdir);
     26
    2427  /* load photcode information */
    2528  if (!InitPhotcodes ()) goto escape;
     
    3033  if (!GetGraphData (&graphsky, NULL, &Ngraph)) return (FALSE);
    3134 
    32   /* find CATDIR in config system */
    33   VarConfig ("CATDIR", "%s", catdir);
     35  /* find catalog files which overlap this region */
     36  Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
     37  regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
    3438
    3539  /* interpret command-line options */
     
    4650  if (!GetPhotcodeInfo (argv[7], &code[3], &mode[3])) return (FALSE);
    4751  if ((mode[2] == MAG_AVE) || (mode[2] == MAG_REF)) UseAverages = TRUE;
    48 
    49   /* find catalog files which overlap this region */
    50   Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
    51   regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
    5252
    5353  /* init vectors to save data */
     
    114114usage:
    115115  fprintf (stderr, "USAGE: ddmags F - F : measure.param\n");
    116   return (FALSE);
    117116
    118117escape:
  • trunk/Ohana/src/opihi/lib.shell/variable.c

    r3414 r3689  
    121121    }
    122122  }
    123   return ((char *) NULL);
     123  return (NULL);
    124124}
    125125
     
    148148    }
    149149  }
    150   return ((char *) NULL);
     150  return (NULL);
    151151}
    152152
     
    168168  }
    169169  free (local);
    170   return ((char *) NULL);
     170  return (NULL);
    171171}
    172172
  • trunk/Ohana/src/opihi/scripts/test.pro

    r2598 r3689  
     1
     2macro testfit
     3 create x 0 1000
     4 set y = 3 + 5*x
     5 set dy = 10*(rnd(x) - 0.5)
     6 set yr = y + dy
     7 fit x yr 1
     8 echo $Cn, $Cnv
     9 echo $dC
     10
     11 yr[100] = yr[100] + 50
     12 yr[200] = yr[200] - 50
     13 yr[300] = yr[300] + 100
     14 yr[400] = yr[400] - 500
     15 yr[500] = yr[500] + 30
     16
     17 fit x yr 1
     18 echo $Cn, $Cnv
     19 echo $dC
     20
     21 fit x yr 1 -clip 3 3
     22 echo $Cn, $Cnv
     23 echo $dC
     24end
     25# expected output:
     26# y = 3.013781 x^0 5.000005 x^1
     27#     0.063198     0.000110
     28# 1, 1000
     29# 2.91071543189
     30# y = 2.495040 x^0 5.000303 x^1
     31#     0.063198     0.000110
     32# 1, 1000
     33# 16.5928919554
     34# y = 3.021974 x^0 4.999991 x^1
     35#     0.063419     0.000110
     36# 1, 995
     37# 2.90820510001
    138
    239macro testloops
Note: See TracChangeset for help on using the changeset viewer.