Changeset 31657 for branches/eam_branches/ipp-20110505/Ohana
- Timestamp:
- Jun 21, 2011, 6:45:51 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/Ohana/src
- Files:
-
- 19 deleted
- 52 edited
- 27 copied
-
libdvo/Makefile (modified) (2 diffs)
-
libdvo/include/convert.h (copied) (copied from trunk/Ohana/src/libdvo/include/convert.h )
-
libdvo/include/dvo.h (modified) (3 diffs)
-
libdvo/include/dvodb.h (copied) (copied from trunk/Ohana/src/libdvo/include/dvodb.h )
-
libdvo/include/get_graphdata.h (copied) (copied from trunk/Ohana/src/libdvo/include/get_graphdata.h )
-
libdvo/include/libdvo_astro.h (copied) (copied from trunk/Ohana/src/libdvo/include/libdvo_astro.h )
-
libdvo/src/ImageOps.c (copied) (copied from trunk/Ohana/src/libdvo/src/ImageOps.c )
-
libdvo/src/ImageSelection.c (copied) (copied from trunk/Ohana/src/libdvo/src/ImageSelection.c )
-
libdvo/src/LoadImages.c (copied) (copied from trunk/Ohana/src/libdvo/src/LoadImages.c )
-
libdvo/src/convert.c (copied) (copied from trunk/Ohana/src/libdvo/src/convert.c )
-
libdvo/src/coord_systems.c (copied) (copied from trunk/Ohana/src/libdvo/src/coord_systems.c )
-
libdvo/src/dbBooleanCond.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbBooleanCond.c )
-
libdvo/src/dbCheckStack.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbCheckStack.c )
-
libdvo/src/dbCmdlineFields.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbCmdlineFields.c )
-
libdvo/src/dbExtractAverages.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbExtractAverages.c )
-
libdvo/src/dbExtractImages.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbExtractImages.c )
-
libdvo/src/dbExtractMeasures.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbExtractMeasures.c )
-
libdvo/src/dbFields.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbFields.c )
-
libdvo/src/dbRPN.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbRPN.c )
-
libdvo/src/dbStackMath.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbStackMath.c )
-
libdvo/src/dbStackOps.c (copied) (copied from trunk/Ohana/src/libdvo/src/dbStackOps.c )
-
libdvo/src/db_utils.c (copied) (copied from trunk/Ohana/src/libdvo/src/db_utils.c )
-
libdvo/src/dvo_set_catdir.c (copied) (copied from trunk/Ohana/src/libdvo/src/dvo_set_catdir.c )
-
libdvo/src/dvo_set_skyregion.c (copied) (copied from trunk/Ohana/src/libdvo/src/dvo_set_skyregion.c )
-
libdvo/src/match_image.c (copied) (copied from trunk/Ohana/src/libdvo/src/match_image.c )
-
libkapa/include/kapa.h (modified) (2 diffs)
-
libohana/Makefile (modified) (1 diff)
-
libohana/include/ohana.h (modified) (2 diffs)
-
libohana/src/errors.c (copied) (copied from trunk/Ohana/src/libohana/src/errors.c )
-
libohana/src/gprint.c (copied) (copied from trunk/Ohana/src/libohana/src/gprint.c )
-
libohana/src/isolate_elements.c (copied) (copied from trunk/Ohana/src/libohana/src/isolate_elements.c )
-
opihi/cmd.astro/Makefile (modified) (2 diffs)
-
opihi/cmd.astro/coord_systems.c (deleted)
-
opihi/cmd.basic/Makefile (modified) (1 diff)
-
opihi/cmd.data/Makefile (modified) (1 diff)
-
opihi/cmd.data/cursor.c (modified) (1 diff)
-
opihi/cmd.data/ps.c (modified) (1 diff)
-
opihi/dvo/ImageOps.c (deleted)
-
opihi/dvo/ImageSelection.c (deleted)
-
opihi/dvo/LoadImages.c (deleted)
-
opihi/dvo/Makefile (modified) (1 diff)
-
opihi/dvo/badimages.c (modified) (2 diffs)
-
opihi/dvo/dbBooleanCond.c (deleted)
-
opihi/dvo/dbCheckStack.c (deleted)
-
opihi/dvo/dbCmdlineFields.c (deleted)
-
opihi/dvo/dbExtractAverages.c (deleted)
-
opihi/dvo/dbExtractImages.c (deleted)
-
opihi/dvo/dbExtractMeasures.c (deleted)
-
opihi/dvo/dbFields.c (deleted)
-
opihi/dvo/dbRPN.c (deleted)
-
opihi/dvo/dbStackMath.c (deleted)
-
opihi/dvo/dbStackOps.c (deleted)
-
opihi/dvo/dmt.c (modified) (1 diff)
-
opihi/dvo/extract.c (modified) (1 diff)
-
opihi/dvo/gimages.c (modified) (2 diffs)
-
opihi/dvo/images.c (modified) (2 diffs)
-
opihi/dvo/imdata.c (modified) (2 diffs)
-
opihi/dvo/imdense.c (modified) (2 diffs)
-
opihi/dvo/imextract.c (modified) (2 diffs)
-
opihi/dvo/imlist.c (modified) (2 diffs)
-
opihi/dvo/imphot.c (modified) (2 diffs)
-
opihi/dvo/imstats.c (modified) (2 diffs)
-
opihi/dvo/lcat.c (modified) (1 diff)
-
opihi/dvo/match_image.c (deleted)
-
opihi/dvo/photometry.c (modified) (2 diffs)
-
opihi/dvo/region_list.c (modified) (6 diffs)
-
opihi/dvo/skycoverage.c (modified) (2 diffs)
-
opihi/dvo/skyregion.c (modified) (4 diffs)
-
opihi/dvo/subpix.c (modified) (2 diffs)
-
opihi/include/astro.h (modified) (1 diff)
-
opihi/include/convert.h (deleted)
-
opihi/include/data.h (modified) (1 diff)
-
opihi/include/display.h (modified) (1 diff)
-
opihi/include/dvomath.h (modified) (4 diffs)
-
opihi/include/dvoshell.h (modified) (8 diffs)
-
opihi/include/shell.h (modified) (3 diffs)
-
opihi/lib.data/Makefile (modified) (2 diffs)
-
opihi/lib.data/convert.c (deleted)
-
opihi/lib.data/open_kapa.c (modified) (1 diff)
-
opihi/lib.shell/Makefile (modified) (3 diffs)
-
opihi/lib.shell/dvomath.c (modified) (1 diff)
-
opihi/lib.shell/errors.c (deleted)
-
opihi/lib.shell/isolate_elements.c (deleted)
-
photdbc/include/photdbc.h (modified) (1 diff)
-
photdbc/src/make_subcatalog.c (modified) (2 diffs)
-
photdbc/src/photdbc.c (modified) (1 diff)
-
relastro/Makefile (modified) (1 diff)
-
relastro/include/relastro.h (modified) (2 diffs)
-
relastro/src/ConfigInit.c (modified) (1 diff)
-
relastro/src/args.c (modified) (1 diff)
-
relastro/src/high_speed_catalogs.c (modified) (2 diffs)
-
relastro/src/high_speed_objects.c (modified) (14 diffs)
-
relastro/src/high_speed_utils.c (copied) (copied from trunk/Ohana/src/relastro/src/high_speed_utils.c )
-
relastro/src/initialize.c (modified) (2 diffs)
-
relastro/src/relastroVisual.c (modified) (1 diff)
-
relphot/include/relphot.h (modified) (1 diff)
-
uniphot/include/uniphot.h (modified) (1 diff)
-
uniphot/src/plotstuff.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/Ohana/src/libdvo/Makefile
r31613 r31657 36 36 $(DESTINC)/ps1_ref_defs.h 37 37 38 INCS = $(DEFS) $(DESTINC)/dvo.h $(DESTINC)/autocode.h $(DESTINC)/dvo_util.h 38 INCS = $(DEFS) $(DESTINC)/dvo.h $(DESTINC)/autocode.h $(DESTINC)/dvo_util.h $(DESTINC)/dvodb.h $(DESTINC)/libdvo_astro.h $(DESTINC)/convert.h $(DESTINC)/get_graphdata.h 39 39 40 40 OBJS = \ … … 73 73 $(SRC)/skyregion_gsc.$(ARCH).o \ 74 74 $(SRC)/skyregion_ops.$(ARCH).o \ 75 $(SRC)/dvo_set_skyregion.$(ARCH).o \ 76 $(SRC)/dvo_set_catdir.$(ARCH).o \ 75 77 $(SRC)/cmf-ps1-v1-alt.$(ARCH).o \ 76 78 $(SRC)/cmf-ps1-sv1-alt.$(ARCH).o \ 77 $(SRC)/dvo_util.$(ARCH).o 79 $(SRC)/dvo_util.$(ARCH).o \ 80 $(SRC)/dbBooleanCond.$(ARCH).o \ 81 $(SRC)/dbCheckStack.$(ARCH).o \ 82 $(SRC)/dbCmdlineFields.$(ARCH).o \ 83 $(SRC)/dbExtractAverages.$(ARCH).o \ 84 $(SRC)/dbExtractMeasures.$(ARCH).o \ 85 $(SRC)/dbExtractImages.$(ARCH).o \ 86 $(SRC)/dbFields.$(ARCH).o \ 87 $(SRC)/dbRPN.$(ARCH).o \ 88 $(SRC)/dbStackMath.$(ARCH).o \ 89 $(SRC)/dbStackOps.$(ARCH).o \ 90 $(SRC)/coord_systems.$(ARCH).o \ 91 $(SRC)/LoadImages.$(ARCH).o \ 92 $(SRC)/ImageSelection.$(ARCH).o \ 93 $(SRC)/ImageOps.$(ARCH).o \ 94 $(SRC)/match_image.$(ARCH).o \ 95 $(SRC)/db_utils.$(ARCH).o \ 96 $(SRC)/convert.$(ARCH).o 97 78 98 79 99 # $(SRC)/dvo_convert_panstarrs.$(ARCH).o -
branches/eam_branches/ipp-20110505/Ohana/src/libdvo/include/dvo.h
r31468 r31657 1 # ifndef DVO_H 2 # define DVO_H 3 1 4 # include <ohana.h> 2 5 # include <gfitsio.h> 3 6 # include <autocode.h> 4 7 5 # i fndef DVO_H6 # define DVO_H8 # include <libdvo_astro.h> 9 # include <dvodb.h> 7 10 8 11 /* DVO table modes */ … … 506 509 SkyList *SkyListChildrenByBounds_List PROTO((SkyList *table, int depth, double Rmin, double Rmax, double Dmin, double Dmax)); 507 510 511 int set_skyregion(double Rs, double Re, double Ds, double De); 512 int get_skyregion (double *Rs, double *Re, double *Ds, double *De); 513 514 void dvo_set_catdir(char *catdir); 515 char *dvo_get_catdir(); 516 508 517 /* dvo-specific sorting functions */ 509 518 void sortave (Average *ave, off_t N); … … 513 522 void sort_regions (SkyRegion *region, off_t N); 514 523 524 #ifdef MOVED_TO_LIBOHANA 525 int print_error(void); 526 int init_error(void); 527 int push_error(char *); 528 #endif 529 515 530 # endif -
branches/eam_branches/ipp-20110505/Ohana/src/libkapa/include/kapa.h
r31615 r31657 85 85 } KapaSection; 86 86 87 typedef struct { 87 #ifdef NOT_MOVED_TO_DVO 88 typedef struct graphdata { 88 89 double xmin, xmax, ymin, ymax; 89 90 int style, ptype, ltype, etype, ebar, color; … … 96 97 char axis[8], labels[8], ticks[8]; 97 98 } Graphdata; 99 #endif 98 100 99 101 typedef struct { -
branches/eam_branches/ipp-20110505/Ohana/src/libohana/Makefile
r31611 r31657 39 39 $(SRC)/IOBufferOps.$(ARCH).o \ 40 40 $(SRC)/CommOps.$(ARCH).o \ 41 $(SRC)/isolate_elements.$(ARCH).o \ 42 $(SRC)/errors.$(ARCH).o \ 43 $(SRC)/gprint.$(ARCH).o \ 41 44 $(SRC)/version.$(ARCH).o 42 45 -
branches/eam_branches/ipp-20110505/Ohana/src/libohana/include/ohana.h
r31598 r31657 97 97 }; 98 98 99 typedef enum {GP_LOG, GP_ERR} gpDest; 100 99 101 /* Some notes on the Ohana BYTE_SWAP macros: 100 102 … … 321 323 off_t Fwrite PROTO((void *ptr, off_t size, off_t nitems, FILE *f, char *type)); 322 324 325 char **isolate_elements PROTO((int argc, char **argv, int *nstack)); 326 327 // functions used to manage "last error message" 328 int init_error PROTO((void)); 329 int push_error PROTO((char *line)); 330 int print_error PROTO((void)); 331 332 // gprint gets a stub implementation in libohana. opihi implements the real one. 333 int gprint (gpDest dest, char *format, ...); 334 323 335 /* 324 336 # define F_SETFL 4 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.astro/Makefile
r30972 r31657 25 25 $(SRC)/cplot.$(ARCH).o \ 26 26 $(SRC)/csystem.$(ARCH).o \ 27 $(SRC)/coord_systems.$(ARCH).o \28 27 $(SRC)/ctimes.$(ARCH).o \ 29 28 $(SRC)/cval.$(ARCH).o \ … … 77 76 $(INC)/shell.h \ 78 77 $(INC)/dvomath.h \ 79 $(INC)/convert.h \80 78 $(INC)/display.h 81 79 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/Makefile
r27255 r31657 66 66 $(INC)/shell.h \ 67 67 $(INC)/dvomath.h \ 68 $(INC)/convert.h \69 68 $(INC)/display.h 70 69 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.data/Makefile
r31450 r31657 155 155 $(INC)/shell.h \ 156 156 $(INC)/dvomath.h \ 157 $(INC)/convert.h \158 157 $(INC)/display.h 159 158 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.data/cursor.c
r13479 r31657 20 20 remove_argument (N, &argc, argv); 21 21 } 22 if (!GetGraph Data (NULL, &kapa, name)) return (FALSE);22 if (!GetGraphdata (NULL, &kapa, name)) return (FALSE); 23 23 FREE (name); 24 24 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.data/ps.c
r14590 r31657 56 56 57 57 // get the connection to kapa, false if none available 58 if (!GetGraph Data (NULL, &kapa, name)) return (FALSE);58 if (!GetGraphdata (NULL, &kapa, name)) return (FALSE); 59 59 FREE (name); 60 60 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/Makefile
r31450 r31657 20 20 funcs = \ 21 21 $(SRC)/init.$(ARCH).o \ 22 $(SRC)/ImageOps.$(ARCH).o \23 $(SRC)/ImageSelection.$(ARCH).o \24 $(SRC)/LoadImages.$(ARCH).o \25 22 $(SRC)/cmpReadFile.$(ARCH).o \ 26 23 $(SRC)/compare.$(ARCH).o \ 27 $(SRC)/match_image.$(ARCH).o \28 24 $(SRC)/dvomisc.$(ARCH).o \ 29 25 $(SRC)/region_list.$(ARCH).o \ 30 26 $(SRC)/find_matches.$(ARCH).o \ 31 27 $(SRC)/photometry.$(ARCH).o \ 32 $(SRC)/dbBooleanCond.$(ARCH).o \33 $(SRC)/dbCheckStack.$(ARCH).o \34 $(SRC)/dbCmdlineFields.$(ARCH).o \35 $(SRC)/dbExtractAverages.$(ARCH).o \36 $(SRC)/dbExtractMeasures.$(ARCH).o \37 $(SRC)/dbExtractImages.$(ARCH).o \38 $(SRC)/dbFields.$(ARCH).o \39 $(SRC)/dbRPN.$(ARCH).o \40 $(SRC)/dbStackMath.$(ARCH).o \41 $(SRC)/dbStackOps.$(ARCH).o \42 28 $(SRC)/dvo.$(ARCH).o 43 29 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/badimages.c
r29540 r31657 20 20 } 21 21 22 image = LoadImages (&Nimage);22 image = LoadImagesDVO (&Nimage); 23 23 24 24 Cross = FALSE; … … 70 70 } 71 71 72 FreeImages (image);72 FreeImagesDVO(image); 73 73 return (TRUE); 74 74 } -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/dmt.c
r27435 r31657 45 45 } 46 46 47 if (!GetGraph Data (&graphsky, &kapa, NULL)) return (FALSE);47 if (!GetGraphdata (&graphsky, &kapa, NULL)) return (FALSE); 48 48 if (!GetGraph (&graphmode, NULL, NULL)) return (FALSE); 49 49 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/extract.c
r17201 r31657 31 31 RegionFile *regions; 32 32 33 if (!GetGraph Data (&graphmode, NULL, NULL)) return (FALSE);33 if (!GetGraphdata (&graphmode, NULL, NULL)) return (FALSE); 34 34 if (!InitPhotcodes ()) return (FALSE); 35 35 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/gimages.c
r30612 r31657 83 83 if (!ohana_str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE); 84 84 85 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);85 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 86 86 image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect); 87 87 BuildChipMatch (image, Nimage); … … 245 245 set_int_variable ("IMAGEphotcode:n", Nfound); 246 246 247 FreeImages (image);247 FreeImagesDVO (image); 248 248 free (subset); 249 249 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/images.c
r30612 r31657 130 130 131 131 /* it is not an error for the database not to have any images */ 132 if ((image = LoadImages (&Nimage)) == NULL) return (TRUE);132 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (TRUE); 133 133 BuildChipMatch (image, Nimage); 134 134 … … 355 355 free (Xvec.elements.Flt); 356 356 free (Yvec.elements.Flt); 357 FreeImages (image);357 FreeImagesDVO (image); 358 358 FREE (foundMosaic); 359 359 return (TRUE); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/imdata.c
r29540 r31657 86 86 if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) return (FALSE); 87 87 88 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);88 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 89 89 image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect); 90 90 BuildChipMatch (image, Nimage); … … 222 222 vec[0].Nelements = N; 223 223 REALLOCATE (vec[0].elements.Flt, opihi_flt, MAX(1,N)); 224 FreeImages (image);224 FreeImagesDVO(image); 225 225 return (TRUE); 226 226 } -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/imdense.c
r28958 r31657 21 21 } 22 22 23 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);23 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 24 24 BuildChipMatch (image, Nimage); 25 25 … … 70 70 free (Xvec.elements.Flt); 71 71 free (Yvec.elements.Flt); 72 FreeImages (image);72 FreeImagesDVO (image); 73 73 return (TRUE); 74 74 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/imextract.c
r31160 r31657 90 90 } 91 91 92 if ((image = LoadImages (&Nimage)) == NULL) goto escape;92 if ((image = LoadImagesDVO (&Nimage)) == NULL) goto escape; 93 93 BuildChipMatch (image, Nimage); 94 94 dbExtractImagesInit (); … … 141 141 142 142 // free (subset); 143 FreeImages (image);143 FreeImagesDVO (image); 144 144 145 145 if (vec) free (vec); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/imlist.c
r29938 r31657 81 81 } 82 82 83 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);83 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 84 84 image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect); 85 85 BuildChipMatch (image, Nimage); … … 108 108 } 109 109 110 FreeImages (image);110 FreeImagesDVO(image); 111 111 free (subset); 112 112 return (TRUE); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/imphot.c
r30612 r31657 50 50 gprint (GP_ERR, "searching in range %ds - %ds (%f seconds)\n", (int)tzero, (int)(tzero + trange), trange); 51 51 52 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);52 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 53 53 image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TRUE); 54 54 … … 98 98 } 99 99 100 FreeImages (image);100 FreeImagesDVO(image); 101 101 free (subset); 102 102 return (TRUE); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/imstats.c
r29540 r31657 30 30 } 31 31 32 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);32 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 33 33 BuildChipMatch (image, Nimage); 34 34 … … 58 58 free (Xvec.elements.Flt); 59 59 free (Yvec.elements.Flt); 60 FreeImages (image);60 FreeImagesDVO (image); 61 61 return (TRUE); 62 62 } -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/lcat.c
r14401 r31657 11 11 SkyList *skylist; 12 12 13 if (!GetGraph Data (&graphmode, NULL, NULL)) return (FALSE);13 if (!GetGraphdata (&graphmode, NULL, NULL)) return (FALSE); 14 14 15 15 ShowAll = FALSE; -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/photometry.c
r30612 r31657 1178 1178 ra = average[0].R - measure[0].dR / 3600.0; 1179 1179 dec = average[0].D - measure[0].dD / 3600.0; 1180 image = MatchImage (measure[0].t, measure[0].photcode, measure[0].imageID);1180 image = MatchImageDVO (measure[0].t, measure[0].photcode, measure[0].imageID); 1181 1181 if (image == NULL) break; 1182 1182 RD_to_XY (&x, &y, ra, dec, &image[0].coords); … … 1191 1191 ra = average[0].R - measure[0].dR / 3600.0; 1192 1192 dec = average[0].D - measure[0].dD / 3600.0; 1193 image = MatchImage (measure[0].t, measure[0].photcode, measure[0].imageID);1193 image = MatchImageDVO (measure[0].t, measure[0].photcode, measure[0].imageID); 1194 1194 if (image == NULL) break; 1195 1195 RD_to_XY (&x, &y, ra, dec, &image[0].coords); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/region_list.c
r25757 r31657 5 5 information carried back up */ 6 6 7 static char *CATDIR = NULL;8 7 static SkyTable *sky = NULL; 9 8 10 9 int SetCATDIR (char *path, int verbose) { 11 10 11 char *CATDIR = NULL; 12 12 char *newpath; 13 13 char catdir_config[256]; … … 24 24 } 25 25 26 if (CATDIR != NULL) free (CATDIR); 27 CATDIR = strcreate (newpath); 26 CATDIR = newpath; 27 // save the new value in libdvo 28 dvo_set_catdir(CATDIR); 28 29 29 30 if (VarConfig ("GSCFILE", "%s", gscfile) == NULL) gscfile[0] = 0; … … 51 52 52 53 char *GetCATDIR () { 54 char *CATDIR = dvo_get_catdir(); 55 53 56 if (CATDIR == NULL) { 54 SetCATDIR (NULL, FALSE); 57 if (SetCATDIR (NULL, FALSE)) { 58 CATDIR = dvo_get_catdir(); 59 } 55 60 } 56 61 return (CATDIR); … … 136 141 if (selection->name != NULL) { 137 142 char filename[256]; 143 char *CATDIR = dvo_get_catdir(); 138 144 139 145 ALLOCATE (skylist, SkyList, 1); … … 158 164 Graphdata graphsky; 159 165 160 if (!GetGraph Data (&graphsky, NULL, NULL)) {166 if (!GetGraphdata (&graphsky, NULL, NULL)) { 161 167 gprint (GP_ERR, "region display not available\n"); 162 168 return (NULL); … … 201 207 ALLOCATE (skylist[0].filename, char *, NREGIONS); 202 208 skylist[0].ownElements = TRUE; // free these elements when freeing the list 209 210 char *CATDIR = dvo_get_catdir(); 203 211 204 212 while (fscanf (f, "%s", filename) != EOF) { -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/skycoverage.c
r31160 r31657 186 186 PutCoords (&coords, &buf[0].header); 187 187 188 image = LoadImages (&Nimage);188 image = LoadImagesDVO(&Nimage); 189 189 if (image == NULL) { 190 190 return (FALSE); … … 266 266 } 267 267 } 268 FreeImages (image);268 FreeImagesDVO(image); 269 269 return (TRUE); 270 270 } -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/skyregion.c
r27610 r31657 1 1 # include "dvoshell.h" 2 2 3 #ifdef NO_MOVED_TO_DVO 3 4 static double RAs = 0.0; 4 5 static double RAe = 0.0; 5 6 static double DECs = 0.0; 6 7 static double DECe = 0.0; 8 #endif 7 9 8 10 // define the sky region for which extractions are limited … … 10 12 11 13 if (argc == 1) { 14 double RAs, RAe, DECs, DECe; 15 get_skyregion(&RAs, &RAe, &DECs, &DECe); 16 12 17 gprint (GP_ERR, "current skyregion: %f - %f : %f - %f\n", RAs, RAe, DECs, DECe); 13 18 gprint (GP_ERR, "USAGE: skyregion (min RA) (max RA) (min DEC) (max DEC)\n"); … … 24 29 return (TRUE); 25 30 } 26 31 #ifdef NOT_MOVED_TO_LIBDVO 27 32 int get_skyregion (double *Rs, double *Re, double *Ds, double *De) { 28 33 … … 44 49 return TRUE; 45 50 } 51 #endif 46 52 47 53 /* find region which overlaps c at given depth (-1 : populated ) */ -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/dvo/subpix.c
r29540 r31657 114 114 115 115 /* load all images, extract those touching Ra, Dec */ 116 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);116 if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE); 117 117 BuildChipMatch (image, Nimage); 118 118 … … 150 150 SkyListFree (skylist); 151 151 152 FreeImages (image);152 FreeImagesDVO(image); 153 153 return (TRUE); 154 154 } -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/astro.h
r21153 r31657 27 27 } CoordTransform; 28 28 29 #ifndef MOVED_TO_LIBDVO 29 30 typedef enum {COORD_NONE, COORD_CELESTIAL, COORD_GALACTIC, COORD_ECLIPTIC} CoordTransformSystem; 31 #endif 30 32 31 33 CoordTransform *InitTransform (CoordTransformSystem input, CoordTransformSystem output); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/data.h
r29540 r31657 4 4 # include "convert.h" 5 5 # include "display.h" 6 # include "get_graphdata.h" 6 7 7 8 # ifndef DATA_H -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/display.h
r27435 r31657 11 11 int PlotVectorPairErrors PROTO((int kapa, Vector *xVec, Vector *yVec, Vector *dyValues, Graphdata *graphmode)); 12 12 int PlotVectorTriplet PROTO((int kapa, Vector *xVec, Vector *yVec, Vector *zValues, Graphdata *graphmode)); 13 int GetGraphData PROTO((Graphdata *data, int *kapa, char *name));13 // int GetGraphData PROTO((Graphdata *data, int *kapa, char *name)); 14 14 int GetGraph PROTO((Graphdata *data, int *kapa, char *name)); 15 15 int SetGraph PROTO((Graphdata *data)); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/dvomath.h
r20936 r31657 7 7 8 8 # define NCHARS 256 9 # define opihi_flt double10 # define opihi_int int9 // # define opihi_flt double 10 // # define opihi_int int 11 11 // NOTE: if opihi_int is changed to unsigned, all subtraction and negation operations 12 12 // need to result in a float value (or 3 - 5 will yield the unexpected value 2^32 - 2) … … 26 26 enum {ANYVECTOR, NEWVECTOR, OLDVECTOR}; 27 27 enum {ANYBUFFER, NEWBUFFER, OLDBUFFER}; 28 #ifdef NOT_MOVED_TO_LIBDVO 28 29 enum {OPIHI_FLT, OPIHI_INT}; 30 #endif 29 31 30 32 typedef struct { /* representation of a variable (0-D) */ … … 64 66 /* math functions */ 65 67 char *dvomath PROTO((int argc, char **argv, int *size, int maxsize)); 66 char **isolate_elements PROTO((int argc, char **argv, int *nstack)); 68 // MOVED to libohana 69 // char **isolate_elements PROTO((int argc, char **argv, int *nstack)); 67 70 StackVar *convert_to_RPN PROTO((int argc, char **argv, int *nstack)); 68 71 int check_stack PROTO((StackVar *stack, int Nstack, int validsize)); … … 144 147 /* why are these in here? */ 145 148 int gfits_copy_matrix_info (Matrix *matrix1, Matrix *matrix2); 149 #ifndef MOVED_TO_LIBDVO 146 150 int GetTimeFormat PROTO((time_t *TimeReference, int *TimeFormat)); 151 #endif 147 152 148 153 # endif -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/dvoshell.h
r31160 r31657 2 2 # include "basic.h" 3 3 # include "astro.h" 4 # include "dvo.h" 4 5 5 6 # ifndef DVOSHELL_H 6 7 # define DVOSHELL_H 7 8 9 #ifdef NOT_MOVED_TO_LIBDVO 8 10 typedef enum { 9 11 DB_STACK_NONE = 0, … … 232 234 }; 233 235 234 235 236 enum {DVO_TABLE_AVERAGE, DVO_TABLE_MEASURE, DVO_TABLE_IMAGE}; 236 237 enum {DVO_DB_CMDLINE_ERROR, DVO_DB_CMDLINE_IS_END, DVO_DB_CMDLINE_IS_WHERE, DVO_DB_CMDLINE_IS_MATCH}; … … 268 269 opihi_int Int; 269 270 } dbValue; 271 272 #endif // notdef MOVED_TO_LIBDVO 270 273 271 274 typedef struct { … … 313 316 void FreeDVO PROTO((void)); 314 317 int InitPhotcodes PROTO((void)); 318 #ifdef NOT_MOVED_TO_DVO 315 319 Image *LoadImages PROTO((off_t *Nimage)); 316 320 void FreeImages PROTO((Image *images)); 317 321 Image *MatchImage PROTO((unsigned int time, short int source, unsigned int imageID)); 322 #endif 318 323 Coords *MatchMosaic PROTO((unsigned int time, short int source)); 319 324 int Quality PROTO((Measure *measure, int IsDophot)); … … 347 352 CMPstars *cmpReadText PROTO((FILE *f, off_t *nstars)); 348 353 int RD_to_XYpic PROTO((double *x, double *y, double r, double d, Coords *coords, double Rmin, double Rmax, double Rmid, int *leftside)); 349 354 int wordhash (char *word); 355 356 #ifdef NOT_MOVED_TO_LIBDVO 350 357 // dvo DB field functions 351 358 dbField *dbCmdlineFields PROTO((int argc, char **argv, int table, int *last, int *nfields)); … … 361 368 dbStack *dbBinary PROTO((dbStack *V1, dbStack *V2, char *op, dbValue *fields)); 362 369 dbStack *dbUnary PROTO((dbStack *V1, char *op, dbValue *fields)); 370 #endif 363 371 364 372 int GetMagMode PROTO((char *string)); … … 368 376 int ParseImageField PROTO((dbField *field, char *fieldName)); 369 377 370 dbValue dbExtractAverages PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field));371 378 dbValue dbExtractMeasures PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field)); 372 379 dbValue dbExtractImages PROTO((Image *image, off_t Nimage, off_t N, dbField *field)); 380 #ifdef NOT_MOVED_TO_LIBDVO 381 dbValue dbExtractAverages PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field)); 373 382 374 383 void dbInitField PROTO((dbField *field)); 375 384 void dbFreeFields PROTO((dbField *fields, int Nfields)); 376 385 int dbAstroRegionLimits PROTO((dbStack **stack, int *nstack, SkyRegionSelection *selection, int table)); 377 char *strfloat PROTO((float value));378 379 386 int get_skyregion (double *Rs, double *Re, double *Ds, double *De); 380 387 int set_skyregion (double Rs, double Re, double Ds, double De); 381 388 void FreeImageSelection (void); 389 char *strfloat PROTO((float value)); 390 382 391 383 392 void FreeSkyRegionSelection (SkyRegionSelection *selection); 384 int wordhash (char *word); 393 385 394 386 395 int dbExtractMeasuresInitTransform (CoordTransformSystem target); … … 395 404 int dbExtractImagesInit (void); 396 405 int dbExtractImagesReset (void); 406 #endif // NOT_MOVED_TO_LIBDVO 397 407 398 408 # endif -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/shell.h
r31590 r31657 12 12 # define MACRO_NAME(s) MACRO_STRING(s) 13 13 14 typedef enum {GP_FILE, GP_BUFF} gpMode; 15 #ifdef NOT_MOVED_TO_LIBOHANA 14 16 /* enums used by gprint functions */ 15 typedef enum {GP_FILE, GP_BUFF} gpMode;16 17 typedef enum {GP_LOG, GP_ERR} gpDest; 18 #endif 17 19 typedef enum {OPIHI_VERBOSE_OFF, OPIHI_VERBOSE_ON, OPIHI_VERBOSE_ERROR} OpihiVerboseMode; 18 20 … … 122 124 char *VarConfigEntry PROTO((char *keyword, char *mode, int entry, void *ptr)); 123 125 126 #ifndef NOT_MOVED_TO_DVO 124 127 int init_error PROTO((void)); 125 128 int push_error PROTO((char *line)); 126 129 int print_error PROTO((void)); 130 #endif 131 127 132 void handle_interrupt PROTO((int)); 128 133 char **command_completer PROTO((const char *, int, int)); … … 171 176 FILE *gprintGetFile PROTO((gpDest dest)); 172 177 char *gprintGetName PROTO((gpDest dest)); 178 #ifdef NOT_MOVED_TO_LIBOHANA 173 179 int gprint PROTO((gpDest dest, char *format, ...)) OHANA_FORMAT(printf, 2, 3); 180 #endif 174 181 int gwrite PROTO((char *buffer, int size, int N, gpDest dest)); 175 182 int gprint_syserror PROTO((gpDest dest, int myError, char *format, ...)) OHANA_FORMAT(printf, 3, 4); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.data/Makefile
r29540 r31657 21 21 $(SDIR)/svdcmp.$(ARCH).o \ 22 22 $(SDIR)/svdcmp_bond_new.$(ARCH).o \ 23 $(SDIR)/convert.$(ARCH).o \24 23 $(SDIR)/bracket.$(ARCH).o \ 25 24 $(SDIR)/spline.$(ARCH).o \ … … 48 47 $(INC)/shell.h \ 49 48 $(INC)/dvomath.h \ 50 $(INC)/convert.h \51 49 $(INC)/display.h 52 50 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.data/open_kapa.c
r18326 r31657 162 162 163 163 /* return pointers for given kapa, don't set or open */ 164 int GetGraph Data (Graphdata *data, int *fd, char *name) {164 int GetGraphdata (Graphdata *data, int *fd, char *name) { 165 165 166 166 int entry; -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/Makefile
r16889 r31657 28 28 $(SDIR)/convert_to_RPN.$(ARCH).o \ 29 29 $(SDIR)/dvomath.$(ARCH).o \ 30 $(SDIR)/errors.$(ARCH).o \31 30 $(SDIR)/evaluate_stack.$(ARCH).o \ 32 31 $(SDIR)/exec_loop.$(ARCH).o \ … … 35 34 $(SDIR)/gprint.$(ARCH).o \ 36 35 $(SDIR)/interrupt.$(ARCH).o \ 37 $(SDIR)/isolate_elements.$(ARCH).o \38 36 $(SDIR)/macro_create.$(ARCH).o \ 39 37 $(SDIR)/macro_delete.$(ARCH).o \ … … 61 59 $(INC)/shell.h \ 62 60 $(INC)/dvomath.h \ 63 $(INC)/convert.h \64 61 $(INC)/display.h 65 62 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/dvomath.c
r20936 r31657 1 1 # include "opihi.h" 2 # include "dvo.h" 2 3 3 4 /* return value on success is temp vector/buffer name or scalar value return value on error is NULL, all -
branches/eam_branches/ipp-20110505/Ohana/src/photdbc/include/photdbc.h
r30616 r31657 111 111 void unique_measures (Catalog *catalog); 112 112 void wcatalog (Catalog *catalog); 113 int make_subcatalog (Catalog *subcatalog, Catalog *catalog );113 int make_subcatalog (Catalog *subcatalog, Catalog *catalog, SkyRegion *region); 114 114 void check_directory (char *basefile); 115 115 -
branches/eam_branches/ipp-20110505/Ohana/src/photdbc/src/make_subcatalog.c
r31450 r31657 3 3 // copy a catalog to a new subcatalog, applying some filters 4 4 // the supplied subcatalog must already be locked, opened, and created 5 int make_subcatalog (Catalog *subcatalog, Catalog *catalog ) {5 int make_subcatalog (Catalog *subcatalog, Catalog *catalog, SkyRegion *region) { 6 6 7 7 int found; … … 36 36 for (i = 0; i < catalog[0].Naverage; i++) { 37 37 // perform exclusions based on average properties 38 39 // XXX: temporary check make sure that this object belongs in this region 40 // used to fix the pole area in the reference catalog 41 { 42 double R = catalog[0].average[i].R; 43 double D = catalog[0].average[i].D; 44 if (R <= region->Rmin) continue; 45 if (R > region->Rmax) continue; 46 if (D <= region->Dmin) continue; 47 if (D > region->Dmax) continue; 48 } 38 49 39 50 // exclude stars with too few measurements -
branches/eam_branches/ipp-20110505/Ohana/src/photdbc/src/photdbc.c
r28331 r31657 65 65 66 66 /* limit number of measures based on selections */ 67 make_subcatalog (&outcatalog, &incatalog );67 make_subcatalog (&outcatalog, &incatalog, skylist[0].regions[i]); 68 68 69 69 // XXX add other filters here: -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/Makefile
r29001 r31657 61 61 $(SRC)/high_speed_catalogs.$(ARCH).o \ 62 62 $(SRC)/high_speed_objects.$(ARCH).o \ 63 $(SRC)/high_speed_utils.$(ARCH).o \ 63 64 $(SRC)/relastroVisual.$(ARCH).o 64 65 -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/include/relastro.h
r31542 r31657 134 134 int NphotcodesGroupA, NphotcodesGroupB; 135 135 PhotCode **photcodesGroupA, **photcodesGroupB; 136 char WHERE_A[10000], WHERE_B[10000]; 137 SkyRegionSelection SELECTION; 136 138 137 139 int AreaSelect; … … 365 367 int GetScatterRawRef(float *dLsig, float *dMsig, float *dRsig, int *nKeep, StarData *raw, StarData *ref, int Nstars, float SigmaLimit); 366 368 int LimitDensityCatalog (Catalog *subcatalog, Catalog *catalog); 369 370 int initializeConstraints(); 371 int applyConstraintsA(Catalog *catalog, off_t i); 372 int applyConstraintsB(Catalog *catalog, off_t i); 373 void setupAreaSelection(SkyRegion *region); -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/src/ConfigInit.c
r30616 r31657 48 48 ScanConfig(config, "PHOTCODE_FILE", "%s", 0, MasterPhotcodeFile); 49 49 50 // Defaults for WHERE_A are established in db_utils.c: intializeConstraints 51 ScanConfig(config, "WHERE_A", "%s", 0, WHERE_A); 52 ScanConfig(config, "WHERE_B", "%s", 0, WHERE_B); 53 50 54 sprintf (ImageCat, "%s/Images.dat", CATDIR); 51 55 -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/src/args.c
r31542 r31657 315 315 fprintf (stderr, " -update-chips\n"); 316 316 fprintf (stderr, " -update-mosaics\n"); 317 fprintf (stderr, " -high-speed (code[,code,code]) (code[,code,code]) (radius) \n\n");317 fprintf (stderr, " -high-speed (code[,code,code]) (code[,code,code]) (radius) (output catdir)\n\n"); 318 318 fprintf (stderr, " additional options: \n"); 319 319 fprintf (stderr, " -time (start)(stop)\n"); -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/src/high_speed_catalogs.c
r31612 r31657 9 9 Catalog catalog; 10 10 11 // tell libdvo the CATDIR 12 dvo_set_catdir(CATDIR); 13 11 14 // load the current sky table (layout of all SkyRegions) 12 15 sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, FALSE, SKY_DEPTH, VERBOSE); … … 16 19 if (UserCatalog) { 17 20 skylist = SkyRegionByPoint (sky, -1, UserCatalogRA, UserCatalogDEC); 21 setupAreaSelection(skylist->regions[0]); 18 22 } else { 19 23 skylist = SkyListByPatch (sky, -1, &UserPatch); 24 setupAreaSelection(&UserPatch); 20 25 } 26 27 initializeConstraints(); 21 28 22 29 // load data from each region file, only use bright stars -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/src/high_speed_objects.c
r31160 r31657 4 4 # define NEXT_J { j++; continue; } 5 5 6 // XXX these were used to spot-check specific objects7 # define REF_RA1 192.4557818 # define REF_DEC1 2.5631029 # define REF_RA2 192.44430211310 # define REF_DEC2 2.578655911211 6 int high_speed_objects (SkyRegion *region, Catalog *catalog) { 12 7 … … 14 9 15 10 off_t i, j, m, J, ni, nj, *N1, Nslow, Ninvalid, NgroupA, NgroupB, NgroupAbad, NgroupBbad,l,i1,Noff,Nmeasure,Naverage, NAVERAGE, NMEASURE; 16 int *slowMoving, *groupA, *groupB, status, foundA, foundB, Nmatch, valid,Nmatchmeas,Nepoch,nv[2],Nmatchmeasobj; 11 int *slowMoving, *groupA, *groupB, status, Nmatch, Nmatchmeas,Nepoch,nv[2],Nmatchmeasobj; 12 int foundA, foundB; 17 13 double *X1, *Y1; 18 14 double dX, dY, dR, RADIUS2; … … 20 16 Catalog catalog1; 21 17 22 int zcode, zNsec, ycode, yNsec, jcode, jNsec, hcode, hNsec, kcode, kNsec, USNO_R, USNO_N,Nsecfilt;18 int Nsecfilt; 23 19 char filename[1024]; 24 20 Noff = strlen(CATDIR); 25 sprintf (filename, "%s /%s", HIGH_SPEED_DIR, &catalog[0].filename[Noff]);26 printf("%s\n",filename);21 sprintf (filename, "%s%s", HIGH_SPEED_DIR, &catalog[0].filename[Noff]); 22 fprintf(stderr, "%s\n",filename); 27 23 dvo_catalog_init(&catalog1, TRUE); /*initialise new catalogue*/ 28 24 catalog1.filename = strcreate(filename); … … 33 29 Naverage=catalog[0].Naverage; 34 30 Nmeasure=catalog[0].Nmeasure; 35 // ALLOCATE (catalog1.average, Average,Naverage);36 // ALLOCATE (catalog1.measure, Measure,Nmeasure);37 // ALLOCATE(catalog1.secfilt, SecFilt,catalog[0].Naverage*Nsecfilt);38 31 catalog1.filename = filename; // based on the input name, need to keep everything below the catdir portion 39 32 catalog1.Nsecfilt = Nsecfilt; … … 56 49 REALLOCATE(catalog1.secfilt, SecFilt, NAVERAGE*Nsecfilt); 57 50 58 ycode = GetPhotcodeCodebyName("y");59 yNsec = GetPhotcodeNsec(ycode);60 61 zcode = GetPhotcodeCodebyName("z");62 zNsec = GetPhotcodeNsec(zcode);63 64 jcode = GetPhotcodeCodebyName("J");65 jNsec = GetPhotcodeNsec(jcode);66 67 hcode = GetPhotcodeCodebyName("H");68 hNsec = GetPhotcodeNsec(hcode);69 70 kcode = GetPhotcodeCodebyName("K");71 kNsec = GetPhotcodeNsec(kcode);72 73 USNO_R = GetPhotcodeCodebyName("USNO_RED");74 USNO_N = GetPhotcodeCodebyName("USNO_N");75 76 51 // high-speed between different surveys (easier case): 77 52 // we have two sets of photcodes (A) and (B) and are looking for objects … … 94 69 memset (groupB, 0, catalog[0].Naverage*sizeof(int)); 95 70 96 fprintf (stderr, "checking "OFF_T_FMT" objects\n", catalog[0].Naverage);71 if (VERBOSE) fprintf (stderr, "checking "OFF_T_FMT" objects\n", catalog[0].Naverage); 97 72 Nslow = 0; 98 73 Ninvalid = 0; … … 100 75 NgroupBbad = 0; 101 76 102 fprintf (stdout, "# RA_A DEC_A RA_B DEC_B : pmx pmy dR dt: z dz y dy J dJ H dH K dK\n");103 //................270.2346670 20.2471540 270.2170434 20.2717396 : -59.11 88.78 106.66 : 0.000 0.000 19.582 0.112 16.041 0.110 15.388 0.098 14.858 0.001104 105 77 // mark (exclude) objects with both sets of target photcodes 106 78 for (i = 0; i < catalog[0].Naverage; i++) { 107 108 // if (i % 100 == 0) fprintf (stderr, ".");109 110 // radius = hypot((REF_DEC1 - catalog[0].average[i].D), (REF_RA1 - catalog[0].average[i].R));111 // if (radius < 0.0001) {112 // fprintf (stderr, "found it\n");113 // }114 // radius = hypot((REF_DEC2 - catalog[0].average[i].D), (REF_RA2 - catalog[0].average[i].R));115 // if (radius < 0.0001) {116 // fprintf (stderr, "found it\n");117 // }118 119 79 // do any of the measures for this object match group A? 120 80 m = catalog[0].average[i].measureOffset; … … 132 92 for (j = 0; !foundB && (j < catalog[0].average[i].Nmeasure); j++, m++) { 133 93 134 135 94 if (MeasMatchesPhotcode(&catalog[0].measure[m], photcodesGroupB, NphotcodesGroupB)) { 136 95 foundB = TRUE; … … 138 97 } 139 98 99 // object found in both - mark as slow moving 140 100 if (foundA && foundB) { 141 101 slowMoving[i] = TRUE; … … 144 104 } 145 105 146 // additional constraints: 147 // * group A : require 148 149 // 2MASS detections: 106 // Apply additional constraints: 150 107 if (foundA && !foundB) { 151 // average-based tests: 152 153 154 valid = TRUE; 155 valid &= ((catalog[0].average[i].flags & 0x02000000) == 0); 156 valid &= ((catalog[0].average[i].flags & 0x08000000) > 0); 157 valid &= ((catalog[0].secfilt[i*Nsecfilt + yNsec].M < 1.0)||(isnan(catalog[0].secfilt[i*Nsecfilt + yNsec].M))); 158 valid &= (((catalog[0].secfilt[i*Nsecfilt + zNsec].M < 1.0))||(isnan(catalog[0].secfilt[i*Nsecfilt + zNsec].M))); 159 // XXX color restrictions are applied in the pair-wise matching below 160 161 // measure-based tests: 162 /* m = catalog[0].average[i].measureOffset; 163 for (j = 0; valid && (j < catalog[0].average[i].Nmeasure); j++, m++) { 164 if (catalog[0].measure[m].photcode == USNO_R) { 165 valid &= ((catalog[0].measure[m].M > 20.0) || isnan(catalog[0].measure[m].M)); 166 } 167 if (catalog[0].measure[m].photcode == USNO_N) { 168 valid &= ((catalog[0].measure[m].M > 18.0) || isnan(catalog[0].measure[m].M)); 169 } 170 }*/ 171 172 // ((objflags & 524288) == 524288) && 173 // ((objflags & 262144) == 0) && 174 // (z<1.0) && 175 // (y<1.0) && 176 // ((yp[$i]-J)>1.25) && ((yp[$i]-J)<5.0) && 177 // ((USNO_RED<1.0)||(USNO_RED>20.0)) && 178 // ((USNO_N>18.0)||(USNO_N<1.0)) 179 180 if (valid) { 181 groupA[i] = TRUE; 182 NgroupA ++; 183 continue; 184 } else { 185 NgroupAbad ++; 186 // fprintf (stderr, "skip "OFF_T_FMT" (group A)\n", i); 187 } 188 } 189 190 // PS1 detections: 191 if (foundB && !foundA) { 192 193 // average-based tests: 194 valid = TRUE; 195 valid &= ((catalog[0].average[i].flags & 0x01000000) == 0); 196 197 valid &= ((catalog[0].average[i].flags & 0x04000000) > 0); 198 199 valid &= ((catalog[0].secfilt[i*Nsecfilt + jNsec].M < 1.0)||(isnan(catalog[0].secfilt[i*Nsecfilt + jNsec].M))); 200 valid &= ((catalog[0].secfilt[i*Nsecfilt + yNsec].Nused > 1)||(catalog[0].secfilt[i*Nsecfilt + zNsec].Nused > 1)); 201 valid &= ((catalog[0].secfilt[i*Nsecfilt + yNsec].dM < 0.2)||(catalog[0].secfilt[i*Nsecfilt + zNsec].dM < 0.2)); 202 203 /*if ((catalog[0].secfilt[i*Nsecfilt + zNsec].M < 1.0) || (catalog[0].secfilt[i*Nsecfilt + zNsec].Nused == 1)) { 204 valid &= TRUE; 205 } else { 206 valid &= ((catalog[0].secfilt[i*Nsecfilt + zNsec].M - catalog[0].secfilt[i*Nsecfilt + yNsec].M) > 0.2); 207 }*/ 208 209 // measure-based tests: 210 /*m = catalog[0].average[i].measureOffset; 211 for (j = 0; valid && (j < catalog[0].average[i].Nmeasure); j++, m++) { 212 if (catalog[0].measure[m].photcode == USNO_R) { 213 valid &= ((catalog[0].measure[m].M > 20.0) || isnan(catalog[0].measure[m].M)); 214 } 215 if (catalog[0].measure[m].photcode == USNO_N) { 216 valid &= ((catalog[0].measure[m].M > 18.5) || isnan(catalog[0].measure[m].M)); 217 } 218 }*/ 219 220 // (abs(glat)>15.0) && 221 // ((objflags & 65536) == 0) && 222 // ((objflags & 131072) == 131072) && 223 // (J<1.0) && 224 // (y:nphot>1) && 225 // (y:err<0.2) && 226 // ((USNO_RED>20.0)||(USNO_RED<1.0)) && 227 // ((USNO_N>18.5)||(USNO_N<1.0)) && 228 // ((z<1.0)||(z:nphot == 1)||((z:nphot>1)&&((z-y)>0.2))) 229 230 if (valid) { 231 groupB[i] = TRUE; 232 NgroupB ++; 233 continue; 234 } else { 235 NgroupBbad ++; 236 // fprintf (stderr, "skip "OFF_T_FMT" (group B)\n", i); 237 } 238 } 239 240 // this object does not have a detection from either groupA or groupB -- skip as if slow 108 if (applyConstraintsA(catalog, i)) { 109 groupA[i] = TRUE; 110 NgroupA++; 111 continue; 112 } else { 113 NgroupAbad ++; 114 // fprintf (stderr, "skip "OFF_T_FMT" (group A)\n", i); 115 } 116 117 } else if (foundB && !foundA) { 118 119 if (applyConstraintsB(catalog, i)) { 120 groupB[i] = TRUE; 121 NgroupB++; 122 continue; 123 } else { 124 NgroupBbad++; 125 } 126 } 127 // this object does not have a detection matching the contraints from either gorupA or groupB -- skip as if slow 241 128 slowMoving[i] = TRUE; 242 129 Ninvalid ++; 243 130 } 131 244 132 fprintf (stderr, OFF_T_FMT" slow, "OFF_T_FMT" invalid, ("OFF_T_FMT" group A, "OFF_T_FMT" group B), "OFF_T_FMT" total objects; "OFF_T_FMT" in group A, "OFF_T_FMT" in group B\n", Nslow, Ninvalid, NgroupAbad, NgroupBbad, catalog[0].Naverage, NgroupA, NgroupB); 245 133 … … 284 172 ni = N1[i]; 285 173 nj = N1[j]; 286 // if (ni == 131030) {287 // fprintf (stderr, "got 2mass\n");288 // }289 // if (nj == 53581) {290 // fprintf (stderr, "got ps1\n");291 // }292 174 293 175 if (slowMoving[ni]) NEXT_I; … … 319 201 dR = dX*dX + dY*dY; 320 202 if (dR > RADIUS2) continue; 321 322 // y_groupA - J_groupB323 324 /* yJ = catalog[0].secfilt[nj*Nsecfilt + yNsec].M - catalog[0].secfilt[ni*Nsecfilt + jNsec].M;325 if (yJ < 1.25) continue;326 if (yJ > 5.0) continue;*/327 203 328 204 /*** a match is found (just print it for the moment) ***/ … … 330 206 Nepoch=2; 331 207 FIT_MODE = FIT_PM_ONLY; 332 /*nv=(int *)malloc(Nepoch*sizeof(int));*/333 208 nv[0]=ni; /*THESE SHOULD BE CHANGED FOR MULTIPLE EPOCHS AS SHOULD nv*/ 334 209 nv[1]=nj; … … 363 238 REALLOCATE(catalog1.secfilt, SecFilt, NAVERAGE*Nsecfilt); 364 239 } 365 // for the moment, just write the matches to stdout:366 //float pmx = -dX; // proper-motion displacement in ra direction (B - A) [arcsec]367 //float pmy = -dY; // proper-motion displacement in dec direction (B - A) [arcsec]368 /* fprintf (stdout, "%11.7f %11.7f %11.7f %11.7f : %7.2f %7.2f %7.2f: %7.3f %6.3f %7.3f %6.3f %7.3f %6.3f %7.3f %6.3f %7.3f %6.3f\n",369 catalog[0].average[ni].R, catalog[0].average[ni].D,370 catalog[0].average[nj].R, catalog[0].average[nj].D,371 dX, dY, sqrt(dR),372 catalog[0].secfilt[nj*Nsecfilt + zNsec].M,373 catalog[0].secfilt[nj*Nsecfilt + zNsec].dM,374 catalog[0].secfilt[nj*Nsecfilt + yNsec].M,375 catalog[0].secfilt[nj*Nsecfilt + yNsec].dM,376 catalog[0].secfilt[ni*Nsecfilt + jNsec].M,377 catalog[0].secfilt[ni*Nsecfilt + jNsec].dM,378 catalog[0].secfilt[ni*Nsecfilt + hNsec].M,379 catalog[0].secfilt[ni*Nsecfilt + hNsec].dM,380 catalog[0].secfilt[ni*Nsecfilt + kNsec].M,381 catalog[0].secfilt[ni*Nsecfilt + kNsec].dM);*/382 240 } 383 241 i++; -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/src/initialize.c
r29001 r31657 63 63 64 64 /* parse the comma-separated list of photcodesGroupA */ 65 fprintf (stderr, "PHOTCODE_A_LIST: %s\n", PHOTCODE_A_LIST); 65 66 list = PHOTCODE_A_LIST; 66 67 while ((codename = strtok_r (list, ",", &ptr)) != NULL) { 67 68 list = NULL; // pass NULL on successive strtok_r calls 68 fprintf (stderr, "PHOTCODE_A_LIST: %s\n", PHOTCODE_A_LIST);69 69 fprintf (stderr, "codename: %s\n", codename); 70 70 if ((photcodesGroupA[NphotcodesGroupA] = GetPhotcodebyName (codename)) == NULL) { … … 83 83 ALLOCATE (photcodesGroupB, PhotCode *, NPHOTCODES); 84 84 85 fprintf (stderr, "PHOTCODE_B_LIST: %s\n", PHOTCODE_B_LIST); 85 86 /* parse the comma-separated list of photcodesGroupB */ 86 87 list = PHOTCODE_B_LIST; 87 88 while ((codename = strtok_r (list, ",", &ptr)) != NULL) { 88 89 list = NULL; // pass NULL on successive strtok_r calls 89 fprintf (stderr, "PHOTCODE_B_LIST: %s\n", PHOTCODE_B_LIST);90 90 fprintf (stderr, "codename: %s\n", codename); 91 91 if ((photcodesGroupB[NphotcodesGroupB] = GetPhotcodebyName (codename)) == NULL) { -
branches/eam_branches/ipp-20110505/Ohana/src/relastro/src/relastroVisual.c
r30616 r31657 3 3 */ 4 4 5 #include "kapa.h"6 5 #include "relastro.h" 7 6 -
branches/eam_branches/ipp-20110505/Ohana/src/relphot/include/relphot.h
r31535 r31657 233 233 off_t getImageByID (off_t ID); 234 234 235 int rationalize_mosaics ();235 int rationalize_mosaics PROTO((Catalog *catalog, int Ncatalog)); 236 236 int LimitDensityCatalog (Catalog *subcatalog, Catalog *catalog); 237 237 -
branches/eam_branches/ipp-20110505/Ohana/src/uniphot/include/uniphot.h
r31160 r31657 83 83 int style, ptype, ltype, etype, color; 84 84 double lweight, size; 85 } Graphdata;85 } UPGraphdata; 86 86 87 87 /***** prototypes ****/ 88 88 void ConfigInit PROTO((int *argc, char **argv)); 89 void DonePlotting PROTO(( Graphdata *graphmode, int N));90 void JpegPlot PROTO(( Graphdata *graphmode, int N, char *filename));91 void PSPlot PROTO(( Graphdata *graphmode, int N, char *filename));89 void DonePlotting PROTO((UPGraphdata *graphmode, int N)); 90 void JpegPlot PROTO((UPGraphdata *graphmode, int N, char *filename)); 91 void PSPlot PROTO((UPGraphdata *graphmode, int N, char *filename)); 92 92 void PlotLabel PROTO((char *string, int N)); 93 93 void PlotVector PROTO((int Npts, double *vect, int mode, int N)); 94 void PrepPlotting PROTO((int Npts, Graphdata *graphmode, int N));94 void PrepPlotting PROTO((int Npts, UPGraphdata *graphmode, int N)); 95 95 void XDead PROTO((void)); 96 96 int args_uniphot PROTO((int argc, char **argv)); -
branches/eam_branches/ipp-20110505/Ohana/src/uniphot/src/plotstuff.c
r13479 r31657 27 27 } 28 28 29 void DonePlotting ( Graphdata *graphmode, int N) {29 void DonePlotting (UPGraphdata *graphmode, int N) { 30 30 31 31 if (Xgraph[N] == 0) return; … … 34 34 } 35 35 36 void PrepPlotting (int Npts, Graphdata *graphmode, int N) {36 void PrepPlotting (int Npts, UPGraphdata *graphmode, int N) { 37 37 38 38 active = N; … … 75 75 } 76 76 77 void JpegPlot ( Graphdata *graphmode, int N, char *filename) {77 void JpegPlot (UPGraphdata *graphmode, int N, char *filename) { 78 78 79 79 if (Xgraph[N] == 0) return; … … 83 83 } 84 84 85 void PSPlot ( Graphdata *graphmode, int N, char *filename) {85 void PSPlot (UPGraphdata *graphmode, int N, char *filename) { 86 86 87 87 if (Xgraph[N] == 0) return; … … 97 97 int style, ptype, ltype, etype, color; 98 98 double lweight, size; 99 } Graphdata;100 Graphdata graphdata;99 } UPGraphdata; 100 UPGraphdata graphdata; 101 101 102 102 graphdata.xmin = -200;
Note:
See TracChangeset
for help on using the changeset viewer.
