Changeset 35316
- Timestamp:
- Mar 17, 2013, 6:16:50 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130307/Ohana/src
- Files:
-
- 6 added
- 7 edited
-
addstar/src/GetFileMode.c (modified) (4 diffs)
-
addstar/src/MatchHeaders.c (modified) (1 diff)
-
addstar/src/ReadStarsFITS.c (modified) (3 diffs)
-
libautocode/def/cmf-ps1-dv3.d (added)
-
libautocode/doc/cmf-ps1-dv3.c (added)
-
libautocode/doc/cmf-ps1-dv3.h (added)
-
libdvo/Makefile (modified) (2 diffs)
-
libdvo/include/cmf-ps1-dv3.h (added)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/cmf-ps1-dv3.c (added)
-
opihi/cmd.data/Makefile (modified) (1 diff)
-
opihi/cmd.data/init.c (modified) (2 diffs)
-
opihi/cmd.data/xsection.c (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/Ohana/src/addstar/src/GetFileMode.c
r35108 r35316 20 20 havePHOT_VER = gfits_scan (header, "PHOT_VER", "%s", 1, ctmp); 21 21 haveTARG_VER = gfits_scan (header, "TARG_VER", "%s", 1, ctmp); 22 if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ; 22 if (havePHOT_VER && haveTARG_VER) { 23 if (VERBOSE) fprintf (stderr, "found SDSS objects\n"); 24 return SDSS_OBJ; 25 } 23 26 24 27 if (haveNaxis && (Naxis == 2)) { … … 28 31 if ((Nx > 0) && (Ny > 0)) { 29 32 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 33 if (VERBOSE) fprintf (stderr, "found MOSAIC CMP\n"); 30 34 return MOSAIC_CMP; 31 35 } 36 if (VERBOSE) fprintf (stderr, "found SIMPLE CMP\n"); 32 37 return SIMPLE_CMP; 33 38 } … … 36 41 if (haveNaxis && (TEXTMODE || !simple)) { 37 42 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 43 if (VERBOSE) fprintf (stderr, "found MOSAIC CMP\n"); 38 44 return MOSAIC_CMP; 39 45 } 46 if (VERBOSE) fprintf (stderr, "found SIMPLE CMP\n"); 40 47 return SIMPLE_CMP; 41 48 } … … 43 50 if (!extend && strcmp (&ctype[4], "-DIS")) { 44 51 if (!strcmp (&ctype[4], "-WRP")) { 52 if (VERBOSE) fprintf (stderr, "found MOSAIC CMF\n"); 45 53 return MOSAIC_CMF; 46 54 } 55 if (VERBOSE) fprintf (stderr, "found SIMPLE CMF\n"); 47 56 return SIMPLE_CMF; 48 57 } 49 58 50 59 if (!extend && !strcmp (&ctype[4], "-DIS")) { 60 if (VERBOSE) fprintf (stderr, "found MOSAIC PHU\n"); 51 61 return MOSAIC_PHU; 52 62 } 53 63 54 64 if (extend && strcmp (&ctype[4], "-DIS")) { 65 if (VERBOSE) fprintf (stderr, "found SIMPLE MEF\n"); 55 66 return SIMPLE_MEF; 56 67 } 57 68 58 69 if (extend && !strcmp (&ctype[4], "-DIS")) { 70 if (VERBOSE) fprintf (stderr, "found MOSAIC MEF\n"); 59 71 return MOSAIC_MEF; 60 72 } 61 73 74 if (VERBOSE) fprintf (stderr, "extension type is unknown\n"); 62 75 return (NONE); 63 76 } -
branches/eam_branches/ipp-20130307/Ohana/src/addstar/src/MatchHeaders.c
r34405 r35316 61 61 if (!strcmp (exttype, "PS1_SV1")) goto keep; 62 62 if (!strcmp (exttype, "PS1_SV2")) goto keep; 63 if (!strcmp (exttype, "PS1_DV3")) { 64 fprintf (stderr, "exttype, ..%s..\n", exttype); 65 goto keep; 66 } 67 fprintf (stderr, "exttype, ..%s..\n", exttype); 63 68 continue; 64 69 -
branches/eam_branches/ipp-20130307/Ohana/src/addstar/src/ReadStarsFITS.c
r34580 r35316 15 15 Stars *Convert_PS1_SV1_Alt PROTO((FTable *table, unsigned int *nstars)); 16 16 Stars *Convert_PS1_SV2 PROTO((FTable *table, unsigned int *nstars)); 17 Stars *Convert_PS1_DV3 PROTO((FTable *table, unsigned int *nstars)); 17 18 18 19 // given a file with the pointer at the start of the table block and the … … 78 79 stars = Convert_PS1_SV2 (&table, &Nstars); 79 80 } 81 if (!strcmp (type, "PS1_DV3")) { 82 stars = Convert_PS1_DV3 (&table, &Nstars); 83 } 80 84 if (stars == NULL) { 81 85 fprintf (stderr, "invalid table type %s\n", type); … … 962 966 } 963 967 964 968 Stars *Convert_PS1_DV3 (FTable *table, unsigned int *nstars) { 969 970 off_t Nstars; 971 unsigned int i; 972 double ZeroPt; 973 Stars *stars; 974 CMF_PS1_DV3 *ps1data; 975 976 ps1data = gfits_table_get_CMF_PS1_DV3 (table, &Nstars, NULL); 977 if (!ps1data) { 978 fprintf (stderr, "skipping inconsistent entry\n"); 979 return (NULL); 980 } 981 ZeroPt = GetZeroPoint(); 982 983 ALLOCATE (stars, Stars, Nstars); 984 for (i = 0; i < Nstars; i++) { 985 InitStar (&stars[i]); 986 stars[i].measure.Xccd = ps1data[i].X; 987 stars[i].measure.Yccd = ps1data[i].Y; 988 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 989 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 990 991 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 992 stars[i].measure.pltscale = ps1data[i].pltscale; 993 994 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 995 stars[i].measure.M = NAN; 996 } else { 997 stars[i].measure.M = ps1data[i].M + ZeroPt; 998 } 999 stars[i].measure.dM = ps1data[i].dM; 1000 stars[i].measure.dMcal = ps1data[i].dMcal; 1001 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 1002 1003 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 1004 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 1005 1006 // these fluxes are converted from counts to counts/sec in FilterStars.c 1007 stars[i].measure.FluxPSF = ps1data[i].Flux; 1008 stars[i].measure.dFluxPSF = ps1data[i].dFlux; 1009 stars[i].measure.FluxKron = ps1data[i].kronFlux; 1010 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 1011 1012 stars[i].measure.Sky = ps1data[i].sky; 1013 stars[i].measure.dSky = ps1data[i].dSky; 1014 1015 stars[i].measure.psfChisq = ps1data[i].psfChisq; 1016 stars[i].measure.psfQF = ps1data[i].psfQF; 1017 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 1018 stars[i].measure.psfNdof = ps1data[i].psfNdof; 1019 stars[i].measure.psfNpix = ps1data[i].psfNpix; 1020 stars[i].measure.crNsigma = ps1data[i].crNsigma; 1021 stars[i].measure.extNsigma = ps1data[i].extNsigma; 1022 1023 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 1024 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 1025 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 1026 1027 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 1028 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 1029 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 1030 1031 stars[i].measure.photFlags = ps1data[i].flags; 1032 1033 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 1034 stars[i].measure.detID = ps1data[i].detID; 1035 1036 // the Average fields and the following Measure fields are set in FilterStars after 1037 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 1038 1039 // averef is set in find_matches 1040 1041 // dbFlags is zero on ingest. 1042 1043 // the following fields are currently not being set anywhere: t_msec 1044 } 1045 *nstars = Nstars; 1046 return (stars); 1047 } 1048 1049 1050 -
branches/eam_branches/ipp-20130307/Ohana/src/libdvo/Makefile
r35263 r35316 36 36 $(DESTINC)/ps1_v3_defs.h \ 37 37 $(DESTINC)/ps1_v4_defs.h \ 38 $(DESTINC)/ps1_ref_defs.h 38 $(DESTINC)/ps1_ref_defs.h \ 39 $(DESTINC)/cmf-ps1-dv3.h 39 40 40 41 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 … … 84 85 $(SRC)/cmf-ps1-v1-alt.$(ARCH).o \ 85 86 $(SRC)/cmf-ps1-sv1-alt.$(ARCH).o \ 87 $(SRC)/cmf-ps1-dv3.$(ARCH).o \ 86 88 $(SRC)/dvo_util.$(ARCH).o \ 87 89 $(SRC)/dbBooleanCond.$(ARCH).o \ -
branches/eam_branches/ipp-20130307/Ohana/src/libdvo/include/dvo.h
r35102 r35316 288 288 CMF_PS1_SV1 *gfits_table_get_CMF_PS1_SV1_Alt (FTable *ftable, off_t *Ndata, char *swapped); 289 289 290 // another special case : does not match byte-boundaries 291 # include "cmf-ps1-dv3.h" 292 290 293 typedef struct { 291 294 int Ncode; // number of photcodes -
branches/eam_branches/ipp-20130307/Ohana/src/opihi/cmd.data/Makefile
r35237 r35316 150 150 $(SRC)/vsmooth.$(ARCH).o \ 151 151 $(SRC)/vstats.$(ARCH).o \ 152 $(SRC)/xsection.$(ARCH).o \ 152 153 $(SRC)/wd.$(ARCH).o \ 153 154 $(SRC)/write_vectors.$(ARCH).o \ -
branches/eam_branches/ipp-20130307/Ohana/src/opihi/cmd.data/init.c
r35237 r35316 141 141 int wd PROTO((int, char **)); 142 142 int write_vectors PROTO((int, char **)); 143 int xsection PROTO((int, char **)); 143 144 int zap PROTO((int, char **)); 144 145 int zplot PROTO((int, char **)); … … 299 300 {1, "wd", wd, "write an image to a file"}, 300 301 {1, "write", write_vectors, "write vectors to datafile"}, 302 {1, "xsection", xsection, "generate cross-section histogram for an image (or region)"}, 301 303 {1, "zap", zap, "assign values to pixel regions"}, 302 304 {1, "zplot", zplot, "plot x y with size scaled by z"},
Note:
See TracChangeset
for help on using the changeset viewer.
