Changeset 39225 for trunk/Ohana
- Timestamp:
- Dec 3, 2015, 4:16:29 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 41 edited
- 6 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/addstar/Makefile (modified) (1 diff)
-
Ohana/src/dvomerge/Makefile (modified) (2 diffs)
-
Ohana/src/dvomerge/include/dvomerge.h (modified) (1 diff)
-
Ohana/src/dvomerge/include/dvoutils.h (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvorepair.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvorepairFixStackIDs.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/dvomerge/src/dvorepairFixStackIDs.c )
-
Ohana/src/dvomerge/src/dvoutils.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvoutils_args.c (modified) (2 diffs)
-
Ohana/src/dvomerge/src/dvoutils_check_images.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/dvomerge/src/dvoutils_check_images.c )
-
Ohana/src/dvomerge/src/help.c (modified) (1 diff)
-
Ohana/src/kapa2/include/constants.h (modified) (1 diff)
-
Ohana/src/kapa2/include/globals.h (modified) (1 diff)
-
Ohana/src/kapa2/src/CheckVisual.c (modified) (2 diffs)
-
Ohana/src/kapa2/src/args.c (modified) (3 diffs)
-
Ohana/src/libautocode/def/measure.d (modified) (1 diff)
-
Ohana/src/libdvo/src/coordops.c (modified) (1 diff)
-
Ohana/src/libkapa/src/KapaOpen.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.astro (modified) (1 prop)
-
Ohana/src/opihi/cmd.astro/Makefile (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/cneedles.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro/cneedles.c )
-
Ohana/src/opihi/cmd.astro/drizzle.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/init.c (modified) (4 diffs)
-
Ohana/src/opihi/cmd.astro/region.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/wcs.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro/wcs.c )
-
Ohana/src/opihi/cmd.data/Makefile (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/init.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.data/needles.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.data/needles.c )
-
Ohana/src/opihi/dvo/avmatch.c (modified) (1 diff)
-
Ohana/src/opihi/dvo/imlist.c (modified) (4 diffs)
-
Ohana/src/opihi/include/dvomath.h (modified) (1 diff)
-
Ohana/src/opihi/lib.shell/VectorOps.c (modified) (2 diffs)
-
Ohana/src/relastro/include/relastro.h (modified) (2 diffs)
-
Ohana/src/relastro/src/BrightCatalog.c (modified) (10 diffs)
-
Ohana/src/relastro/src/ConfigInit.c (modified) (1 diff)
-
Ohana/src/relastro/src/GetAstromError.c (modified) (2 diffs)
-
Ohana/src/relastro/src/args.c (modified) (3 diffs)
-
Ohana/src/relastro/src/bcatalog.c (modified) (1 diff)
-
Ohana/src/relastro/src/launch_region_hosts.c (modified) (1 diff)
-
Ohana/src/relastro/src/load_catalogs.c (modified) (2 diffs)
-
Ohana/src/uniphot/doc/galmotion.sh (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/uniphot/doc/galmotion.sh )
-
Ohana/src/uniphot/src/initialize_setgalmodel.c (modified) (1 diff)
-
Ohana/src/uniphot/src/setgalmodel.c (modified) (1 diff)
-
Ohana/src/uniphot/src/setgalmodel_client.c (modified) (1 diff)
-
Ohana/src/uniphot/src/update_catalog_setgalmodel.c (modified) (1 diff)
-
Ohana/src/uniphot/src/update_dvo_setgalmodel.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20151113 (added) merged: 39135-39136,39166,39182-39185,39193-39208,39211-39215,39218-39224
- Property svn:mergeinfo changed
-
trunk/Ohana
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20151113/Ohana (added) merged: 39166,39182-39185,39193-39208,39211-39215,39218-39224
- Property svn:mergeinfo changed
-
trunk/Ohana/src/addstar/Makefile
r38986 r39225 39 39 # programs in 'SERVER' use the client-server concept and are out of date 40 40 41 INSTALL = addstar sedstar loadgalphot loadstarpar loadstarpar_client loadICRF loadICRF_client skycells mkcmf dumpskycells findskycell load2mass loadwise loadtycho loadsupercos42 SERVER = addstar _client addstarc addstard addstart41 INSTALL = addstar addstar_client sedstar loadgalphot loadstarpar loadstarpar_client loadICRF loadICRF_client skycells mkcmf dumpskycells findskycell load2mass loadwise loadtycho loadsupercos 42 SERVER = addstarc addstard addstart 43 43 44 44 all: $(INSTALL) -
trunk/Ohana/src/dvomerge/Makefile
r38986 r39225 125 125 $(SRC)/dvorepairFixCPT.$(ARCH).o \ 126 126 $(SRC)/dvorepairFixWarpIDs.$(ARCH).o \ 127 $(SRC)/dvorepairFixStackIDs.$(ARCH).o \ 127 128 $(SRC)/dvorepairImagesVsMeasures.$(ARCH).o \ 128 129 $(SRC)/dvorepairDeleteImageList.$(ARCH).o \ … … 171 172 $(SRC)/SetSignals.$(ARCH).o \ 172 173 $(SRC)/Shutdown.$(ARCH).o \ 174 $(SRC)/LoadImages.$(ARCH).o \ 173 175 $(SRC)/dvoutils.$(ARCH).o \ 174 176 $(SRC)/dvoutils_args.$(ARCH).o \ 175 177 $(SRC)/dvoutils_uniq_images.$(ARCH).o \ 178 $(SRC)/dvoutils_check_images.$(ARCH).o \ 176 179 $(SRC)/dvoutils_load_image_index.$(ARCH).o 177 180 -
trunk/Ohana/src/dvomerge/include/dvomerge.h
r39142 r39225 252 252 int dvorepair_by_objID (int argc, char **argv); 253 253 int dvorepairFixWarpIDs (int argc, char **argv); 254 254 int dvorepairFixStackIDs (int argc, char **argv); 255 -
trunk/Ohana/src/dvomerge/include/dvoutils.h
r38986 r39225 20 20 DVOUTILS_NONE, 21 21 DVOUTILS_UNIQ_IMAGES, 22 DVOUTILS_CHECK_IMAGES, 22 23 } DVOUTILS_OP_TYPE; 23 24 … … 32 33 33 34 char *IMAGES_LIST; 35 char *CATDIR; 36 char *EXTERN_ID_LIST; 34 37 35 38 int main (int argc, char **argv); 36 39 int dvoutils_args (int *argc, char **argv); 37 40 int dvoutils_uniq_images (char *filename); 41 int dvoutils_check_images (void); 38 42 39 43 ImageData *dvoutils_load_image_index (char *filename); -
trunk/Ohana/src/dvomerge/src/dvorepair.c
r38986 r39225 11 11 12 12 if (!strcmp(argv[1], "-fix-warp-ids")) dvorepairFixWarpIDs(argc, argv); 13 if (!strcmp(argv[1], "-fix-stack-ids")) dvorepairFixStackIDs(argc, argv); 13 14 14 15 if (!strcmp(argv[1], "-fix-cpt")) dvorepairFixCPT(argc, argv); -
trunk/Ohana/src/dvomerge/src/dvoutils.c
r38986 r39225 13 13 exit (0); 14 14 15 case DVOUTILS_CHECK_IMAGES: 16 dvoutils_check_images(); 17 exit (0); 18 15 19 default: 16 20 fprintf (stderr, "ERROR: unknown option\n"); -
trunk/Ohana/src/dvomerge/src/dvoutils_args.c
r37807 r39225 22 22 remove_argument (N, argc, argv); 23 23 } 24 if ((N = get_argument (*argc, argv, "-check-images"))) { 25 DVOUTILS_OP = DVOUTILS_CHECK_IMAGES; 26 remove_argument (N, argc, argv); 27 CATDIR = strcreate (argv[N]); 28 remove_argument (N, argc, argv); 29 EXTERN_ID_LIST = strcreate (argv[N]); 30 remove_argument (N, argc, argv); 31 } 32 33 if (*argc != 1) { 34 fprintf (stderr, "USAGE: dvoutils -uniq-images (filename) [-v,-verbose]\n\n"); 35 fprintf (stderr, "USAGE: dvoutils -check-images (catdir) (externIDs) [-v,-verbose]\n\n"); 36 fprintf (stderr, " -v : VERBOSE\n"); 37 exit (2); 38 } 24 39 25 40 if (DVOUTILS_OP == DVOUTILS_NONE) { … … 28 43 } 29 44 30 if (*argc != 1) {31 fprintf (stderr, "USAGE: dvoutils -uniq-images (filename) [-v,-verbose]\n\n");32 fprintf (stderr, " -v : VERBOSE\n");33 exit (2);34 }35 36 45 return TRUE; 37 46 } -
trunk/Ohana/src/dvomerge/src/help.c
r38986 r39225 172 172 173 173 fprintf (stderr, "USAGE\n"); 174 fprintf (stderr, " dvorepair -fix-warp-ids (catdir) (idfile) - regenerate images.dat warp_skyfile_ids (EXTERN_ID) values\n"); 174 fprintf (stderr, " dvorepair -fix-warp-ids (catdir.list) (idfile) - regenerate images.dat warp_skyfile_ids (EXTERN_ID) values\n"); 175 fprintf (stderr, " dvorepair -fix-stack-ids (catdir.list) - regenerate images.dat stackID (EXTERN_ID) values\n"); 175 176 fprintf (stderr, " dvorepair -fix-cpt (images) (rootlist) - regenerate cpt & cps files from the cpm files\n"); 176 177 fprintf (stderr, " dvorepair -images-vs-measures (catdir) (Ntol) - find images with too many missing detections\n"); -
trunk/Ohana/src/kapa2/include/constants.h
r37807 r39225 11 11 12 12 # define NCHANNELS 10 13 # define NPIXELS_DYNAMIC 12814 15 // XXX for the moment, this is set to match the values in SetColorScale3D_CC16 # define NPIXELS_STATIC 12817 // # define NPIXELS_STATIC 4600 -- if we want fullcolor to work, need this18 13 19 14 # define PAD1 3 -
trunk/Ohana/src/kapa2/include/globals.h
r35106 r39225 11 11 int NAN_GREEN; 12 12 int NAN_BLUE; 13 14 int NPIXELS_DYNAMIC; 15 int NPIXELS_STATIC; 13 16 14 17 /* these should be absorbed into KapaImageWidget -
trunk/Ohana/src/kapa2/src/CheckVisual.c
r35237 r39225 131 131 } 132 132 133 Npixels = NPIXELS_STATIC; 133 134 if (graphic[0].dynamicColors) { 134 135 Npixels = NPIXELS_DYNAMIC; 135 if ((N = get_argument (*argc, argv, "-ncolors"))) {136 remove_argument(N, argc, argv);137 Npixels = atoi (argv[N]);138 remove_argument(N, argc, argv);139 }140 136 141 137 /* allocate color cells */ … … 181 177 } 182 178 } else { 183 Npixels = NPIXELS_STATIC;184 if ((N = get_argument (*argc, argv, "-ncolors"))) {185 remove_argument(N, argc, argv);186 Npixels = atoi (argv[N]);187 remove_argument(N, argc, argv);188 }189 190 179 // XXX allocate the unsigned long *pixels here and above 191 180 ALLOCATE (graphic[0].pixels, unsigned long, Npixels); -
trunk/Ohana/src/kapa2/src/args.c
r35106 r39225 1 1 # include "Ximage.h" 2 3 void help(void); 2 4 3 5 int args (int *argc, char **argv) { 4 6 5 7 int N; 8 9 if ((N = get_argument (*argc, argv, "-h"))) help(); 10 if ((N = get_argument (*argc, argv, "-help"))) help(); 11 if ((N = get_argument (*argc, argv, "--h"))) help(); 12 if ((N = get_argument (*argc, argv, "--help"))) help(); 6 13 7 14 MAP_WINDOW = TRUE; … … 37 44 } 38 45 46 NPIXELS_DYNAMIC = 128; 47 NPIXELS_STATIC = 128; 48 if ((N = get_argument (*argc, argv, "-ncolors"))) { 49 remove_argument(N, argc, argv); 50 NPIXELS_DYNAMIC = atoi (argv[N]); 51 NPIXELS_STATIC = NPIXELS_DYNAMIC; 52 remove_argument(N, argc, argv); 53 } 54 39 55 NAN_RED = 0; 40 56 NAN_GREEN = 0xffff; … … 56 72 return (TRUE); 57 73 } 74 75 void help (void) { 76 77 fprintf (stderr, "USAGE: kapa [options]\n"); 78 fprintf (stderr, "OPTIONS: \n"); 79 fprintf (stderr, "-h, -help, --h, --help : this listing\n"); 80 fprintf (stderr, "-nomap : use X but do not generate a window\n"); 81 fprintf (stderr, "-name : name for the X window bar\n"); 82 fprintf (stderr, "-noX : do not use an X window\n"); 83 fprintf (stderr, "-debug : report debug info\n"); 84 fprintf (stderr, "-fg : define the foreground color (X color style)\n"); 85 fprintf (stderr, "-ncolors : set the number of colors (pixels) available (128 default)\n"); 86 fprintf (stderr, "-nan (red) (green) (blue) : set NaN pixels to this color (hex values)\n"); 87 exit (2); 88 } -
trunk/Ohana/src/libautocode/def/measure.d
r38986 r39225 45 45 # XXX I can deprecate these as I am going to apply the correct uR,uD offset 46 46 # XXX not sure how to use this yet... 47 # XXX replace RoffGall with Moff -> static component of the zpt correction 47 48 FIELD RoffGAL, R_OFF_GAL, float, RA offset from correction, arcsec 48 49 FIELD DoffGAL, D_OFF_GAL, float, DEC offset from correction, arcsec -
trunk/Ohana/src/libdvo/src/coordops.c
r38553 r39225 990 990 991 991 OhanaProjection GetProjection (char *ctype) { 992 if (!str cmp(&ctype[4], "-ZEA")) return PROJ_ZEA;993 if (!str cmp(&ctype[4], "-ZPL")) return PROJ_ZPL;994 if (!str cmp(&ctype[4], "-ZPN")) return PROJ_ZPN;995 if (!str cmp(&ctype[4], "-ARC")) return PROJ_ARC;996 if (!str cmp(&ctype[4], "-STG")) return PROJ_STG;997 if (!str cmp(&ctype[4], "-SIN")) return PROJ_SIN;998 if (!str cmp(&ctype[0], "MM")) return PROJ_SIN; // note ctype[0]999 if (!str cmp(&ctype[4], "-TAN")) return PROJ_TAN;1000 if (!str cmp(&ctype[4], "-TNX")) return PROJ_TNX;1001 if (!str cmp(&ctype[4], "-DIS")) return PROJ_DIS;1002 if (!str cmp(&ctype[4], "-LIN")) return PROJ_LIN;1003 if (!str cmp(&ctype[0], "GENE")) return PROJ_LIN; // note ctype[0]1004 if (!str cmp(&ctype[4], "-PLY")) return PROJ_PLY;1005 if (!str cmp(&ctype[4], "-WRP")) return PROJ_WRP;1006 if (!str cmp(&ctype[4], "-AIT")) return PROJ_AIT;1007 if (!str cmp(&ctype[4], "-GLS")) return PROJ_GLS;1008 if (!str cmp(&ctype[4], "-PAR")) return PROJ_PAR;992 if (!strncmp(&ctype[4], "-ZEA", 4)) return PROJ_ZEA; 993 if (!strncmp(&ctype[4], "-ZPL", 4)) return PROJ_ZPL; 994 if (!strncmp(&ctype[4], "-ZPN", 4)) return PROJ_ZPN; 995 if (!strncmp(&ctype[4], "-ARC", 4)) return PROJ_ARC; 996 if (!strncmp(&ctype[4], "-STG", 4)) return PROJ_STG; 997 if (!strncmp(&ctype[4], "-SIN", 4)) return PROJ_SIN; 998 if (!strncmp(&ctype[0], "MM", 2)) return PROJ_SIN; // note ctype[0] 999 if (!strncmp(&ctype[4], "-TAN", 4)) return PROJ_TAN; 1000 if (!strncmp(&ctype[4], "-TNX", 4)) return PROJ_TNX; 1001 if (!strncmp(&ctype[4], "-DIS", 4)) return PROJ_DIS; 1002 if (!strncmp(&ctype[4], "-LIN", 4)) return PROJ_LIN; 1003 if (!strncmp(&ctype[0], "GENE", 4)) return PROJ_LIN; // note ctype[0] 1004 if (!strncmp(&ctype[4], "-PLY", 4)) return PROJ_PLY; 1005 if (!strncmp(&ctype[4], "-WRP", 4)) return PROJ_WRP; 1006 if (!strncmp(&ctype[4], "-AIT", 4)) return PROJ_AIT; 1007 if (!strncmp(&ctype[4], "-GLS", 4)) return PROJ_GLS; 1008 if (!strncmp(&ctype[4], "-PAR", 4)) return PROJ_PAR; 1009 1009 return PROJ_NONE; 1010 1010 } -
trunk/Ohana/src/libkapa/src/KapaOpen.c
r37042 r39225 2 2 3 3 // kapa connection timeout is N_RETRY * 10000 usec 4 # define N_RETRY 20004 # define N_RETRY 5000 5 5 6 6 # define MY_PORT 2500 -
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro (added) merged: 39166,39183,39194,39199,39223
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/Makefile
r39169 r39225 23 23 $(SRC)/cdot.$(ARCH).o \ 24 24 $(SRC)/cline.$(ARCH).o \ 25 $(SRC)/cneedles.$(ARCH).o \ 25 26 $(SRC)/cplot.$(ARCH).o \ 26 27 $(SRC)/csystem.$(ARCH).o \ … … 76 77 $(SRC)/vshimage.$(ARCH).o \ 77 78 $(SRC)/shimage.$(ARCH).o \ 79 $(SRC)/wcs.$(ARCH).o \ 78 80 $(SRC)/imsub.$(ARCH).o \ 79 81 $(SRC)/imfit.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.astro/drizzle.c
r19823 r39225 141 141 142 142 if (Vmk && Vmk[Ni]) continue; 143 if (!isfinite(Vin[Ni])) continue; 144 143 145 Vout[No] += Vin[Ni]; 144 146 Vwt[No] ++; … … 195 197 196 198 if (Vmk && Vmk[Ni]) continue; 199 if (!isfinite(Vin[Ni])) continue; 197 200 Vout[No] += Vin[Ni]; 198 201 Vwt[No] ++; -
trunk/Ohana/src/opihi/cmd.astro/init.c
r39169 r39225 7 7 int cdot PROTO((int, char **)); 8 8 int cline PROTO((int, char **)); 9 int cneedles PROTO((int, char **)); 9 10 int cplot PROTO((int, char **)); 10 11 int csystem PROTO((int, char **)); … … 66 67 int vshimage PROTO((int, char **)); 67 68 int shimage PROTO((int, char **)); 69 int wcs PROTO((int, char **)); 68 70 69 71 static Command cmds[] = { … … 74 76 {1, "cdot", cdot, "plot point in sky coordinates"}, 75 77 {1, "cline", cline, "plot line connecting two sky coordinates"}, 78 {1, "cneedles", cneedles, "plot vectors in sky coordinates"}, 76 79 {1, "cplot", cplot, "plot vectors in sky coordinates"}, 77 80 {1, "csystem", csystem, "convert between coordinate systems"}, … … 131 134 {1, "vshimage", vshimage, "generate images for vector spherical harmonic terms"}, 132 135 {1, "shimage", shimage, "generate images for spherical harmonic terms"}, 136 {1, "wcs", wcs, "set the wcs for the given image"}, 133 137 }; 134 138 -
trunk/Ohana/src/opihi/cmd.astro/region.c
r37807 r39225 74 74 } 75 75 76 float Angle = 0.0; 77 if ((N = get_argument (argc, argv, "-angle"))) { 78 remove_argument (N, &argc, argv); 79 Angle = atof(argv[N]); 80 remove_argument (N, &argc, argv); 81 } 82 76 83 if ((argc != 4) && (argc != 5)) { 77 84 gprint (GP_ERR, "USAGE: region Ra Dec Radius [projection] [orientation]\n"); 78 gprint (GP_ERR, " [-image] [-ew] [+ew] [-ns] [+ns] [-no-clear] \n");85 gprint (GP_ERR, " [-image] [-ew] [+ew] [-ns] [+ns] [-no-clear] [-angle theta]\n"); 79 86 gprint (GP_ERR, " current: %f %f (%f x %f) (%s)\n", 80 87 graphmode.coords.crval1, graphmode.coords.crval2, … … 111 118 graphmode.coords.crval2 = Dec; 112 119 113 graphmode.coords.pc1_1 = (graphmode.flipeast) ? -1 : 1; 114 graphmode.coords.pc2_2 = (graphmode.flipnorth) ? -1 : 1; 120 float pc1_1 = (graphmode.flipeast) ? -1 : 1; 121 float pc2_2 = (graphmode.flipnorth) ? -1 : 1; 122 123 graphmode.coords.pc1_1 = cos(Angle*RAD_DEG)*pc1_1; 124 graphmode.coords.pc1_2 = sin(Angle*RAD_DEG)*pc2_2; 125 graphmode.coords.pc2_1 = -sin(Angle*RAD_DEG)*pc1_1; 126 graphmode.coords.pc2_2 = cos(Angle*RAD_DEG)*pc2_2; 115 127 116 128 /* ask kapa for coordinate limits, to get the right aspect ratio */ -
trunk/Ohana/src/opihi/cmd.data/Makefile
r38463 r39225 97 97 $(SRC)/medimage_commands.$(ARCH).o \ 98 98 $(SRC)/mset.$(ARCH).o \ 99 $(SRC)/needles.$(ARCH).o \ 99 100 $(SRC)/peak.$(ARCH).o \ 100 101 $(SRC)/periodogram.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r38463 r39225 86 86 int medimage_command PROTO((int, char **)); 87 87 int mset PROTO((int, char **)); 88 int needles PROTO((int, char **)); 88 89 int peak PROTO((int, char **)); 89 90 int periodogram PROTO((int, char **)); … … 261 262 {1, "mset", mset, "insert a vector in an image"}, 262 263 {1, "imset", mset, "insert a vector in an image"}, 264 {1, "needles", needles, "plot vectors needles"}, 263 265 {1, "parity", parity, "set image parity"}, 264 266 {1, "peak", peak, "find vector peak in range"}, -
trunk/Ohana/src/opihi/dvo/avmatch.c
r38601 r39225 328 328 gprint (GP_ERR, "USAGE: avmatch (RA) (DEC) (RADIUS) field[,field,field...]\n"); 329 329 gprint (GP_ERR, " OR: avmatch -coords (filename.fits) (RADIUS) field[,field,field...]\n"); 330 gprint (GP_ERR, " RADIUS is in arcseconds\n"); 330 331 331 332 if ((argc > N + 1) && !strcasecmp (argv[N+1], "fields")) { -
trunk/Ohana/src/opihi/dvo/imlist.c
r37807 r39225 21 21 } 22 22 23 int VERBOSE = TRUE; 24 if ((N = get_argument (argc, argv, "-quiet"))) { 25 VERBOSE = FALSE; 26 remove_argument (N, &argc, argv); 27 } 28 if ((N = get_argument (argc, argv, "-q"))) { 29 VERBOSE = FALSE; 30 remove_argument (N, &argc, argv); 31 } 32 23 33 TimeSelect = FALSE; 24 34 if ((N = get_argument (argc, argv, "-time"))) { … … 35 45 remove_argument (N, &argc, argv); 36 46 TimeSelect = TRUE; 37 gprint (GP_ERR, "plotting in range %ds - %ds (%f seconds)\n", (int)tzero, (int)(tzero + trange), trange);47 if (VERBOSE) gprint (GP_ERR, "plotting in range %ds - %ds (%f seconds)\n", (int)tzero, (int)(tzero + trange), trange); 38 48 } 39 49 … … 88 98 GetTimeFormat (&TimeReference, &TimeFormat); 89 99 100 int Nfound = 0; 101 90 102 for (j = 0; j < MAX_LIST; j++) { 91 103 i = subset[j]; … … 104 116 XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 105 117 } 106 gprint (GP_LOG, "%3lld %s %8lld %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n", 107 (long long) i, image[i].name, (long long) image[i].imageID, r, d, t, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal); 118 if (VERBOSE) gprint (GP_LOG, "%3lld %s %8lld %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n", 119 (long long) i, image[i].name, (long long) image[i].imageID, r, d, t, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal); 120 121 char name[80]; 122 sprintf (name, "imlist:%d", Nfound); 123 set_str_variable (name, image[i].name); 124 Nfound ++; 108 125 } 126 set_int_variable ("imlist:n", Nfound); 109 127 110 128 FreeImagesDVO(image); -
trunk/Ohana/src/opihi/include/dvomath.h
r38441 r39225 147 147 Vector *InitVector PROTO((void)); 148 148 void FreeVectorArray PROTO((Vector **vec, int Nvec)); 149 void FreeVector PROTO((Vector *vec)); 149 150 int CopyVector PROTO((Vector *out, Vector *in)); 150 151 int ResetVector PROTO((Vector *vec, char type, int Nelements)); -
trunk/Ohana/src/opihi/lib.shell/VectorOps.c
r33662 r39225 15 15 16 16 // this function is NOT thread protected : it is only used in startup and/or shutdown 17 void FreeVector (Vector *vec) { 18 19 if (!vec) return; 20 if (vec->elements.Int) { 21 free (vec->elements.Int); 22 } 23 free (vec); 24 } 25 26 // this function is NOT thread protected : it is only used in startup and/or shutdown 17 27 void FreeVectorArray (Vector **vec, int Nvec) { 18 28 … … 21 31 if (!vec) return; 22 32 for (i = 0; i < Nvec; i++) { 23 if (!vec[i]) continue; 24 if (vec[i]->elements.Int) { 25 free (vec[i]->elements.Int); 26 } 27 free (vec[i]); 33 FreeVector (vec[i]); 28 34 } 29 35 free (vec); -
trunk/Ohana/src/relastro/include/relastro.h
r38986 r39225 254 254 int SRC_MEAS_TOOFEW; //catalog objects wich fewer detections then this are ignored 255 255 double MIN_ERROR; 256 257 double MIN_DISTANCE_MOD; 258 double MAX_DISTANCE_MOD; 259 double MAX_DISTANCE_MOD_ERR; 256 260 257 261 int IMFIT_TOO_FEW; // need more than this number of stars to fit an image … … 323 327 PhotCode *DCR_RED_PHOTCODE_POS, *DCR_RED_PHOTCODE_NEG; 324 328 int DCR_RED_NSEC_POS, DCR_RED_NSEC_NEG; 329 330 float *LoopWeight2MASS; 331 float *LoopWeightTycho; 325 332 326 333 int ImagSelect; -
trunk/Ohana/src/relastro/src/BrightCatalog.c
r38553 r39225 159 159 GET_COLUMN(uR, "U_RA", float); 160 160 GET_COLUMN(uD, "U_DEC", float); 161 GET_COLUMN(duR, "V_RA_ERR", float); 162 GET_COLUMN(duD, "V_DEC_ERR", float); 161 GET_COLUMN(duR, "U_RA_ERR", float); 162 GET_COLUMN(duD, "U_DEC_ERR", float); 163 GET_COLUMN(uRgal, "U_RA_GAL", float); 164 GET_COLUMN(uDgal, "U_DEC_GAL", float); 163 165 GET_COLUMN(P, "PAR", float); 164 166 GET_COLUMN(dP, "PAR_ERR", float); … … 189 191 ALLOCATE (average, Average, Nrow); 190 192 for (i = 0; i < Nrow; i++) { 193 dvo_average_init (&average[i]); 191 194 average[i].R = R[i] ; 192 195 average[i].D = D[i] ; … … 197 200 average[i].duR = duR[i] ; 198 201 average[i].duD = duD[i] ; 202 average[i].uRgal = uRgal[i] ; 203 average[i].uDgal = uDgal[i] ; 199 204 average[i].P = P[i] ; 200 205 average[i].dP = dP[i] ; … … 230 235 free (duR); 231 236 free (duD); 237 free (uRgal); 238 free (uDgal); 232 239 free (P); 233 240 free (dP); … … 489 496 gfits_define_bintable_column (&theader, "E", "U_RA", "RA*cos(D) proper-motion", "", 1.0, 0.0); 490 497 gfits_define_bintable_column (&theader, "E", "U_DEC", "DEC proper-motion", "", 1.0, 0.0); 491 gfits_define_bintable_column (&theader, "E", "V_RA_ERR", "RA*cos(D) p-m error", "", 1.0, 0.0); 492 gfits_define_bintable_column (&theader, "E", "V_DEC_ERR", "DEC p-m error", "", 1.0, 0.0); 498 gfits_define_bintable_column (&theader, "E", "U_RA_ERR", "RA*cos(D) p-m error", "", 1.0, 0.0); 499 gfits_define_bintable_column (&theader, "E", "U_DEC_ERR", "DEC p-m error", "", 1.0, 0.0); 500 gfits_define_bintable_column (&theader, "E", "U_RA_GAL", "RA*cos(D) p-m error", "", 1.0, 0.0); 501 gfits_define_bintable_column (&theader, "E", "U_DEC_GAL", "DEC p-m error", "", 1.0, 0.0); 493 502 gfits_define_bintable_column (&theader, "E", "PAR", "parallax", "", 1.0, 0.0); 494 503 gfits_define_bintable_column (&theader, "E", "PAR_ERR", "parallax error", "", 1.0, 0.0); … … 526 535 float *duR ; ALLOCATE (duR , float , catalog->Naverage); 527 536 float *duD ; ALLOCATE (duD , float , catalog->Naverage); 537 float *uRgal ; ALLOCATE (uRgal , float , catalog->Naverage); 538 float *uDgal ; ALLOCATE (uDgal , float , catalog->Naverage); 528 539 float *P ; ALLOCATE (P , float , catalog->Naverage); 529 540 float *dP ; ALLOCATE (dP , float , catalog->Naverage); … … 560 571 duR[i] = average[i].duR ; 561 572 duD[i] = average[i].duD ; 573 uRgal[i] = average[i].uRgal ; 574 uDgal[i] = average[i].uDgal ; 562 575 P[i] = average[i].P ; 563 576 dP[i] = average[i].dP ; … … 591 604 gfits_set_bintable_column (&theader, &ftable, "U_RA", uR, catalog->Naverage); 592 605 gfits_set_bintable_column (&theader, &ftable, "U_DEC", uD, catalog->Naverage); 593 gfits_set_bintable_column (&theader, &ftable, "V_RA_ERR", duR, catalog->Naverage); 594 gfits_set_bintable_column (&theader, &ftable, "V_DEC_ERR", duD, catalog->Naverage); 606 gfits_set_bintable_column (&theader, &ftable, "U_RA_ERR", duR, catalog->Naverage); 607 gfits_set_bintable_column (&theader, &ftable, "U_DEC_ERR", duD, catalog->Naverage); 608 gfits_set_bintable_column (&theader, &ftable, "U_RA_GAL", uRgal, catalog->Naverage); 609 gfits_set_bintable_column (&theader, &ftable, "U_DEC_GAL", uDgal, catalog->Naverage); 595 610 gfits_set_bintable_column (&theader, &ftable, "PAR", P, catalog->Naverage); 596 611 gfits_set_bintable_column (&theader, &ftable, "PAR_ERR", dP, catalog->Naverage); … … 604 619 gfits_set_bintable_column (&theader, &ftable, "NMEASURE", Nmeasure, catalog->Naverage); 605 620 gfits_set_bintable_column (&theader, &ftable, "NMISSING", Nmissing, catalog->Naverage); 606 gfits_set_bintable_column (&theader, &ftable, "NGALPHOT", Ngalphot,catalog->Naverage);621 gfits_set_bintable_column (&theader, &ftable, "NGALPHOT", Ngalphot, catalog->Naverage); 607 622 gfits_set_bintable_column (&theader, &ftable, "OFF_MEASURE", measureOffset, catalog->Naverage); 608 623 gfits_set_bintable_column (&theader, &ftable, "OFF_MISSING", missingOffset, catalog->Naverage); … … 624 639 free (duR); 625 640 free (duD); 641 free (uRgal); 642 free (uDgal); 626 643 free (P); 627 644 free (dP); -
trunk/Ohana/src/relastro/src/ConfigInit.c
r37807 r39225 35 35 if (!ScanConfig (config, "RELASTRO_DPOS_MAX", "%lf", 0, &DPOS_MAX)) DPOS_MAX = 6.0; 36 36 if (!ScanConfig (config, "ADDSTAR_RADIUS", "%lf", 0, &ADDSTAR_RADIUS)) ADDSTAR_RADIUS = 1.0; 37 38 if (!ScanConfig (config, "RELASTRO_MIN_DISTANCE_MOD", "%lf", 0, &MIN_DISTANCE_MOD)) MIN_DISTANCE_MOD = 7.5; 39 if (!ScanConfig (config, "RELASTRO_MAX_DISTANCE_MOD", "%lf", 0, &MAX_DISTANCE_MOD)) MAX_DISTANCE_MOD = 15.0; 40 if (!ScanConfig (config, "RELASTRO_MAX_DISTANCE_MOD_ERR", "%lf", 0, &MAX_DISTANCE_MOD_ERR)) MAX_DISTANCE_MOD_ERR = 1.0; 37 41 38 42 if (!ScanConfig (config, "USE_FIXED_PIXCOORDS", "%d", 0, &USE_FIXED_PIXCOORDS)) USE_FIXED_PIXCOORDS = FALSE; -
trunk/Ohana/src/relastro/src/GetAstromError.c
r38986 r39225 73 73 int has2MASS = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_2MASS); 74 74 75 // serious hack: if the object has 2MASS, we set this internal bit and adjust the75 // modest hack: if the object has 2MASS or Tycho, we set this internal bit and adjust the 76 76 // weight to ensure the image is tied down to the 2mass frame 77 77 78 if (has2MASS) { 79 switch (Nloop) { 80 case 0: 81 dPtotal = dPtotal / 1000.0; 82 break; 83 case 1: 84 dPtotal = dPtotal / 300.0; 85 break; 86 case 2: 87 dPtotal = dPtotal / 100.0; 88 break; 89 case 3: 90 dPtotal = dPtotal / 30.0; 91 break; 92 case 4: 93 dPtotal = dPtotal / 10.0; 94 break; 95 case 5: 96 dPtotal = dPtotal / 10.0; 97 break; 98 default: 99 break; 100 } 78 if (has2MASS && LoopWeight2MASS) { 79 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 101 80 } 102 if (is2MASS) { 103 switch (Nloop) { 104 case 0: 105 dPtotal = dPtotal / 1000.0; 106 break; 107 case 1: 108 dPtotal = dPtotal / 300.0; 109 break; 110 case 2: 111 dPtotal = dPtotal / 100.0; 112 break; 113 case 3: 114 dPtotal = dPtotal / 30.0; 115 break; 116 case 4: 117 dPtotal = dPtotal / 10.0; 118 break; 119 case 5: 120 dPtotal = dPtotal / 10.0; 121 break; 122 default: 123 break; 124 } 81 if (is2MASS && LoopWeight2MASS) { 82 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 125 83 } 126 if (isTycho) { 127 switch (Nloop) { 128 case 0: 129 case 1: 130 dPtotal = dPtotal / 200.0; 131 break; 132 case 2: 133 case 3: 134 dPtotal = dPtotal / 100.0; 135 break; 136 case 4: 137 case 5: 138 dPtotal = dPtotal / 50.0; 139 break; 140 default: 141 break; 142 } 84 if (isTycho && LoopWeightTycho) { 85 dPtotal = dPtotal / LoopWeightTycho[Nloop]; 143 86 } 144 145 87 return (dPtotal); 146 88 } … … 197 139 198 140 dPtotal = MAX (dPtotal, MIN_ERROR); 141 142 // early on, we want 2MASS and Tycho to have a very high weight. This will force images 143 // to match the 2MASS / Tycho / ICRS reference frame. As Nloop gets higher, the weight 144 // needs to drop to allow the ps1 measurements to drive the solution 145 int is2MASS = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013); 146 int isTycho = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021); 147 int has2MASS = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_2MASS); 148 149 // modest hack: if the object has 2MASS or Tycho, we set this internal bit and adjust the 150 // weight to ensure the image is tied down to the 2mass frame 151 152 if (has2MASS && LoopWeight2MASS) { 153 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 154 } 155 if (is2MASS && LoopWeight2MASS) { 156 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 157 } 158 if (isTycho && LoopWeightTycho) { 159 dPtotal = dPtotal / LoopWeightTycho[Nloop]; 160 } 161 199 162 return (dPtotal); 200 163 } 201 164 202 /* for a long time, psphot was either not report edposition errors, or was reporting165 /* for a long time, psphot was either not reporting position errors, or was reporting 203 166 * completely wrong astrometry errors. This function lets us handle, in the 204 167 * configuration, different strategies to generating a position error -
trunk/Ohana/src/relastro/src/args.c
r38986 r39225 4 4 void usage_merge_source (void); 5 5 void usage_merge_source_id (char *name); 6 float *ParseLoopWeights (char *rawlist); 6 7 7 8 int args (int argc, char **argv) { … … 529 530 remove_argument (N, &argc, argv); 530 531 NLOOP = atof (argv[N]); 532 remove_argument (N, &argc, argv); 533 } 534 535 // e.g., -loop-weights-2mass 1000,300,300,200,200,100 536 // NOTE: this must come after -nloop above 537 LoopWeight2MASS = NULL; 538 if ((N = get_argument (argc, argv, "-loop-weights-2mass"))) { 539 remove_argument (N, &argc, argv); 540 LoopWeight2MASS = ParseLoopWeights (argv[N]); 541 remove_argument (N, &argc, argv); 542 } 543 LoopWeightTycho = NULL; 544 if ((N = get_argument (argc, argv, "-loop-weights-tycho"))) { 545 remove_argument (N, &argc, argv); 546 LoopWeightTycho = ParseLoopWeights (argv[N]); 531 547 remove_argument (N, &argc, argv); 532 548 } … … 999 1015 } 1000 1016 1017 float *ParseLoopWeights (char *rawlist) { 1018 1019 float *weights = NULL; 1020 ALLOCATE (weights, float, NLOOP); 1021 1022 int Nloop = 0; 1023 1024 /* parse the comma-separated list of photcodes */ 1025 char *myList = strcreate(rawlist); 1026 char *list = myList; 1027 char *entry = NULL; 1028 char *ptr = NULL; 1029 while ((Nloop < NLOOP) && ((entry = strtok_r (list, ",", &ptr)) != NULL)) { 1030 list = NULL; // pass NULL on successive strtok_r calls 1031 1032 weights[Nloop] = atof(entry); 1033 Nloop ++; 1034 } 1035 free (myList); 1036 1037 if (Nloop == 0) { 1038 fprintf (stderr, "syntax error parsing weights: %s\n", rawlist); 1039 exit (3); 1040 } 1041 1042 while (Nloop < NLOOP) { 1043 weights[Nloop] = weights[Nloop - 1]; 1044 Nloop ++; 1045 } 1046 return weights; 1047 } -
trunk/Ohana/src/relastro/src/bcatalog.c
r38986 r39225 117 117 if (!isfinite(catalog[0].average[i].uRgal)) continue; 118 118 if (!isfinite(catalog[0].average[i].uDgal)) continue; 119 120 // filter stars which are not well-handled by the galactic motion model 121 int mStarpar = catalog[0].average[i].starparOffset; 122 myAssert (mStarpar < catalog[0].Nstarpar, "oops"); 123 124 StarPar *starpar = &catalog[0].starpar[mStarpar]; 125 if (starpar->DistMag < MIN_DISTANCE_MOD) continue; 126 if (starpar->DistMag > MAX_DISTANCE_MOD) continue; 127 if (starpar->dDistMag > MAX_DISTANCE_MOD_ERR) continue; 119 128 } 120 129 -
trunk/Ohana/src/relastro/src/launch_region_hosts.c
r38986 r39225 134 134 if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset %f", MaxMeanOffset); 135 135 136 if (LoopWeight2MASS) { 137 char *weightline = NULL; 138 for (i = 0; i < NLOOP; i++) { 139 strextend (&weightline, "%f,", LoopWeight2MASS[i]); 140 } 141 strextend (&command, "-loop-weights-2mass %s", weightline); 142 free (weightline); 143 } 144 if (LoopWeightTycho) { 145 char *weightline = NULL; 146 for (i = 0; i < NLOOP; i++) { 147 strextend (&weightline, "%f,", LoopWeightTycho[i]); 148 } 149 strextend (&command, "-loop-weights-tycho %s", weightline); 150 free (weightline); 151 } 152 136 153 strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW); 137 154 strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM); -
trunk/Ohana/src/relastro/src/load_catalogs.c
r38986 r39225 44 44 pcatalog->catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT; // don't need to load all data at this point 45 45 pcatalog->Nsecfilt = GetPhotcodeNsecfilt (); 46 47 if (USE_GALAXY_MODEL) { 48 pcatalog->catflags = pcatalog->catflags | DVO_LOAD_STARPAR; 49 } 46 50 47 51 // loads Average, Measure, SecFilt … … 171 175 strextend (&command, " -minerror %f", MIN_ERROR); 172 176 strextend (&command, " -D RELASTRO_SIGMA_LIM %f", SIGMA_LIM); 177 strextend (&command, " -D RELASTRO_MIN_DISTANCE_MOD %f", MIN_DISTANCE_MOD); 178 strextend (&command, " -D RELASTRO_MAX_DISTANCE_MOD %f", MAX_DISTANCE_MOD); 179 strextend (&command, " -D RELASTRO_MAX_DISTANCE_MOD_ERR %f", MAX_DISTANCE_MOD_ERR); 173 180 174 181 if (FIT_MODE == FIT_PM_ONLY) strextend (&command, "-pm"); -
trunk/Ohana/src/uniphot/src/initialize_setgalmodel.c
r37807 r39225 45 45 46 46 // XXX add to config? 47 if (!InitGalaxyModel (" ROESER")) {47 if (!InitGalaxyModel ("FEAST-HIPPARCOS")) { 48 48 fprintf (stderr, "failed to init galaxy model\n"); 49 49 exit (2); -
trunk/Ohana/src/uniphot/src/setgalmodel.c
r38986 r39225 11 11 status = update_dvo_setgalmodel (); 12 12 13 if (!status) exit (1); 13 if (!status) { 14 fprintf (stderr, "ERROR: problem running setgalmodel\n"); 15 exit (1); 16 } 17 fprintf (stderr, "SUCCESS running setgalmodel\n"); 14 18 exit (0); 15 19 } -
trunk/Ohana/src/uniphot/src/setgalmodel_client.c
r38986 r39225 17 17 18 18 update_dvo_setgalmodel (); 19 fprintf (stderr, "SUCCESS running setgalmodel_client\n"); 19 20 20 21 exit (0); -
trunk/Ohana/src/uniphot/src/update_catalog_setgalmodel.c
r38986 r39225 28 28 if (fabs(starpar->FeH) > 99.0) continue; 29 29 30 double distance = pow(10.0, 0.2*(starpar->DistMag + 5.0)); 30 // NOTE: distance is in kiloparsec 31 double distance = pow(10.0, 0.2*(starpar->DistMag + 5.0)) / 1000.0; 31 32 32 33 double Lrad = starpar->galLon * RAD_DEG; -
trunk/Ohana/src/uniphot/src/update_dvo_setgalmodel.c
r38986 r39225 37 37 dvo_catalog_init (&catalog, TRUE); 38 38 catalog.filename = HOST_ID ? localFilename : skylist[0].filename[i]; 39 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_ MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT | DVO_LOAD_STARPAR;39 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_STARPAR; 40 40 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 41 41
Note:
See TracChangeset
for help on using the changeset viewer.
