Changeset 3689
- Timestamp:
- Apr 8, 2005, 10:08:50 AM (21 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 4 edited
-
dvo/calextract.c (modified) (2 diffs)
-
dvo/ddmags.c (modified) (4 diffs)
-
lib.shell/variable.c (modified) (3 diffs)
-
scripts/test.pro (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/calextract.c
r3462 r3689 94 94 /* extract values, assign to vectors */ 95 95 for (i = 0; i < catalog.Naverage; i++) { 96 if (i && !(i % 10000)) { fprintf (stderr, ","); } 96 97 m = catalog.average[i].offset; 97 98 … … 125 126 if (N == NSTAR) { 126 127 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); 129 130 } 130 131 } -
trunk/Ohana/src/opihi/dvo/ddmags.c
r3462 r3689 22 22 catalog.measure = NULL; 23 23 24 /* find CATDIR in config system */ 25 VarConfig ("CATDIR", "%s", catdir); 26 24 27 /* load photcode information */ 25 28 if (!InitPhotcodes ()) goto escape; … … 30 33 if (!GetGraphData (&graphsky, NULL, &Ngraph)) return (FALSE); 31 34 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); 34 38 35 39 /* interpret command-line options */ … … 46 50 if (!GetPhotcodeInfo (argv[7], &code[3], &mode[3])) return (FALSE); 47 51 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);52 52 53 53 /* init vectors to save data */ … … 114 114 usage: 115 115 fprintf (stderr, "USAGE: ddmags F - F : measure.param\n"); 116 return (FALSE);117 116 118 117 escape: -
trunk/Ohana/src/opihi/lib.shell/variable.c
r3414 r3689 121 121 } 122 122 } 123 return ( (char *)NULL);123 return (NULL); 124 124 } 125 125 … … 148 148 } 149 149 } 150 return ( (char *)NULL);150 return (NULL); 151 151 } 152 152 … … 168 168 } 169 169 free (local); 170 return ( (char *)NULL);170 return (NULL); 171 171 } 172 172 -
trunk/Ohana/src/opihi/scripts/test.pro
r2598 r3689 1 2 macro 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 24 end 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 1 38 2 39 macro testloops
Note:
See TracChangeset
for help on using the changeset viewer.
