Changeset 34088
- Timestamp:
- Jun 26, 2012, 11:46:01 AM (14 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 152 edited
- 1 copied
-
checkpaths.pl (copied) (copied from branches/eam_branches/ipp-20120601/Ohana/checkpaths.pl )
-
configure.tcsh (modified) (9 diffs)
-
src/addstar/Makefile (modified) (1 diff)
-
src/addstar/src/GetFileMode.c (modified) (2 diffs)
-
src/addstar/src/LoadData.c (modified) (1 diff)
-
src/addstar/src/LoadDataPMM.c (modified) (1 diff)
-
src/addstar/src/ReadStarsSDSS.c (modified) (1 diff)
-
src/addstar/src/edge_check.c (modified) (2 diffs)
-
src/addstar/src/get2mass_full.c (modified) (1 diff)
-
src/addstar/src/get2mass_ops.c (modified) (3 diffs)
-
src/addstar/src/load2mass_as_rawdata.c (modified) (2 diffs)
-
src/addstar/src/load_subpix.c (modified) (1 diff)
-
src/addstar/src/loadwise_rawdata.c (modified) (2 diffs)
-
src/addstar/src/resort_catalog.c (modified) (1 diff)
-
src/addstar/src/sky_tessalation.c (modified) (1 diff)
-
src/delstar/src/args.c (modified) (2 diffs)
-
src/delstar/src/find_matches.c (modified) (3 diffs)
-
src/elixir/src/CheckMessages.c (modified) (2 diffs)
-
src/gastro/src/gcenter.c (modified) (2 diffs)
-
src/gastro/src/gstars.c (modified) (2 diffs)
-
src/gastro2/src/getusnob.c (modified) (2 diffs)
-
src/gastro2/src/gstars2.c (modified) (2 diffs)
-
src/gastro2/src/rtext.c (modified) (2 diffs)
-
src/gcompare/src/input.c (modified) (1 diff)
-
src/getstar/src/GetFileMode.c (modified) (1 diff)
-
src/getstar/src/ReadImageFiles.c (modified) (1 diff)
-
src/getstar/src/edge_check.c (modified) (2 diffs)
-
src/getstar/src/select_by_region.c (modified) (2 diffs)
-
src/imclean/src/LoadStarsChad.c (modified) (2 diffs)
-
src/imclean/src/LoadStarsSex.c (modified) (2 diffs)
-
src/imregister/detrend/altpath.c (modified) (1 diff)
-
src/imregister/imphot/db_load.c (modified) (2 diffs)
-
src/imregister/imphot/output.c (modified) (2 diffs)
-
src/imregister/imreg/cadc.c (modified) (1 diff)
-
src/imregister/imreg/imregclient.c (modified) (4 diffs)
-
src/imregister/imreg/modify.c (modified) (2 diffs)
-
src/imregister/spreg/modify.c (modified) (1 diff)
-
src/imregister/src/imphotmerge.c (modified) (2 diffs)
-
src/kapa2/src/CheckVisual.c (modified) (4 diffs)
-
src/kapa2/src/DrawFrame.c (modified) (5 diffs)
-
src/kapa2/src/EraseOverlay.c (modified) (2 diffs)
-
src/kapa2/src/JPEGit24.c (modified) (4 diffs)
-
src/kapa2/src/Layout.c (modified) (2 diffs)
-
src/kapa2/src/PSFrame.c (modified) (2 diffs)
-
src/kapa2/src/PSPixmap.c (modified) (3 diffs)
-
src/kapa2/src/PaintOverlay.c (modified) (2 diffs)
-
src/kapa2/src/Remap16.c (modified) (3 diffs)
-
src/kapa2/src/Remap24.c (modified) (3 diffs)
-
src/kapa2/src/Remap32.c (modified) (3 diffs)
-
src/kapa2/src/Remap8.c (modified) (3 diffs)
-
src/kapa2/src/SetGraphSize.c (modified) (2 diffs)
-
src/kapa2/src/SetImageData.c (modified) (2 diffs)
-
src/kapa2/src/bDrawFrame.c (modified) (2 diffs)
-
src/kapa2/src/bDrawImage.c (modified) (4 diffs)
-
src/kapa2/src/bDrawOverlay.c (modified) (2 diffs)
-
src/libautocode/def/common.h (modified) (1 diff)
-
src/libdvo/src/ImageOps.c (modified) (3 diffs)
-
src/libdvo/src/coordops.c (modified) (2 diffs)
-
src/libdvo/src/dbCmdlineFields.c (modified) (1 diff)
-
src/libdvo/src/dbRPN.c (modified) (2 diffs)
-
src/libdvo/src/dvo_image.c (modified) (1 diff)
-
src/libdvo/src/dvo_tiny_values.c (modified) (2 diffs)
-
src/libdvo/src/skyregion_gsc.c (modified) (2 diffs)
-
src/libfits/Makefile (modified) (1 diff)
-
src/libfits/extern/fits_hdecompress.c (modified) (4 diffs)
-
src/libfits/extern/ricecomp.c (modified) (12 diffs)
-
src/libfits/matrix/F_compress_M.c (modified) (3 diffs)
-
src/libfits/table/F_copy_T.c (modified) (2 diffs)
-
src/libkapa/src/DrawRotString.c (modified) (5 diffs)
-
src/libkapa/src/KapaOpen.c (modified) (2 diffs)
-
src/libkapa/src/KiiOpen.c (modified) (2 diffs)
-
src/libkapa/src/KiiPicture.c (modified) (2 diffs)
-
src/libohana/src/config.c (modified) (4 diffs)
-
src/libohana/src/time.c (modified) (1 diff)
-
src/misc/src/mkgauss.c (modified) (2 diffs)
-
src/mosastro/src/clip.c (modified) (1 diff)
-
src/mosastro/src/getusnob.c (modified) (1 diff)
-
src/opihi/cmd.astro (modified) (1 prop)
-
src/opihi/cmd.astro/cdot.c (modified) (1 diff)
-
src/opihi/cmd.astro/cline.c (modified) (1 diff)
-
src/opihi/cmd.astro/fixcols.c (modified) (2 diffs)
-
src/opihi/cmd.astro/fiximage.c (modified) (1 diff)
-
src/opihi/cmd.astro/gauss.c (modified) (2 diffs)
-
src/opihi/cmd.astro/getvel.c (modified) (2 diffs)
-
src/opihi/cmd.astro/imfit.c (modified) (2 diffs)
-
src/opihi/cmd.astro/imsub.c (modified) (2 diffs)
-
src/opihi/cmd.astro/kronflux.c (modified) (1 diff)
-
src/opihi/cmd.astro/medianmap.c (modified) (2 diffs)
-
src/opihi/cmd.astro/objload.c (modified) (1 diff)
-
src/opihi/cmd.astro/outline.c (modified) (3 diffs)
-
src/opihi/cmd.astro/rotcurve.c (modified) (2 diffs)
-
src/opihi/cmd.astro/spec.c (modified) (2 diffs)
-
src/opihi/cmd.astro/star.c (modified) (2 diffs)
-
src/opihi/cmd.astro/transform.c (modified) (2 diffs)
-
src/opihi/cmd.data/densify.c (modified) (2 diffs)
-
src/opihi/cmd.data/gaussdeviate.c (modified) (2 diffs)
-
src/opihi/cmd.data/list_header.c (modified) (1 diff)
-
src/opihi/cmd.data/load.c (modified) (2 diffs)
-
src/opihi/cmd.data/lookup.c (modified) (1 diff)
-
src/opihi/cmd.data/rotate.c (modified) (3 diffs)
-
src/opihi/cmd.data/shift.c (modified) (2 diffs)
-
src/opihi/cmd.data/spline_apply.c (modified) (2 diffs)
-
src/opihi/cmd.data/spline_construct.c (modified) (2 diffs)
-
src/opihi/dvo/avextract.c (modified) (2 diffs)
-
src/opihi/dvo/calextract.c (modified) (4 diffs)
-
src/opihi/dvo/calmextract.c (modified) (4 diffs)
-
src/opihi/dvo/ccd.c (modified) (2 diffs)
-
src/opihi/dvo/cmd.c (modified) (2 diffs)
-
src/opihi/dvo/cmpload.c (modified) (2 diffs)
-
src/opihi/dvo/fitsed.c (modified) (4 diffs)
-
src/opihi/dvo/gcat.c (modified) (2 diffs)
-
src/opihi/dvo/hosts.c (modified) (3 diffs)
-
src/opihi/dvo/images.c (modified) (2 diffs)
-
src/opihi/dvo/imdata.c (modified) (2 diffs)
-
src/opihi/dvo/imextract.c (modified) (2 diffs)
-
src/opihi/dvo/imlist.c (modified) (2 diffs)
-
src/opihi/dvo/imphot.c (modified) (2 diffs)
-
src/opihi/dvo/lcurve.c (modified) (2 diffs)
-
src/opihi/dvo/objectcoverage.c (modified) (3 diffs)
-
src/opihi/dvo/paverage.c (modified) (4 diffs)
-
src/opihi/dvo/pmeasure.c (modified) (4 diffs)
-
src/opihi/dvo/simage.c (modified) (2 diffs)
-
src/opihi/dvo/skycat.c (modified) (2 diffs)
-
src/opihi/lib.data/starfuncs.c (modified) (3 diffs)
-
src/opihi/lib.data/svdcmp.c (modified) (3 diffs)
-
src/opihi/lib.shell/convert_to_RPN.c (modified) (2 diffs)
-
src/opihi/lib.shell/evaluate_stack.c (modified) (1 diff)
-
src/opihi/lib.shell/opihi.c (modified) (2 diffs)
-
src/opihi/pantasks/ControllerOps.c (modified) (6 diffs)
-
src/opihi/pantasks/client_shell.c (modified) (2 diffs)
-
src/opihi/pantasks/task.c (modified) (2 diffs)
-
src/opihi/pcontrol/CheckHost.c (modified) (1 diff)
-
src/opihi/pcontrol/CheckSystem.c (modified) (1 diff)
-
src/opihi/pcontrol/Makefile (modified) (1 diff)
-
src/photdbc/src/CopyBackupToHost.c (modified) (1 diff)
-
src/photdbc/src/PclientCommands.c (modified) (2 diffs)
-
src/relastro/src/CoordOps.c (modified) (1 diff)
-
src/relastro/src/ImageOps.c (modified) (1 diff)
-
src/relastro/src/StarMaps.c (modified) (2 diffs)
-
src/relastro/src/relastro_merge_source.c (modified) (3 diffs)
-
src/relastro/src/resort_catalog.c (modified) (1 diff)
-
src/relastro/src/select_images.c (modified) (2 diffs)
-
src/relastro/src/testparallax.c (modified) (2 diffs)
-
src/relphot/src/GridOps.c (modified) (3 diffs)
-
src/relphot/src/MosaicOps.c (modified) (4 diffs)
-
src/relphot/src/StarOps.c (modified) (6 diffs)
-
src/relphot/src/reload_catalogs.c (modified) (1 diff)
-
src/relphot/src/select_images.c (modified) (3 diffs)
-
src/relphot/src/setMrelFinal.c (modified) (3 diffs)
-
src/skycalc/src/time.c (modified) (1 diff)
-
src/tools/src/fhead.c (modified) (2 diffs)
-
src/tools/src/mktemp.c (modified) (3 diffs)
-
src/uniphot/src/update_dvo_uniphot.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/configure.tcsh
r31669 r34088 10 10 set optimize = 0 11 11 set pedantic = 1 12 set no_as_needed = 0 13 set debug_build = 0 12 14 set memcheck = 0 13 15 set use_tcmalloc = 0 … … 31 33 while ("$1" != "") 32 34 switch ("$1") 33 # options passed by jhbuild or others which we ignore35 # options passed by build systems which we ignore 34 36 case --enable-maintainer-mode 35 37 case --no-create 36 38 case --no-recursion 39 case --disable-shared 40 case --enable-shared 41 case --disable-static 42 case --enable-static 43 breaksw; 44 # key/value options passed by build systems which we ignore 37 45 case --sbindir* 38 46 case --libexecdir* … … 49 57 endif 50 58 breaksw; 51 case --disable-shared 52 case --enable-shared 53 case --disable-static 54 case --enable-static 55 echo "" 56 echo "WARNING: Ohana can't turn shared/static builds on/off." 57 echo "" 58 breaksw; 59 case --enable-no-as-needed 60 set no_as_needed = 1 61 breaksw; 62 case --enable-debug-build 63 set debug_build = 1 64 set pedantic = 0 65 echo "disabling pedantic build" 66 endif 67 breaksw; 68 # options used by Ohana, but not gpcsw 59 69 case --vararch 60 70 set vararch = 1 … … 80 90 case --pedantic 81 91 set pedantic = 1 92 if ($debug_build) then 93 echo "--pedantic and --enable-debug-build are mutually exclusive" 94 exit 2; 95 endif 82 96 breaksw; 83 97 case --no-pedantic … … 203 217 set CPPFLAGS = "" 204 218 endif 219 205 220 if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror" 221 if ($debug_build) set CPPFLAGS = "$CPPFLAGS -Wall" 206 222 if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY" 207 223 … … 211 227 if ($profile) set LDFLAGS = "$LDFLAGS -Wl,--start-group -Wl,-Bstatic -Wl,-Bdynamic" 212 228 229 if ($no_as_needed) set LDFLAGS = "$LDFLAGS -Wl,--no-as-needed" 230 213 231 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib" 232 set xtrlibpath = `checkpaths.pl lib` 233 set syslibpath = "$syslibpath $xtrlibpath" 234 214 235 set needlibs = "" 215 236 set needlibs = "$needlibs png" … … 226 247 227 248 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include" 249 set xtrincpath = `checkpaths.pl include` 250 set sysincpath = "$sysincpath $xtrincpath" 228 251 229 252 set needincs = "" … … 334 357 echo "setting architecture to: $arch" 335 358 359 # add 360 336 361 # set up the basic directory names: 337 362 set root = `pwd` … … 707 732 EOF 708 733 exit 2; 734 -
trunk/Ohana/src/addstar/Makefile
r33963 r34088 13 13 14 14 # programs may add their own internal requirements here 15 FULL_CFLAGS = $(BASE_CFLAGS) -Wall -Werror15 FULL_CFLAGS = $(BASE_CFLAGS) 16 16 FULL_CPPFLAGS = $(BASE_CPPFLAGS) 17 17 FULL_LDFLAGS = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS) -
trunk/Ohana/src/addstar/src/GetFileMode.c
r31627 r34088 7 7 8 8 int Naxis; 9 int simple, extend , haveNaxis, haveCTYPE;9 int simple, extend; 10 10 int havePHOT_VER, haveTARG_VER; 11 11 12 12 gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple); 13 haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis);14 haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);13 int haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis); 14 int haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype); 15 15 16 16 gfits_scan_alt (header, "EXTEND", "%t", 1, &extend); … … 22 22 if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ; 23 23 24 if ( (Naxis == 2) || TEXTMODE || !simple) {25 if ( !strcmp (&ctype[4], "-WRP")) {24 if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) { 25 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 26 26 return MOSAIC_CMP; 27 27 } -
trunk/Ohana/src/addstar/src/LoadData.c
r31669 r34088 1 1 # include "addstar.h" 2 # define DVO_IMAGE_NAME_LEN 1283 2 4 3 // XXX this function is somewhat specific to the elixir format output files -
trunk/Ohana/src/addstar/src/LoadDataPMM.c
r27435 r34088 1 1 # include "addstar.h" 2 # define DVO_IMAGE_NAME_LEN 1283 2 4 3 /* .asc files look like: -
trunk/Ohana/src/addstar/src/ReadStarsSDSS.c
r33653 r34088 1 1 # include "addstar.h" 2 # define DVO_IMAGE_NAME_LEN 128 2 3 3 int SetSDSSFlags (Stars *star, unsigned int flags1, unsigned int flags2); 4 4 -
trunk/Ohana/src/addstar/src/edge_check.c
r3361 r34088 4 4 5 5 double theta1, theta2; 6 double Theta1, Theta2;7 6 8 7 theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); … … 17 16 } 18 17 19 Theta1 = theta1;20 Theta2 = theta2;21 18 theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 22 19 theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); -
trunk/Ohana/src/addstar/src/get2mass_full.c
r30613 r34088 23 23 star[0][0].measure.theta = ToShortPixels(strtod (ptr, NULL)); 24 24 25 star[2][0].measure.FWx = star[ 2][0].measure.FWx = star[0][0].measure.FWx;26 star[2][0].measure.FWy = star[ 2][0].measure.FWy = star[0][0].measure.FWy;27 star[2][0].measure.theta = star[ 2][0].measure.theta = star[0][0].measure.theta;25 star[2][0].measure.FWx = star[1][0].measure.FWx = star[0][0].measure.FWx; 26 star[2][0].measure.FWy = star[1][0].measure.FWy = star[0][0].measure.FWy; 27 star[2][0].measure.theta = star[1][0].measure.theta = star[0][0].measure.theta; 28 28 29 29 ptr = next2MASSfield (ptr); // designation (skip) -
trunk/Ohana/src/addstar/src/get2mass_ops.c
r21508 r34088 73 73 74 74 char *ptr; 75 char Jquality, Hquality, Kquality;76 75 double J, dJ, H, dH, K, dK; 77 76 e_time time; … … 95 94 dK = strtod (ptr, NULL); 96 95 97 /* filter on the ph_qual flag for this filter (field 19) */ 96 // get the time 97 time = get2mass_time (ptr, 20, Nmax - (ptr - line)); 98 99 # if (0) 100 char Jquality, Hquality, Kquality; 101 /* old code to filter on the ph_qual flag for this filter (field 19) */ 98 102 if (SELECT_2MASS_QUALITY != NULL) { 99 103 ptr = skipNbounds (ptr, '|', 3, Nmax - (ptr - line)); … … 105 109 time = get2mass_time (ptr, 20, Nmax - (ptr - line)); 106 110 } 111 # endif 107 112 108 113 // how many bits are being used for the 2mass flags; can we just set photFlags based on them? -
trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c
r24977 r34088 14 14 int i, j, verbose; 15 15 int Nstars, NSTARS, Ntstars, NTSTARS; 16 int Nbyte, Nextra, Ntotal,offset;16 int Nbyte, Nextra, offset; 17 17 18 18 double Rmin, Rmax, Dmin, Dmax; … … 37 37 38 38 Nextra = 0; // number excess bytes from lsat partial row 39 Ntotal = 0; // track the total number of bytes read40 39 while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) { 41 40 if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename); -
trunk/Ohana/src/addstar/src/load_subpix.c
r24002 r34088 45 45 46 46 int bin; 47 double d y, dM;47 double dM; 48 48 49 dy = y - (int)(y);49 // dy = y - (int)(y); 50 50 bin = 5 * (int)(x/100) + (int)(y/100); 51 51 dM = Subpix[bin].dM; -
trunk/Ohana/src/addstar/src/loadwise_rawdata.c
r33963 r34088 14 14 int i, j, verbose; 15 15 int Nstars, NSTARS, Ntstars, NTSTARS; 16 int Nbyte, Nextra, Ntotal,offset;16 int Nbyte, Nextra, offset; 17 17 18 18 double Rmin, Rmax, Dmin, Dmax; … … 37 37 38 38 Nextra = 0; // number excess bytes from lsat partial row 39 Ntotal = 0; // track the total number of bytes read40 39 while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) { 41 40 if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename); -
trunk/Ohana/src/addstar/src/resort_catalog.c
r33653 r34088 146 146 int NmeasureTotal = 0; 147 147 int measureOffsetOK = TRUE; 148 for (i = 0; i < catalog[0].Naverage; i++) {148 for (i = 0; i < Naverage; i++) { 149 149 NmeasureTotal += catalog[0].average[i].Nmeasure; 150 150 if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) { -
trunk/Ohana/src/addstar/src/sky_tessalation.c
r33719 r34088 2 2 # include "assert.h" 3 3 # define iSWAP(X,Y) {int tmp=(X); (X) = (Y); (Y) = tmp;} 4 # define DVO_IMAGE_NAME_LEN 1285 4 6 5 // we use a static refcoords structure to avoid multiple alloc / init steps -
trunk/Ohana/src/delstar/src/args.c
r14590 r34088 26 26 int N; 27 27 double trange; 28 time_t tmp;29 28 30 29 /* check for help request */ … … 77 76 if (ohana_str_to_time (argv[N], &END)) { 78 77 if (START > END) { 78 time_t tmp; 79 79 tmp = START; 80 80 START = END; 81 END = START;81 END = tmp; 82 82 } 83 83 remove_argument (N, argc, argv); -
trunk/Ohana/src/delstar/src/find_matches.c
r28241 r34088 5 5 int drop; 6 6 off_t i, j, k, n, m, N, M, averef; 7 off_t *next_meas, *next_miss, *ave_miss , last, last_miss;7 off_t *next_meas, *next_miss, *ave_miss; 8 8 off_t Nave, Nmeas, NMEAS, Nmiss; 9 9 off_t Nmeasfound, Nsecfilt; … … 29 29 } 30 30 next_meas[i] = -1; 31 last = i;32 31 /* set up pointers for linked list of missing */ 33 32 for (i = 0; i < Nmiss - 1; i++) { … … 35 34 } 36 35 next_miss[i] = -1; 37 last_miss = i;38 36 /* set up references for missing to average */ 39 37 for (i = 0; i < Nave; i++) { -
trunk/Ohana/src/elixir/src/CheckMessages.c
r10336 r34088 10 10 int CheckMessages () { 11 11 12 int status , Message;12 int status; 13 13 struct timeval now; 14 14 char *message, *p, *p2; … … 27 27 then = now; 28 28 if (!status) return (FALSE); 29 30 Message = 0;31 29 32 30 /* loop over all lines in message */ -
trunk/Ohana/src/gastro/src/gcenter.c
r27611 r34088 8 8 9 9 double mean, sigma, gx, gy, gx0, gy0, n, SearchRadius; 10 int NPIX, minN, Nmin , Nmin0;10 int NPIX, minN, Nmin0; 11 11 int i, j, k; 12 12 double *N, *DX, *DY, *D2, *tX1, *tY1, *tX2, *tY2; … … 154 154 Fmin = Fmin0; 155 155 Smin = Smin0; 156 Nmin = Nmin0;157 156 Xmin = Xmin0; 158 157 Ymin = Ymin0; -
trunk/Ohana/src/gastro/src/gstars.c
r27435 r34088 27 27 Header header, theader; 28 28 FILE *f; 29 int j, Ninstar, nstar, rnumber, N, Nstars, nbytes , Nbytes;29 int j, Ninstar, nstar, rnumber, N, Nstars, nbytes; 30 30 SStars *stars; 31 31 char *buffer; … … 154 154 } 155 155 ALLOCATE (stars, SStars, Nstars); 156 Nbytes = Nstars*BYTES_STAR;157 156 158 157 /* re-open file for stars */ -
trunk/Ohana/src/gastro2/src/getusnob.c
r27435 r34088 13 13 double DEC1; 14 14 double uR, uD; 15 float mB1, mB2, mR1, mR2, m B, mR;15 float mB1, mB2, mR1, mR2, mR, mB; 16 16 int iDEC0, iDEC1, iRA0, iRA1; 17 17 int spd, spd_start, spd_end; … … 133 133 } 134 134 135 stars[Nusno].M = mB;135 stars[Nusno].M = TRUE ? mB : mR; // optionally use blue or red (but not activated) 136 136 stars[Nusno].R += uR*(epoch - 2000.0); 137 137 stars[Nusno].D += uD*(epoch - 2000.0); -
trunk/Ohana/src/gastro2/src/gstars2.c
r27435 r34088 7 7 double det; 8 8 off_t Nskip; 9 int NX, NY, FoundAstrom, extend,naxis;9 int NX, NY, FoundAstrom, naxis; 10 10 StarData *stars; 11 11 FILE *f; … … 125 125 /* read from FITS table or from text table */ 126 126 /* Is NAXIS == 0 a better test?? */ 127 extend = FALSE;128 127 gfits_scan_alt (&Target[0].header, "NAXIS", "%t", 1, &naxis); 129 128 if ((naxis == 0) && !TEXTMODE) { -
trunk/Ohana/src/gastro2/src/rtext.c
r3562 r34088 8 8 9 9 char *buffer; 10 int i, N, Nbytes,nbytes, Ninstar, Nstars, NSTARS;10 int i, N, nbytes, Ninstar, Nstars, NSTARS; 11 11 double dmag, type; 12 12 StarData *stars; … … 14 14 NSTARS = *nstars; 15 15 ALLOCATE (stars, StarData, MAX (NSTARS, 1)); 16 Nbytes = NSTARS*BYTES_STAR;17 16 18 17 N = Nstars = 0; -
trunk/Ohana/src/gcompare/src/input.c
r2421 r34088 11 11 12 12 data_type data; 13 int i, status, n,NVALUES, NBYTES, nbytes;13 int i, status, NVALUES, NBYTES, nbytes; 14 14 FILE *f; 15 15 char dummy_line[1000], *next; 16 16 17 n = 0;18 19 17 if (!strcmp (filename, "-")) { 20 18 f = stdin; -
trunk/Ohana/src/getstar/src/GetFileMode.c
r27435 r34088 14 14 gfits_scan_alt (header, "EXTEND", "%t", 1, &extend); 15 15 16 if ( (Naxis == 2) || !simple) {17 if ( !strcmp (&ctype[4], "-WRP")) {16 if (haveNaxis && ((Naxis == 2) || !simple)) { 17 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 18 18 return MOSAIC_CMP; 19 19 } -
trunk/Ohana/src/getstar/src/ReadImageFiles.c
r29557 r34088 1 1 # include "dvoImageOverlaps.h" 2 # define DVO_IMAGE_NAME_LEN 1283 2 4 3 Image *ReadImageFiles (char *filename, off_t *Nimages) { -
trunk/Ohana/src/getstar/src/edge_check.c
r12774 r34088 4 4 5 5 double theta1, theta2; 6 double Theta1, Theta2;7 6 8 7 theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); … … 17 16 } 18 17 19 Theta1 = theta1;20 Theta2 = theta2;21 18 theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 22 19 theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); -
trunk/Ohana/src/getstar/src/select_by_region.c
r31669 r34088 4 4 int select_by_region (Catalog *output, Catalog *catalog, SkyRegion *region, int start, int end) { 5 5 6 int i, j, Nm,offset, m, Nsecfilt, code, Nsec;6 int i, j, offset, m, Nsecfilt, code, Nsec; 7 7 int Nave, NAVE, Nmeas, NMEAS, needMeas; 8 8 double R, D, AREA; … … 140 140 } 141 141 142 Nm = 0;143 offset = catalog[0].average[i].measureOffset;144 145 142 if (needMeas) { 143 offset = catalog[0].average[i].measureOffset; 146 144 for (j = 0; j < catalog[0].average[i].Nmeasure; j++) { 147 145 output[0].measure[Nmeas] = catalog[0].measure[offset + j]; -
trunk/Ohana/src/imclean/src/LoadStarsChad.c
r7080 r34088 10 10 int status; 11 11 double x, y, m, sky, lsky; 12 char *buffer;13 12 int Mhist[HIST_BINS], Shist[HIST_BINS], bin, sum; 14 13 double FWHMx, FWHMy, angle, flux; … … 16 15 double saturate, complete; 17 16 char line[256]; 18 19 ALLOCATE (buffer, char, CHAR_LINE*NBLOCK);20 17 21 18 f = fopen (filename, "r"); -
trunk/Ohana/src/imclean/src/LoadStarsSex.c
r7080 r34088 13 13 double x, y, m, dm, sky, lsky, ftype; 14 14 char *buffer; 15 int Mhist[HIST_BINS], Shist[HIST_BINS], n[10],bin, sum, flags;15 int Mhist[HIST_BINS], Shist[HIST_BINS], bin, sum, flags; 16 16 double A, A2, S2, FWHMx, FWHMy, angle, Mgal, Map; 17 int gotFWHM,satfound, done;17 int satfound, done; 18 18 double saturate, complete; 19 19 … … 31 31 /* zero things that will sum */ 32 32 N = A = A2 = S2 = 0; 33 gotFWHM = FALSE;34 33 for (i = 0; i < HIST_BINS; i++) { Mhist[i] = Shist[i] = 0; } 35 for (i = 1; i <= 9; i++) { n[i] = 0; }36 34 37 35 Nstars = 0; -
trunk/Ohana/src/imregister/detrend/altpath.c
r27435 r34088 6 6 int status, found; 7 7 off_t i, j, n, Nlist; 8 off_t *list , *current;8 off_t *list; 9 9 char *dBPath, infile[256], outfile[256], line[1024]; 10 10 struct stat statbuf; 11 11 12 ALLOCATE (current, off_t, Nimage);13 12 ALLOCATE (list, off_t, Nimage); 14 13 Nlist = 0; -
trunk/Ohana/src/imregister/imphot/db_load.c
r7080 r34088 7 7 8 8 int Nx, Ny, Naxis; 9 int mode , status;9 int mode; 10 10 11 11 /* database name must be set first */ … … 31 31 32 32 /* how do we decide if it is text or fits? must examine header */ 33 if ( FITS) {34 status =rfits (db);33 if (mode == FITS) { 34 rfits (db); 35 35 } else { 36 status =rtext (db);36 rtext (db); 37 37 } 38 38 return (TRUE); -
trunk/Ohana/src/imregister/imphot/output.c
r27435 r34088 4 4 int output (Image *image, off_t *match, off_t Nmatch) { 5 5 6 int status;7 8 6 /* output the selected entries */ 9 7 if (options.table != (char *) NULL) { 10 status =DumpFitsTable (options.table, image, match, Nmatch);8 DumpFitsTable (options.table, image, match, Nmatch); 11 9 return (TRUE); 12 10 } … … 14 12 /* output the selected entries */ 15 13 if (options.bintable != (char *) NULL) { 16 status =DumpFitsBintable (options.bintable, image, match, Nmatch);14 DumpFitsBintable (options.bintable, image, match, Nmatch); 17 15 return (TRUE); 18 16 } -
trunk/Ohana/src/imregister/imreg/cadc.c
r27435 r34088 184 184 off_t GetREFCCD (RegImage *image, off_t *index, off_t *entry, off_t Nindex, off_t start) { 185 185 186 off_t i, N, NMATCH; 187 off_t *match; 188 189 /* create output index */ 190 N = 0; 191 NMATCH = 1000; 192 ALLOCATE (match, off_t, NMATCH); 186 off_t i; 193 187 194 188 /* find unique sequences */ -
trunk/Ohana/src/imregister/imreg/imregclient.c
r27611 r34088 4 4 int imregclient (char *fitsfile, char *statfile, char *datfile) { 5 5 6 int i, Nentry, Nslice, status,tmpint;6 int i, Nentry, Nslice, tmpint; 7 7 FILE *f; 8 8 RegImage *image; … … 35 35 exit (1); 36 36 } 37 status = fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm); 37 if (fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm) != 3) { 38 fprintf (stderr, "error reading stats\n"); 39 } 38 40 image[0].ccd = tmpint; 39 41 fclose (f); … … 46 48 exit (1); 47 49 } 48 status = 3;49 50 Nslice = image[0].seq; 50 51 Nentry = Nslice + 1; … … 52 53 for (i = 0; i < Nentry; i++) { 53 54 image[i] = image[0]; 54 status = fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm); 55 if (fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm) != 3) { 56 fprintf (stderr, "error reading stats\n"); 57 } 55 58 image[i].seq = tmpint; 56 59 if (image[i].seq == Nslice) continue; -
trunk/Ohana/src/imregister/imreg/modify.c
r27435 r34088 6 6 off_t i, j, Nold; 7 7 char *tmppath; 8 char *ext, *root, *path , dist;8 char *ext, *root, *path; 9 9 10 10 Nold = 0; … … 16 16 ALLOCATE (tmppath, char, 128); 17 17 } 18 if (output.modify_dist) { 19 dist = (output.dist) ? 0xff : ~IMREG_DIST; 20 } 18 // XXX this code is not used, why was it here? 19 // if (output.modify_dist) { 20 // dist = (output.dist) ? 0xff : ~IMREG_DIST; 21 // } 21 22 22 23 /* modify the selected entries */ -
trunk/Ohana/src/imregister/spreg/modify.c
r27435 r34088 24 24 if (!strncmp (spectrum[i].pathname, output.oldpath, Nold)) { 25 25 strcpy (tmppath, &spectrum[i].pathname[Nold]); 26 snprintf (spectrum[i].pathname, 128, "%s%s", output.newpath, tmppath);26 snprintf (spectrum[i].pathname, 64, "%s%s", output.newpath, tmppath); 27 27 } 28 28 } -
trunk/Ohana/src/imregister/src/imphotmerge.c
r28241 r34088 18 18 int VERBOSE, PHOTCODE, dbstate; 19 19 int PhotCodeSelect, Nin; 20 char * FitsOutput, *NameSelect;20 char *NameSelect; 21 21 int NameSelectLength; 22 22 … … 53 53 } 54 54 55 FitsOutput = (char *) NULL;56 if ((N = get_argument (argc, argv, "-fits"))) {57 remove_argument (N, &argc, argv);58 FitsOutput = strcreate (argv[N]);59 remove_argument (N, &argc, argv);60 }55 // char *FitsOutput = (char *) NULL; 56 // if ((N = get_argument (argc, argv, "-fits"))) { 57 // remove_argument (N, &argc, argv); 58 // FitsOutput = strcreate (argv[N]); 59 // remove_argument (N, &argc, argv); 60 // } 61 61 62 62 VERBOSE = FALSE; -
trunk/Ohana/src/kapa2/src/CheckVisual.c
r25757 r34088 10 10 11 11 int i, Nfound, N; 12 int is Color, isDefault;12 int isDefault; 13 13 XVisualInfo *visual_list, visual_temp; 14 14 unsigned long planes[3]; … … 35 35 36 36 // set these based on selected visual 37 is Color = isDefault = FALSE;37 isDefault = FALSE; 38 38 39 39 // attempt to select the most desirable type of visual: TrueColor 40 40 for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++); 41 41 if (i != Nfound) { 42 isColor = TRUE;42 // isColor = TRUE; 43 43 if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class); 44 44 isDefault = (graphic[0].visual == visual_list[i].visual); … … 52 52 for (i = 0; (i < Nfound) && (visual_list[i].class != DirectColor); i++); 53 53 if (i != Nfound) { 54 isColor = TRUE;54 // isColor = TRUE; 55 55 if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class); 56 56 isDefault = (graphic[0].visual == visual_list[i].visual); … … 64 64 for (i = 0; (i < Nfound) && (visual_list[i].class != PseudoColor); i++); 65 65 if (i != Nfound) { 66 isColor = TRUE;66 // isColor = TRUE; 67 67 if (DEBUG) fprintf (stderr, "selected visual class is %d\n", visual_list[i].class); 68 68 isDefault = (graphic[0].visual == visual_list[i].visual); -
trunk/Ohana/src/kapa2/src/DrawFrame.c
r32632 r34088 91 91 int pos, dir, fontsize; 92 92 double size, n, pad; 93 char string[64] , *fontname;93 char string[64]; 94 94 95 95 double fx = axis->fx; … … 130 130 int xt, yt; 131 131 132 fontname = GetRotFont (&fontsize); 132 // char *fontname is returned by GetRotFont, but not used here 133 GetRotFont (&fontsize); 133 134 134 135 pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : fontsize + 4.0; … … 231 232 232 233 TickMarkData *ticks; 233 double range, major, minor, first, value , dPixels, overshoot;234 int i, NTICKS, nPixels,done, ifirst, nsignif;234 double range, major, minor, first, value; 235 int i, NTICKS, done, ifirst, nsignif; 235 236 236 237 *nticks = 0; … … 249 250 250 251 // length of the axis in pixels 251 nPixels = hypot(axis->dfx, axis->dfy);252 dPixels = nPixels / range; // axis pixel-scale252 // int nPixels = hypot(axis->dfx, axis->dfy); 253 // double dPixels = nPixels / range; // axis pixel-scale 253 254 254 255 AxisTickScale (axis, &major, &minor, &nsignif); … … 263 264 264 265 // allow undershoot by 1 pixel 265 overshoot = (axis->min - first) * dPixels;266 // double overshoot = (axis->min - first) * dPixels; 266 267 // if (overshoot > 0.5) { 267 268 // if (range > 0) { -
trunk/Ohana/src/kapa2/src/EraseOverlay.c
r26891 r34088 4 4 5 5 int i, N; 6 Graphic *graphic;7 6 Section *section; 8 7 KapaImageWidget *image; … … 11 10 KiiScanCommand (sock, 16, "%*s %d", &N); 12 11 13 graphic = GetGraphic();14 12 section = GetActiveSection(); 15 13 image = section->image; -
trunk/Ohana/src/kapa2/src/JPEGit24.c
r29938 r34088 33 33 int i_start, i_end, j_start, j_end; 34 34 int I_start, J_start; 35 int dropback; /* this is a bit of a kludge... */ 36 int dx, dy, DX, DY, inDX, inDY; 35 int dx, dy, DX, inDX, inDY; 37 36 int quality; 38 37 int expand_in, expand_out; 39 double expand,Ix, Iy;38 double Ix, Iy; 40 39 unsigned char *out_pix; 41 40 unsigned short *in_pix, *in_pix_ref; … … 85 84 86 85 assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2)); 87 expand = expand_in = expand_out = 1.0;86 expand_in = expand_out = 1.0; 88 87 if (image[0].picture.expand > 0) { 89 expand = 1 / (1.0*image[0].picture.expand);90 88 expand_out = image[0].picture.expand; 91 89 expand_in = 1; 92 90 } 93 91 if (image[0].picture.expand < 0) { 94 expand = fabs((double)image[0].picture.expand);95 92 expand_out = 1; 96 93 expand_in = -image[0].picture.expand; … … 100 97 dy = image[0].picture.dy; 101 98 DX = image[0].image[0].matrix.Naxis[0]; 102 DY = image[0].image[0].matrix.Naxis[1];99 // DY = image[0].image[0].matrix.Naxis[1]; 103 100 104 101 // i_start, j_start are the closest lit screen pixel to 0,0 … … 118 115 inDX = image[0].picture.flipx ? -1 : +1; 119 116 inDY = image[0].picture.flipy ? -1 : +1; 120 121 dropback = expand_out - (i_end - i_start) % expand_out;122 if ((i_end - i_start) % expand_out == 0) dropback = 0;123 117 124 118 /* output line buffer */ -
trunk/Ohana/src/kapa2/src/Layout.c
r27790 r34088 5 5 6 6 int N; 7 Section *section;8 7 char *namedSocket = NULL; 9 8 … … 43 42 44 43 /* create basic section, empty of image or graph */ 45 section = AddSection ("default", 0.0, 0.0, 1.0, 1.0, -1); 44 // Section *section is returned by not used 45 AddSection ("default", 0.0, 0.0, 1.0, 1.0, -1); 46 46 } -
trunk/Ohana/src/kapa2/src/PSFrame.c
r29955 r34088 57 57 int pos, dir, fontsize; 58 58 double size, n, pad; 59 char string[64] , *fontname;59 char string[64]; 60 60 61 61 double fx = axis->fx; … … 90 90 int xt, yt; 91 91 92 fontname = GetRotFont (&fontsize); 92 // char *fontname is returned by not needed 93 GetRotFont (&fontsize); 93 94 94 95 pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : 0.8*fontsize + 1.0; -
trunk/Ohana/src/kapa2/src/PSPixmap.c
r32695 r34088 153 153 int i_start, i_end, j_start, j_end; 154 154 int I_start, J_start; 155 int dropback; /* this is a bit of a kludge... */ 156 int dx, dy, DX, DY, inDX, inDY, Xs, Ys; 155 int dx, dy, DX, inDX, inDY; 157 156 int expand_in, expand_out; 158 double expand,Ix, Iy;157 double Ix, Iy; 159 158 unsigned short *in_pix, *in_pix_ref; 160 159 unsigned char *pixel1, *pixel2, *pixel3; … … 174 173 175 174 assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2)); 176 expand = expand_in = expand_out = 1.0;175 expand_in = expand_out = 1.0; 177 176 if (image[0].picture.expand > 0) { 178 expand = 1 / (1.0*image[0].picture.expand);179 177 expand_out = image[0].picture.expand; 180 178 expand_in = 1; 181 179 } 182 180 if (image[0].picture.expand < 0) { 183 expand = fabs((double)image[0].picture.expand);184 181 expand_out = 1; 185 182 expand_in = -image[0].picture.expand; 186 183 } 187 184 188 Xs = image[0].picture.x;189 Ys = image[0].picture.y;190 185 dx = image[0].picture.dx; 191 186 dy = image[0].picture.dy; 192 187 DX = image[0].image[0].matrix.Naxis[0]; 193 DY = image[0].image[0].matrix.Naxis[1];194 188 195 189 // i_start, j_start are the closest lit screen pixel to 0,0 … … 209 203 inDX = image[0].picture.flipx ? -1 : +1; 210 204 inDY = image[0].picture.flipy ? -1 : +1; 211 212 dropback = expand_out - (i_end - i_start) % expand_out;213 if ((i_end - i_start) % expand_out == 0) dropback = 0;214 205 215 206 in_pix_ref = &image[0].pixmap[DX*(int)MAX(Iy,0) + (int)MAX(Ix,0)]; -
trunk/Ohana/src/kapa2/src/PaintOverlay.c
r25757 r34088 5 5 int i; 6 6 int dX, dY, dx, dy; 7 int Xmin, Ymin, Xmax, Ymax , Xrange, Yrange;7 int Xmin, Ymin, Xmax, Ymax; 8 8 double t, expand, X, Y, pX, pY; 9 9 … … 23 23 Xmax = image[0].picture.x + image[0].picture.dx; 24 24 Ymax = image[0].picture.y + image[0].picture.dy; 25 Xrange = image[0].picture.dx;26 Yrange = image[0].picture.dy;27 25 28 26 for (i = 0; i < image[0].overlay[N].Nobjects; i++) { -
trunk/Ohana/src/kapa2/src/Remap16.c
r25978 r34088 13 13 int I_start, J_start; 14 14 int dropback, inDX, inDY; 15 int dx, dy, DX , DY;16 double expand,Ix, Iy;15 int dx, dy, DX; 16 double Ix, Iy; 17 17 int expand_in, expand_out; 18 18 OUT_TYPE *out_pix, *out_pix2, *data; … … 49 49 if (picture[0].expand == -1) picture[0].expand = 1; 50 50 assert ((picture[0].expand >= 1) || (picture[0].expand <= -2)); 51 expand = expand_in = expand_out = 1.0;51 expand_in = expand_out = 1.0; 52 52 if (picture[0].expand > 0) { 53 expand = 1 / (1.0*picture[0].expand);54 53 expand_out = picture[0].expand; 55 54 expand_in = 1; 56 55 } 57 56 if (picture[0].expand < 0) { 58 expand = fabs((double)picture[0].expand);59 57 expand_out = 1; 60 58 expand_in = -picture[0].expand; … … 65 63 dy = picture[0].dy; 66 64 DX = matrix[0].Naxis[0]; 67 DY = matrix[0].Naxis[1];65 // int DY = matrix[0].Naxis[1]; 68 66 69 67 // i_start, j_start are the closest lit screen pixel to 0,0 -
trunk/Ohana/src/kapa2/src/Remap24.c
r25978 r34088 7 7 int I_start, J_start; 8 8 int dropback, extra, inDX, inDY; 9 int dx, dy, DX , DY;10 double expand,Ix, Iy;9 int dx, dy, DX; 10 double Ix, Iy; 11 11 int expand_in, expand_out; 12 12 unsigned char *out_pix, *out_pix2, *data; … … 33 33 if (picture[0].expand == -1) picture[0].expand = 1; 34 34 assert ((picture[0].expand >= 1) || (picture[0].expand <= -2)); 35 expand = expand_in = expand_out = 1.0;35 expand_in = expand_out = 1.0; 36 36 if (picture[0].expand == 0) /* set up expansions */ 37 37 picture[0].expand = 1; 38 38 if (picture[0].expand > 0) { 39 expand = 1 / (1.0*picture[0].expand);40 39 expand_out = picture[0].expand; 41 40 expand_in = 1; 42 41 } 43 42 if (picture[0].expand < 0) { 44 expand = fabs((double)picture[0].expand);45 43 expand_out = 1; 46 44 expand_in = -picture[0].expand; … … 50 48 dy = picture[0].dy; 51 49 DX = matrix[0].Naxis[0]; 52 DY = matrix[0].Naxis[1];50 // int DY = matrix[0].Naxis[1]; 53 51 54 52 // each row is padded to a 4-byte word -
trunk/Ohana/src/kapa2/src/Remap32.c
r25978 r34088 16 16 int I_start, J_start; 17 17 int dropback, inDX, inDY; 18 int dx, dy, DX , DY;19 double expand,Ix, Iy;18 int dx, dy, DX; 19 double Ix, Iy; 20 20 int expand_in, expand_out; 21 21 OUT_TYPE *out_pix, *out_pix2, *data; … … 52 52 if (picture[0].expand == -1) picture[0].expand = 1; 53 53 assert ((picture[0].expand >= 1) || (picture[0].expand <= -2)); 54 expand = expand_in = expand_out = 1.0;54 expand_in = expand_out = 1.0; 55 55 if (picture[0].expand > 0) { 56 expand = 1 / (1.0*picture[0].expand);57 56 expand_out = picture[0].expand; 58 57 expand_in = 1; 59 58 } 60 59 if (picture[0].expand < 0) { 61 expand = fabs((double)picture[0].expand);62 60 expand_out = 1; 63 61 expand_in = -picture[0].expand; … … 68 66 dy = picture[0].dy; 69 67 DX = matrix[0].Naxis[0]; 70 DY = matrix[0].Naxis[1];68 // int DY = matrix[0].Naxis[1]; 71 69 72 70 // i_start, j_start are the closest lit screen pixel to 0,0 -
trunk/Ohana/src/kapa2/src/Remap8.c
r25978 r34088 8 8 int I_start, J_start; 9 9 int dropback, inDX, inDY; 10 int dx, dy, DX , DY;11 double expand,Ix, Iy;10 int dx, dy, DX; 11 double Ix, Iy; 12 12 int expand_in, expand_out; 13 13 OUT_TYPE *out_pix, *out_pix2, *data; … … 32 32 if (picture[0].expand == -1) picture[0].expand = 1; 33 33 assert ((picture[0].expand >= 1) || (picture[0].expand <= -2)); 34 expand = expand_in = expand_out = 1.0;34 expand_in = expand_out = 1.0; 35 35 if (picture[0].expand == 0) /* set up expansions */ 36 36 picture[0].expand = 1; 37 37 if (picture[0].expand > 0) { 38 expand = 1 / (1.0*picture[0].expand);39 38 expand_out = picture[0].expand; 40 39 expand_in = 1; 41 40 } 42 41 if (picture[0].expand < 0) { 43 expand = fabs((double)picture[0].expand);44 42 expand_out = 1; 45 43 expand_in = -picture[0].expand; … … 50 48 dy = picture[0].dy; 51 49 DX = matrix[0].Naxis[0]; 52 DY = matrix[0].Naxis[1];50 // int DY = matrix[0].Naxis[1]; 53 51 54 52 // i_start, j_start are the closest lit screen pixel to 0,0 -
trunk/Ohana/src/kapa2/src/SetGraphSize.c
r29938 r34088 77 77 double minPADx, maxPADx, minPADy; 78 78 double minPAD, maxPAD; 79 char string[64] , *fontname;79 char string[64]; 80 80 KapaGraphWidget *graph; 81 81 Graphic *graphic; … … 97 97 98 98 graphic = GetGraphic (); 99 fontname = GetRotFont (&fontsize); 99 // char *fontname; 100 GetRotFont (&fontsize); 100 101 101 102 minPAD = 1.0*fontsize + 0; -
trunk/Ohana/src/kapa2/src/SetImageData.c
r31160 r34088 3 3 int SetImageData (int sock) { 4 4 5 Graphic *graphic;6 5 Section *section; 7 6 KapaImageWidget *image; 8 7 9 graphic = GetGraphic(); 8 // XXX needed for XClearWindow below 9 // Graphic *graphic = GetGraphic(); 10 10 11 11 section = GetActiveSection(); … … 53 53 int SetImageCoords (int sock) { 54 54 55 Graphic *graphic;56 55 Section *section; 57 56 KapaImageWidget *image; 58 59 graphic = GetGraphic();60 57 61 58 section = GetActiveSection(); -
trunk/Ohana/src/kapa2/src/bDrawFrame.c
r29955 r34088 60 60 int pos, dir, fontsize; 61 61 double size, n, pad; 62 char string[64] , *fontname;62 char string[64]; 63 63 64 64 double fx = axis->fx; … … 93 93 int xt, yt; 94 94 95 fontname = GetRotFont (&fontsize); 95 // char *fontname is returned but ignored 96 GetRotFont (&fontsize); 96 97 97 98 pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : 0.8*fontsize + 1.0; -
trunk/Ohana/src/kapa2/src/bDrawImage.c
r32695 r34088 11 11 int i_start, i_end, j_start, j_end; 12 12 int I_start, J_start; 13 int dropback; /* this is a bit of a kludge... */14 int dx, dy, DX, DY,inDX, inDY, Xs, Ys;13 // int dropback; /* this is a bit of a kludge... */ 14 int dx, dy, DX, inDX, inDY, Xs, Ys; 15 15 int expand_in, expand_out; 16 double expand,Ix, Iy;16 double Ix, Iy; 17 17 unsigned char *out_pix; 18 18 unsigned short *in_pix, *in_pix_ref; … … 35 35 36 36 assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2)); 37 expand = expand_in = expand_out = 1.0;37 expand_in = expand_out = 1.0; 38 38 if (image[0].picture.expand > 0) { 39 expand = 1 / (1.0*image[0].picture.expand);40 39 expand_out = image[0].picture.expand; 41 40 expand_in = 1; 42 41 } 43 42 if (image[0].picture.expand < 0) { 44 expand = fabs((double)image[0].picture.expand);45 43 expand_out = 1; 46 44 expand_in = -image[0].picture.expand; … … 53 51 dy = image[0].picture.dy; 54 52 DX = image[0].image[0].matrix.Naxis[0]; 55 DY = image[0].image[0].matrix.Naxis[1];53 // int DY = image[0].image[0].matrix.Naxis[1]; 56 54 57 55 // the created buffer is supposed to contain the output windows … … 82 80 inDY = image[0].picture.flipy ? -1 : +1; 83 81 84 dropback = expand_out - (i_end - i_start) % expand_out;85 if ((i_end - i_start) % expand_out == 0) dropback = 0;82 // dropback = expand_out - (i_end - i_start) % expand_out; 83 // if ((i_end - i_start) % expand_out == 0) dropback = 0; 86 84 87 85 ALLOCATE (line_buffer, bDrawColor, 3*dx); -
trunk/Ohana/src/kapa2/src/bDrawOverlay.c
r29938 r34088 8 8 int i; 9 9 int dx, dy; 10 int Xmin, Ymin, Xmax, Ymax , Xrange, Yrange;10 int Xmin, Ymin, Xmax, Ymax; 11 11 double expand, X, Y, dX, dY, pX, pY; 12 12 bDrawColor color; … … 28 28 Xmax = image[0].picture.dx; 29 29 Ymax = image[0].picture.dy; 30 Xrange = image[0].picture.dx;31 Yrange = image[0].picture.dy;32 30 33 31 if (N == INFRONT) { -
trunk/Ohana/src/libautocode/def/common.h
r28241 r34088 32 32 # define rawshort short 33 33 34 # define DVO_IMAGE_NAME_LEN 121 35 34 36 /*** rawshort is used to handle the broken pre-autocode photreg tables 35 37 fix the tables and remove this -
trunk/Ohana/src/libdvo/src/ImageOps.c
r31636 r34088 8 8 { 9 9 10 int j, flipped, status , InPic;10 int j, flipped, status; 11 11 off_t i, n, *subset; 12 12 int npts; … … 65 65 x[2] = image[i].NX; y[2] = image[i].NY; 66 66 x[3] = 0; y[3] = image[i].NY; 67 InPic =flipped = FALSE;67 flipped = FALSE; 68 68 for (j = 0; j < 4; j++) { 69 69 XY_to_RD (&r, &d, x[j], y[j], &image[i].coords); … … 95 95 x[2] = image[i].NX; y[2] = image[i].NY; 96 96 x[3] = 0; y[3] = image[i].NY; 97 InPic =flipped = FALSE;97 flipped = FALSE; 98 98 for (j = 0; j < 4; j++) { 99 99 XY_to_RD (&r, &d, x[j], y[j], &image[i].coords); -
trunk/Ohana/src/libdvo/src/coordops.c
r31663 r34088 68 68 mode = GetProjectionMode (proj); 69 69 if (proj == PROJ_NONE) return (FALSE); 70 if ( proj== PROJ_MODE_NONE) return (FALSE);70 if (mode == PROJ_MODE_NONE) return (FALSE); 71 71 72 72 stht = ctht = 1; … … 201 201 mode = GetProjectionMode (proj); 202 202 if (proj == PROJ_NONE) return (FALSE); 203 if ( proj== PROJ_MODE_NONE) return (FALSE);203 if (mode == PROJ_MODE_NONE) return (FALSE); 204 204 205 205 /**** Locally Cartesian Projections ****/ -
trunk/Ohana/src/libdvo/src/dbCmdlineFields.c
r31636 r34088 136 136 // XXX the ra and dec range depend on the projection. 137 137 // XXX this is wrong... 138 int status;139 status =XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);140 status =XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);138 // int status; 139 XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords); 140 XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords); 141 141 } 142 142 -
trunk/Ohana/src/libdvo/src/dbRPN.c
r31635 r34088 4 4 dbStack *dbRPN (int argc, char **argv, int *nstack) { 5 5 6 int type , Nx, Ny;6 int type; 7 7 int i, j, Nstack, Nop_stack, NSTACK; 8 8 dbStack *stack, *op_stack; … … 17 17 } 18 18 19 N x = Ny = Nstack = Nop_stack = 0;19 Nstack = Nop_stack = 0; 20 20 for (i = 0; i < argc; i++) { 21 21 -
trunk/Ohana/src/libdvo/src/dvo_image.c
r33649 r34088 111 111 exit (2); 112 112 } 113 return ( TRUE);113 return (status); 114 114 } 115 115 -
trunk/Ohana/src/libdvo/src/dvo_tiny_values.c
r33649 r34088 51 51 52 52 for (i = 0; i < catalog[0].Naverage; i++) { 53 CopyAverageToTiny (& catalog[0].averageT[i], &catalog[0].average[i]);53 CopyAverageToTiny (&averageT[i], &average[i]); 54 54 } 55 55 } … … 61 61 62 62 for (i = 0; i < catalog[0].Nmeasure; i++) { 63 CopyMeasureToTiny (& catalog[0].measureT[i], &catalog[0].measure[i]);63 CopyMeasureToTiny (&measureT[i], &measure[i]); 64 64 } 65 65 } -
trunk/Ohana/src/libdvo/src/skyregion_gsc.c
r33649 r34088 271 271 int i, j, Nz, NZ, Nregions, poleRegion; 272 272 SkyRegion *regions; 273 SkyRegion tempregion;274 273 SkyRegionZone *zones; 275 274 char basename[64]; … … 294 293 poleRegion = SIGN(regions[i].Dmin); 295 294 Nregions --; 296 tempregion = regions[i];297 295 for (j = i; j < Nregions; j++) { 298 296 regions[j] = regions[j+1]; -
trunk/Ohana/src/libfits/Makefile
r31663 r34088 16 16 17 17 # programs may add their own internal requirements here 18 FULL_CFLAGS = $(BASE_CFLAGS) -fPIC -Wall -Werror18 FULL_CFLAGS = $(BASE_CFLAGS) -fPIC 19 19 FULL_CPPFLAGS = $(BASE_CPPFLAGS) -I$(EXT) 20 20 FULL_LDFLAGS = $(BASE_LDFLAGS) -lohana -
trunk/Ohana/src/libfits/extern/fits_hdecompress.c
r15487 r34088 1048 1048 { 1049 1049 LONGLONG sumall; 1050 int nel,stat;1050 int stat; 1051 1051 unsigned char nbitplanes[3]; 1052 1052 char tmagic[2]; … … 1071 1071 *scale=readint(infile); /* scale factor for digitization */ 1072 1072 1073 nel = (*nx) * (*ny);1073 // nel = (*nx) * (*ny); 1074 1074 1075 1075 /* sum of all pixels */ … … 1095 1095 */ 1096 1096 { 1097 int nel,stat;1097 int stat; 1098 1098 LONGLONG sumall; 1099 1099 unsigned char nbitplanes[3]; … … 1119 1119 *scale=readint(infile); /* scale factor for digitization */ 1120 1120 1121 nel = (*nx) * (*ny);1121 // nel = (*nx) * (*ny); 1122 1122 1123 1123 /* sum of all pixels */ -
trunk/Ohana/src/libfits/extern/ricecomp.c
r18269 r34088 59 59 { 60 60 Buffer bufmem, *buffer = &bufmem; 61 int bsize,i, j, thisblock;61 int i, j, thisblock; 62 62 int lastpix, nextpix, pdiff; 63 63 int v, fs, fsmask, top, fsmax, fsbits, bbits; … … 73 73 * compression of short & byte images. 74 74 */ 75 bsize = 4;75 // int bsize = 4; 76 76 77 77 /* nblock = 32; now an input parameter*/ … … 277 277 { 278 278 Buffer bufmem, *buffer = &bufmem; 279 int bsize,i, j, thisblock;279 int i, j, thisblock; 280 280 281 281 /* … … 299 299 * compression of short & byte images. 300 300 */ 301 bsize = 2;301 // bsize = 2; 302 302 303 303 /* nblock = 32; now an input parameter */ … … 501 501 { 502 502 Buffer bufmem, *buffer = &bufmem; 503 int bsize,i, j, thisblock;503 int i, j, thisblock; 504 504 505 505 /* … … 523 523 * compression of short & byte images. 524 524 */ 525 bsize = 1;525 // bsize = 1; 526 526 527 527 /* nblock = 32; now an input parameter */ … … 826 826 int nblock) /* coding block size */ 827 827 { 828 int bsize,i, k, imax;828 int i, k, imax; 829 829 int nbits, nzero, fs; 830 830 unsigned char *cend, bytevalue; … … 839 839 * compression of short & byte images. 840 840 */ 841 bsize = 4;841 // bsize = 4; 842 842 843 843 /* nblock = 32; now an input parameter */ … … 1014 1014 { 1015 1015 int i, imax; 1016 int bsize,k;1016 int k; 1017 1017 int nbits, nzero, fs; 1018 1018 unsigned char *cend, bytevalue; … … 1028 1028 */ 1029 1029 1030 bsize = 2;1030 // bsize = 2; 1031 1031 1032 1032 /* nblock = 32; now an input parameter */ … … 1200 1200 { 1201 1201 int i, imax; 1202 int bsize,k;1202 int k; 1203 1203 int nbits, nzero, fs; 1204 1204 unsigned char *cend; … … 1214 1214 */ 1215 1215 1216 bsize = 1;1216 // bsize = 1; 1217 1217 1218 1218 /* nblock = 32; now an input parameter */ -
trunk/Ohana/src/libfits/matrix/F_compress_M.c
r33648 r34088 45 45 float zscale, zzero; 46 46 47 int zdata_pixsize, odata_pixsize , idata_pixsize;47 int zdata_pixsize, odata_pixsize; 48 48 49 49 int *ztile = NULL; … … 236 236 zdata_pixsize = gfits_vartable_heap_pixsize (zdef.format); 237 237 238 // size of a pixel in the final image 239 idata_pixsize = abs(header[0].bitpix) / 8;238 // size of a pixel in the final image (not needed) 239 // idata_pixsize = abs(header[0].bitpix) / 8; 240 240 241 241 // size of a pixel in the output from the decompression routine … … 480 480 int gfits_compressed_is_primary (Header *header) { 481 481 482 int has_ztension, has_zimage;483 int ztension, zimage;484 485 has_zimage = gfits_scan_alt (header, "ZIMAGE", "%t", 1, &zimage);486 has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);482 int zimage = FALSE; 483 // int ztension = FALSE; 484 485 int has_zimage = gfits_scan_alt (header, "ZIMAGE", "%t", 1, &zimage); 486 // int has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension); 487 487 488 488 if (has_zimage && zimage) return (TRUE); -
trunk/Ohana/src/libfits/table/F_copy_T.c
r31663 r34088 17 17 int gfits_copy_vtable (VTable *in, VTable *out) { 18 18 19 off_t i , Nx, Ny, Nrows;19 off_t i; 20 20 21 21 /* find buffer size */ 22 Nx = in[0].header[0].Naxis[0];23 Ny = in[0].header[0].Naxis[1];22 off_t Nx = in[0].header[0].Naxis[0]; 23 // off_t Ny = in[0].header[0].Naxis[1]; 24 24 25 25 // validate these two? … … 32 32 out[0].Nrow = in[0].Nrow; 33 33 34 Nrows = out[0].Nrow;34 off_t Nrows = out[0].Nrow; 35 35 36 36 ALLOCATE (out[0].row, off_t, MAX (Nrows, 1)); -
trunk/Ohana/src/libkapa/src/DrawRotString.c
r30603 r34088 77 77 /* check for special characters */ 78 78 if (!code && !protect) { 79 /* subscript, starts with _ */ 79 80 if (N == 94) { 80 81 SetRotFont (currentname, (int)(0.8*currentsize)); … … 83 84 continue; 84 85 } 86 /* superscript, starts with ^ */ 85 87 if (N == 95) { 86 88 SetRotFont (currentname, (int)(0.8*currentsize)); … … 89 91 continue; 90 92 } 93 /* normal script, starts with | */ 91 94 if (N == 124) { 92 95 SetRotFont (currentname, basesize); … … 137 140 138 141 int ii, jj, byte_line, byte, bit, flag; 139 unsigned long int fore , back;142 unsigned long int fore; 140 143 double i, j, cs, sn, rscale, tmp; 141 144 int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0; … … 143 146 if (mode) { 144 147 fore = RotForeground; 145 back = RotBackground;148 // back = RotBackground; 146 149 } else { 147 150 fore = RotBackground; 148 back = RotForeground;151 // back = RotForeground; 149 152 } 150 153 -
trunk/Ohana/src/libkapa/src/KapaOpen.c
r27988 r34088 252 252 int KapaOpenNamedSocket (char *kapa_exec, char *name) { 253 253 254 int InitSocket , status;254 int InitSocket; 255 255 struct sockaddr_un Address; 256 256 socklen_t AddressLength; … … 269 269 Address.sun_family = AF_UNIX; 270 270 InitSocket = socket (AF_UNIX, SOCK_STREAM, 0); 271 status =bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));272 status =listen (InitSocket, 1);271 bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address)); 272 listen (InitSocket, 1); 273 273 274 274 if (name == NULL) { -
trunk/Ohana/src/libkapa/src/KiiOpen.c
r27588 r34088 4 4 int KiiOpen (char *kii_exec, char *name) { 5 5 6 int InitSocket , status;6 int InitSocket; 7 7 struct sockaddr_un Address; 8 8 socklen_t AddressLength; … … 21 21 Address.sun_family = AF_UNIX; 22 22 InitSocket = socket (AF_UNIX, SOCK_STREAM, 0); 23 status =bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));24 status =listen (InitSocket, 1);23 bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address)); 24 listen (InitSocket, 1); 25 25 26 26 if (name == NULL) { -
trunk/Ohana/src/libkapa/src/KiiPicture.c
r31160 r34088 22 22 23 23 int Nwrite, Npix, Ncolors, size; 24 float *in,min, max;24 float min, max; 25 25 26 26 Npix = image[0].Nx*image[0].Ny; … … 28 28 KiiSendCommand (fd, 4, "READ"); /* tell kapa to look for the incoming image */ 29 29 KiiScanMessage (fd, "%d", &Ncolors); 30 31 in = image[0].data1d;32 30 33 31 /* these are for a future upgrade */ -
trunk/Ohana/src/libohana/src/config.c
r20358 r34088 131 131 132 132 FILE *f; 133 int i, done,Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;133 int i, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel; 134 134 char *ibuffer, *obuffer, *tbuffer; 135 135 char *last, *next; … … 149 149 /* load data from file */ 150 150 if (f) { 151 done = FALSE;152 151 while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) { 153 152 Nbytes += nbytes; … … 382 381 383 382 FILE *f; 384 int i, done,Nbytes, NBYTES, nbytes, Ncpy;383 int i, Nbytes, NBYTES, nbytes, Ncpy; 385 384 char *ibuffer; 386 385 char line[256]; … … 398 397 399 398 /* load data from file */ 400 done = FALSE;401 399 while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) { 402 400 Nbytes += nbytes; -
trunk/Ohana/src/libohana/src/time.c
r30602 r34088 95 95 p1 = line; 96 96 tmp = strtod (p1, &p2); 97 if (0) { fprintf (stderr, "tmp: %f\n", tmp); } 97 98 mode = TIME_DATE; 98 99 if (p2 == p1 + strlen (p1) - 1) { -
trunk/Ohana/src/misc/src/mkgauss.c
r2417 r34088 38 38 long A, B; 39 39 double val, x, dx, dx1, dx2, dx3, df; 40 double mean, sigma;41 40 42 41 A = time(NULL); … … 49 48 dx2 = 2.0*dx/3.0; 50 49 dx3 = dx; 51 mean = 0.0;52 sigma = 1.0;53 50 54 51 for (i = 0, x = -7.0; (i < NGAUSS) && (x < 7.0); x += dx) { -
trunk/Ohana/src/mosastro/src/clip.c
r6645 r34088 5 5 int i, j, Nscatter, Nmask, Nkeep, Nkpcp; 6 6 double DL, DM, dL, dM; 7 double sigma;8 7 StarData *raw, *ref; 9 8 10 9 Nmask = Nkeep = 0; 11 sigma = GetScatter (&Nscatter, &DL, &DM, FALSE); 10 11 // double sigma is returned; 12 GetScatter (&Nscatter, &DL, &DM, FALSE); 12 13 13 14 for (i = 0; i < Nchip; i++) { -
trunk/Ohana/src/mosastro/src/getusnob.c
r27435 r34088 133 133 } 134 134 135 stars[Nusno].M = mB;135 stars[Nusno].M = (TRUE) ? mB : mR; 136 136 stars[Nusno].R += uR*(Year - 2000.0); 137 137 stars[Nusno].D += uD*(Year - 2000.0); -
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro (added) merged: 33985,34049,34073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/cdot.c
r25757 r34088 30 30 31 31 status = fRD_to_XY (&x, &y, r, d, &graphmode.coords); 32 32 if (!status) return TRUE; 33 33 34 if (!KapaPrepPlot (kapa, 1, &graphmode)) return (FALSE); 34 35 KapaPlotVector (kapa, 1, &x, "x"); -
trunk/Ohana/src/opihi/cmd.astro/cline.c
r30971 r34088 23 23 graphmode.etype = 0; 24 24 25 // need to plot to edge of picture.. 25 26 status = fRD_to_XY (&x[0], &y[0], r[0], d[0], &graphmode.coords); 27 if (!status) { 28 return FALSE; 29 } 26 30 status = fRD_to_XY (&x[1], &y[1], r[1], d[1], &graphmode.coords); 31 if (!status) { 32 return FALSE; 33 } 27 34 28 35 if (!KapaPrepPlot (kapa, 2, &graphmode)) return (FALSE); -
trunk/Ohana/src/opihi/cmd.astro/fixcols.c
r21061 r34088 68 68 int fixcols (int argc, char **argv) { 69 69 70 int ix, iy, Nx, N y, Nvect, start, stop;70 int ix, iy, Nx, Nvect, start, stop; 71 71 float *Vin, *vect, *meds, median, stdev, sigma, Nsigma, value; 72 72 Buffer *in; … … 84 84 85 85 Nx = in[0].matrix.Naxis[0]; 86 Ny = in[0].matrix.Naxis[1];86 // Ny = in[0].matrix.Naxis[1]; 87 87 88 88 ALLOCATE (meds, float, Nx); -
trunk/Ohana/src/opihi/cmd.astro/fiximage.c
r33700 r34088 3 3 int fiximage (int argc, char **argv) { 4 4 5 int ix, iy , N;5 int ix, iy; 6 6 Buffer *in, *ct, *mask; 7 7 8 int VERBOSE = FALSE;9 if ((N = get_argument (argc, argv, "-v"))) {10 VERBOSE = TRUE;11 remove_argument (N, &argc, argv);12 }8 // int VERBOSE = FALSE; 9 // if ((N = get_argument (argc, argv, "-v"))) { 10 // VERBOSE = TRUE; 11 // remove_argument (N, &argc, argv); 12 // } 13 13 14 14 if (argc != 4) { -
trunk/Ohana/src/opihi/cmd.astro/gauss.c
r13479 r34088 5 5 char key[20]; 6 6 int i, N, Npix, Nborder, Nspot; 7 double X, Y, Z , ZP, RA, DEC, max;7 double X, Y, ZP, RA, DEC, max; 8 8 int kapa; 9 9 char *name; … … 58 58 KiiCursorRead (kapa, &X, &Y, &ZP, &RA, &DEC, key); 59 59 if (!strcasecmp (key, "Q")) break; 60 Z =get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);60 get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max); 61 61 } 62 62 KiiCursorOff (kapa); -
trunk/Ohana/src/opihi/cmd.astro/getvel.c
r19823 r34088 4 4 5 5 int i, n, Ncurve; 6 int nx, ny;7 6 double L, V, Vo, dV, Bo, dB; 8 7 double xo, yo; … … 29 28 30 29 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE); 31 nx = buf[0].matrix.Naxis[0];32 ny = buf[0].matrix.Naxis[1];30 // int nx = buf[0].matrix.Naxis[0]; 31 // int ny = buf[0].matrix.Naxis[1]; 33 32 34 33 /* we expect the input image to have units of velocity, lattitude, and longitude */ -
trunk/Ohana/src/opihi/cmd.astro/imfit.c
r20936 r34088 3 3 int imfit (int argc, char **argv) { 4 4 5 int i, j, N, Npts, Save, VERBOSE , ShapeVariation;5 int i, j, N, Npts, Save, VERBOSE; 6 6 int sx, sy, nx, ny, Nx, Ny; 7 7 float chisq, ochisq, dchisq, Gain, RDnoise, SatThreshold; … … 16 16 } 17 17 18 ShapeVariation = FALSE;19 if ((N = get_argument (argc, argv, "-shapes"))) {20 remove_argument (N, &argc, argv);21 ShapeVariation = TRUE;22 }18 // int ShapeVariation = FALSE; 19 // if ((N = get_argument (argc, argv, "-shapes"))) { 20 // remove_argument (N, &argc, argv); 21 // ShapeVariation = TRUE; 22 // } 23 23 24 24 SatThreshold = 0xffff; -
trunk/Ohana/src/opihi/cmd.astro/imsub.c
r12840 r34088 3 3 int imsub (int argc, char **argv) { 4 4 5 int i, j, N , VERBOSE;5 int i, j, N; 6 6 int sx, sy, nx, ny, Nx, Ny; 7 7 float value; … … 9 9 Buffer *buf; 10 10 11 VERBOSE = FALSE;12 if ((N = get_argument (argc, argv, "-v"))) {13 remove_argument (N, &argc, argv);14 VERBOSE = TRUE;15 }11 // int VERBOSE = FALSE; 12 // if ((N = get_argument (argc, argv, "-v"))) { 13 // remove_argument (N, &argc, argv); 14 // VERBOSE = TRUE; 15 // } 16 16 17 17 /* set fitting function */ -
trunk/Ohana/src/opihi/cmd.astro/kronflux.c
r33963 r34088 67 67 int i, j; 68 68 69 double gain;70 char *string = get_variable ("GAIN");71 if (string == (char *) NULL) {72 if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n");73 gain = 1.0;74 } else {75 gain = atof (string);76 }69 // double gain; 70 // char *string = get_variable ("GAIN"); 71 // if (string == (char *) NULL) { 72 // if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n"); 73 // gain = 1.0; 74 // } else { 75 // gain = atof (string); 76 // } 77 77 78 78 float *data = (float *) matrix->buffer; -
trunk/Ohana/src/opihi/cmd.astro/medianmap.c
r16006 r34088 6 6 int i, j, k, I0, I1, J0, J1, I, J, n, N; 7 7 int nx, ny, Nx, Ny, NX, NY, Ignore; 8 float Mv, Nv, Mv2,value, min, max, IgnoreValue;8 float value, min, max, IgnoreValue; 9 9 float *In, *Out, *ip; 10 10 float fx, fy; … … 71 71 ALLOCATE (temp, float, 2*nx*ny); 72 72 73 Nv =Mv = Mv2 = 0.0;73 // float Mv = Mv2 = 0.0; 74 74 75 75 for (j = 0; j < Ny; j++) { -
trunk/Ohana/src/opihi/cmd.astro/objload.c
r13479 r34088 52 52 for (i = 0; i < Nline; i++) { 53 53 /* we are now using all entries on the *.obj line */ 54 status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f", &type, &overlay[Noverlay].x, &overlay[Noverlay].y); 54 status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f", &type, &overlay[Noverlay].x, & 55 overlay[Noverlay].y); 56 if (status != 3) continue; 55 57 if (Objtype && (Objtype != type)) continue; 56 58 overlay[Noverlay].type = KII_OVERLAY_BOX; -
trunk/Ohana/src/opihi/cmd.astro/outline.c
r13479 r34088 8 8 int outline (int argc, char **argv) { 9 9 10 int i, j, k, Npar,BigChange, ABigChange;10 int i, j, k, BigChange, ABigChange; 11 11 float Io, *in, ochisq, dchi, chisq, chisq_p, chisq_m, dp, tmp_par; 12 12 float curve, frac; … … 14 14 15 15 if (argc != 9) { 16 gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer) Npar\n");16 gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer)\n"); 17 17 return (FALSE); 18 18 } … … 26 26 par[4] = atof(argv[5]); 27 27 Io = atof(argv[6]); 28 Npar = atof (argv[8]);28 // int Npar = atof (argv[8]); 29 29 30 30 dpar[0] = 10; -
trunk/Ohana/src/opihi/cmd.astro/rotcurve.c
r19823 r34088 8 8 double L, dL, Lo, V, Vo, dV, Bo, dB, Do, dD; 9 9 double xo, yo, Xo, Yo; 10 double sl, cl, wo, Ro, Rs, wr, r, fr,d, min;10 double sl, cl, wo, Ro, Rs, wr, r, d, min; 11 11 double R[100], T[100], W[100]; 12 12 FILE *f; … … 99 99 } 100 100 r = (wr - W[n]) * (R[n-1] - R[n]) / (W[n-1] - W[n]) + R[n]; 101 fr = (Ro/r);101 // fr = (Ro/r); 102 102 if (r < fabs(Rs)) { /* can't be on rotation curve */ 103 103 continue; -
trunk/Ohana/src/opihi/cmd.astro/spec.c
r20936 r34088 3 3 int spec (int argc, char **argv) { 4 4 5 int i, j, Xo, X1, y1, y2, Nx , Ny;5 int i, j, Xo, X1, y1, y2, Nx; 6 6 int Nlong, Ngap, Nrow, N, Nring; 7 7 float *buffer, *V; … … 45 45 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE); 46 46 Nx = buf[0].matrix.Naxis[0]; 47 Ny = buf[0].matrix.Naxis[1];47 // int Ny = buf[0].matrix.Naxis[1]; 48 48 49 49 Xo = atof (argv[2]); -
trunk/Ohana/src/opihi/cmd.astro/star.c
r26891 r34088 4 4 5 5 int x, y, N, dx, Nborder; 6 double Z,max;6 double max; 7 7 Buffer *buf; 8 8 … … 36 36 } 37 37 38 Z =get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);38 get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max); 39 39 40 40 return (TRUE); -
trunk/Ohana/src/opihi/cmd.astro/transform.c
r7917 r34088 5 5 int i, j, Nx, Ny; 6 6 Coords coords_in, coords_out; 7 double scale_in, scale_out;8 7 int X, Y; 9 8 double x, y, r, d, dx, dy; … … 30 29 } 31 30 32 scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1)));33 scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1)));31 // double scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1))); 32 // double scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1))); 34 33 35 34 Vin = (float *) in[0].matrix.buffer; -
trunk/Ohana/src/opihi/cmd.data/densify.c
r31160 r34088 5 5 int densify (int argc, char **argv) { 6 6 7 int i, Nx, Ny, Xb, Yb, N ormalize, N, Xpix, Ypix, good, UseGraph;7 int i, Nx, Ny, Xb, Yb, N, Xpix, Ypix, good, UseGraph; 8 8 double Xmin, Xmax, dX, Ymin, Ymax, dY; 9 9 float *val; … … 12 12 opihi_flt *x, *y; 13 13 14 Normalize = TRUE;15 if ((N = get_argument (argc, argv, "-raw"))) {16 remove_argument (N, &argc, argv);17 Normalize = FALSE;18 }14 // int Normalize = TRUE; 15 // if ((N = get_argument (argc, argv, "-raw"))) { 16 // remove_argument (N, &argc, argv); 17 // Normalize = FALSE; 18 // } 19 19 20 20 UseGraph = FALSE; -
trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c
r20936 r34088 34 34 35 35 int i, Npts; 36 double mean, sigma;37 36 Vector *vec; 38 37 … … 42 41 43 42 Npts = atoi (argv[2]); 44 mean = atof (argv[3]);45 sigma = atof (argv[4]);43 // mean = atof (argv[3]); 44 // sigma = atof (argv[4]); 46 45 47 46 ResetVector (vec, OPIHI_FLT, Npts); -
trunk/Ohana/src/opihi/cmd.data/list_header.c
r27435 r34088 41 41 strcpy (buf[0].file, "*"); 42 42 strcat (buf[0].file, filename); 43 43 44 status = gfits_read_header (argv[2], &buf[0].header); 45 if (!status) { 46 gprint (GP_ERR, "failed to read header for %s\n", argv[2]); 47 return FALSE; 48 } 44 49 buf[0].header.bitpix = bitpix; 45 50 buf[0].header.bzero = bzero; -
trunk/Ohana/src/opihi/cmd.data/load.c
r13479 r34088 3 3 int load (int argc, char **argv) { 4 4 5 int i, N, n,ISCEL;5 int i, N, ISCEL; 6 6 int kapa, Noverlay, NOVERLAY; 7 7 char *c, type[10], string[128], line[1024]; … … 59 59 60 60 dx = dy = 0; 61 for (n = 0; scan_line (f, line) != EOF;) {61 while (scan_line (f, line) != EOF) { 62 62 c = strchr (line, '#'); 63 63 if (c != (char *) NULL) -
trunk/Ohana/src/opihi/cmd.data/lookup.c
r20936 r34088 37 37 38 38 for (j = 0; (*ip < *xp) && (j < yv[0].Nelements); j++); 39 *op = j;39 *op = *yp; 40 40 } 41 41 -
trunk/Ohana/src/opihi/cmd.data/rotate.c
r27435 r34088 3 3 int rotate (int argc, char **argv) { 4 4 5 int i, j, NX, NY, X, Y, Lx, Ly, N , newCenter;5 int i, j, NX, NY, X, Y, Lx, Ly, N; 6 6 float *in_buff, *out_buff, *c; 7 7 double angle, CosAngle, SinAngle, Xo, Yo, dX, dY, fx, fy, x, y, X1, Y1; … … 12 12 Yo = 0; 13 13 if ((N = get_argument (argc, argv, "-center"))) { 14 newCenter = TRUE;15 14 remove_argument (N, &argc, argv); 16 15 Xo = atof(argv[N]); … … 19 18 remove_argument (N, &argc, argv); 20 19 } 21 else22 newCenter = FALSE;23 20 24 21 if (argc != 3) { -
trunk/Ohana/src/opihi/cmd.data/shift.c
r9726 r34088 3 3 int shift (int argc, char **argv) { 4 4 5 int i, j , N, ROLL;5 int i, j; 6 6 int nx, ny, dx, dy, DXin, DXot, DYin, DYot; 7 7 float *Vin, *Vot; … … 9 9 Buffer *in, *out; 10 10 11 ROLL = FALSE;12 if ((N = get_argument (argc, argv, "-roll"))) {13 remove_argument (N, &argc, argv);14 ROLL = TRUE;15 }11 // int ROLL = FALSE; 12 // if ((N = get_argument (argc, argv, "-roll"))) { 13 // remove_argument (N, &argc, argv); 14 // ROLL = TRUE; 15 // } 16 16 17 17 if (argc != 5) { -
trunk/Ohana/src/opihi/cmd.data/spline_apply.c
r16119 r34088 5 5 6 6 int i, j, I, J; 7 int nx, ny, Nx, Ny , xdir;7 int nx, ny, Nx, Ny; 8 8 float rx, ry, x, y; 9 9 float *Tx1, *Tx2, *Txc, *Ty1, *Ty2, *Tyc, *V, *V1, *V2; … … 19 19 if ((out = SelectBuffer (argv[3], ANYBUFFER, TRUE)) == NULL) return (FALSE); 20 20 21 xdir = FALSE;22 if (!strcmp (argv[4], "x")) xdir = TRUE;21 // xdir = FALSE; 22 // if (!strcmp (argv[4], "x")) xdir = TRUE; 23 23 24 24 nx = atoi (argv[5]); -
trunk/Ohana/src/opihi/cmd.data/spline_construct.c
r17903 r34088 4 4 int spline_construct_cmd (int argc, char **argv) { 5 5 6 int i, j, Nx, Ny , xdir;6 int i, j, Nx, Ny; 7 7 float *Tx, *Ty, *Ty2, *V; 8 8 Buffer *in, *out; … … 31 31 gfits_create_matrix (&out[0].header, &out[0].matrix); 32 32 33 xdir = FALSE;34 if (!strcmp (argv[3], "x")) xdir = TRUE;33 // int xdir = FALSE; 34 // if (!strcmp (argv[3], "x")) xdir = TRUE; 35 35 /* ideally, the resulting image should carry this info (in header?) */ 36 36 -
trunk/Ohana/src/opihi/dvo/avextract.c
r33963 r34088 5 5 off_t i, j, n, m; 6 6 int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack; 7 int Nsecfilt, mode,VERBOSE, needMeasures;7 int Nsecfilt, VERBOSE, needMeasures; 8 8 char **cstack, name[1024]; 9 9 void *Signal; … … 25 25 skylist = NULL; 26 26 selection = NULL; 27 28 mode = MAG_AVE;29 27 30 28 if ((N = get_argument (argc, argv, "-h"))) goto help; -
trunk/Ohana/src/opihi/dvo/calextract.c
r27435 r34088 6 6 7 7 off_t i, Nr; 8 int N secfilt, NSTAR, N, mode[2];8 int N, mode[2]; 9 9 10 10 PhotCode *code[2]; … … 24 24 /* load photcode information */ 25 25 if (!InitPhotcodes ()) return (FALSE); 26 Nsecfilt = GetPhotcodeNsecfilt ();27 26 28 27 /* command line arguments */ … … 41 40 /* one unique value per star */ 42 41 N = 0; 43 NSTAR = 1;44 42 ALLOCATE (vec, Vector *, NVEC); 45 43 if ((vec[Nd] = SelectVector ("cal:dmag", ANYVECTOR, TRUE)) == NULL) goto escape; … … 74 72 75 73 # if (0) 74 int NSTAR = 1; 75 int Nsecfilt = GetPhotcodeNsecfilt (); 76 76 /* extract values, assign to vectors */ 77 77 for (i = 0; i < catalog.Naverage; i++) { -
trunk/Ohana/src/opihi/dvo/calmextract.c
r27435 r34088 7 7 8 8 off_t i, k, Nr; 9 int NSTAR, N star, Nsecfilt, N, mode[2];9 int NSTAR, N, mode[2]; 10 10 11 11 Catalog catalog; … … 25 25 /* load photcode information */ 26 26 if (!InitPhotcodes ()) goto escape; 27 Nsecfilt = GetPhotcodeNsecfilt ();28 27 29 28 /* command line arguments */ … … 61 60 62 61 N = 0; 63 Nstar = 0;64 62 NSTAR = 100; 65 63 for (k = 0; k < NVEC; k++) { … … 87 85 88 86 # if (0) 87 int Nstar = 0; 88 int Nsecfilt = GetPhotcodeNsecfilt (); 89 89 90 /* extract values, assign to vectors */ 90 91 for (i = 0; i < catalog.Naverage; i++) { -
trunk/Ohana/src/opihi/dvo/ccd.c
r27435 r34088 8 8 int mode[4]; 9 9 int Nsecfilt, KeepNulls; 10 void *Signal;11 10 12 11 Catalog catalog; … … 63 62 64 63 // grab data from all selected sky regions 65 Signal =signal (SIGINT, handle_interrupt);64 signal (SIGINT, handle_interrupt); 66 65 interrupt = FALSE; 67 66 -
trunk/Ohana/src/opihi/dvo/cmd.c
r27435 r34088 8 8 int Npts, NPTS, mode[3]; 9 9 int Nsecfilt, KeepNulls; 10 void *Signal;11 10 12 11 PhotCode *code[3]; … … 61 60 62 61 // grab data from all selected sky regions 63 Signal = signal (SIGINT, handle_interrupt); 62 // void *Signal = signal (SIGINT, handle_interrupt); 63 signal (SIGINT, handle_interrupt); 64 64 interrupt = FALSE; 65 65 -
trunk/Ohana/src/opihi/dvo/cmpload.c
r27435 r34088 6 6 int cmpload (int argc, char **argv) { 7 7 8 int i, Noverlay, NOVERLAY, Nstar, N, N in, Nextra, Objtype, type;8 int i, Noverlay, NOVERLAY, Nstar, N, Nextra, Objtype, type; 9 9 int doneread, done, Nskip, Nbytes, nbytes, Ninstar; 10 10 char *c, *c2, *name; … … 63 63 64 64 /* load in stars by blocks of 1000 */ 65 Nin = 0;66 65 ALLOCATE (buffer, char, (BLOCK*BYTES_STAR) + 1); 67 66 buffer[BLOCK*BYTES_STAR] = 0; -
trunk/Ohana/src/opihi/dvo/fitsed.c
r28241 r34088 26 26 off_t i, j, k, m; 27 27 int N, done, Nfit; 28 int Nsecfilt,status;28 int status; 29 29 void *oldsignal; 30 30 char name[64], line[1024], key[20]; … … 41 41 KapaSection magSection, resSection; 42 42 43 Catalog catalog , outcat;43 Catalog catalog; 44 44 SkyList *skylist; 45 45 SkyRegionSelection *selection; … … 57 57 catalog.secfilt = NULL; 58 58 59 outcat.average = NULL;60 outcat.measure = NULL;61 outcat.secfilt = NULL;59 // outcat.average = NULL; 60 // outcat.measure = NULL; 61 // outcat.secfilt = NULL; 62 62 63 63 SEDtable = NULL; … … 80 80 /* load photcode information */ 81 81 if (!InitPhotcodes ()) goto escape; 82 Nsecfilt = GetPhotcodeNsecfilt ();83 82 84 83 /* interpret command-line options */ -
trunk/Ohana/src/opihi/dvo/gcat.c
r33662 r34088 8 8 SkyTable *sky; 9 9 SkyList *skylist; 10 void *Signal;11 10 12 11 int ShowHost = FALSE; … … 43 42 44 43 // prepare to handle interrupt signals 45 Signal =signal (SIGINT, handle_interrupt);44 signal (SIGINT, handle_interrupt); 46 45 interrupt = FALSE; 47 46 -
trunk/Ohana/src/opihi/dvo/hosts.c
r33963 r34088 15 15 if (!strncmp(argv[1], "purge-temp", MAX(strlen(argv[1]), 3))) { 16 16 glob_t pglob; 17 int ALL_PID = FALSE; 17 18 int PID = getpid(); 18 19 int N; … … 20 21 remove_argument (N, &argc, argv); 21 22 PID = atoi(argv[N]); 23 remove_argument (N, &argc, argv); 24 } 25 26 if ((N = get_argument (argc, argv, "-all-pid"))) { 27 remove_argument (N, &argc, argv); 28 ALL_PID = TRUE; 22 29 remove_argument (N, &argc, argv); 23 30 } … … 60 67 pglob.gl_offs = 0; 61 68 char name[DVO_MAX_PATH]; 62 snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID); 69 if (ALL_PID) { 70 snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.*.fits", table->hosts[i].pathname); 71 } else { 72 snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID); 73 } 63 74 if (VERBOSE) gprint (GP_ERR, "checking %s\n", name); 64 75 glob (name, 0, NULL, &pglob); -
trunk/Ohana/src/opihi/dvo/images.c
r31635 r34088 13 13 off_t i, Nimage, Nmosaic; 14 14 int j, status, InPic, leftside, *plist, TimeSelect, ByName; 15 int WITH_MOSAIC, SOLO_MOSAIC , HIDDEN;15 int WITH_MOSAIC, SOLO_MOSAIC; 16 16 time_t tzero, tend; 17 17 int N, NPTS, n, npts, Npts, kapa, *foundMosaic; … … 42 42 } 43 43 44 HIDDEN = FALSE;45 if ((N = get_argument (argc, argv, "-hidden"))) {46 remove_argument (N, &argc, argv);47 HIDDEN = TRUE;48 }44 // int HIDDEN = FALSE; 45 // if ((N = get_argument (argc, argv, "-hidden"))) { 46 // remove_argument (N, &argc, argv); 47 // HIDDEN = TRUE; 48 // } 49 49 50 50 photcode = NULL; -
trunk/Ohana/src/opihi/dvo/imdata.c
r31635 r34088 15 15 Vector *vec; 16 16 SkyRegionSelection *selection; 17 void *Signal;18 17 19 18 // parse skyregion options … … 130 129 131 130 // prepare to handle interrupt signals 132 Signal =signal (SIGINT, handle_interrupt);131 signal (SIGINT, handle_interrupt); 133 132 interrupt = FALSE; 134 133 -
trunk/Ohana/src/opihi/dvo/imextract.c
r31635 r34088 5 5 off_t i, j, Nimage; 6 6 int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack; 7 int VERBOSE;8 7 char **cstack, name[1024]; 9 8 void *Signal; … … 27 26 if ((N = get_argument (argc, argv, "--help"))) goto help; 28 27 29 VERBOSE = FALSE;30 if ((N = get_argument (argc, argv, "-v"))) {31 remove_argument (N, &argc, argv);32 VERBOSE = TRUE;33 }28 // int VERBOSE = FALSE; 29 // if ((N = get_argument (argc, argv, "-v"))) { 30 // remove_argument (N, &argc, argv); 31 // VERBOSE = TRUE; 32 // } 34 33 35 34 if (!InitPhotcodes ()) goto escape; -
trunk/Ohana/src/opihi/dvo/imlist.c
r31635 r34088 4 4 5 5 off_t i, j, Nimage, *subset, Nsubset; 6 int N, TimeSelect, RegionSelect,TimeFormat, NameSelect;6 int N, TimeSelect, TimeFormat, NameSelect; 7 7 int PhotcodeSelect; 8 8 time_t tzero, TimeReference; … … 38 38 } 39 39 40 RegionSelect = FALSE;41 if ((N = get_argument (argc, argv, "-region"))) {42 remove_argument (N, &argc, argv);43 RegionSelect = TRUE;44 }40 // int RegionSelect = FALSE; 41 // if ((N = get_argument (argc, argv, "-region"))) { 42 // remove_argument (N, &argc, argv); 43 // RegionSelect = TRUE; 44 // } 45 45 46 46 PhotcodeValue = NULL; -
trunk/Ohana/src/opihi/dvo/imphot.c
r31635 r34088 9 9 char bufname[64]; 10 10 float *p; 11 double fx, fy,x, y;11 double x, y; 12 12 Image *image; 13 13 Buffer *buf; … … 58 58 59 59 if (GreyScale && Nsubset) { 60 fx = image[subset[0]].NX / 100;61 fy = image[subset[0]].NY / 200;60 // double fx = image[subset[0]].NX / 100; 61 // double fy = image[subset[0]].NY / 200; 62 62 p = (float *) buf[0].matrix.buffer; 63 63 for (y = 0; y < 200; y+=1.0) { -
trunk/Ohana/src/opihi/dvo/lcurve.c
r27435 r34088 7 7 double *RA, *DEC; 8 8 int kapa, TimeFormat; 9 int found, AutoLimits, ErrorBars, GalMag, AbsPhot,SaveVectors;9 int found, AutoLimits, ErrorBars, SaveVectors; 10 10 off_t i, j, m, Nstars, *N1; 11 11 int N, NPTS; … … 39 39 } 40 40 41 AbsPhot = FALSE;42 if ((N = get_argument (argc, argv, "-abs"))) {43 remove_argument (N, &argc, argv);44 AbsPhot = TRUE;45 }41 // int AbsPhot = FALSE; 42 // if ((N = get_argument (argc, argv, "-abs"))) { 43 // remove_argument (N, &argc, argv); 44 // AbsPhot = TRUE; 45 // } 46 46 47 GalMag = FALSE;48 if ((N = get_argument (argc, argv, "-gal"))) {49 gprint (GP_ERR, "galaxy magnitudes currently disabled\n");50 return (FALSE);51 }47 // int GalMag = FALSE; 48 // if ((N = get_argument (argc, argv, "-gal"))) { 49 // gprint (GP_ERR, "galaxy magnitudes currently disabled\n"); 50 // return (FALSE); 51 // } 52 52 53 53 ErrorBars = FALSE; -
trunk/Ohana/src/opihi/dvo/objectcoverage.c
r31450 r34088 5 5 int objectcoverage (int argc, char **argv) { 6 6 7 void *Signal;8 7 int ShowDensity; 9 int N, status, TimeSelect, xs, ys; 10 time_t tzero, tend; 11 double pixscale, r, d, Xs, Ys, trange, RaCenter, DecCenter; 8 int N, status, xs, ys; 9 double pixscale, r, d, Xs, Ys, RaCenter, DecCenter; 12 10 char projection[16]; 13 11 float *V; … … 77 75 } 78 76 79 TimeSelect = FALSE; 80 if ((N = get_argument (argc, argv, "-time"))) { 81 remove_argument (N, &argc, argv); 82 if (!ohana_str_to_time (argv[N], &tzero)) { 83 gprint (GP_ERR, "syntax error\n"); 84 return (FALSE); 85 } 86 remove_argument (N, &argc, argv); 87 if (!ohana_str_to_dtime (argv[N], &trange)) { 88 gprint (GP_ERR, "syntax error\n"); 89 return (FALSE); 90 } 91 remove_argument (N, &argc, argv); 92 if (trange < 0) { 93 trange = fabs (trange); 94 tzero -= trange; 95 } 96 TimeSelect = TRUE; 97 } 98 if ((N = get_argument (argc, argv, "-trange"))) { 99 remove_argument (N, &argc, argv); 100 if (!ohana_str_to_time (argv[N], &tzero)) { 101 gprint (GP_ERR, "syntax error\n"); 102 return (FALSE); 103 } 104 remove_argument (N, &argc, argv); 105 if (!ohana_str_to_time (argv[N], &tend)) { 106 gprint (GP_ERR, "syntax error\n"); 107 return (FALSE); 108 } 109 remove_argument (N, &argc, argv); 110 trange = tend - tzero; 111 if (trange < 0) { 112 trange = fabs (trange); 113 tzero -= trange; 114 } 115 TimeSelect = TRUE; 116 } 77 // double trange; 78 // time_t tzero, tend; 79 // int TimeSelect = FALSE; 80 // if ((N = get_argument (argc, argv, "-time"))) { 81 // remove_argument (N, &argc, argv); 82 // if (!ohana_str_to_time (argv[N], &tzero)) { 83 // gprint (GP_ERR, "syntax error\n"); 84 // return (FALSE); 85 // } 86 // remove_argument (N, &argc, argv); 87 // if (!ohana_str_to_dtime (argv[N], &trange)) { 88 // gprint (GP_ERR, "syntax error\n"); 89 // return (FALSE); 90 // } 91 // remove_argument (N, &argc, argv); 92 // if (trange < 0) { 93 // trange = fabs (trange); 94 // tzero -= trange; 95 // } 96 // TimeSelect = TRUE; 97 // } 98 // if ((N = get_argument (argc, argv, "-trange"))) { 99 // remove_argument (N, &argc, argv); 100 // if (!ohana_str_to_time (argv[N], &tzero)) { 101 // gprint (GP_ERR, "syntax error\n"); 102 // return (FALSE); 103 // } 104 // remove_argument (N, &argc, argv); 105 // if (!ohana_str_to_time (argv[N], &tend)) { 106 // gprint (GP_ERR, "syntax error\n"); 107 // return (FALSE); 108 // } 109 // remove_argument (N, &argc, argv); 110 // trange = tend - tzero; 111 // if (trange < 0) { 112 // trange = fabs (trange); 113 // tzero -= trange; 114 // } 115 // TimeSelect = TRUE; 116 // } 117 117 118 118 if (argc != 3) { … … 178 178 Nsecfilt = GetPhotcodeNsecfilt(); 179 179 // grab data from all selected sky regions 180 Signal =signal (SIGINT, handle_interrupt);180 signal (SIGINT, handle_interrupt); 181 181 interrupt = FALSE; 182 182 -
trunk/Ohana/src/opihi/dvo/paverage.c
r27435 r34088 4 4 int paverage (int argc, char **argv) { 5 5 6 FILE *f;7 6 off_t i, j; 8 7 int kapa, Narg, Npts, NPTS, status, VERBOSE; … … 12 11 unsigned IDclip, IDchoice, LimExclude; 13 12 float *Xvec, *Yvec, *Zvec; 14 void *Signal;15 13 16 14 PhotCode *photcode; … … 27 25 if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE; 28 26 29 f = (FILE *) NULL;30 27 Mz = 17.0; 31 28 Mr = -5.0; … … 102 99 103 100 // prepare to handle interrupt signals 104 Signal =signal (SIGINT, handle_interrupt);101 signal (SIGINT, handle_interrupt); 105 102 interrupt = FALSE; 106 103 -
trunk/Ohana/src/opihi/dvo/pmeasure.c
r27435 r34088 6 6 int pmeasure (int argc, char **argv) { 7 7 8 FILE *f;9 8 off_t i, j, k, m; 10 9 int kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded; … … 17 16 float *Xvec, *Yvec, *Zvec; 18 17 time_t tzero, tend; 19 void *Signal;20 18 21 19 SkyTable *sky; … … 27 25 if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE; 28 26 29 f = (FILE *) NULL;30 27 Mz = 17.0; 31 28 Mr = -5.0; … … 175 172 176 173 // prepare to handle interrupt signals 177 Signal =signal (SIGINT, handle_interrupt);174 signal (SIGINT, handle_interrupt); 178 175 interrupt = FALSE; 179 176 -
trunk/Ohana/src/opihi/dvo/simage.c
r27435 r34088 12 12 Header header; 13 13 Coords coords; 14 int i, j, kapa, Nstars, nstars, Nbytes, nbytes, N pts, N;14 int i, j, kapa, Nstars, nstars, Nbytes, nbytes, N; 15 15 Graphdata graphmode; 16 16 … … 150 150 graphmode.size = -1; 151 151 graphmode.etype = 0; 152 Npts = Xvec.Nelements;153 152 154 153 PlotVectorTriplet (kapa, &Xvec, &Yvec, &Zvec, &graphmode); -
trunk/Ohana/src/opihi/dvo/skycat.c
r30612 r34088 14 14 SkyList *skylist; 15 15 SkyRegion **regions; 16 void *Signal;17 16 18 17 VERBOSE = FALSE; … … 62 61 63 62 // prepare to handle interrupt signals 64 Signal =signal (SIGINT, handle_interrupt);63 signal (SIGINT, handle_interrupt); 65 64 interrupt = FALSE; 66 65 -
trunk/Ohana/src/opihi/lib.data/starfuncs.c
r29938 r34088 125 125 opihi_flt *zs, opihi_flt *zp, opihi_flt *sk) { 126 126 127 double R a2, Ri2, Ro2, rad2;127 double Ro2, rad2; 128 128 int i, j, Npts, Nsky; 129 129 int Xs, Xe, Ys, Ye, off, Xc, Yc; … … 132 132 133 133 /* define circular boundaries */ 134 Ra2 = SQ(Raper);135 Ri2 = SQ(Rinner);136 134 Ro2 = SQ(Router); 137 135 … … 145 143 /* this sample uses a circular aperture */ 146 144 # if (0) 145 double Ri2 = SQ(Rinner); 147 146 Nsky = 0; 148 147 for (j = Ys; j < Ye; j++) { -
trunk/Ohana/src/opihi/lib.data/svdcmp.c
r20936 r34088 14 14 int svdcmp (float *a, opihi_flt *w, float *v, int Nx, int Ny) { 15 15 16 int flag, i, its, j, jj, k, l, nm , status;16 int flag, i, its, j, jj, k, l, nm; 17 17 float c, f, h, s, x, y, z; 18 18 float anorm=0.0, g = 0.0, scale = 0.0; … … 111 111 } 112 112 113 status = 1;113 // int status = 1; 114 114 for (k = Nx - 1; k >= 0; k--) { 115 115 for (its = 0; its < 30; its++) { … … 152 152 break; 153 153 } 154 if (its == 29) status = 0;154 // if (its == 29) status = 0; 155 155 x = w[l]; 156 156 nm = k-1; -
trunk/Ohana/src/opihi/lib.shell/convert_to_RPN.c
r16890 r34088 4 4 StackVar *convert_to_RPN (int argc, char **argv, int *nstack) { 5 5 6 int type , Nx, Ny;6 int type; 7 7 int i, j, Nstack, Nop_stack, NSTACK; 8 8 StackVar *stack, *op_stack; … … 17 17 } 18 18 19 N x = Ny = Nstack = Nop_stack = 0;19 Nstack = Nop_stack = 0; 20 20 for (i = 0; i < argc; i++) { 21 21 -
trunk/Ohana/src/opihi/lib.shell/evaluate_stack.c
r20936 r34088 12 12 int evaluate_stack (StackVar *stack, int *Nstack) { 13 13 14 int i, j, Nvar, Nout,status;14 int i, j, status; 15 15 char line[512]; // this is only used to report an error 16 16 StackVar tmp_stack; 17 Nout = Nvar = 0;18 17 19 18 status = TRUE; -
trunk/Ohana/src/opihi/lib.shell/opihi.c
r31667 r34088 4 4 int opihi (int argc, char **argv) { 5 5 6 int Nbad , status;6 int Nbad; 7 7 char *line, *prompt, *history; 8 8 pid_t ppid; … … 39 39 stripwhite (line); 40 40 if (*line) { 41 status =multicommand (line);41 multicommand (line); 42 42 add_history (line); 43 43 -
trunk/Ohana/src/opihi/pantasks/ControllerOps.c
r32632 r34088 63 63 int CheckControllerJob (Job *job) { 64 64 struct timeval start, stop; 65 float dtime;66 65 67 66 gettimeofday (&start, (void *) NULL); 68 67 CheckControllerJobStatus (job); 69 68 gettimeofday (&stop, (void *) NULL); 70 dtime = DTIME (stop, start);71 / * if (VerboseMode()) gprint (GP_ERR, "check job status %f\n", dtime); */69 // float dtime = DTIME (stop, start); 70 // if (VerboseMode()) gprint (GP_ERR, "check job status %f\n", dtime); 72 71 73 72 if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) { … … 75 74 GetJobOutput ("stdout", job[0].pid, &job[0].stdout_buff, job[0].stdout_size); 76 75 gettimeofday (&stop, (void *) NULL); 77 dtime = DTIME (stop, start);76 // float dtime = DTIME (stop, start); 78 77 /* if (VerboseMode()) gprint (GP_ERR, "get stdout %f\n", dtime); */ 79 78 … … 81 80 GetJobOutput ("stderr", job[0].pid, &job[0].stderr_buff, job[0].stderr_size); 82 81 gettimeofday (&stop, (void *) NULL); 83 dtime = DTIME (stop, start);82 // float dtime = DTIME (stop, start); 84 83 /* if (VerboseMode()) gprint (GP_ERR, "get stderr %f\n", dtime); */ 85 84 … … 87 86 DeleteControllerJob (job); 88 87 gettimeofday (&stop, (void *) NULL); 89 dtime = DTIME (stop, start);88 // float dtime = DTIME (stop, start); 90 89 /* if (VerboseMode()) gprint (GP_ERR, "delete job %f\n", dtime); */ 91 90 } … … 578 577 int QuitController () { 579 578 580 int status;581 579 char cmd[128]; 582 580 IOBuffer buffer; … … 586 584 sprintf (cmd, "quit"); 587 585 InitIOBuffer (&buffer, 0x100); 588 status =ControllerCommand (cmd, NULL, &buffer);586 ControllerCommand (cmd, NULL, &buffer); 589 587 FreeIOBuffer (&buffer); 590 588 -
trunk/Ohana/src/opihi/pantasks/client_shell.c
r31666 r34088 4 4 int client_shell (int argc, char **argv) { 5 5 6 int Nbad , status;6 int Nbad; 7 7 char *line, *prompt, *history; 8 8 pid_t ppid; … … 41 41 42 42 if (*line) { 43 status = multicommand (line); 43 // status = multicommand (line); do something different if false? 44 multicommand (line); 44 45 add_history (line); 45 46 append_history (1, history); -
trunk/Ohana/src/opihi/pantasks/task.c
r32632 r34088 5 5 6 6 int hash; 7 int ThisList , status;7 int ThisList; 8 8 char *input, *outline; 9 9 Task *task; … … 82 82 case TASK_NPENDING: 83 83 case TASK_ACTIVE: 84 status = command (input, &outline, TRUE); 84 // status = command(); do something with this info? 85 command (input, &outline, TRUE); 85 86 if (outline != NULL) free (outline); 86 /* what to do if command is invalid?87 if (!status) return (FALSE); */88 87 break; 89 88 -
trunk/Ohana/src/opihi/pcontrol/CheckHost.c
r25872 r34088 40 40 int CheckHostResponse (Host *host) { 41 41 42 IOBuffer *buffer;43 44 42 /* we only check IDLE hosts without jobs */ 45 43 ASSERT (host, "missing host"); 46 buffer = &host[0].comms_buffer;47 44 48 45 // XXX check on the value of the response? (OK) -
trunk/Ohana/src/opihi/pcontrol/CheckSystem.c
r28158 r34088 62 62 void *CheckSystem_Threaded (void *data) { 63 63 64 int Njobchecks, Nhostchecks, Nlivechecks, Ndonejobs; 65 66 Nlivechecks = 0; 64 int Njobchecks, Nhostchecks, Ndonejobs; 67 65 68 66 gprintInit (); -
trunk/Ohana/src/opihi/pcontrol/Makefile
r33662 r34088 13 13 LIBS1 = -lkapa -lFITS -lohana 14 14 LIBS2 = -lbasiccmd -lshell -ldata 15 FULL_CFLAGS = $(BASE_CFLAGS) -Wall -Werror15 FULL_CFLAGS = $(BASE_CFLAGS) 16 16 FULL_CPPFLAGS = $(BASE_CPPFLAGS) 17 17 FULL_LDFLAGS = $(LIBS1) $(LIBS2) $(BASE_LDFLAGS) -
trunk/Ohana/src/photdbc/src/CopyBackupToHost.c
r33655 r34088 22 22 // get the IDs for the src and dst machines 23 23 int srcID = 0; 24 int srcIndex = 0;25 24 int dstID = 0; 26 25 int dstIndex = 0; 27 26 for (i = 0; i < table->Nhosts; i++) { 28 if (!strcmp (table->hosts[i].hostname, srcHostname)) { srcID = table->hosts[i].hostID; srcIndex = i;}27 if (!strcmp (table->hosts[i].hostname, srcHostname)) { srcID = table->hosts[i].hostID; } 29 28 if (!strcmp (table->hosts[i].hostname, dstHostname)) { dstID = table->hosts[i].hostID; dstIndex = i; } 30 29 } -
trunk/Ohana/src/photdbc/src/PclientCommands.c
r33655 r34088 126 126 int CheckBusyJob (HostInfo *host, IOBuffer *stdout_buf, IOBuffer *stderr_buf) { 127 127 128 int status;129 128 char *p; 130 129 char string[64]; … … 132 131 133 132 InitIOBuffer (&buffer, 100); 134 status =PclientCommand (host, "status", &buffer);135 status =PclientResponse (host, PCLIENT_PROMPT, &buffer);133 PclientCommand (host, "status", &buffer); 134 PclientResponse (host, PCLIENT_PROMPT, &buffer); 136 135 137 136 /** need to parse message **/ -
trunk/Ohana/src/relastro/src/CoordOps.c
r32346 r34088 11 11 12 12 off_t N; 13 Image *images;14 13 15 images = getimages (&N, NULL); 14 // Images *images = getimages (&N, NULL); return value ignored 15 getimages (&N, NULL); 16 16 17 17 NoldCoords = N; -
trunk/Ohana/src/relastro/src/ImageOps.c
r33652 r34088 426 426 XY_to_LM (&Rx, &Dx, dLsig, 0.0, coords); 427 427 dP0 = 3600.0 * hypot(Rx - Ro, Dx - Do); // convert to arcsec 428 XY_to_LM (&Rx, &Dx, 0.0, d Lsig, coords);428 XY_to_LM (&Rx, &Dx, 0.0, dMsig, coords); 429 429 dP1 = 3600.0 * hypot(Rx - Ro, Dx - Do); // convert to arcsec 430 430 dPosSys = 0.5 * (dP0 + dP1); -
trunk/Ohana/src/relastro/src/StarMaps.c
r33652 r34088 57 57 int updateStarMaps(Catalog *catalog) { 58 58 59 Image *images;60 59 off_t i, N, Nimages; 61 60 int xbin, ybin; … … 64 63 gettimeofday (&start, (void *) NULL); 65 64 66 images = getimages(&Nimages, NULL); 65 // Images *images = getimages(&Nimages, NULL); return value ignored 66 getimages(&Nimages, NULL); 67 67 68 68 for (i = 0; i < catalog[0].Nmeasure; i++) { -
trunk/Ohana/src/relastro/src/relastro_merge_source.c
r33652 r34088 18 18 dvo_catalog_init (&catalog_dst, TRUE); 19 19 SkyRegion *region_src = NULL; 20 SkyRegion *region_dst = NULL;20 // SkyRegion *region_dst = NULL; 21 21 22 22 // load data from each region file, only use bright stars … … 26 26 region_src = &sky[0].regions[i]; 27 27 } 28 // currently, we only accept dst == src... 28 29 if (sky[0].regions[i].index == CAT_ID_DST) { 29 30 catalog_dst.filename = sky[0].filename[i]; 30 region_dst = &sky[0].regions[i];31 // region_dst = &sky[0].regions[i]; 31 32 } 32 33 } … … 91 92 92 93 // repoint the src measures at this object 93 Measure *measures_src;94 ALLOCATE (measures_src, Measure, catalog_src.average[index_src].Nmeasure);95 94 m = catalog_src.average[index_src].measureOffset; 96 95 for (i = 0; i < catalog_src.average[index_src].Nmeasure; i++, m++) { -
trunk/Ohana/src/relastro/src/resort_catalog.c
r33652 r34088 112 112 int NmeasureTotal = 0; 113 113 int measureOffsetOK = TRUE; 114 for (i = 0; i < catalog[0].Naverage; i++) {114 for (i = 0; i < Naverage; i++) { 115 115 NmeasureTotal += catalog[0].average[i].Nmeasure; 116 116 if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) { -
trunk/Ohana/src/relastro/src/select_images.c
r33652 r34088 292 292 293 293 double theta1, theta2; 294 double Theta1, Theta2;295 294 296 295 theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); … … 305 304 } 306 305 307 Theta1 = theta1;308 Theta2 = theta2;309 306 theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 310 307 theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); -
trunk/Ohana/src/relastro/src/testparallax.c
r33652 r34088 10 10 double R[NPTS], D[NPTS], Time[NPTS], JD[NPTS]; 11 11 double X[NPTS], Y[NPTS], dX[NPTS], dY[NPTS], pX[NPTS], pY[NPTS]; 12 double Tref[NPTS], Tjyrs[NPTS], TrefS, TjyrsS, TrefMean, TjyrsMean,Ro, Do;12 double Tref[NPTS], Tjyrs[NPTS], TrefS, TjyrsS, TrefMean, Ro, Do; 13 13 Coords coords; 14 14 PMFit fitPAR; … … 82 82 } 83 83 TrefMean = TrefS / Npts; 84 TjyrsMean = TjyrsS / Npts;84 // double TjyrsMean = TjyrsS / Npts; 85 85 86 86 for (i = 0; i < Npts; i++) { -
trunk/Ohana/src/relphot/src/GridOps.c
r33963 r34088 423 423 Merr = MAX (catalog[c].measureT[m].dM, MIN_ERROR); 424 424 425 // Wsys = 1.0 / SQ(Merr);426 Wsys = 1.0;425 // disable Wsys for now 426 Wsys = TRUE ? 1.0 : 1.0 / SQ(Merr); 427 427 428 428 Ng = gridmeas[c][m]; … … 684 684 off_t i, Nimage; 685 685 int j, Nbytes, Nformat; 686 off_t *imlist;687 686 FILE *f; 688 687 Header header, theader; … … 697 696 698 697 /* select reference mosaic image */ 699 imlist = SelectRefMosaic (&refmosaic, &Nimage); 698 // off_t *imlist = SelectRefMosaic (&refmosaic, &Nimage); return value ignored 699 SelectRefMosaic (&refmosaic, &Nimage); 700 700 701 701 /* we are writing to this file */ -
trunk/Ohana/src/relphot/src/MosaicOps.c
r33963 r34088 762 762 int setMmos_mosaic (Mosaic *myMosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info, FlatCorrectionTable *flatcorr) { 763 763 764 Image *imageReal;765 764 off_t j, NimageReal; 766 765 … … 776 775 assert (Nmos < Nmosaic); 777 776 778 imageReal = getimages (&NimageReal, NULL); 777 // Image *imageReal = getimages (&NimageReal, NULL); returned pointer is not used 778 getimages (&NimageReal, NULL); 779 779 780 780 /* on PoorImages run, skip good images */ … … 1500 1500 off_t i, j, m, c, N, ave, Nimage; 1501 1501 double *xlist, *ylist; 1502 double Xmin, Xmax, Ymin, Ymax;1502 // double Xmin, Xmax, Ymin, Ymax; 1503 1503 char string[64]; 1504 Image *image;1505 1504 Graphdata graphdata; 1506 1505 1507 1506 if (!MOSAIC_ZEROPT) return; 1508 1507 1509 image = getimages (&Nimage, NULL); 1508 // Image *image = getimages (&Nimage, NULL); returned value ignored 1509 getimages (&Nimage, NULL); 1510 1510 1511 1511 N = 0; 1512 for (i = 0; i < Nmosaic; i++) 1512 for (i = 0; i < Nmosaic; i++) { 1513 1513 N = MAX (N, N_onMosaic[i]); 1514 } 1514 1515 1515 1516 ALLOCATE (xlist, double, N); … … 1518 1519 for (i = 0; i < Nmosaic; i++) { 1519 1520 N = 0; 1520 Xmin = Ymin = +360.0;1521 Xmax = Ymax = -360.0;1521 // Xmin = Ymin = +360.0; 1522 // Xmax = Ymax = -360.0; 1522 1523 for (j = 0; j < N_onMosaic[i]; j++) { 1523 1524 -
trunk/Ohana/src/relphot/src/StarOps.c
r33963 r34088 354 354 int Next = 0; 355 355 int haveSynth = FALSE; 356 int haveStack = FALSE; 356 357 357 358 int forceSynth = FALSE; … … 413 414 } 414 415 } 416 // gpc1 stack data 417 if ((catalog[Nc].measure[m].photcode >= 11000) && (catalog[Nc].measure[m].photcode <= 11400)) { 418 if (pass < 2) continue; 419 haveStack = TRUE; 420 } 421 415 422 // count extended detections for 2MASS (XXX NOTE hardwired photcodes 2011, 2012, 2013) 416 423 if ((catalog[Nc].measure[m].photcode >= 2011) && (catalog[Nc].measure[m].photcode <= 2013)) { … … 477 484 // up-weight the ubercal values (or convergence can take a long time...) 478 485 if (catalog[Nc].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) { 486 haveUbercal = TRUE; 479 487 wlist[N] = 10.0; 480 488 } … … 492 500 493 501 int Nminmeas = isSetMrelFinal ? 1 : STAR_TOOFEW + 1; 502 503 if (haveStack && (N > 1)) { 504 // fprintf (stderr, "multiple stack values for %10.6f %10.6f\n", catalog[Nc].averageT[j].R, catalog[Nc].averageT[j].D); 505 } 494 506 495 507 // when performing the grid analysis, STAR_TOOFEW should be set to 1; … … 1106 1118 off_t j, N; 1107 1119 double *xlist, *ylist; 1108 double Xmin, Ymin, Xmax, Ymax;1120 // double Xmin, Ymin, Xmax, Ymax; 1109 1121 Graphdata graphdata; 1110 1122 … … 1117 1129 1118 1130 N = 0; 1119 Xmin = Ymin = +360.0;1120 Xmax = Ymax = -360.0;1131 // Xmin = Ymin = +360.0; 1132 // Xmax = Ymax = -360.0; 1121 1133 for (i = 0; i < Ncatalog; i++) { 1122 1134 for (j = 0; j < catalog[i].Naverage; j++) { -
trunk/Ohana/src/relphot/src/reload_catalogs.c
r33963 r34088 94 94 catalog.catformat = dvo_catalog_catformat (UPDATE_CATFORMAT); 95 95 } 96 97 struct timeval now; 98 gettimeofday (&now, (void *) NULL); 99 char *moddate = ohana_sec_to_date (now.tv_sec); 100 gfits_modify (&catalog.header, "RELPHOT", "%s", 1, moddate); 101 free (moddate); 102 96 103 dvo_catalog_save (&catalog, VERBOSE); 97 104 dvo_catalog_unlock (&catalog); -
trunk/Ohana/src/relphot/src/select_images.c
r33963 r34088 256 256 } 257 257 if (RESET) { 258 if (!KEEP_UBERCAL ) {258 if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) { 259 259 image[nimage].Mcal = 0.0; 260 260 image[nimage].dMcal = NAN; … … 296 296 297 297 double theta1, theta2; 298 double Theta1, Theta2;299 298 300 299 theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); … … 309 308 } 310 309 311 Theta1 = theta1;312 Theta2 = theta2;313 310 theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 314 311 theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); -
trunk/Ohana/src/relphot/src/setMrelFinal.c
r33963 r34088 166 166 167 167 /* allow measures from images marked POOR and FEW */ 168 if (pass >= 2) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;168 if (pass >= 3) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL; 169 169 170 170 /* allow measures marked as outliers (POOR) and off image region (AREA) */ 171 if (pass >= 2) {171 if (pass >= 3) { 172 172 MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_SKIP_PHOTOM; 173 173 } else { … … 233 233 } 234 234 235 // PASS 3 : accept bad measurements (eg, SAT, CR) 235 // PASS 3 : accept bad measurements (eg, SAT, CR), internal outliers 236 236 if (pass < 3) { 237 237 if (catalog[0].measure[m].photFlags & code->photomBadMask) goto skip; … … 241 241 } 242 242 243 // PASS 2 : internal outliers accepted243 // PASS 2 : accept stack measurements 244 244 245 245 // PASS 1 : accept poor measurements as well (eg, POOR FIT, etc) -
trunk/Ohana/src/skycalc/src/time.c
r20936 r34088 65 65 long ja, jdint, jalpha, jb, jc, jd, je; 66 66 float jdfrac; 67 double x;68 67 69 68 jdin = jdin + 0.5; /* adjust for 1/2 day */ 70 69 jdint = jdin; 71 x = jdint/7.+0.01; 70 71 // double x = jdint/7.+0.01; XXX why was this here? 72 72 jdfrac = jdin - jdint; 73 73 date->h = jdfrac * 24; /* truncate */ -
trunk/Ohana/src/tools/src/fhead.c
r31160 r34088 5 5 int main (int argc, char **argv) { 6 6 7 int N, Extnum, Nextend , status;7 int N, Extnum, Nextend; 8 8 int i, j; 9 9 off_t nbytes; … … 45 45 fprintf (stdout, "------> %s <------\n", argv[i]); 46 46 47 status = FALSE;48 47 if (!Extnum && !Extname) { 49 48 if (!gfits_read_header (argv[i], &head)) { -
trunk/Ohana/src/tools/src/mktemp.c
r27591 r34088 16 16 int i, j, Ntotal; 17 17 char *tmpdir, *template, deftemplate[32], *prefix, defprefix[32], *filename; 18 int make_directory, fail_silently, unsafe_mode,full_path;18 int make_directory, fail_silently, full_path; 19 19 20 20 tmpdir = NULL; … … 25 25 make_directory = FALSE; 26 26 fail_silently = FALSE; 27 unsafe_mode = FALSE;27 // int unsafe_mode = FALSE; -u not implemented 28 28 full_path = TRUE; 29 29 … … 56 56 continue; 57 57 } 58 if (argv[i][j] == 'u') { 59 unsafe_mode = TRUE; 60 continue; 61 } 58 // -u == --dry-run, not implemented 59 // if (argv[i][j] == 'u') { 60 // unsafe_mode = TRUE; 61 // continue; 62 // } 63 62 64 // unknown option 63 65 usage(); -
trunk/Ohana/src/uniphot/src/update_dvo_uniphot.c
r33654 r34088 6 6 7 7 off_t i, Nimage, Nkeep, *keep; 8 int j, status,Nmin;8 int j, Nmin; 9 9 char line[256]; 10 10 glob_t pglob; … … 55 55 pglob.gl_offs = 0; 56 56 sprintf (line, "%s/*/*.cpt", CATDIR); 57 status =glob (line, 0, NULL, &pglob);57 glob (line, 0, NULL, &pglob); 58 58 59 59 coords.crpix1 = coords.crpix2 = 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.
