Changeset 12008
- Timestamp:
- Feb 22, 2007, 4:05:39 PM (19 years ago)
- Location:
- branches/dvo-mods-2007-02/Ohana/src
- Files:
-
- 104 edited
-
addstar/src/FilterStars.c (modified) (1 diff)
-
addstar/src/ImageOptions.c (modified) (1 diff)
-
addstar/src/LoadStars.c (modified) (4 diffs)
-
addstar/src/ReadImageHeader.c (modified) (4 diffs)
-
addstar/src/ReadStarsFITS.c (modified) (1 diff)
-
addstar/src/SEDfit.c (modified) (4 diffs)
-
addstar/src/calibrate.c (modified) (6 diffs)
-
addstar/src/fakeimage.c (modified) (4 diffs)
-
addstar/src/find_matches.c (modified) (3 diffs)
-
addstar/src/find_matches_closest.c (modified) (3 diffs)
-
addstar/src/find_matches_refstars.c (modified) (2 diffs)
-
addstar/src/find_proper.c (modified) (2 diffs)
-
addstar/src/load2mass_catalog.c (modified) (2 diffs)
-
addstar/src/replace_match.c (modified) (1 diff)
-
addstar/src/update_coords.c (modified) (2 diffs)
-
delstar/src/delete_imagefile.c (modified) (1 diff)
-
delstar/src/delete_imagename.c (modified) (1 diff)
-
delstar/src/find_image_db.c (modified) (3 diffs)
-
delstar/src/find_matches.c (modified) (1 diff)
-
delstar/src/gimages.c (modified) (2 diffs)
-
elixir/src/DefineProcesses.c (modified) (1 diff)
-
gastro/src/getptolemy.c (modified) (1 diff)
-
gastro2/src/getptolemy.c (modified) (1 diff)
-
getstar/src/select_by_image.c (modified) (2 diffs)
-
imclean/src/ConfigInit.c (modified) (1 diff)
-
imregister/base/ConfigInit.c (modified) (1 diff)
-
imregister/imphot/ConfigInit.c (modified) (1 diff)
-
imregister/imphot/dumpfits.c (modified) (1 diff)
-
imregister/imphot/output.c (modified) (1 diff)
-
imregister/imphot/subset.c (modified) (1 diff)
-
imregister/src/imphotmerge.c (modified) (2 diffs)
-
libautocode/def/average.d (modified) (2 diffs)
-
libautocode/def/image.d (modified) (3 diffs)
-
libautocode/def/measure.d (modified) (1 diff)
-
libautocode/def/secfilt.d (modified) (1 diff)
-
libdvo/Makefile (modified) (1 diff)
-
libdvo/doc/dvo-structures.txt (modified) (1 diff)
-
libdvo/src/LoadPhotcodes.c (modified) (17 diffs)
-
libdvo/src/coordops.update.c (modified) (1 diff)
-
libdvo/src/dvo_catalog.c (modified) (1 diff)
-
libdvo/src/dvo_catalog_raw.c (modified) (22 diffs)
-
libdvo/src/dvo_convert.c (modified) (23 diffs)
-
libdvo/src/dvo_convert_elixir.c (modified) (8 diffs)
-
libdvo/src/dvo_convert_loneos.c (modified) (9 diffs)
-
libdvo/src/dvo_convert_panstarrs.c (modified) (9 diffs)
-
libdvo/src/dvo_convert_pmtest.c (modified) (1 diff)
-
libdvo/src/photfits.c (modified) (7 diffs)
-
markstar/src/match_images.c (modified) (3 diffs)
-
mosastro/src/getptolemy.c (modified) (1 diff)
-
opihi/dvo/calextract.c (modified) (1 diff)
-
opihi/dvo/calmextract.c (modified) (1 diff)
-
opihi/dvo/catalog.c (modified) (6 diffs)
-
opihi/dvo/cmatch.c (modified) (1 diff)
-
opihi/dvo/dmt.c (modified) (1 diff)
-
opihi/dvo/extract.c (modified) (3 diffs)
-
opihi/dvo/fitsed.c (modified) (1 diff)
-
opihi/dvo/gimages.c (modified) (2 diffs)
-
opihi/dvo/gstar.c (modified) (4 diffs)
-
opihi/dvo/imdata.c (modified) (6 diffs)
-
opihi/dvo/imextract.c (modified) (2 diffs)
-
opihi/dvo/imlist.c (modified) (2 diffs)
-
opihi/dvo/imphot.c (modified) (1 diff)
-
opihi/dvo/imstats.c (modified) (1 diff)
-
opihi/dvo/lcurve.c (modified) (1 diff)
-
opihi/dvo/lightcurve.c (modified) (1 diff)
-
opihi/dvo/match_image.c (modified) (2 diffs)
-
opihi/dvo/mextract.c (modified) (1 diff)
-
opihi/dvo/paverage.c (modified) (1 diff)
-
opihi/dvo/photometry.c (modified) (12 diffs)
-
opihi/dvo/pmeasure.c (modified) (1 diff)
-
opihi/dvo/subpix.c (modified) (1 diff)
-
photdbc/src/find_images.c (modified) (1 diff)
-
photdbc/src/flag_measures.c (modified) (9 diffs)
-
photdbc/src/get_mags.c (modified) (1 diff)
-
photdbc/src/join_stars.c (modified) (6 diffs)
-
photdbc/src/make_subcatalog.c (modified) (2 diffs)
-
photdbc/src/unique_measures.c (modified) (1 diff)
-
relastro/src/GridOps.v1.c (modified) (1 diff)
-
relastro/src/GridOps.v2.c (modified) (2 diffs)
-
relastro/src/ImageOps.c (modified) (14 diffs)
-
relastro/src/MosaicOps.c (modified) (8 diffs)
-
relastro/src/StarOps.c (modified) (13 diffs)
-
relastro/src/UpdateImages.c (modified) (1 diff)
-
relastro/src/UpdateObjects.c (modified) (1 diff)
-
relastro/src/bcatalog.c (modified) (4 diffs)
-
relastro/src/plot_scatter.c (modified) (1 diff)
-
relastro/src/plotstuff.c (modified) (1 diff)
-
relastro/src/select_images.c (modified) (2 diffs)
-
relastro/src/setExclusions.c (modified) (2 diffs)
-
relastro/src/setMrelFinal.c (modified) (4 diffs)
-
relphot/src/GridOps.c (modified) (2 diffs)
-
relphot/src/ImageOps.c (modified) (15 diffs)
-
relphot/src/MosaicOps.c (modified) (8 diffs)
-
relphot/src/StarOps.c (modified) (13 diffs)
-
relphot/src/bcatalog.c (modified) (4 diffs)
-
relphot/src/plot_scatter.c (modified) (1 diff)
-
relphot/src/relphot.c (modified) (1 diff)
-
relphot/src/select_images.c (modified) (2 diffs)
-
relphot/src/setExclusions.c (modified) (2 diffs)
-
relphot/src/setMrelFinal.c (modified) (4 diffs)
-
uniphot/src/fit_groups.c (modified) (2 diffs)
-
uniphot/src/subset_images.c (modified) (1 diff)
-
uniphot/src/update.c (modified) (1 diff)
-
uniphot/src/update_catalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/dvo-mods-2007-02/Ohana/src/addstar/src/FilterStars.c
r10937 r12008 25 25 while (stars[N].R >= 360.0) stars[N].R -= 360.0; 26 26 stars[N].found = -1; 27 stars[N].code = image[0]. source;27 stars[N].code = image[0].photcode; 28 28 29 29 /** additional quantities to supply to Stars based on the image data **/ 30 30 31 31 /* calculate accurate per-star airmass */ 32 stars[N].airmass = airmass (image[0].secz _PS, stars[N].R, stars[N].D, image[0].sidtime, image[0].latitude);33 stars[N].Mcal = image[0].Mcal _PS;32 stars[N].airmass = airmass (image[0].secz, stars[N].R, stars[N].D, image[0].sidtime, image[0].latitude); 33 stars[N].Mcal = image[0].Mcal; 34 34 stars[N].t = image[0].tzero + 1e-4*stars[N].Y*image[0].trate; /* trate is in 0.1 msec / row */ 35 35 -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/ImageOptions.c
r10937 r12008 24 24 if (!strcmp (&images[0].coords.ctype[4], "-DIS")) continue; 25 25 26 photcode = GetPhotcodebyCode (images[i]. source);26 photcode = GetPhotcodebyCode (images[i].photcode); 27 27 28 28 if (equivPhotcode) { -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/LoadStars.c
r10897 r12008 52 52 exit (1); 53 53 } 54 image[0]. source = photcode;54 image[0].photcode = photcode; 55 55 56 56 image[0].NX -= XOVERSCAN; … … 62 62 tmp = 0; 63 63 /* gfits_scan (&header, "APMIFIT", "%lf", 1, &tmp); */ 64 image[0].apmifit _PS= tmp;64 image[0].apmifit = tmp; 65 65 66 66 tmp = 0; 67 67 /* gfits_scan (&header, "dAPMIFIT", "%lf", 1, &tmp); */ 68 image[0].dapmifit _PS= tmp;68 image[0].dapmifit = tmp; 69 69 70 70 tmp = 0; … … 108 108 tmp = 0; 109 109 gfits_scan (&header, AirmassKeyword, "%lf", 1, &tmp); 110 image[0].secz _PS= MIN (NO_MAG, tmp);110 image[0].secz = MIN (NO_MAG, tmp); 111 111 112 112 if (!gfits_scan (&header, CCDNumKeyword, "%d", 1, &itmp)) { … … 120 120 121 121 /* secz is in units milli-airmass */ 122 image[0].Mcal _PS= 0.0;122 image[0].Mcal = 0.0; 123 123 image[0].Xm = NO_MAG; 124 124 image[0].code = 0; -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/ReadImageHeader.c
r10937 r12008 66 66 exit (1); 67 67 } 68 image[0]. source = photcode;68 image[0].photcode = photcode; 69 69 70 70 image[0].NX -= XOVERSCAN; … … 76 76 tmp = 0; 77 77 /* gfits_scan (header, "APMIFIT", "%lf", 1, &tmp); */ 78 image[0].apmifit _PS= tmp;78 image[0].apmifit = tmp; 79 79 80 80 tmp = 0; 81 81 /* gfits_scan (header, "dAPMIFIT", "%lf", 1, &tmp); */ 82 image[0].dapmifit _PS= tmp;82 image[0].dapmifit = tmp; 83 83 84 84 tmp = 0; … … 118 118 tmp = 0; 119 119 gfits_scan (header, AirmassKeyword, "%lf", 1, &tmp); 120 image[0].secz _PS= MIN (NO_MAG, tmp);120 image[0].secz = MIN (NO_MAG, tmp); 121 121 122 122 if (!gfits_scan (header, CCDNumKeyword, "%d", 1, &ccdnum)) { … … 130 130 131 131 /* secz is in units milli-airmass */ 132 image[0].Mcal _PS= 0.0;132 image[0].Mcal = 0.0; 133 133 image[0].Xm = NO_MAG; 134 134 image[0].code = 0; -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/ReadStarsFITS.c
r10937 r12008 93 93 PS1Data *ps1data; 94 94 95 ps1data = gfits_table_get _PS1Data (table, &Nstars, NULL);95 ps1data = gfits_table_get1Data (table, &Nstars, NULL); 96 96 97 97 ALLOCATE (stars, Stars, Nstars); -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/SEDfit.c
r8361 r12008 80 80 Nphot = 0; 81 81 for (j = 0; j < incat[0].average[i].Nm; j++) { 82 idx = table[0].hashcode[incat[0].measure[m+j]. source];82 idx = table[0].hashcode[incat[0].measure[m+j].photcode]; 83 83 if (idx == -1) continue; 84 84 // only fit the selected photcodes (mode == "fit") … … 86 86 if (table[0].mode[idx] == SED_SAMPLE) continue; 87 87 // XXX do something more clever if more than one value exists per photcode 88 sourceValue.mags[idx] = incat[0].measure[m+j].M _PS+ table[0].vegaToAB[idx];89 sourceError.mags[idx] = incat[0].measure[m+j].dM _PS;90 if (incat[0].measure[m+j]. source == USNOred) sourceError.mags[idx] = 0.3;91 if (incat[0].measure[m+j]. source == USNOblu) sourceError.mags[idx] = 0.3;88 sourceValue.mags[idx] = incat[0].measure[m+j].M + table[0].vegaToAB[idx]; 89 sourceError.mags[idx] = incat[0].measure[m+j].dM; 90 if (incat[0].measure[m+j].photcode == USNOred) sourceError.mags[idx] = 0.3; 91 if (incat[0].measure[m+j].photcode == USNOblu) sourceError.mags[idx] = 0.3; 92 92 found[idx] = TRUE; 93 93 Nphot ++; … … 171 171 172 172 for (j = 0; j < Nsec; j++) { 173 outcat[0].secfilt[Nave*Nsec+j].M _PS= NO_MAG;174 outcat[0].secfilt[Nave*Nsec+j].dM _PS= NO_MAG;173 outcat[0].secfilt[Nave*Nsec+j].M = NO_MAG; 174 outcat[0].secfilt[Nave*Nsec+j].dM = NO_MAG; 175 175 outcat[0].secfilt[Nave*Nsec+j].Xm = NO_MAG; 176 176 } … … 185 185 for (j = 0; valid && (j < Nmodel); j++) { 186 186 n = modelRow[j]; 187 outcat[0].measure[Nmeas].dR _PS= 0.0;188 outcat[0].measure[Nmeas].dD _PS= 0.0;189 outcat[0].measure[Nmeas].M _PS= MIN (table[0].row[minFit.row][0].mags[n] + minFit.Md, NO_MAG);190 outcat[0].measure[Nmeas].dM _PS= 0.0;191 outcat[0].measure[Nmeas].Mcal _PS= 0;187 outcat[0].measure[Nmeas].dR = 0.0; 188 outcat[0].measure[Nmeas].dD = 0.0; 189 outcat[0].measure[Nmeas].M = MIN (table[0].row[minFit.row][0].mags[n] + minFit.Md, NO_MAG); 190 outcat[0].measure[Nmeas].dM = 0.0; 191 outcat[0].measure[Nmeas].Mcal = 0; 192 192 outcat[0].measure[Nmeas].t = TIMEREF; 193 193 outcat[0].measure[Nmeas].averef = Nave; 194 outcat[0].measure[Nmeas]. source = table[0].code[n];194 outcat[0].measure[Nmeas].photcode = table[0].code[n]; 195 195 outcat[0].measure[Nmeas].dophot = 0; 196 196 outcat[0].measure[Nmeas].flags = 0; 197 outcat[0].measure[Nmeas].dt _PS= 0xffff;198 199 outcat[0].measure[Nmeas].Mgal _PS= NO_MAG;200 outcat[0].measure[Nmeas].airmass _PS= 0;197 outcat[0].measure[Nmeas].dt = 0xffff; 198 199 outcat[0].measure[Nmeas].Mgal = NO_MAG; 200 outcat[0].measure[Nmeas].airmass = 0; 201 201 outcat[0].measure[Nmeas].FWx = NO_MAG; 202 202 outcat[0].measure[Nmeas].FWy = NO_ERR; -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/calibrate.c
r5585 r12008 60 60 // - calibrate to external system (Mref) 61 61 62 mycode = GetPhotcodebyCode (new[0]. source);62 mycode = GetPhotcodebyCode (new[0].photcode); 63 63 incode = GetPhotcodebyCode (mycode[0].equiv); 64 64 excode = GetPhotcodebyCode (incode[0].equiv); … … 74 74 m = average[0].offset; 75 75 for (i = 0; i < average[0].Nm; i++) { 76 if (measure[m]. source == CalC0) {76 if (measure[m].photcode == CalC0) { 77 77 found0 = TRUE; 78 CalM0 = measure[m].M _PS;79 dCalM = measure[m].dM _PS;78 CalM0 = measure[m].M; 79 dCalM = measure[m].dM; 80 80 } 81 if (measure[m]. source == CalC1) {81 if (measure[m].photcode == CalC1) { 82 82 found1 = TRUE; 83 CalM1 = measure[m].M _PS;83 CalM1 = measure[m].M; 84 84 } 85 if (measure[m]. source == CalC2) {85 if (measure[m].photcode == CalC2) { 86 86 found2 = TRUE; 87 CalM2 = measure[m].M _PS;87 CalM2 = measure[m].M; 88 88 } 89 89 if (found0 && found1 && found2) { 90 Mcal = new[0].M _PS + 0.001*mycode[0].C + mycode[0].K*(new[0].airmass_PS- 1.0) - ZeroPt;90 Mcal = new[0].M + 0.001*mycode[0].C + mycode[0].K*(new[0].airmass - 1.0) - ZeroPt; 91 91 color = CalM1 - CalM2 - 0.001*mycode[0].dX; 92 92 factor = color; … … 99 99 } 100 100 // if we want to apply a Mcal -> Mref color correction, we need the additional color term 101 SaveCalibration (Mcal, new[0].dM _PS, CalM0, dCalM, new[0].M_PS - ZeroPt - new[0].dt_PS, Nstar);101 SaveCalibration (Mcal, new[0].dM, CalM0, dCalM, new[0].M - ZeroPt - new[0].dt, Nstar); 102 102 return; 103 103 } … … 121 121 if (MaxN == -1) { 122 122 fprintf (stderr, "no clean stars\n"); 123 image[0].Mcal _PS= 10.000;124 image[0].dMcal _PS= 10.000;123 image[0].Mcal = 10.000; 124 image[0].dMcal = 10.000; 125 125 return; 126 126 } … … 155 155 if (Nkeep < 5) { 156 156 fprintf (stderr, "too few stars\n"); 157 image[0].Mcal _PS= 10.000;158 image[0].dMcal _PS= 10.000;157 image[0].Mcal = 10.000; 158 image[0].dMcal = 10.000; 159 159 return; 160 160 } … … 187 187 Mw = W1 / W2; 188 188 fprintf (stderr, "N: %.0f, mean: %f, wt mean: %f, stdev: %f, precision: %f\n", N, M1, Mw, M2, M2 / sqrt (N)); 189 image[0].Mcal _PS= M1;190 image[0].dMcal _PS= M2 / sqrt (N);189 image[0].Mcal = M1; 190 image[0].dMcal = M2 / sqrt (N); 191 191 image[0].Mxxxx = N; 192 192 } else { 193 193 fprintf (stderr, "too few stars\n"); 194 image[0].Mcal _PS= 10.000;195 image[0].dMcal _PS= 10.000;194 image[0].Mcal = 10.000; 195 image[0].dMcal = 10.000; 196 196 image[0].Mxxxx = 0; 197 197 } -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/fakeimage.c
r11081 r12008 111 111 image[i+1].NY = Ny; 112 112 113 image[i+1]. source = photcode;113 image[i+1].photcode = photcode; 114 114 115 115 image[i+1].exptime = 0.0; 116 116 117 image[i+1].apmifit _PS= 0.0;118 image[i+1].dapmifit _PS= 0.0;117 image[i+1].apmifit = 0.0; 118 image[i+1].dapmifit = 0.0; 119 119 120 120 image[i+1].detection_limit = 0.0; … … 124 124 image[i+1].tzero = MosaicTime; 125 125 image[i+1].trate = 0; 126 image[i+1].secz _PS= 1.0;126 image[i+1].secz = 1.0; 127 127 image[i+1].ccdnum = 0xff; 128 128 129 image[i+1].Mcal _PS= 0.0;129 image[i+1].Mcal = 0.0; 130 130 image[i+1].Xm = NO_MAG; 131 131 image[i+1].code = 0; … … 173 173 image[0].NY = Dmax - Dmin; 174 174 175 image[0]. source = photcode;175 image[0].photcode = photcode; 176 176 177 177 image[0].exptime = 0.0; 178 image[0].apmifit _PS= 0.0;179 image[0].dapmifit _PS= 0.0;178 image[0].apmifit = 0.0; 179 image[0].dapmifit = 0.0; 180 180 image[0].detection_limit = 0.0; 181 181 image[0].saturation_limit = 0.0; … … 184 184 image[0].tzero = MosaicTime; 185 185 image[0].trate = 0; 186 image[0].secz _PS= 1.0;186 image[0].secz = 1.0; 187 187 image[0].ccdnum = 0xff; 188 image[0].Mcal _PS= 0.0;188 image[0].Mcal = 0.0; 189 189 image[0].Xm = NO_MAG; 190 190 image[0].code = 0; -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/find_matches.c
r10939 r12008 142 142 /** add measurements for this star **/ 143 143 /** dR,dD now represent arcsec **/ 144 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N].R);145 if (catalog[0].measure[Nmeas].dR _PS> +180.0*3600.0) {144 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N].R); 145 if (catalog[0].measure[Nmeas].dR > +180.0*3600.0) { 146 146 // average on high end of boundary, move star up 147 147 stars[N].R += 360.0; 148 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N].R);149 } 150 if (catalog[0].measure[Nmeas].dR _PS< -180.0*3600.0) {148 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N].R); 149 } 150 if (catalog[0].measure[Nmeas].dR < -180.0*3600.0) { 151 151 // average on low end of boundary, move star down 152 152 stars[N].R -= 360.0; 153 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N].R);154 } 155 if (fabs(catalog[0].measure[Nmeas].dR _PS) > 10*RADIUS) {153 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N].R); 154 } 155 if (fabs(catalog[0].measure[Nmeas].dR) > 10*RADIUS) { 156 156 fprintf (stderr, "error: %10.6f,%10.6f vs %10.6f,%10.6f (%f,%f vs %f,%f)\n", 157 157 catalog[0].average[n].R, catalog[0].average[n].D, … … 160 160 Y1[i], Y2[J]); 161 161 } 162 catalog[0].measure[Nmeas].dD_PS = 3600.0*(catalog[0].average[n].D - stars[N].D); 163 catalog[0].measure[Nmeas].M_PS = stars[N].M; 164 catalog[0].measure[Nmeas].dM_PS = stars[N].dM; /* error in input files stored in thousandths of mag */ 165 catalog[0].measure[Nmeas].Mcal_PS = stars[N].Mcal; 166 catalog[0].measure[Nmeas].t = stars[N].t; 167 catalog[0].measure[Nmeas].averef = n; /* this must be an absolute sequence number, if partial average is loaded */ 168 catalog[0].measure[Nmeas].source = stars[N].code; /* photcode */ 169 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 170 catalog[0].measure[Nmeas].flags = 0; 171 catalog[0].measure[Nmeas].dt_PS = stars[N].dt; 172 catalog[0].measure[Nmeas].airmass_PS = stars[N].airmass; 173 174 catalog[0].measure[Nmeas].Mgal_PS = stars[N].Mgal; 175 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 176 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 177 catalog[0].measure[Nmeas].theta = MIN ((255/360)*stars[N].df, NO_ERR); 162 catalog[0].measure[Nmeas].dD = 3600.0*(catalog[0].average[n].D - stars[N].D); 163 164 /* XXX need to add dX, dY : need to load into stars[N].dX,dY */ 165 /* XXX need to add stargal, Sky, dSky, qPSF, detID, imageID */ 166 catalog[0].measure[Nmeas].Xccd = stars[N].X; 167 catalog[0].measure[Nmeas].Yccd = stars[N].Y; 168 169 catalog[0].measure[Nmeas].M = stars[N].M; 170 catalog[0].measure[Nmeas].dM = stars[N].dM; /* error in input files stored in thousandths of mag */ 171 catalog[0].measure[Nmeas].Mcal = stars[N].Mcal; 172 catalog[0].measure[Nmeas].t = stars[N].t; 173 catalog[0].measure[Nmeas].averef = n; /* this must be an absolute sequence number, if partial average is loaded */ 174 catalog[0].measure[Nmeas].photcode = stars[N].code; /* photcode */ 175 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 176 catalog[0].measure[Nmeas].flags = 0; 177 catalog[0].measure[Nmeas].dt = stars[N].dt; 178 catalog[0].measure[Nmeas].airmass = stars[N].airmass; 179 180 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 181 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 182 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 183 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_MAG); 178 184 179 185 /* it is not valid to pass PRI/SEC/REF photcodes to this routine */ 180 186 /* check for entries in the secfilt lists */ 181 187 Mcat = PhotCat (&catalog[0].measure[Nmeas]); 182 Mval = (Nsec == -1) ? &catalog[0].average[n].M : &catalog[0].secfilt[n*Nsecfilt+Nsec].M _PS;188 Mval = (Nsec == -1) ? &catalog[0].average[n].M : &catalog[0].secfilt[n*Nsecfilt+Nsec].M; 183 189 if (*Mval == NO_MAG) *Mval = Mcat; 184 190 /* in UPDATE mode, this value is not saved; use relphot to recalculate */ … … 263 269 264 270 for (j = 0; j < Nsecfilt; j++) { 265 catalog[0].secfilt[Nave*Nsecfilt+j].M_PS = NO_MAG; 266 catalog[0].secfilt[Nave*Nsecfilt+j].dM_PS = NO_MAG; 267 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NO_MAG; 268 } 269 270 catalog[0].measure[Nmeas].dR_PS = 0.0; 271 catalog[0].measure[Nmeas].dD_PS = 0.0; 272 catalog[0].measure[Nmeas].M_PS = stars[N].M; 273 catalog[0].measure[Nmeas].dM_PS = stars[N].dM; 274 catalog[0].measure[Nmeas].Mcal_PS = stars[N].Mcal; 275 catalog[0].measure[Nmeas].t = stars[N].t; 276 catalog[0].measure[Nmeas].averef = Nave; /* XXX EAM : must be absolute Nave if partial read */ 277 catalog[0].measure[Nmeas].source = stars[N].code; /* photcode */ 278 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 279 catalog[0].measure[Nmeas].flags = 0; 280 catalog[0].measure[Nmeas].dt_PS = stars[N].dt; 281 catalog[0].measure[Nmeas].airmass_PS = stars[N].airmass; 282 283 catalog[0].measure[Nmeas].Mgal_PS = stars[N].Mgal; 284 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 285 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 286 catalog[0].measure[Nmeas].theta = MIN ((255/360)*stars[N].df, NO_ERR); 271 catalog[0].secfilt[Nave*Nsecfilt+j].M = NO_MAG; 272 catalog[0].secfilt[Nave*Nsecfilt+j].dM = NO_MAG; 273 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NO_MAG; 274 } 275 276 /* XXX need to add dX, dY : need to load into stars[N].dX,dY */ 277 /* XXX need to add stargal, Sky, dSky, qPSF, detID, imageID */ 278 catalog[0].measure[Nmeas].Xccd = stars[N].X; 279 catalog[0].measure[Nmeas].Yccd = stars[N].Y; 280 281 catalog[0].measure[Nmeas].dR = 0.0; 282 catalog[0].measure[Nmeas].dD = 0.0; 283 catalog[0].measure[Nmeas].M = stars[N].M; 284 catalog[0].measure[Nmeas].dM = stars[N].dM; 285 catalog[0].measure[Nmeas].Mcal = stars[N].Mcal; 286 catalog[0].measure[Nmeas].t = stars[N].t; 287 catalog[0].measure[Nmeas].averef = Nave; /* XXX EAM : must be absolute Nave if partial read */ 288 catalog[0].measure[Nmeas].photcode = stars[N].code; /* photcode */ 289 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 290 catalog[0].measure[Nmeas].flags = 0; 291 catalog[0].measure[Nmeas].dt = stars[N].dt; 292 catalog[0].measure[Nmeas].airmass = stars[N].airmass; 293 294 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 295 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 296 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 297 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_MAG); 298 /* XXX replace df here with theta, right? */ 287 299 288 300 Mcat = PhotCat (&catalog[0].measure[Nmeas]); 289 Mval = (Nsec == -1) ? &catalog[0].average[Nave].M : &catalog[0].secfilt[Nave*Nsecfilt+Nsec].M _PS;301 Mval = (Nsec == -1) ? &catalog[0].average[Nave].M : &catalog[0].secfilt[Nave*Nsecfilt+Nsec].M; 290 302 if (*Mval == NO_MAG) *Mval = Mcat; 291 303 -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/find_matches_closest.c
r10939 r12008 160 160 /** add measurements for this star **/ 161 161 /** dR,dD now represent arcsec **/ 162 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N].R);163 if (catalog[0].measure[Nmeas].dR _PS> +180.0*3600.0) {162 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N].R); 163 if (catalog[0].measure[Nmeas].dR > +180.0*3600.0) { 164 164 // average on high end of boundary, move star up 165 165 stars[N].R += 360.0; 166 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N].R);167 } 168 if (catalog[0].measure[Nmeas].dR _PS< -180.0*3600.0) {166 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N].R); 167 } 168 if (catalog[0].measure[Nmeas].dR < -180.0*3600.0) { 169 169 // average on low end of boundary, move star down 170 170 stars[N].R -= 360.0; 171 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N].R);172 } 173 if (fabs(catalog[0].measure[Nmeas].dR _PS) > 10*RADIUS) {171 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N].R); 172 } 173 if (fabs(catalog[0].measure[Nmeas].dR) > 10*RADIUS) { 174 174 fprintf (stderr, "error: %10.6f,%10.6f vs %10.6f,%10.6f (%f,%f vs %f,%f)\n", 175 175 catalog[0].average[n].R, catalog[0].average[n].D, … … 178 178 Y1[i], Y2[Jmin]); 179 179 } 180 catalog[0].measure[Nmeas].dD_PS = 3600.0*(catalog[0].average[n].D - stars[N].D); 181 catalog[0].measure[Nmeas].M_PS = stars[N].M; 182 catalog[0].measure[Nmeas].dM_PS = stars[N].dM; /* error in input files stored in thousandths of mag */ 183 catalog[0].measure[Nmeas].Mcal_PS = stars[N].Mcal; 184 catalog[0].measure[Nmeas].t = stars[N].t; 185 catalog[0].measure[Nmeas].averef = n; 186 catalog[0].measure[Nmeas].source = stars[N].code; /* photcode */ 187 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 188 catalog[0].measure[Nmeas].flags = 0; 189 catalog[0].measure[Nmeas].dt_PS = stars[N].dt; 190 catalog[0].measure[Nmeas].airmass_PS = stars[N].airmass; 191 192 catalog[0].measure[Nmeas].Mgal_PS = stars[N].Mgal; 193 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 194 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 195 catalog[0].measure[Nmeas].theta = MIN ((255/360)*stars[N].df, NO_ERR); 180 catalog[0].measure[Nmeas].dD = 3600.0*(catalog[0].average[n].D - stars[N].D); 181 182 /* XXX need to add dX, dY : need to load into stars[N].dX,dY */ 183 /* XXX need to add stargal, Sky, dSky, qPSF, detID, imageID */ 184 catalog[0].measure[Nmeas].Xccd = stars[N].X; 185 catalog[0].measure[Nmeas].Yccd = stars[N].Y; 186 187 catalog[0].measure[Nmeas].M = stars[N].M; 188 catalog[0].measure[Nmeas].dM = stars[N].dM; /* error in input files stored in thousandths of mag */ 189 catalog[0].measure[Nmeas].Mcal = stars[N].Mcal; 190 catalog[0].measure[Nmeas].t = stars[N].t; 191 catalog[0].measure[Nmeas].averef = n; 192 catalog[0].measure[Nmeas].photcode = stars[N].code; /* photcode */ 193 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 194 catalog[0].measure[Nmeas].flags = 0; 195 catalog[0].measure[Nmeas].dt = stars[N].dt; 196 catalog[0].measure[Nmeas].airmass = stars[N].airmass; 197 198 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 199 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 200 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 201 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_MAG); 196 202 197 203 /* it is not valid to pass PRI/SEC/REF photcodes to this routine */ 198 204 /* check for entries in the secfilt lists */ 199 205 Mcat = PhotCat (&catalog[0].measure[Nmeas]); 200 Mval = (Nsec == -1) ? &catalog[0].average[n].M : &catalog[0].secfilt[n*Nsecfilt+Nsec].M _PS;206 Mval = (Nsec == -1) ? &catalog[0].average[n].M : &catalog[0].secfilt[n*Nsecfilt+Nsec].M; 201 207 if (*Mval == NO_MAG) *Mval = Mcat; 202 208 /* in UPDATE mode, this value is not saved; use relphot to recalculate */ … … 261 267 262 268 for (j = 0; j < Nsecfilt; j++) { 263 catalog[0].secfilt[Nave*Nsecfilt+j].M _PS= NO_MAG;264 catalog[0].secfilt[Nave*Nsecfilt+j].dM _PS= NO_MAG;269 catalog[0].secfilt[Nave*Nsecfilt+j].M = NO_MAG; 270 catalog[0].secfilt[Nave*Nsecfilt+j].dM = NO_MAG; 265 271 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NO_MAG; 266 272 } 267 273 268 catalog[0].measure[Nmeas].dR_PS = 0.0; 269 catalog[0].measure[Nmeas].dD_PS = 0.0; 270 catalog[0].measure[Nmeas].M_PS = stars[N].M; 271 catalog[0].measure[Nmeas].dM_PS = stars[N].dM; 272 catalog[0].measure[Nmeas].Mcal_PS = stars[N].Mcal; 273 catalog[0].measure[Nmeas].t = stars[N].t; 274 catalog[0].measure[Nmeas].averef = Nave; 275 catalog[0].measure[Nmeas].source = stars[N].code; /* photcode */ 276 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 277 catalog[0].measure[Nmeas].flags = 0; 278 catalog[0].measure[Nmeas].dt_PS = stars[N].dt; 279 catalog[0].measure[Nmeas].airmass_PS = stars[N].airmass; 280 281 catalog[0].measure[Nmeas].Mgal_PS = stars[N].Mgal; 282 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 283 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 284 catalog[0].measure[Nmeas].theta = MIN ((255/360)*stars[N].df, NO_ERR); 274 /* XXX need to add dX, dY : need to load into stars[N].dX,dY */ 275 /* XXX need to add stargal, Sky, dSky, qPSF, detID, imageID */ 276 catalog[0].measure[Nmeas].Xccd = stars[N].X; 277 catalog[0].measure[Nmeas].Yccd = stars[N].Y; 278 279 catalog[0].measure[Nmeas].dR = 0.0; 280 catalog[0].measure[Nmeas].dD = 0.0; 281 catalog[0].measure[Nmeas].M = stars[N].M; 282 catalog[0].measure[Nmeas].dM = stars[N].dM; 283 catalog[0].measure[Nmeas].Mcal = stars[N].Mcal; 284 catalog[0].measure[Nmeas].t = stars[N].t; 285 catalog[0].measure[Nmeas].averef = Nave; 286 catalog[0].measure[Nmeas].photcode = stars[N].code; /* photcode */ 287 catalog[0].measure[Nmeas].dophot = stars[N].dophot; 288 catalog[0].measure[Nmeas].flags = 0; 289 catalog[0].measure[Nmeas].dt = stars[N].dt; 290 catalog[0].measure[Nmeas].airmass = stars[N].airmass; 291 292 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 293 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 294 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 295 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_ERR); 285 296 286 297 Mcat = PhotCat (&catalog[0].measure[Nmeas]); 287 Mval = (Nsec == -1) ? &catalog[0].average[Nave].M : &catalog[0].secfilt[Nave*Nsecfilt+Nsec].M _PS;298 Mval = (Nsec == -1) ? &catalog[0].average[Nave].M : &catalog[0].secfilt[Nave*Nsecfilt+Nsec].M; 288 299 if (*Mval == NO_MAG) *Mval = Mcat; 289 300 -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/find_matches_refstars.c
r8644 r12008 131 131 /** add measurements for this star **/ 132 132 /** *** dR,dD now in arcsec *** **/ 133 catalog[0].measure[Nmeas].dR _PS= 3600.0*(catalog[0].average[n].R - stars[N][0].R);134 catalog[0].measure[Nmeas].dD _PS= 3600.0*(catalog[0].average[n].D - stars[N][0].D);135 catalog[0].measure[Nmeas].M _PS= MIN (stars[N][0].M, NO_MAG);136 catalog[0].measure[Nmeas].dM _PS= MIN (stars[N][0].dM, NO_ERR);137 catalog[0].measure[Nmeas].Mcal _PS= 0;138 catalog[0].measure[Nmeas].t = (TIMEREF == 0) ? stars[N][0].t : TIMEREF; /** careful : time_t vs e_time **/139 catalog[0].measure[Nmeas].averef = n;140 catalog[0].measure[Nmeas]. source= stars[N][0].code;141 catalog[0].measure[Nmeas].dophot = 0;142 catalog[0].measure[Nmeas].flags = 0;143 catalog[0].measure[Nmeas].dt _PS= 0xffff;144 145 catalog[0].measure[Nmeas].Mgal _PS= NO_MAG;146 catalog[0].measure[Nmeas].airmass _PS= 0;147 catalog[0].measure[Nmeas].FWx = NO_MAG;148 catalog[0].measure[Nmeas].FWy = NO_MAG;149 catalog[0].measure[Nmeas].theta = NO_ERR;133 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N][0].R); 134 catalog[0].measure[Nmeas].dD = 3600.0*(catalog[0].average[n].D - stars[N][0].D); 135 catalog[0].measure[Nmeas].M = MIN (stars[N][0].M, NO_MAG); 136 catalog[0].measure[Nmeas].dM = MIN (stars[N][0].dM, NO_ERR); 137 catalog[0].measure[Nmeas].Mcal = 0; 138 catalog[0].measure[Nmeas].t = (TIMEREF == 0) ? stars[N][0].t : TIMEREF; /** careful : time_t vs e_time **/ 139 catalog[0].measure[Nmeas].averef = n; 140 catalog[0].measure[Nmeas].photcode = stars[N][0].code; 141 catalog[0].measure[Nmeas].dophot = 0; 142 catalog[0].measure[Nmeas].flags = 0; 143 catalog[0].measure[Nmeas].dt = 0xffff; 144 145 catalog[0].measure[Nmeas].Mgal = NO_MAG; 146 catalog[0].measure[Nmeas].airmass = 0; 147 catalog[0].measure[Nmeas].FWx = NO_MAG; 148 catalog[0].measure[Nmeas].FWy = NO_MAG; 149 catalog[0].measure[Nmeas].theta = NO_MAG; 150 150 151 /* XXX need to add dX, dY : need to load into stars[N].dX,dY */ 152 /* XXX need to add stargal, Sky, dSky, qPSF, detID, imageID */ 153 catalog[0].measure[Nmeas].Xccd = 0.0; 154 catalog[0].measure[Nmeas].Yccd = 0.0; 155 151 156 if (ACCEPT_MOTION) { 152 catalog[0].average[n].uR = stars[N][0].uR;153 catalog[0].average[n].uD = stars[N][0].uD;154 catalog[0].average[n].duR = stars[N][0].duR;155 catalog[0].average[n].duD = stars[N][0].duD;156 catalog[0].average[n].P = stars[N][0].P;157 catalog[0].average[n].dP = stars[N][0].dP;157 catalog[0].average[n].uR = stars[N][0].uR; 158 catalog[0].average[n].uD = stars[N][0].uD; 159 catalog[0].average[n].duR = stars[N][0].duR; 160 catalog[0].average[n].duD = stars[N][0].duD; 161 catalog[0].average[n].P = stars[N][0].P; 162 catalog[0].average[n].dP = stars[N][0].dP; 158 163 } 159 164 … … 240 245 241 246 for (j = 0; j < Nsecfilt; j++) { 242 catalog[0].secfilt[Nave*Nsecfilt+j].M_PS = NO_MAG; 243 catalog[0].secfilt[Nave*Nsecfilt+j].dM_PS = NO_MAG; 244 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NO_MAG; 245 } 246 247 catalog[0].measure[Nmeas].dR_PS = 0.0; 248 catalog[0].measure[Nmeas].dD_PS = 0.0; 249 catalog[0].measure[Nmeas].M_PS = MIN (stars[N][0].M, NO_MAG); 250 catalog[0].measure[Nmeas].dM_PS = MIN (stars[N][0].dM, NO_ERR); 251 catalog[0].measure[Nmeas].Mcal_PS = 0; 252 catalog[0].measure[Nmeas].t = (stars[N][0].t == 0) ? TIMEREF : stars[N][0].t; /** careful : time_t vs e_time **/ 253 catalog[0].measure[Nmeas].averef = Nave; 254 catalog[0].measure[Nmeas].source = stars[N][0].code; 255 catalog[0].measure[Nmeas].dophot = 0; 256 catalog[0].measure[Nmeas].flags = 0; 257 catalog[0].measure[Nmeas].dt_PS = 0xffff; 258 259 catalog[0].measure[Nmeas].Mgal_PS = NO_MAG; 260 catalog[0].measure[Nmeas].airmass_PS = 0; 261 catalog[0].measure[Nmeas].FWx = NO_MAG; 262 catalog[0].measure[Nmeas].FWy = NO_ERR; 263 catalog[0].measure[Nmeas].theta = NO_ERR; 247 catalog[0].secfilt[Nave*Nsecfilt+j].M = NO_MAG; 248 catalog[0].secfilt[Nave*Nsecfilt+j].dM = NO_MAG; 249 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NO_MAG; 250 } 251 252 catalog[0].measure[Nmeas].dR = 0.0; 253 catalog[0].measure[Nmeas].dD = 0.0; 254 catalog[0].measure[Nmeas].M = MIN (stars[N][0].M, NO_MAG); 255 catalog[0].measure[Nmeas].dM = MIN (stars[N][0].dM, NO_ERR); 256 catalog[0].measure[Nmeas].Mcal = 0; 257 catalog[0].measure[Nmeas].t = (stars[N][0].t == 0) ? TIMEREF : stars[N][0].t; /** careful : time_t vs e_time **/ 258 catalog[0].measure[Nmeas].averef = Nave; 259 catalog[0].measure[Nmeas].photcode = stars[N][0].code; 260 catalog[0].measure[Nmeas].dophot = 0; 261 catalog[0].measure[Nmeas].flags = 0; 262 catalog[0].measure[Nmeas].dt = 0xffff; 263 264 catalog[0].measure[Nmeas].airmass = 0; 265 catalog[0].measure[Nmeas].Mgal = NO_MAG; 266 catalog[0].measure[Nmeas].FWx = NO_MAG; 267 catalog[0].measure[Nmeas].FWy = NO_MAG; 268 catalog[0].measure[Nmeas].theta = NO_MAG; 269 270 /* XXX need to add dX, dY : need to load into stars[N].dX,dY */ 271 /* XXX need to add stargal, Sky, dSky, qPSF, detID, imageID */ 272 catalog[0].measure[Nmeas].Xccd = 0.0; 273 catalog[0].measure[Nmeas].Yccd = 0.0; 264 274 265 275 stars[N][0].found = Nmeas; -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/find_proper.c
r3339 r12008 111 111 catalog[0].measure[Nmeas].t = 0; /* a flag: if 0, image is not in database */ 112 112 catalog[0].measure[Nmeas].averef = n; 113 catalog[0].measure[Nmeas]. source = USNO_RED;113 catalog[0].measure[Nmeas].photcode = USNO_RED; 114 114 catalog[0].measure[Nmeas+1].dR = catalog[0].measure[Nmeas].dR; 115 115 catalog[0].measure[Nmeas+1].dD = catalog[0].measure[Nmeas].dD; … … 119 119 catalog[0].measure[Nmeas+1].t = 0; /* a flag: if 0, image is not in database */ 120 120 catalog[0].measure[Nmeas+1].averef = n; 121 catalog[0].measure[Nmeas+1]. source = USNO_BLUE;121 catalog[0].measure[Nmeas+1].photcode = USNO_BLUE; 122 122 /* add flag in average to mark as matched with the USNO catalog */ 123 123 catalog[0].average[n].code |= (ID_PROPER | ID_USNO); -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/load2mass_catalog.c
r7780 r12008 44 44 45 45 for (j = 0; j < Nsec; j++) { 46 catalog[0].secfilt[Nave*Nsec+j].M _PS= NO_MAG;47 catalog[0].secfilt[Nave*Nsec+j].dM _PS= NO_MAG;46 catalog[0].secfilt[Nave*Nsec+j].M = NO_MAG; 47 catalog[0].secfilt[Nave*Nsec+j].dM = NO_MAG; 48 48 catalog[0].secfilt[Nave*Nsec+j].Xm = NO_MAG; 49 49 } … … 51 51 // we now have the min chisq row. use this to supply the other filter values.... 52 52 for (j = 0; j < 3; j++) { 53 catalog[0].measure[Nmeas].dR _PS= 0.0;54 catalog[0].measure[Nmeas].dD _PS= 0.0;55 catalog[0].measure[Nmeas].M _PS= MIN (stars[i+j].M, NO_MAG);56 catalog[0].measure[Nmeas].dM _PS= MIN (stars[i+j].dM, NO_ERR);57 catalog[0].measure[Nmeas].Mcal _PS= 0;53 catalog[0].measure[Nmeas].dR = 0.0; 54 catalog[0].measure[Nmeas].dD = 0.0; 55 catalog[0].measure[Nmeas].M = MIN (stars[i+j].M, NO_MAG); 56 catalog[0].measure[Nmeas].dM = MIN (stars[i+j].dM, NO_ERR); 57 catalog[0].measure[Nmeas].Mcal = 0; 58 58 catalog[0].measure[Nmeas].t = stars[i+j].t; 59 59 catalog[0].measure[Nmeas].averef = Nave; 60 catalog[0].measure[Nmeas]. source = stars[i+j].code;60 catalog[0].measure[Nmeas].photcode = stars[i+j].code; 61 61 catalog[0].measure[Nmeas].dophot = 0; 62 62 catalog[0].measure[Nmeas].flags = 0; 63 catalog[0].measure[Nmeas].dt _PS= 0xffff;63 catalog[0].measure[Nmeas].dt = 0xffff; 64 64 65 catalog[0].measure[Nmeas].Mgal _PS= NO_MAG;66 catalog[0].measure[Nmeas].airmass _PS= 0;65 catalog[0].measure[Nmeas].Mgal = NO_MAG; 66 catalog[0].measure[Nmeas].airmass = 0; 67 67 catalog[0].measure[Nmeas].FWx = NO_MAG; 68 68 catalog[0].measure[Nmeas].FWy = NO_ERR; -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/replace_match.c
r6683 r12008 7 7 /* search for entry and replace values M, dM, R, D */ 8 8 for (i = 0; i < average[0].Nm; i++) { 9 if (measure[i]. source != star[0].code) continue;10 measure[i].dR _PS= 3600.0*(average[0].R - star[0].R);11 measure[i].dD _PS= 3600.0*(average[0].D - star[0].D);12 measure[i].M _PS= MIN (star[0].M, NO_MAG);13 measure[i].dM _PS= MIN (star[0].dM, NO_ERR);9 if (measure[i].photcode != star[0].code) continue; 10 measure[i].dR = 3600.0*(average[0].R - star[0].R); 11 measure[i].dD = 3600.0*(average[0].D - star[0].D); 12 measure[i].M = MIN (star[0].M, NO_MAG); 13 measure[i].dM = MIN (star[0].dM, NO_ERR); 14 14 star[0].found = average[0].offset + i; 15 15 return (TRUE); -
branches/dvo-mods-2007-02/Ohana/src/addstar/src/update_coords.c
r6683 r12008 19 19 continue; 20 20 } 21 R = measure[m].dR _PS;22 D = measure[m].dD _PS;21 R = measure[m].dR; 22 D = measure[m].dD; 23 23 r += R; 24 24 d += D; … … 37 37 m = average[0].offset; /* first measurement of this star */ 38 38 for (i = 0; i < average[0].Nm; i++) { 39 measure[m].dR _PS-= r;40 measure[m].dD _PS-= d;39 measure[m].dR -= r; 40 measure[m].dD -= d; 41 41 m = next[m]; 42 42 } -
branches/dvo-mods-2007-02/Ohana/src/delstar/src/delete_imagefile.c
r8555 r12008 45 45 start = image[0].tzero; 46 46 stop = image[0].tzero + trange; 47 find_matches (&catalog, image[0]. source, start, stop);47 find_matches (&catalog, image[0].photcode, start, stop); 48 48 49 49 dvo_catalog_save (&catalog, VERBOSE); -
branches/dvo-mods-2007-02/Ohana/src/delstar/src/delete_imagename.c
r8555 r12008 54 54 start = image[j].tzero; 55 55 stop = image[j].tzero + trange; 56 find_matches (&catalog, image[j]. source, start, stop);56 find_matches (&catalog, image[j].photcode, start, stop); 57 57 58 58 dvo_catalog_save (&catalog, VERBOSE); -
branches/dvo-mods-2007-02/Ohana/src/delstar/src/find_image_db.c
r7080 r12008 46 46 start = timage[0].tzero - MAX(0.05*timage[0].trate*timage[0].NY, 1); 47 47 stop = timage[0].tzero + MAX(1.05*timage[0].trate*timage[0].NY, 1); 48 code = timage[0]. source;48 code = timage[0].photcode; 49 49 50 50 Nlist = 0; … … 55 55 if (image[i].tzero < start) continue; 56 56 if (image[i].tzero > stop) continue; 57 if (image[i]. source != code) continue;57 if (image[i].photcode != code) continue; 58 58 list[Nlist] = i; 59 59 Nlist ++; … … 82 82 if (image[i].tzero > END) continue; 83 83 if (code != NULL) { 84 if (image[i]. source != code[0].code) continue;84 if (image[i].photcode != code[0].code) continue; 85 85 } 86 86 list[Nlist] = i; -
branches/dvo-mods-2007-02/Ohana/src/delstar/src/find_matches.c
r4680 r12008 55 55 drop &= (catalog[0].measure[i].t >= start); 56 56 drop &= (catalog[0].measure[i].t <= end); 57 drop &= ((photcode == -1) || (photcode == catalog[0].measure[i]. source));57 drop &= ((photcode == -1) || (photcode == catalog[0].measure[i].photcode)); 58 58 if (!drop) { 59 59 prev = i; -
branches/dvo-mods-2007-02/Ohana/src/delstar/src/gimages.c
r7080 r12008 56 56 Shutdown ("ERROR: photcode %s not found in photcode table", photcode); 57 57 } 58 image[0]. source = Nc;58 image[0].photcode = Nc; 59 59 60 60 tmp = 0; … … 76 76 tmp = 0; 77 77 gfits_scan (&header, "AIRMASS", "%lf", 1, &tmp); 78 image[0].secz _PS= tmp;78 image[0].secz = tmp; 79 79 80 80 /* secz is in units milli-airmass */ 81 image[0].Mcal _PS = ALPHA*(image[0].secz_PS- 1.000);81 image[0].Mcal = ALPHA*(image[0].secz - 1.000); 82 82 image[0].Xm = NO_MAG; 83 83 -
branches/dvo-mods-2007-02/Ohana/src/elixir/src/DefineProcesses.c
r10336 r12008 27 27 GetConfig (config, "global.pending", "%s", 0, global[0].argv[2]); 28 28 GetConfig (config, "global.logfile", "%s", 0, global[0].argv[3]); 29 GetConfig (config, "global. source", "%s", 0, global[0].argv[4]);29 GetConfig (config, "global.photcode", "%s", 0, global[0].argv[4]); 30 30 GetConfig (config, "global.msg", "%s", 0, global[0].argv[5]); 31 31 GetConfig (config, "global.end", "%s", 0, global[0].argv[6]); -
branches/dvo-mods-2007-02/Ohana/src/gastro/src/getptolemy.c
r8514 r12008 50 50 stars[k].X = catalog.average[j].R; 51 51 stars[k].Y = catalog.average[j].D; 52 stars[k].mag = catalog.measure[catalog.average[j].offset].M _PS;52 stars[k].mag = catalog.measure[catalog.average[j].offset].M; 53 53 } 54 54 dvo_catalog_free (&catalog); -
branches/dvo-mods-2007-02/Ohana/src/gastro2/src/getptolemy.c
r8513 r12008 61 61 Ref[0].stars[k].R = catalog.average[j].R; 62 62 Ref[0].stars[k].D = catalog.average[j].D; 63 Ref[0].stars[k].M = catalog.measure[catalog.average[j].offset].M _PS;63 Ref[0].stars[k].M = catalog.measure[catalog.average[j].offset].M; 64 64 } 65 65 dvo_catalog_free (&catalog); -
branches/dvo-mods-2007-02/Ohana/src/getstar/src/select_by_image.c
r6812 r12008 21 21 start = image[0].tzero; 22 22 end = image[0].tzero + 1e-4*image[0].NY*image[0].trate; /* trate is in 0.1 msec / row */ 23 photcode = image[0]. source;23 photcode = image[0].photcode; 24 24 } 25 25 if (VERBOSE) fprintf (stderr, "extracting for range %d to %d (photcode %s)\n", start, end, photcode); … … 27 27 for (i = 0; (i < catalog[0].Nmeasure); i++) { 28 28 if ((i % 10000) == 0) fprintf (stderr, ". "); 29 if ((catalog[0].measure[i].t >= start) && (catalog[0].measure[i].t <= end) && (photcode == catalog[0].measure[i]. source)) {29 if ((catalog[0].measure[i].t >= start) && (catalog[0].measure[i].t <= end) && (photcode == catalog[0].measure[i].photcode)) { 30 30 n = catalog[0].measure[i].averef; 31 31 stars[N].R = catalog[0].average[n].R - catalog[0].measure[i].dR / 360000.0; -
branches/dvo-mods-2007-02/Ohana/src/imclean/src/ConfigInit.c
r11903 r12008 20 20 ScanConfig (config, "DOPHOT_CHAR_LINE", "%d", 0, &CHAR_LINE); 21 21 ScanConfig (config, "DOPHOT_TYPE_FIELD", "%d", 0, &TYPE_FIELD); 22 ScanConfig (config, "DOPHOT _PSF_FIELD", "%d", 0, &PSF_FIELD);22 ScanConfig (config, "DOPHOTF_FIELD", "%d", 0, &PSF_FIELD); 23 23 ScanConfig (config, "DOPHOT_AP_FIELD", "%d", 0, &AP_FIELD); 24 24 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, PhotCodeFile); -
branches/dvo-mods-2007-02/Ohana/src/imregister/base/ConfigInit.c
r6684 r12008 73 73 74 74 WarnConfig (config, "imstats", "%s", 0, ElixirBase); 75 sprintf (ImstatFifo, "%s. source", ElixirBase);75 sprintf (ImstatFifo, "%s.photcode", ElixirBase); 76 76 WarnConfig (config, "ptolemy", "%s", 0, ElixirBase); 77 sprintf (PtolemyFifo, "%s. source", ElixirBase);77 sprintf (PtolemyFifo, "%s.photcode", ElixirBase); 78 78 79 79 if (!ScanConfig (config, "CONNECT", "%s", 0, CONNECT)) { -
branches/dvo-mods-2007-02/Ohana/src/imregister/imphot/ConfigInit.c
r6684 r12008 69 69 70 70 WarnConfig (config, "imstats", "%s", 0, ElixirBase); 71 sprintf (ImstatFifo, "%s. source", ElixirBase);71 sprintf (ImstatFifo, "%s.photcode", ElixirBase); 72 72 WarnConfig (config, "ptolemy", "%s", 0, ElixirBase); 73 sprintf (PtolemyFifo, "%s. source", ElixirBase);73 sprintf (PtolemyFifo, "%s.photcode", ElixirBase); 74 74 75 75 if (!ScanConfig (config, "CONNECT", "%s", 0, CONNECT)) { -
branches/dvo-mods-2007-02/Ohana/src/imregister/imphot/dumpfits.c
r7080 r12008 113 113 subset = &image[match[i]]; 114 114 startstr = sec_to_date (subset[0].tzero); 115 filtstr = GetPhotcodeNamebyCode (subset[0]. source);116 zp = subset[0].Mcal _PS;117 dzp = subset[0].dMcal _PS;115 filtstr = GetPhotcodeNamebyCode (subset[0].photcode); 116 zp = subset[0].Mcal; 117 dzp = subset[0].dMcal; 118 118 XY_to_RD (&ra, &dec, 0.0, 0.0, &subset[0].coords); 119 airmass = subset[0].secz _PS;119 airmass = subset[0].secz; 120 120 sky = subset[0].Myyyy + 0x8000; 121 121 -
branches/dvo-mods-2007-02/Ohana/src/imregister/imphot/output.c
r5014 r12008 35 35 36 36 /* convert photcode to filter name */ 37 photstr = GetPhotcodeNamebyCode (image[i]. source);37 photstr = GetPhotcodeNamebyCode (image[i].photcode); 38 38 if (photstr == (char *) NULL) photstr = PhotError; 39 39 40 40 fprintf (stdout, "%s %s %s %7.4f %7.4f %7.4f %5d %02x\n", image[i].name, photstr, timestr, 41 image[i].Mcal _PS, image[i].dMcal_PS, image[i].secz_PS, image[i].nstar, image[i].code);41 image[i].Mcal, image[i].dMcal, image[i].secz, image[i].nstar, image[i].code); 42 42 free (timestr); 43 43 } -
branches/dvo-mods-2007-02/Ohana/src/imregister/imphot/subset.c
r5386 r12008 23 23 } 24 24 if (!status && criteria.Ntimes) continue; 25 if (criteria.PhotcodeSelect && (image[i]. source != criteria.photcode)) continue;25 if (criteria.PhotcodeSelect && (image[i].photcode != criteria.photcode)) continue; 26 26 if (criteria.CodeSelect && (image[i].code != criteria.Code)) continue; 27 27 if (criteria.NameSelect && strncasecmp (image[i].name, criteria.Name, NameSelectLength)) continue; -
branches/dvo-mods-2007-02/Ohana/src/imregister/src/imphotmerge.c
r7080 r12008 4 4 5 5 Image *LoadImageTable (FILE *f, Header *header, int *nimage); 6 static char *version = "imphotcopy $Revision: 1.5 $";6 static char *version = "imphotcopy $Revision: 1.5.4.1 $"; 7 7 8 8 int main (int argc, char **argv) { … … 105 105 } 106 106 if (!status && Ntimes) continue; 107 if (PhotCodeSelect && (input[i]. source != PHOTCODE)) continue;107 if (PhotCodeSelect && (input[i].photcode != PHOTCODE)) continue; 108 108 if ((NameSelect != (char *) NULL) && (strncasecmp (input[i].name, NameSelect, NameSelectLength))) continue; 109 109 -
branches/dvo-mods-2007-02/Ohana/src/libautocode/def/average.d
r11742 r12008 2 2 EXTNAME DVO_AVERAGE 3 3 TYPE BINTABLE 4 SIZE 764 SIZE 84 5 5 DESCRIPTION DVO Average Object Table 6 6 … … 30 30 FIELD missing, missing, int, offset to first missing obs 31 31 32 # Pan-STARRS uses a 64-bit detection ID. keep this in two 32 bit ints for backwards compatibility? 33 FIELD objID_hi, OBJ_ID_HI, unsigned int, ID upper bytes 34 FIELD objID_lo, OBJ_ID_LO, unsigned int, ID lower bytes 35 32 36 # this structure should only be used for internal representations 33 37 # the average-FORMAT structures should be used for external representations 34 38 # note that the average magnitudes are stored in the 'secfilt' table (change this name??) 35 39 # the index for the secfilt table is just Nsecfilt times the index for the average table. 40 41 # XXX after the rest of the DVO re-org work, remove the magnitude based values from this table 42 # and move them to the secfilt table. 43 44 # the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs -
branches/dvo-mods-2007-02/Ohana/src/libautocode/def/image.d
r6454 r12008 25 25 FIELD tzero, TZERO, e_time, readout time (row 0) 26 26 FIELD nstar, NSTAR, unsigned int, number of stars on image 27 FIELD secz _PS,SECZ, float, airmass, mag27 FIELD secz, SECZ, float, airmass, mag 28 28 FIELD NX, NX, short, image width 29 29 FIELD NY, NY, short, image height 30 FIELD apmifit _PS,APMIFIT, float, aperture correction, mag31 FIELD dapmifit _PS,DAPMIFIT, float, apmifit error, mag32 FIELD Mcal _PS,MCAL, float, calibration mag, mag33 FIELD dMcal _PS,DMCAL, float, error on Mcal, mag30 FIELD apmifit, APMIFIT, float, aperture correction, mag 31 FIELD dapmifit, DAPMIFIT, float, apmifit error, mag 32 FIELD Mcal, MCAL, float, calibration mag, mag 33 FIELD dMcal, DMCAL, float, error on Mcal, mag 34 34 FIELD Xm, XM, short, image chisq, 10*log(value) 35 FIELD source, SOURCE,short, identifier for CCD,35 FIELD photcode, PHOTCODE, short, identifier for CCD, 36 36 FIELD exptime, EXPTIME, float, exposure time, seconds 37 37 FIELD sidtime, ST, float, sidereal time of exposure … … 48 48 FIELD code, CODE, char, image quality flag 49 49 FIELD ccdnum, CCDNUM, unsigned char, CCD ID number 50 # 40 bytes 50 FIELD imageID_hi, IMAGE_ID_HI, unsigned int, ID upper bytes 51 FIELD imageID_lo, IMAGE_ID_LO, unsigned int, ID lower bytes 52 # 48 bytes 51 53 52 FIELD dummy, DUMMY, char[1 8], unused54 FIELD dummy, DUMMY, char[10], unused 53 55 FIELD order, ORDER, short, Mrel 2D polynomical order 54 56 FIELD Mx, MX, short, Mrel polyterm … … 66 68 FIELD Mxyyy, MXYYY, short, Mrel polyterm 67 69 FIELD Myyyy, MYYYY, short, Mrel polyterm 68 # 4 8bytes70 # 40 bytes -
branches/dvo-mods-2007-02/Ohana/src/libautocode/def/measure.d
r6454 r12008 2 2 EXTNAME DVO_MEASURE 3 3 TYPE BINTABLE 4 SIZE 504 SIZE 96 5 5 DESCRIPTION DVO Detection Measurement Table 6 6 7 FIELD dR_PS, D_RA, float, RA offset, arcsec 8 FIELD dD_PS, D_DEC, float, DEC offset, arcsec 9 FIELD M_PS, MAG, float, catalog mag, mag 10 FIELD Mcal_PS, Mcal, float, image cal mag, mag 11 FIELD Mgal_PS, Mgal, float, galaxy mag, mag 12 FIELD dM_PS, dM, float, mag error, mag 13 FIELD airmass_PS, airmass, float, (airmass - 1), airmass 14 FIELD dt_PS, dt, float, exposure time, 2.5*log(exptime) 15 FIELD FWx, FWx, short, object fwhm major axis, 1/100 of arcsec 16 FIELD FWy, FWy, short, object fwhm minor axis, 1/100 of arcsec 17 FIELD theta, theta, unsigned char, angle wrt ccd X dir, (0xff/360) deg 18 FIELD dophot, dophot, char, dophot type 19 FIELD source, source, unsigned short, photcode 20 FIELD flags, flags, unsigned short, flags for various uses 21 FIELD t, t, unsigned int, time in seconds (UNIX) 22 FIELD averef, averef, unsigned int, reference to average entry 7 FIELD dR, D_RA, float, RA offset, arcsec 8 FIELD dD, D_DEC, float, DEC offset, arcsec 9 FIELD M, MAG, float, catalog mag, mag 10 FIELD Mcal, Mcal, float, image cal mag, mag 11 FIELD Mgal, Mgal, float, galaxy mag, mag 12 FIELD dM, dM, float, mag error, mag 13 FIELD airmass, airmass, float, (airmass - 1), airmass 14 FIELD dt, dt, float, exposure time, 2.5*log(exptime) 15 16 FIELD t, t, unsigned int, time in seconds (UNIX) 17 FIELD averef, averef, unsigned int, reference to average entry 18 19 FIELD FWx, FWx, short, object fwhm major axis, 1/100 of arcsec 20 FIELD FWy, FWy, short, object fwhm minor axis, 1/100 of arcsec 21 FIELD theta, theta, short, angle wrt ccd X dir, (0xffff/360) deg 22 FIELD photcode, photcode, unsigned short, photcode 23 24 FIELD flags, flags, unsigned short, flags for various uses 25 FIELD dophot, dophot, char, dophot type 26 FIELD stargal, stargal, char, star-galaxy separator 27 28 # new field elements needed for Pan-STARRS: 29 FIELD Xccd, X_CCD, float, X coord on chip, pixels 30 FIELD Yccd, Y_CCD, float, Y coord on chip, pixels 31 32 # could these be packed into fewer bits? 33 FIELD Sky, SKY_FLUX, float, local estimate of sky flux, counts/sec 34 FIELD dSky, SKY_FLUX_ERR, float, local estimate of sky flux, counts/sec 35 36 FIELD dXccd, X_CCD_ERR, short, X coord error on chip, pixels 37 FIELD dYccd, Y_CCD_ERR, short, Y coord error on chip, pixels 38 39 # do we need more resolution than a short? should this be a log? 40 FIELD qPSF, PSF_QF, short, psf coverage/quality factor 41 42 # Pan-STARRS uses a 64-bit detection ID. keep this in two 32 bit ints for backwards compatibility? 43 FIELD detID_hi, DET_ID_HI, unsigned int, ID upper bytes 44 FIELD detID_lo, DET_ID_LO, unsigned int, ID lower bytes 45 46 FIELD imageID_hi, IMAGE_ID_HI, unsigned int, reference to image 47 FIELD imageID_lo, IMAGE_ID_LO, unsigned int, reference to image 48 49 # we may need 2 extra bytes for padding purposes... 50 FIELD dummy, dummy, char[6], padding -
branches/dvo-mods-2007-02/Ohana/src/libautocode/def/secfilt.d
r6454 r12008 2 2 EXTNAME DVO_SECFILT 3 3 TYPE BINTABLE 4 SIZE 1 24 SIZE 16 5 5 DESCRIPTION DVO SecFilt : Secondary Filter Data 6 6 7 7 # elements of data structure / FITS table 8 FIELD M _PS,MAG, float, other mags, mags9 FIELD dM _PS,MAG_ERR, float, scatter on mag, mags8 FIELD M, MAG, float, other mags, mags 9 FIELD dM, MAG_ERR, float, scatter on mag, mags 10 10 FIELD Xm, MAG_CHI, short, chisq on mag, [100*log(value)] 11 FIELD Ncode, NCODE, short, number of detections in band 12 FIELD Nused, NUSED, short, number of detections used in average 11 13 FIELD dummy, JUNK, short, place holder -
branches/dvo-mods-2007-02/Ohana/src/libdvo/Makefile
r11880 r12008 41 41 $(SRC)/dvo_catalog_split.$(ARCH).o \ 42 42 $(SRC)/dvo_catalog_create.$(ARCH).o \ 43 $(SRC)/dvo_catalog_chipcoords.$(ARCH).o \ 43 44 $(SRC)/dvo_convert.$(ARCH).o \ 44 45 $(SRC)/dvo_convert_elixir.$(ARCH).o \ 45 46 $(SRC)/dvo_convert_loneos.$(ARCH).o \ 46 $(SRC)/dvo_convert_panstarrs.$(ARCH).o \47 $(SRC)/dvo_convert_pmtest.$(ARCH).o \48 47 $(SRC)/skyregion_io.$(ARCH).o \ 49 48 $(SRC)/skyregion_gsc.$(ARCH).o \ 50 49 $(SRC)/skyregion_ops.$(ARCH).o 50 51 # $(SRC)/dvo_convert_panstarrs.$(ARCH).o \ 52 # $(SRC)/dvo_convert_pmtest.$(ARCH).o \ 51 53 52 54 include ../libautocode/Makefile.Targets -
branches/dvo-mods-2007-02/Ohana/src/libdvo/doc/dvo-structures.txt
r11742 r12008 1 2 2007.02.22 3 4 I have several DVO improvements to implement. I need to plan them a 5 bit carefully. Here are my thoughts on these updates. 6 7 - add chip X,Y to measure table 8 9 this is a fairly simple addition. In addstar/find_matches, I just need 10 to assign the X,Y value from the incoming star data. For loading 11 old catalogs which don't include X,Y in the table, I need to 12 calculate the X,Y position based on the R,D after finding the 13 matching image. I have code to do this calculation currently in 14 dvo/photometry.c for looking up X,Y on the fly. once this is moved 15 into the load functions, it will not be needed in photometry.c 16 17 - remove PRI/SEC and only use secfilt table for mags 18 19 this is not a very difficult change, conceptually, but it may be a 20 fair amount of work. all of the functions which currently switch on 21 the case of PRI/SEC just need to look in the secfilt location. the 22 value of Nsec needs to increase by 1. the load from tables which 23 used PRI/SEC need to move the PRI values to the correct location in 24 secfilt 25 26 eventually, rename 'secfilt' to a better name choice 27 28 - add image, average, measure IDs 29 30 for PS1, the image and measure need to be generated by the external 31 software. they would just be part of the input stream. for the 32 case were the IDs are not supplied, DVO needs to generate them in a 33 unique way. I probably need to understand / define that mechanism 34 before tackling this problem. 35 36 one point: I need to keep the old averef index. how do this index 37 and the objID work together? 38 39 - link measure to image 40 41 temporariliy use an index like averef? 42 43 - move photcode table to catdir (also zero points) 44 45 should be fairly easy: just like the SkyTable, look in the catdir 46 first, then generate from the default text table if it is missing. 47 48 - color term as a function of mosaic position 49 50 - mextract field,field,field 51 52 this should not be a very difficult job. just add a loop to the 53 avextract / mextract functions. 54 55 - mextract field(s) where condition 56 57 this is a bit trickier, and could make use of the code in the dvo 58 math functions 59 60 - dvo select from mysql 61 62 not very difficult: need to define the commands to select the 63 database and set up a connection, then parse the select line into 64 the appropriate format. just need to as the db for the type of the 65 fields that are requested: must be numerical. 66 67 select field,field,field from table where condition 68 69 - change vectors to doubles 70 71 probably not a terrible job. this will depend on how the union is 72 defined. I don't want this to explode the size of an image! 73 74 --------- 1 75 2 76 I now have the ability to load and save DVO databases in old formats, -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/LoadPhotcodes.c
r9631 r12008 2 2 3 3 # define NCTERMS 4 4 # define F _PS0.0015 # define NO_MAG _PS100.04 # define F 0.001 5 # define NO_MAG 100.0 6 6 7 7 static PhotCodeData *photcodes = NULL; … … 489 489 float M; 490 490 491 Np = photcodes[0].hashcode[measure[0]. source];492 if (Np == -1) return (NO_MAG _PS);491 Np = photcodes[0].hashcode[measure[0].photcode]; 492 if (Np == -1) return (NO_MAG); 493 493 494 494 if (photcodes[0].code[Np].type == PHOT_REF) { 495 M = measure[0].M _PS;495 M = measure[0].M; 496 496 return (M); 497 497 } 498 498 499 M = measure[0].M _PS - measure[0].dt_PS- ZERO_POINT;499 M = measure[0].M - measure[0].dt - ZERO_POINT; 500 500 501 501 return (M); … … 509 509 PhotCode *code; 510 510 511 Np = photcodes[0].hashcode[measure[0]. source];512 if (Np == -1) return (NO_MAG _PS);511 Np = photcodes[0].hashcode[measure[0].photcode]; 512 if (Np == -1) return (NO_MAG); 513 513 514 514 if (photcodes[0].code[Np].type == PHOT_REF) { 515 Mcat = measure[0].M _PS;515 Mcat = measure[0].M; 516 516 return (Mcat); 517 517 } 518 518 code = &photcodes[0].code[Np]; 519 Mcat = measure[0].M _PS - ZERO_POINT + code[0].K*(measure[0].airmass_PS - 1.000) + F_PS*code[0].C;519 Mcat = measure[0].M - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + F*code[0].C; 520 520 521 521 return (Mcat); … … 528 528 PhotCode *code; 529 529 530 Np = photcodes[0].hashcode[measure[0]. source];531 if (Np == -1) return (NO_MAG _PS);530 Np = photcodes[0].hashcode[measure[0].photcode]; 531 if (Np == -1) return (NO_MAG); 532 532 533 533 if (photcodes[0].code[Np].type == PHOT_REF) { 534 Msys = measure[0].M _PS;534 Msys = measure[0].M; 535 535 return (Msys); 536 536 } 537 537 code = &photcodes[0].code[Np]; 538 Mcat = measure[0].M _PS - ZERO_POINT + code[0].K*(measure[0].airmass_PS - 1.000) + F_PS*code[0].C;538 Mcat = measure[0].M - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + F*code[0].C; 539 539 540 540 /* for DEP, color must be made of PRI/SEC */ 541 541 mc = iPhotColor (average, secfilt, NULL, code); 542 if (mc == NO_MAG _PS) return (Mcat);543 mc = mc - F _PS*code[0].dX;542 if (mc == NO_MAG) return (Mcat); 543 mc = mc - F*code[0].dX; 544 544 545 545 Mc = mc; … … 559 559 PhotCode *code; 560 560 561 Np = photcodes[0].hashcode[measure[0]. source];562 if (Np == -1) return (NO_MAG _PS);561 Np = photcodes[0].hashcode[measure[0].photcode]; 562 if (Np == -1) return (NO_MAG); 563 563 564 564 if (photcodes[0].code[Np].type == PHOT_REF) { 565 Mcat = measure[0].M _PS;565 Mcat = measure[0].M; 566 566 return (Mcat); 567 567 } 568 568 code = &photcodes[0].code[Np]; 569 Mrel = measure[0].M _PS - ZERO_POINT + code[0].K*(measure[0].airmass_PS - 1.000) + F_PS*code[0].C - measure[0].Mcal_PS;569 Mrel = measure[0].M - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + F*code[0].C - measure[0].Mcal; 570 570 571 571 /* for DEP, color must be made of PRI/SEC */ 572 572 mc = iPhotColor (average, secfilt, NULL, code); 573 if (mc == NO_MAG _PS) return (Mrel);574 mc = mc - F _PS*code[0].dX;573 if (mc == NO_MAG) return (Mrel); 574 mc = mc - F*code[0].dX; 575 575 576 576 Mc = mc; … … 591 591 592 592 /* code must be the matching PRI/SEC code for this measurement or an equivalent ALT */ 593 Np = photcodes[0].hashcode[thisone[0]. source];593 Np = photcodes[0].hashcode[thisone[0].photcode]; 594 594 if (Np == -1) { 595 return (NO_MAG _PS);595 return (NO_MAG); 596 596 } 597 597 598 598 if (photcodes[0].code[Np].type == PHOT_REF) { 599 Mrel = thisone[0].M _PS;599 Mrel = thisone[0].M; 600 600 return (Mrel); 601 601 } 602 602 if (code[0].code != photcodes[0].code[Np].equiv) { 603 return (NO_MAG _PS);604 } 605 606 Mcal = PhotRel (thisone, average, secfilt) + F _PS*code[0].C;603 return (NO_MAG); 604 } 605 606 Mcal = PhotRel (thisone, average, secfilt) + F*code[0].C; 607 607 608 608 mc = iPhotColor (average, secfilt, measure, code); 609 if (mc == NO_MAG _PS) return (Mcal);610 mc = mc - F _PS*code[0].dX;609 if (mc == NO_MAG) return (Mcal); 610 mc = mc - F*code[0].dX; 611 611 612 612 Mc = mc; … … 627 627 PhotCode *color; 628 628 629 m1 = m2 = NO_MAG _PS;629 m1 = m2 = NO_MAG; 630 630 631 631 if (measure == NULL) { … … 633 633 Ns2 = photcodes[0].hashNsec[code[0].c2]; 634 634 635 m1 = (Ns1 == -1) ? average[0].M : secfilt[Ns1].M _PS;636 m2 = (Ns2 == -1) ? average[0].M : secfilt[Ns2].M _PS;637 mc = ((m1 == NO_MAG _PS) || (m2 == NO_MAG_PS)) ? NO_MAG_PS: (m1 - m2);635 m1 = (Ns1 == -1) ? average[0].M : secfilt[Ns1].M; 636 m2 = (Ns2 == -1) ? average[0].M : secfilt[Ns2].M; 637 mc = ((m1 == NO_MAG) || (m2 == NO_MAG)) ? NO_MAG : (m1 - m2); 638 638 return (mc); 639 639 } … … 641 641 /* find magnitude matching first color term */ 642 642 color = GetPhotcodebyCode (code[0].c1); 643 if (color == NULL) return (NO_MAG _PS);643 if (color == NULL) return (NO_MAG); 644 644 if (color[0].type == PHOT_REF) { 645 for (i = 0; (i < average[0].Nm) && (m1 == NO_MAG _PS); i++) {646 if (measure[i]. source == color[0].code) {647 m1 = measure[i].M _PS;645 for (i = 0; (i < average[0].Nm) && (m1 == NO_MAG); i++) { 646 if (measure[i].photcode == color[0].code) { 647 m1 = measure[i].M; 648 648 } 649 649 } 650 650 } else { 651 651 Ns = photcodes[0].hashNsec[color[0].code]; 652 m1 = (Ns == -1) ? average[0].M : secfilt[Ns].M _PS;652 m1 = (Ns == -1) ? average[0].M : secfilt[Ns].M; 653 653 } 654 654 655 655 /* find magnitude matching second color term */ 656 656 color = GetPhotcodebyCode (code[0].c2); 657 if (color == NULL) return (NO_MAG _PS);657 if (color == NULL) return (NO_MAG); 658 658 if (color[0].type == PHOT_REF) { 659 for (i = 0; (i < average[0].Nm) && (m2 == NO_MAG _PS); i++) {660 if (measure[i]. source == color[0].code) {661 m2 = measure[i].M _PS;659 for (i = 0; (i < average[0].Nm) && (m2 == NO_MAG); i++) { 660 if (measure[i].photcode == color[0].code) { 661 m2 = measure[i].M; 662 662 } 663 663 } 664 664 } else { 665 665 Ns = photcodes[0].hashNsec[color[0].code]; 666 m2 = (Ns == -1) ? average[0].M : secfilt[Ns].M _PS;666 m2 = (Ns == -1) ? average[0].M : secfilt[Ns].M; 667 667 } 668 mc = ((m1 == NO_MAG _PS) || (m2 == NO_MAG_PS)) ? NO_MAG_PS: (m1 - m2);668 mc = ((m1 == NO_MAG) || (m2 == NO_MAG)) ? NO_MAG : (m1 - m2); 669 669 return (mc); 670 670 } … … 678 678 679 679 Ns = photcodes[0].hashNsec[code[0].code]; 680 Mave = (Ns == -1) ? average[0].M : secfilt[Ns].M _PS;681 Mref = Mave + F _PS*code[0].C;680 Mave = (Ns == -1) ? average[0].M : secfilt[Ns].M; 681 Mref = Mave + F*code[0].C; 682 682 683 683 mc = iPhotColor (average, secfilt, measure, code); 684 if (mc == NO_MAG _PS) return (Mref);685 mc = mc - F _PS*code[0].dX;684 if (mc == NO_MAG) return (Mref); 685 mc = mc - F*code[0].dX; 686 686 687 687 Mc = mc; … … 702 702 703 703 Ns = photcodes[0].hashNsec[code[0].code]; 704 Mave = (Ns == -1) ? average[0].M : secfilt[Ns].M _PS;704 Mave = (Ns == -1) ? average[0].M : secfilt[Ns].M; 705 705 return (Mave); 706 706 } … … 713 713 714 714 Ns = photcodes[0].hashNsec[code[0].code]; 715 dM = (Ns == -1) ? average[0].dM : secfilt[Ns].dM _PS;715 dM = (Ns == -1) ? average[0].dM : secfilt[Ns].dM; 716 716 return (dM); 717 717 } … … 726 726 Ns = photcodes[0].hashNsec[code[0].code]; 727 727 Mi = (Ns == -1) ? average[0].Xm : secfilt[Ns].Xm; 728 Xm = (Mi == NO_MAG _PS) ? -1.0 : pow (10.0, 0.01*Mi);728 Xm = (Mi == NO_MAG) ? -1.0 : pow (10.0, 0.01*Mi); 729 729 return (Xm); 730 730 } … … 741 741 if (code[0].type == PHOT_REF) { 742 742 for (i = 0; i < average[0].Nm; i++) { 743 if (measure[i]. source == c1) {744 M1 = measure[i].M _PS;743 if (measure[i].photcode == c1) { 744 M1 = measure[i].M; 745 745 goto filter1; 746 746 } … … 749 749 } else { 750 750 Ns = photcodes[0].hashNsec[code[0].code]; 751 M1 = (Ns == -1) ? average[0].M : secfilt[Ns].M _PS;751 M1 = (Ns == -1) ? average[0].M : secfilt[Ns].M; 752 752 } 753 753 … … 757 757 if (code[0].type == PHOT_REF) { 758 758 for (i = 0; i < average[0].Nm; i++) { 759 if (measure[i]. source == c2) {760 M2 = measure[i].M _PS;759 if (measure[i].photcode == c2) { 760 M2 = measure[i].M; 761 761 goto filter2; 762 762 } … … 765 765 } else { 766 766 Ns = photcodes[0].hashNsec[code[0].code]; 767 M2 = (Ns == -1) ? average[0].M : secfilt[Ns].M _PS;767 M2 = (Ns == -1) ? average[0].M : secfilt[Ns].M; 768 768 } 769 769 -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/coordops.update.c
r8638 r12008 651 651 case PROJ_GLS: 652 652 case PROJ_PAR: 653 return PROJ_MODE _PSEUDOCLY;653 return PROJ_MODEEUDOCLY; 654 654 } 655 655 return PROJ_MODE_NONE; -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_catalog.c
r8520 r12008 340 340 for (in = out = i = 0; i < catalog[0].Naverage; i++) { 341 341 for (j = 0; j < catalog[0].Nsecfilt; j++, in++, out++) { 342 outsec[out].M _PS = insec[in].M_PS;343 outsec[out].dM _PS = insec[in].dM_PS;342 outsec[out].M = insec[in].M; 343 outsec[out].dM = insec[in].dM; 344 344 outsec[out].Xm = insec[in].Xm; 345 345 } 346 346 for (j = 0; j < Nextra; j++, out++) { 347 outsec[out].M _PS= NO_MAG;348 outsec[out].dM _PS= NO_MAG;347 outsec[out].M = NO_MAG; 348 outsec[out].dM = NO_MAG; 349 349 outsec[out].Xm = NO_MAG; 350 350 } -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_catalog_raw.c
r8456 r12008 31 31 if (!strcmp (format, "LONEOS")) catalog[0].catformat = DVO_FORMAT_LONEOS; 32 32 if (!strcmp (format, "ELIXIR")) catalog[0].catformat = DVO_FORMAT_ELIXIR; 33 if (!strcmp (format, "PANSTARRS")) catalog[0].catformat = DVO_FORMAT_PANSTARRS;34 if (!strcmp (format, "PMTEST")) catalog[0].catformat = DVO_FORMAT_PMTEST;33 // if (!strcmp (format, "PANSTARRS")) catalog[0].catformat = DVO_FORMAT_PANSTARRS; 34 // if (!strcmp (format, "PMTEST")) catalog[0].catformat = DVO_FORMAT_PMTEST; 35 35 if (catalog[0].catformat != DVO_FORMAT_UNDEF) goto got_format; 36 36 } … … 71 71 SecFiltSize = sizeof (SecFiltElixir); 72 72 break; 73 # if 0 73 74 case DVO_FORMAT_PANSTARRS: 74 75 AverageSize = sizeof(AveragePanstarrs); … … 81 82 SecFiltSize = sizeof (SecFiltPanstarrs); 82 83 break; 84 # endif 83 85 default: 84 86 fprintf (stderr, "programming error in phot_catalog_raw\n"); … … 210 212 if (catalog[0].catformat == DVO_FORMAT_LONEOS) gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "LONEOS"); 211 213 if (catalog[0].catformat == DVO_FORMAT_ELIXIR) gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "ELIXIR"); 212 if (catalog[0].catformat == DVO_FORMAT_PANSTARRS) gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PANSTARRS");213 if (catalog[0].catformat == DVO_FORMAT_PMTEST) gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PMTEST");214 // if (catalog[0].catformat == DVO_FORMAT_PANSTARRS) gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PANSTARRS"); 215 // if (catalog[0].catformat == DVO_FORMAT_PMTEST) gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PMTEST"); 214 216 215 217 /* rewind file pointers and truncate file */ … … 256 258 AverageElixir *tmpAverageElixir; 257 259 AverageLoneos *tmpAverageLoneos; 258 AveragePanstarrs *tmpAveragePanstarrs;259 AveragePMtest *tmpAveragePMtest;260 // AveragePanstarrs *tmpAveragePanstarrs; 261 // AveragePMtest *tmpAveragePMtest; 260 262 261 263 switch (format) { … … 291 293 free (tmpAverageLoneos); 292 294 break; 295 # if 0 293 296 case DVO_FORMAT_PANSTARRS: 294 297 ALLOCATE (tmpAveragePanstarrs, AveragePanstarrs, MAX (Naverage, 1)); … … 313 316 free (tmpAveragePMtest); 314 317 break; 318 # endif 315 319 default: 316 320 fprintf (stderr, "error reading measures\n"); … … 327 331 AverageElixir *tmpAverageElixir; 328 332 AverageLoneos *tmpAverageLoneos; 329 AveragePanstarrs *tmpAveragePanstarrs;330 AveragePMtest *tmpAveragePMtest;333 // AveragePanstarrs *tmpAveragePanstarrs; 334 // AveragePMtest *tmpAveragePMtest; 331 335 332 336 switch (format) { … … 359 363 } 360 364 break; 365 # if 0 361 366 case DVO_FORMAT_PANSTARRS: 362 367 tmpAveragePanstarrs = AverageInternalToPanstarrs (average, Naverage); … … 379 384 } 380 385 break; 386 # endif 381 387 default: 382 388 fprintf (stderr, "error writing averages\n"); … … 394 400 MeasureElixir *tmpMeasureElixir; 395 401 MeasureLoneos *tmpMeasureLoneos; 396 MeasurePanstarrs *tmpMeasurePanstarrs;402 // MeasurePanstarrs *tmpMeasurePanstarrs; 397 403 398 404 switch (format) { … … 428 434 free (tmpMeasureLoneos); 429 435 break; 436 # if 0 430 437 case DVO_FORMAT_PANSTARRS: 431 438 case DVO_FORMAT_PMTEST: … … 440 447 free (tmpMeasurePanstarrs); 441 448 break; 449 # endif 442 450 default: 443 451 fprintf (stderr, "error reading measures\n"); … … 454 462 MeasureElixir *tmpMeasureElixir; 455 463 MeasureLoneos *tmpMeasureLoneos; 456 MeasurePanstarrs *tmpMeasurePanstarrs;464 // MeasurePanstarrs *tmpMeasurePanstarrs; 457 465 458 466 switch (format) { … … 485 493 } 486 494 break; 495 # if 0 487 496 case DVO_FORMAT_PANSTARRS: 488 497 case DVO_FORMAT_PMTEST: … … 496 505 } 497 506 break; 507 # endif 498 508 default: 499 509 fprintf (stderr, "error writing measures\n"); … … 511 521 SecFiltElixir *tmpSecFiltElixir; 512 522 SecFiltLoneos *tmpSecFiltLoneos; 513 SecFiltPanstarrs *tmpSecFiltPanstarrs;523 // SecFiltPanstarrs *tmpSecFiltPanstarrs; 514 524 515 525 switch (format) { … … 545 555 free (tmpSecFiltLoneos); 546 556 break; 557 # if 0 547 558 case DVO_FORMAT_PANSTARRS: 548 559 case DVO_FORMAT_PMTEST: … … 557 568 free (tmpSecFiltPanstarrs); 558 569 break; 570 # endif 559 571 default: 560 572 fprintf (stderr, "error reading measures\n"); … … 571 583 SecFiltElixir *tmpSecFiltElixir; 572 584 SecFiltLoneos *tmpSecFiltLoneos; 573 SecFiltPanstarrs *tmpSecFiltPanstarrs;585 // SecFiltPanstarrs *tmpSecFiltPanstarrs; 574 586 575 587 switch (format) { … … 602 614 } 603 615 break; 616 # if 0 604 617 case DVO_FORMAT_PANSTARRS: 605 618 case DVO_FORMAT_PMTEST: … … 613 626 } 614 627 break; 628 # endif 615 629 default: 616 630 fprintf (stderr, "error writing secfilts\n"); -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_convert.c
r8456 r12008 44 44 return (average); 45 45 } 46 /* disable the new and minimally-used versions for now. 47 put them back in after dev work is further along 48 OR replace with other output formats */ 49 # if 0 46 50 if (!strcmp (extname, "DVO_AVERAGE_PANSTARRS")) { 47 51 AveragePanstarrs *tmpAverage; … … 60 64 return (average); 61 65 } 66 # endif 62 67 63 68 fprintf (stderr, "table format unknown: %s\n", extname); … … 71 76 AverageElixir *tmpAverageElixir; 72 77 AverageLoneos *tmpAverageLoneos ; 73 AveragePanstarrs *tmpAveragePanstarrs;74 AveragePMtest *tmpAveragePMtest;78 // AveragePanstarrs *tmpAveragePanstarrs; 79 // AveragePMtest *tmpAveragePMtest; 75 80 76 81 /* convert from the internal format */ … … 89 94 free (tmpAverageLoneos ); 90 95 break; 96 # if 0 91 97 case DVO_FORMAT_PANSTARRS: 92 98 tmpAveragePanstarrs = AverageInternalToPanstarrs (average, Naverage); … … 99 105 free (tmpAveragePMtest); 100 106 break; 107 # endif 101 108 default: 102 109 fprintf (stderr, "table format unknown (average)\n"); … … 139 146 return (measure); 140 147 } 148 # if 0 141 149 if (!strcmp (extname, "DVO_MEASURE_PANSTARRS") || !strcmp (extname, "DVO_MEASURE_PMTEST")) { 142 150 MeasurePanstarrs *tmpMeasure; … … 147 155 return (measure); 148 156 } 157 # endif 149 158 150 159 fprintf (stderr, "table format unknown: %s\n", extname); … … 158 167 MeasureElixir *tmpMeasureElixir; 159 168 MeasureLoneos *tmpMeasureLoneos; 160 MeasurePanstarrs *tmpMeasurePanstarrs;169 // MeasurePanstarrs *tmpMeasurePanstarrs; 161 170 162 171 /* convert from the internal format */ … … 175 184 free (tmpMeasureLoneos); 176 185 break; 186 # if 0 177 187 case DVO_FORMAT_PANSTARRS: 178 188 case DVO_FORMAT_PMTEST: … … 181 191 free (tmpMeasurePanstarrs); 182 192 break; 193 # endif 183 194 default: 184 195 fprintf (stderr, "table format unknown (measure)\n"); … … 221 232 return (secfilt); 222 233 } 234 # if 0 223 235 if (!strcmp (extname, "DVO_SECFILT_PANSTARRS") || !strcmp (extname, "DVO_SECFILT_PMTEST")) { 224 236 SecFiltPanstarrs *tmpSecFilt; … … 229 241 return (secfilt); 230 242 } 243 # endif 231 244 232 245 fprintf (stderr, "table format unknown: %s\n", extname); … … 240 253 SecFiltElixir *tmpSecFiltElixir; 241 254 SecFiltLoneos *tmpSecFiltLoneos; 242 SecFiltPanstarrs *tmpSecFiltPanstarrs;255 // SecFiltPanstarrs *tmpSecFiltPanstarrs; 243 256 244 257 /* convert from the internal format */ … … 257 270 free (tmpSecFiltLoneos); 258 271 break; 272 # if 0 259 273 case DVO_FORMAT_PANSTARRS: 260 274 case DVO_FORMAT_PMTEST: … … 263 277 free (tmpSecFiltPanstarrs); 264 278 break; 279 # endif 265 280 default: 266 281 fprintf (stderr, "table format unknown (secfilt)\n"); … … 313 328 goto set_header; 314 329 } 330 # if 0 315 331 if (!strcmp (extname, "DVO_IMAGE_PANSTARRS") || !strcmp (extname, "DVO_IMAGE_PMTEST")) { 316 332 ImagePanstarrs *tmpimage; … … 321 337 goto set_header; 322 338 } 339 # endif 323 340 fprintf (stderr, "table format unknown: %s\n", extname); 324 341 return (FALSE); … … 338 355 ImageElixir *tmpImageElixir; 339 356 ImageLoneos *tmpImageLoneos; 340 ImagePanstarrs *tmpImagePanstarrs;357 // ImagePanstarrs *tmpImagePanstarrs; 341 358 342 359 Nimage = theader[0].Naxis[1]; … … 359 376 free (tmpImageLoneos); 360 377 break; 378 # if 0 361 379 case DVO_FORMAT_PANSTARRS: 362 380 case DVO_FORMAT_PMTEST: … … 366 384 free (tmpImagePanstarrs); 367 385 break; 386 # endif 368 387 default: 369 388 fprintf (stderr, "table format unknown (image ftable)\n"); … … 377 396 ImageElixir *tmpImageElixir; 378 397 ImageLoneos *tmpImageLoneos; 379 ImagePanstarrs *tmpImagePanstarrs;398 // ImagePanstarrs *tmpImagePanstarrs; 380 399 int i, Nrow, Nimage; 381 400 … … 427 446 vtable[0].size = gfits_matrix_size (theader); 428 447 return (TRUE); 448 # if 0 429 449 case DVO_FORMAT_PANSTARRS: 430 450 case DVO_FORMAT_PMTEST: … … 436 456 vtable[0].buffer[i] = (char *) tmpImagePanstarrs; 437 457 } 458 # endif 438 459 439 460 /* convert header from old format to new format */ -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_convert_elixir.c
r6683 r12008 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 out[i].dR_PS = in[i].dR * 0.01; 13 out[i].dD_PS = in[i].dD * 0.01; 14 out[i].M_PS = in[i].M * 0.001; 15 out[i].dM_PS = in[i].dM * 0.001; 16 out[i].dt_PS = in[i].dt * 0.001; 17 out[i].Mcal_PS = in[i].Mcal * 0.001; 18 out[i].Mgal_PS = in[i].Mgal * 0.001; 19 out[i].airmass_PS = in[i].airmass * 0.001; 20 out[i].FWx = in[i].FWx; 21 out[i].FWy = in[i].fwy * in[i].FWx * 0.01; 22 out[i].theta = in[i].theta; 23 out[i].dophot = in[i].dophot; 24 out[i].source = in[i].source; 25 out[i].t = in[i].t; 26 out[i].averef = in[i].averef; 27 out[i].flags = in[i].flags; 12 out[i].dR = in[i].dR * 0.01; 13 out[i].dD = in[i].dD * 0.01; 14 out[i].M = in[i].M * 0.001; 15 out[i].dM = in[i].dM * 0.001; 16 out[i].dt = in[i].dt * 0.001; 17 out[i].Mcal = in[i].Mcal * 0.001; 18 out[i].Mgal = in[i].Mgal * 0.001; 19 out[i].airmass = in[i].airmass * 0.001; 20 out[i].FWx = in[i].FWx; 21 out[i].FWy = in[i].fwy * in[i].FWx * 0.01; 22 out[i].theta = in[i].theta*(0x10000 / 0x100); 23 out[i].dophot = in[i].dophot; 24 out[i].photcode = in[i].source; 25 out[i].t = in[i].t; 26 out[i].averef = in[i].averef; 27 out[i].flags = in[i].flags; 28 29 /* these can be determined if needed / desired */ 30 out[i].Xccd = 0; 31 out[i].Yccd = 0; 32 out[i].dXccd = 0; 33 out[i].dYccd = 0; 34 35 /* these do not have a corresponding value */ 36 out[i].stargal = 0; 37 out[i].Sky = 0; 38 out[i].dSky = 0; 39 out[i].qPSF = 0; 40 41 /* XXX add these later */ 42 out[i].detID_hi = 0; 43 out[i].detID_lo = 0; 44 out[i].imageID_hi = 0; 45 out[i].imageID_lo = 0; 28 46 } 29 47 return (out); … … 39 57 40 58 for (i = 0; i < Nvalues; i++) { 41 out[i].dR = in[i].dR _PS* 100.0;42 out[i].dD = in[i].dD _PS* 100.0;43 out[i].M = in[i].M _PS* 1000.0;44 out[i].dM = in[i].dM _PS* 1000.0;45 out[i].dt = in[i].dt _PS* 1000.0;46 out[i].Mcal = in[i].Mcal _PS* 1000.0;47 out[i].Mgal = in[i].Mgal _PS* 1000.0;48 out[i].airmass = in[i].airmass _PS* 1000.0;59 out[i].dR = in[i].dR * 100.0; 60 out[i].dD = in[i].dD * 100.0; 61 out[i].M = in[i].M * 1000.0; 62 out[i].dM = in[i].dM * 1000.0; 63 out[i].dt = in[i].dt * 1000.0; 64 out[i].Mcal = in[i].Mcal * 1000.0; 65 out[i].Mgal = in[i].Mgal * 1000.0; 66 out[i].airmass = in[i].airmass * 1000.0; 49 67 out[i].FWx = in[i].FWx; 50 out[i].fwy = 100.0 * in[i].FWy/ in[i].FWx;51 out[i].theta = in[i].theta ;68 out[i].fwy = in[i].FWy * 100.0 / in[i].FWx; 69 out[i].theta = in[i].theta*(0x100/ 0x10000); 52 70 out[i].dophot = in[i].dophot; 53 out[i].source = in[i]. source;71 out[i].source = in[i].photcode; 54 72 out[i].t = in[i].t; 55 73 out[i].averef = in[i].averef; … … 90 108 out[i].P = 0; 91 109 out[i].dP = 0; 110 111 /* XXX add these later */ 112 out[i].objID_hi = 0; 113 out[i].objID_lo = 0; 92 114 } 93 115 return (out); … … 128 150 129 151 for (i = 0; i < Nvalues; i++) { 130 out[i].M_PS = in[i].M * 0.001; 131 out[i].dM_PS = in[i].dM * 0.001; 132 out[i].Xm = in[i].Xm; 152 out[i].M = in[i].M * 0.001; 153 out[i].dM = in[i].dM * 0.001; 154 out[i].Xm = in[i].Xm; 155 out[i].Ncode = 0; 156 out[i].Nused = 0; 133 157 } 134 158 return (out); … … 144 168 145 169 for (i = 0; i < Nvalues; i++) { 146 out[i].M = in[i].M _PS* 1000.0;147 out[i].dM = in[i].dM _PS* 1000.0;170 out[i].M = in[i].M * 1000.0; 171 out[i].dM = in[i].dM * 1000.0; 148 172 out[i].Xm = in[i].Xm; 149 173 } … … 166 190 out[i].tzero = in[i].tzero; 167 191 out[i].nstar = in[i].nstar; 168 out[i].secz _PS= in[i].secz * 0.001;192 out[i].secz = in[i].secz * 0.001; 169 193 out[i].NX = in[i].NX; 170 194 out[i].NY = in[i].NY; 171 out[i].apmifit _PS= in[i].apmifit * 0.001;172 out[i].dapmifit _PS= in[i].dapmifit * 0.001;173 out[i].Mcal _PS= in[i].Mcal * 0.001;174 out[i].dMcal _PS= in[i].dMcal * 0.001;195 out[i].apmifit = in[i].apmifit * 0.001; 196 out[i].dapmifit = in[i].dapmifit * 0.001; 197 out[i].Mcal = in[i].Mcal * 0.001; 198 out[i].dMcal = in[i].dMcal * 0.001; 175 199 out[i].Xm = in[i].Xm; 176 out[i]. source = in[i].source;200 out[i].photcode = in[i].source; 177 201 out[i].exptime = in[i].exptime; 178 202 out[i].detection_limit = in[i].detection_limit; … … 199 223 out[i].Mxyyy = in[i].Mxyyy; 200 224 out[i].Myyyy = in[i].Myyyy; 225 226 /* XXX add these later */ 227 out[i].imageID_hi = 0; 228 out[i].imageID_lo = 0; 201 229 } 202 230 return (out); … … 218 246 out[i].tzero = in[i].tzero; 219 247 out[i].nstar = in[i].nstar; 220 out[i].secz = in[i].secz _PS* 1000.0;248 out[i].secz = in[i].secz * 1000.0; 221 249 out[i].NX = in[i].NX; 222 250 out[i].NY = in[i].NY; 223 out[i].apmifit = in[i].apmifit _PS* 1000.0;224 out[i].dapmifit = in[i].dapmifit _PS* 1000.0;225 out[i].Mcal = in[i].Mcal _PS* 1000.0;226 out[i].dMcal = in[i].dMcal _PS* 1000.0;251 out[i].apmifit = in[i].apmifit * 1000.0; 252 out[i].dapmifit = in[i].dapmifit * 1000.0; 253 out[i].Mcal = in[i].Mcal * 1000.0; 254 out[i].dMcal = in[i].dMcal * 1000.0; 227 255 out[i].Xm = in[i].Xm; 228 out[i].source = in[i]. source;256 out[i].source = in[i].photcode; 229 257 out[i].exptime = in[i].exptime; 230 258 out[i].detection_limit = in[i].detection_limit; -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_convert_loneos.c
r6683 r12008 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 out[i].dR _PS= in[i].dR * 0.01;13 out[i].dD _PS= in[i].dD * 0.01;14 out[i].M _PS= in[i].M * 0.001;15 out[i].dM _PS= in[i].dM * 0.001;16 out[i].Mcal _PS= in[i].Mcal * 0.001;12 out[i].dR = in[i].dR * 0.01; 13 out[i].dD = in[i].dD * 0.01; 14 out[i].M = in[i].M * 0.001; 15 out[i].dM = in[i].dM * 0.001; 16 out[i].Mcal = in[i].Mcal * 0.001; 17 17 out[i].dophot = in[i].dophot; 18 out[i]. source = in[i].source;18 out[i].photcode = in[i].source; 19 19 out[i].t = in[i].t; 20 20 … … 24 24 25 25 /* these values don't exist in the Loneos format */ 26 out[i].Mgal _PS= in[i].M;27 out[i].dt _PS= 0;28 out[i].airmass _PS= 0;26 out[i].Mgal = in[i].M; 27 out[i].dt = 0; 28 out[i].airmass = 0; 29 29 out[i].FWx = 0; 30 30 out[i].FWy = 0; 31 31 out[i].theta = 0; 32 out[i].stargal = 0; 33 out[i].Sky = 0; 34 out[i].dSky = 0; 35 out[i].qPSF = 0; 36 37 /* these can be determined if needed / desired */ 38 out[i].Xccd = 0; 39 out[i].Yccd = 0; 40 out[i].dXccd = 0; 41 out[i].dYccd = 0; 42 43 /* XXX add these later */ 44 out[i].detID_hi = 0; 45 out[i].detID_lo = 0; 46 out[i].imageID_hi = 0; 47 out[i].imageID_lo = 0; 32 48 } 33 49 return (out); … … 43 59 44 60 for (i = 0; i < Nvalues; i++) { 45 out[i].dR = in[i].dR _PS* 100.0;46 out[i].dD = in[i].dD _PS* 100.0;47 out[i].M = in[i].M _PS* 1000.0;48 out[i].dM = in[i].dM _PS* 1000.0;49 out[i].Mcal = in[i].Mcal _PS* 1000.0;61 out[i].dR = in[i].dR * 100.0; 62 out[i].dD = in[i].dD * 100.0; 63 out[i].M = in[i].M * 1000.0; 64 out[i].dM = in[i].dM * 1000.0; 65 out[i].Mcal = in[i].Mcal * 1000.0; 50 66 out[i].dophot = in[i].dophot; 51 out[i].source = in[i]. source;67 out[i].source = in[i].photcode; 52 68 out[i].t = in[i].t; 53 69 … … 89 105 out[i].dM = 0xffff; 90 106 out[i].Xg = 0xffff; 107 108 /* XXX add these later */ 109 out[i].objID_hi = 0; 110 out[i].objID_lo = 0; 91 111 } 92 112 return (out); … … 125 145 126 146 for (i = 0; i < Nvalues; i++) { 127 out[i].M_PS = in[i].M*0.001; 128 out[i].dM_PS = 0xffff; 147 out[i].M = in[i].M*0.001; 129 148 out[i].Xm = in[i].Xm; 149 out[i].dM = 0xffff; 150 out[i].Ncode = 0; 151 out[i].Nused = 0; 130 152 } 131 153 return (out); … … 141 163 142 164 for (i = 0; i < Nvalues; i++) { 143 out[i].M = in[i].M _PS*1000.0;165 out[i].M = in[i].M*1000.0; 144 166 out[i].Xm = in[i].Xm; 145 167 } … … 162 184 out[i].tzero = in[i].tzero; 163 185 out[i].nstar = in[i].nstar; 164 out[i].secz _PS= in[i].secz * 0.001;186 out[i].secz = in[i].secz * 0.001; 165 187 out[i].NX = in[i].NX; 166 188 out[i].NY = in[i].NY; 167 out[i].apmifit _PS= in[i].apmifit * 0.001;168 out[i].dapmifit _PS= in[i].dapmifit * 0.001;169 out[i].Mcal _PS= in[i].Mcal * 0.001;170 out[i].dMcal _PS= in[i].dMcal * 0.001;189 out[i].apmifit = in[i].apmifit * 0.001; 190 out[i].dapmifit = in[i].dapmifit * 0.001; 191 out[i].Mcal = in[i].Mcal * 0.001; 192 out[i].dMcal = in[i].dMcal * 0.001; 171 193 out[i].Xm = in[i].Xm; 172 out[i]. source = in[i].source;194 out[i].photcode = in[i].source; 173 195 out[i].exptime = in[i].exptime; 174 196 out[i].detection_limit = in[i].detection_limit; … … 195 217 out[i].Mxyyy = in[i].Mxyyy; 196 218 out[i].Myyyy = in[i].Myyyy; 219 220 /* XXX add these later */ 221 out[i].imageID_hi = 0; 222 out[i].imageID_lo = 0; 197 223 } 198 224 return (out); … … 214 240 out[i].tzero = in[i].tzero; 215 241 out[i].nstar = in[i].nstar; 216 out[i].secz = in[i].secz _PS* 1000.0;242 out[i].secz = in[i].secz * 1000.0; 217 243 out[i].NX = in[i].NX; 218 244 out[i].NY = in[i].NY; 219 out[i].apmifit = in[i].apmifit _PS* 1000.0;220 out[i].dapmifit = in[i].dapmifit _PS* 1000.0;221 out[i].Mcal = in[i].Mcal _PS* 1000.0;222 out[i].dMcal = in[i].dMcal _PS* 1000.0;245 out[i].apmifit = in[i].apmifit * 1000.0; 246 out[i].dapmifit = in[i].dapmifit * 1000.0; 247 out[i].Mcal = in[i].Mcal * 1000.0; 248 out[i].dMcal = in[i].dMcal * 1000.0; 223 249 out[i].Xm = in[i].Xm; 224 out[i].source = in[i]. source;250 out[i].source = in[i].photcode; 225 251 out[i].exptime = in[i].exptime; 226 252 out[i].detection_limit = in[i].detection_limit; -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_convert_panstarrs.c
r6683 r12008 1 1 # include <dvo.h> 2 2 3 /*** note that these structures are identical***/3 /*** XXX is this format actually used by anyone?? ***/ 4 4 5 5 /* convert panstarrs-format measures to internal measures */ … … 12 12 13 13 for (i = 0; i < Nvalues; i++) { 14 out[i].dR _PS= in[i].dR;15 out[i].dD _PS= in[i].dD;16 out[i].M _PS= in[i].M;17 out[i].dM _PS= in[i].dM;18 out[i].Mcal _PS= in[i].Mcal;19 out[i].Mgal _PS= in[i].Mgal;20 out[i].airmass _PS= in[i].airmass;21 out[i].dt _PS= in[i].dt;14 out[i].dR = in[i].dR; 15 out[i].dD = in[i].dD; 16 out[i].M = in[i].M; 17 out[i].dM = in[i].dM; 18 out[i].Mcal = in[i].Mcal; 19 out[i].Mgal = in[i].Mgal; 20 out[i].airmass = in[i].airmass; 21 out[i].dt = in[i].dt; 22 22 out[i].FWx = in[i].FWx; 23 23 out[i].FWy = in[i].FWy; 24 24 out[i].theta = in[i].theta; 25 25 out[i].dophot = in[i].dophot; 26 out[i]. source= in[i].source;26 out[i].photcode = in[i].source; 27 27 out[i].t = in[i].t; 28 28 out[i].averef = in[i].averef; 29 29 out[i].flags = in[i].flags; 30 31 /* these can be determined if needed / desired */ 32 out[i].Xccd = 0; 33 out[i].Yccd = 0; 34 out[i].dXccd = 0; 35 out[i].dYccd = 0; 36 37 /* these do not have a corresponding value */ 38 out[i].stargal = 0; 39 out[i].Sky = 0; 40 out[i].dSky = 0; 41 out[i].qPSF = 0; 42 43 /* XXX add these later */ 44 out[i].detID_hi = 0; 45 out[i].detID_lo = 0; 46 out[i].imageID_hi = 0; 47 out[i].imageID_lo = 0; 30 48 } 31 49 return (out); … … 41 59 42 60 for (i = 0; i < Nvalues; i++) { 43 out[i].dR = in[i].dR _PS;44 out[i].dD = in[i].dD _PS;45 out[i].M = in[i].M _PS;46 out[i].dM = in[i].dM _PS;47 out[i].Mcal = in[i].Mcal _PS;48 out[i].Mgal = in[i].Mgal _PS;49 out[i].airmass = in[i].airmass _PS;50 out[i].dt = in[i].dt _PS;61 out[i].dR = in[i].dR; 62 out[i].dD = in[i].dD; 63 out[i].M = in[i].M; 64 out[i].dM = in[i].dM; 65 out[i].Mcal = in[i].Mcal; 66 out[i].Mgal = in[i].Mgal; 67 out[i].airmass = in[i].airmass; 68 out[i].dt = in[i].dt; 51 69 out[i].FWx = in[i].FWx; 52 70 out[i].FWy = in[i].FWy; 53 71 out[i].theta = in[i].theta; 54 72 out[i].dophot = in[i].dophot; 55 out[i].source = in[i]. source;73 out[i].source = in[i].photcode; 56 74 out[i].t = in[i].t; 57 75 out[i].averef = in[i].averef; … … 92 110 out[i].P = 0; 93 111 out[i].dP = 0; 112 113 /* XXX add these later */ 114 out[i].objID_hi = 0; 115 out[i].objID_lo = 0; 94 116 } 95 117 return (out); … … 130 152 131 153 for (i = 0; i < Nvalues; i++) { 132 out[i].M_PS = in[i].M; 133 out[i].dM_PS = in[i].dM; 134 out[i].Xm = in[i].Xm; 135 } 154 out[i].M = in[i].M; 155 out[i].dM = in[i].dM; 156 out[i].Xm = in[i].Xm; 157 out[i].Ncode = 0; 158 out[i].Nused = 0; 159 } 136 160 return (out); 137 161 } … … 146 170 147 171 for (i = 0; i < Nvalues; i++) { 148 out[i].M = in[i].M _PS;149 out[i].dM = in[i].dM _PS;172 out[i].M = in[i].M; 173 out[i].dM = in[i].dM; 150 174 out[i].Xm = in[i].Xm; 151 175 } … … 168 192 out[i].tzero = in[i].tzero; 169 193 out[i].nstar = in[i].nstar; 170 out[i].secz _PS= in[i].secz;194 out[i].secz = in[i].secz; 171 195 out[i].NX = in[i].NX; 172 196 out[i].NY = in[i].NY; 173 out[i].apmifit _PS= in[i].apmifit;174 out[i].dapmifit _PS= in[i].dapmifit;175 out[i].Mcal _PS= in[i].Mcal;176 out[i].dMcal _PS= in[i].dMcal;197 out[i].apmifit = in[i].apmifit; 198 out[i].dapmifit = in[i].dapmifit; 199 out[i].Mcal = in[i].Mcal; 200 out[i].dMcal = in[i].dMcal; 177 201 out[i].Xm = in[i].Xm; 178 out[i]. source = in[i].source;202 out[i].photcode = in[i].source; 179 203 out[i].exptime = in[i].exptime; 180 204 out[i].detection_limit = in[i].detection_limit; … … 201 225 out[i].Mxyyy = in[i].Mxyyy; 202 226 out[i].Myyyy = in[i].Myyyy; 227 228 /* XXX add these later */ 229 out[i].imageID_hi = 0; 230 out[i].imageID_lo = 0; 203 231 } 204 232 return (out); … … 220 248 out[i].tzero = in[i].tzero; 221 249 out[i].nstar = in[i].nstar; 222 out[i].secz = in[i].secz _PS;250 out[i].secz = in[i].secz; 223 251 out[i].NX = in[i].NX; 224 252 out[i].NY = in[i].NY; 225 out[i].apmifit = in[i].apmifit _PS;226 out[i].dapmifit = in[i].dapmifit _PS;227 out[i].Mcal = in[i].Mcal _PS;228 out[i].dMcal = in[i].dMcal _PS;253 out[i].apmifit = in[i].apmifit; 254 out[i].dapmifit = in[i].dapmifit; 255 out[i].Mcal = in[i].Mcal; 256 out[i].dMcal = in[i].dMcal; 229 257 out[i].Xm = in[i].Xm; 230 out[i].source = in[i]. source;258 out[i].source = in[i].photcode; 231 259 out[i].exptime = in[i].exptime; 232 260 out[i].detection_limit = in[i].detection_limit; -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/dvo_convert_pmtest.c
r6683 r12008 1 1 # include <dvo.h> 2 3 /* convert elixir-format measures to internal measures */ 4 Measure *MeasureElixirToInternal (MeasureElixir *in, int Nvalues) { 5 6 int i; 7 Measure *out; 8 9 ALLOCATE (out, Measure, Nvalues); 10 11 for (i = 0; i < Nvalues; i++) { 12 out[i].dR = in[i].dR; 13 out[i].dD = in[i].dD; 14 out[i].M = in[i].M; 15 out[i].dM = in[i].dM; 16 out[i].dt = in[i].dt; 17 out[i].Mcal = in[i].Mcal; 18 out[i].Mgal = in[i].Mgal; 19 out[i].airmass = in[i].airmass; 20 out[i].FWx = in[i].FWx; 21 out[i].FWy = in[i].FWy; 22 out[i].theta = in[i].theta; 23 out[i].dophot = in[i].dophot; 24 out[i].photcode = in[i].source; 25 out[i].t = in[i].t; 26 out[i].averef = in[i].averef; 27 out[i].flags = in[i].flags; 28 29 out[i].Xccd = in[i].Xccd; 30 out[i].Yccd = in[i].Yccd; 31 out[i].dXccd = in[i].dXccd; 32 out[i].dYccd = in[i].dYccd; 33 34 out[i].stargal = in[i].stargal; 35 out[i].Sky = in[i].Sky; 36 out[i].dSky = in[i].dSky; 37 out[i].qPSF = in[i].qPSF; 38 39 out[i].detID_hi = in[i].detID_hi; 40 out[i].detID_lo = in[i].detID_lo; 41 out[i].imageID_hi = in[i].imageID_hi; 42 out[i].imageID_lo = in[i].imageID_lo; 43 } 44 return (out); 45 } 46 47 /* convert internal measures to elixir-format measures */ 48 MeasureElixir *MeasureInternalToElixir (Measure *in, int Nvalues) { 49 50 int i; 51 MeasureElixir *out; 52 53 ALLOCATE (out, MeasureElixir, Nvalues); 54 55 for (i = 0; i < Nvalues; i++) { 56 out[i].dR = in[i].dR; 57 out[i].dD = in[i].dD; 58 out[i].M = in[i].M; 59 out[i].dM = in[i].dM; 60 out[i].dt = in[i].dt; 61 out[i].Mcal = in[i].Mcal; 62 out[i].Mgal = in[i].Mgal; 63 out[i].airmass = in[i].airmass; 64 out[i].FWx = in[i].FWx; 65 out[i].FWy = in[i].FWy; 66 out[i].theta = in[i].theta; 67 out[i].dophot = in[i].dophot; 68 out[i].photcode = in[i].source; 69 out[i].t = in[i].t; 70 out[i].averef = in[i].averef; 71 out[i].flags = in[i].flags; 72 73 out[i].Xccd = in[i].Xccd; 74 out[i].Yccd = in[i].Yccd; 75 out[i].dXccd = in[i].dXccd; 76 out[i].dYccd = in[i].dYccd; 77 78 out[i].stargal = in[i].stargal; 79 out[i].Sky = in[i].Sky; 80 out[i].dSky = in[i].dSky; 81 out[i].qPSF = in[i].qPSF; 82 83 out[i].detID_hi = in[i].detID_hi; 84 out[i].detID_lo = in[i].detID_lo; 85 out[i].imageID_hi = in[i].imageID_hi; 86 out[i].imageID_lo = in[i].imageID_lo; 87 } 88 return (out); 89 } 2 90 3 91 /* convert panstarrs-format averages to internal averages */ -
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/photfits.c
r5241 r12008 61 61 switch (image[0].order) { 62 62 case 0: 63 c[0] = image[0].Mcal _PS;64 return; 65 case 1: 66 c[0] = image[0].Mcal _PS;63 c[0] = image[0].Mcal; 64 return; 65 case 1: 66 c[0] = image[0].Mcal; 67 67 c[1] = getMi (image[0].Mx); 68 68 c[2] = getMi (image[0].My); 69 69 return; 70 70 case 2: 71 c[0] = image[0].Mcal _PS;71 c[0] = image[0].Mcal; 72 72 c[1] = getMi (image[0].Mx); 73 73 c[2] = getMi (image[0].Mxx); … … 77 77 return; 78 78 case 3: 79 c[0] = image[0].Mcal _PS;79 c[0] = image[0].Mcal; 80 80 c[1] = getMi (image[0].Mx); 81 81 c[2] = getMi (image[0].Mxx); … … 89 89 return; 90 90 case 4: 91 c[0] = image[0].Mcal _PS;91 c[0] = image[0].Mcal; 92 92 c[1] = getMi (image[0].Mx); 93 93 c[2] = getMi (image[0].Mxx); … … 117 117 switch (order) { 118 118 case 0: 119 image[0].Mcal _PS= c[0];120 return; 121 case 1: 122 image[0].Mcal _PS= c[0];119 image[0].Mcal = c[0]; 120 return; 121 case 1: 122 image[0].Mcal = c[0]; 123 123 image[0].Mx = putMi(c[1]); 124 124 image[0].My = putMi(c[2]); 125 125 return; 126 126 case 2: 127 image[0].Mcal _PS= c[0];127 image[0].Mcal = c[0]; 128 128 image[0].Mx = putMi(c[1]); 129 129 image[0].Mxx = putMi(c[2]); … … 133 133 return; 134 134 case 3: 135 image[0].Mcal _PS= c[0];135 image[0].Mcal = c[0]; 136 136 image[0].Mx = putMi(c[1]); 137 137 image[0].Mxx = putMi(c[2]); … … 145 145 return; 146 146 case 4: 147 image[0].Mcal _PS= c[0];147 image[0].Mcal = c[0]; 148 148 image[0].Mx = putMi(c[1]); 149 149 image[0].Mxx = putMi(c[2]); … … 162 162 return; 163 163 default: 164 image[0].Mcal _PS= 0.0;164 image[0].Mcal = 0.0; 165 165 image[0].order = 0; 166 166 return; -
branches/dvo-mods-2007-02/Ohana/src/markstar/src/match_images.c
r2489 r12008 24 24 start[j] = image[j].tzero - MAX(0.05*image[j].trate*image[j].NY, 1); 25 25 stop[j] = image[j].tzero + MAX(1.05*image[j].trate*image[j].NY, 1); 26 source[j] = image[j]. source;26 source[j] = image[j].photcode; 27 27 } 28 28 … … 36 36 if ((catalog[0].measure[j].t >= start[k]) && 37 37 (catalog[0].measure[j].t <= stop[k]) && 38 (catalog[0].measure[j]. source == source[k])) {38 (catalog[0].measure[j].photcode == source[k])) { 39 39 catalog[0].image[j] = k; 40 40 found = TRUE; … … 43 43 if (!found) { 44 44 fprintf (stderr, "ERROR: can't find source image for this measurement: %d %d)\n", 45 catalog[0].measure[j].t, catalog[0].measure[j]. source);45 catalog[0].measure[j].t, catalog[0].measure[j].photcode); 46 46 exit (0); 47 47 } -
branches/dvo-mods-2007-02/Ohana/src/mosastro/src/getptolemy.c
r8515 r12008 50 50 stars[k].R = catalog.average[j].R; 51 51 stars[k].D = catalog.average[j].D; 52 stars[k].M = catalog.measure[catalog.average[j].offset].M _PS;52 stars[k].M = catalog.measure[catalog.average[j].offset].M; 53 53 } 54 54 dvo_catalog_free (&catalog); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/calextract.c
r8455 r12008 83 83 dM2 = NO_MAG; 84 84 for (j = 0; j < catalog.average[i].Nm; j++) { 85 if (catalog.measure[m+j]. source != code[1][0].code) continue;85 if (catalog.measure[m+j].photcode != code[1][0].code) continue; 86 86 M2 = PhotCat (&catalog.measure[m+j]); 87 dM2 = catalog.measure[m+j].dM _PS;87 dM2 = catalog.measure[m+j].dM; 88 88 } 89 89 if (M2 == NO_MAG) continue; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/calmextract.c
r8455 r12008 96 96 dM2 = NO_MAG; 97 97 for (j = 0; j < catalog.average[i].Nm; j++) { 98 if (catalog.measure[m+j]. source != code[1][0].code) continue;98 if (catalog.measure[m+j].photcode != code[1][0].code) continue; 99 99 M2 = PhotCat (&catalog.measure[m+j]); 100 dM2 = catalog.measure[m+j].dM _PS;100 dM2 = catalog.measure[m+j].dM; 101 101 } 102 102 if (M2 == NO_MAG) continue; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/catalog.c
r8427 r12008 197 197 dparse (&D, Ad, tbuffer); 198 198 dparse (&M, Am, tbuffer); 199 catalog.average[nstar].R _PS= R;200 catalog.average[nstar].D _PS= D;201 catalog.average[nstar].M _PS= M;199 catalog.average[nstar].R = R; 200 catalog.average[nstar].D = D; 201 catalog.average[nstar].M = M; 202 202 nstar++; 203 203 if (nstar == NSTARS - 1) { … … 239 239 dparse (&D, Ad, &tbuffer[i*Bytes_Star]); 240 240 dparse (&M, Am, &tbuffer[i*Bytes_Star]); 241 catalog.average[nstar].R _PS= R;242 catalog.average[nstar].D _PS= D;243 catalog.average[nstar].M _PS= M;241 catalog.average[nstar].R = R; 242 catalog.average[nstar].D = D; 243 catalog.average[nstar].M = M; 244 244 nstar++; 245 245 if (nstar == NSTARS - 1) { … … 289 289 dparse (&D, 2, &tbuffer[i*BYTES_STAR]); 290 290 dparse (&M, 3, &tbuffer[i*BYTES_STAR]); 291 catalog.average[nstar].R _PS= R;292 catalog.average[nstar].D _PS= D;293 catalog.average[nstar].M _PS= M;291 catalog.average[nstar].R = R; 292 catalog.average[nstar].D = D; 293 catalog.average[nstar].M = M; 294 294 nstar++; 295 295 if (nstar == NSTARS - 1) { … … 342 342 if (IDclip && (catalog.average[i].code != IDchoice)) 343 343 continue; 344 Zvec.elements[N] = MIN (1.0, MAX (0.01, (catalog.average[i].M _PS- Mz) / Mr));344 Zvec.elements[N] = MIN (1.0, MAX (0.01, (catalog.average[i].M - Mz) / Mr)); 345 345 if (LimExclude && (Zvec.elements[N] > 0.99)) continue; 346 346 if (Zvec.elements[N] < 0.011) continue; 347 while (catalog.average[i].R _PS < Rmin) catalog.average[i].R_PS+= 360.0;348 while (catalog.average[i].R _PS > Rmax) catalog.average[i].R_PS-= 360.0;349 if (fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R _PS, catalog.average[i].D_PS, &graphmode.coords)) N ++;347 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 348 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; 349 if (fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R, catalog.average[i].D, &graphmode.coords)) N ++; 350 350 } 351 351 break; 352 352 case (NUMSCALE): 353 353 for (N = i = 0; i < catalog.Naverage; i++) { 354 if (clip && ((catalog.average[i].M _PS > Mz) || (catalog.average[i].M_PS< Mr+Mz)))354 if (clip && ((catalog.average[i].M > Mz) || (catalog.average[i].M < Mr+Mz))) 355 355 continue; 356 356 if (IDclip && (catalog.average[i].code != IDchoice)) … … 360 360 if (Zvec.elements[N] == 0.01) 361 361 continue; 362 while (catalog.average[i].R _PS < Rmin) catalog.average[i].R_PS+= 360.0;363 while (catalog.average[i].R _PS > Rmax) catalog.average[i].R_PS-= 360.0;364 if (fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R _PS, catalog.average[i].D_PS, &graphmode.coords)) N++;362 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 363 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; 364 if (fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R, catalog.average[i].D, &graphmode.coords)) N++; 365 365 } 366 366 break; 367 367 case (MISSCALE): 368 368 for (N = i = 0; i < catalog.Naverage; i++) { 369 if (clip && ((catalog.average[i].M _PS > Mz) || (catalog.average[i].M_PS< Mr+Mz)))369 if (clip && ((catalog.average[i].M > Mz) || (catalog.average[i].M < Mr+Mz))) 370 370 continue; 371 371 if (IDclip && (catalog.average[i].code != IDchoice)) … … 375 375 if (Zvec.elements[N] == 0.01) 376 376 continue; 377 while (catalog.average[i].R _PS < Rmin) catalog.average[i].R_PS+= 360.0;378 while (catalog.average[i].R _PS > Rmax) catalog.average[i].R_PS-= 360.0;379 if (fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R _PS, catalog.average[i].D_PS, &graphmode.coords)) N++;377 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 378 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; 379 if (fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R, catalog.average[i].D, &graphmode.coords)) N++; 380 380 } 381 381 break; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/cmatch.c
r8427 r12008 51 51 dparse (&D, 2, &tbuffer[i*BYTES_STAR]); 52 52 dparse (&M, 3, &tbuffer[i*BYTES_STAR]); 53 catalog2.average[nstar].R _PS= R;54 catalog2.average[nstar].D _PS= D;53 catalog2.average[nstar].R = R; 54 catalog2.average[nstar].D = D; 55 55 catalog2.average[nstar].M = M * 1000.0; 56 56 nstar++; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/dmt.c
r8455 r12008 82 82 if (catalog.average[i].Nm != 3) continue; 83 83 m = catalog.average[i].offset; 84 M0 = (Ns == -1) ? catalog.average[i].M : catalog.secfilt[i*Nsec+Ns].M _PS;84 M0 = (Ns == -1) ? catalog.average[i].M : catalog.secfilt[i*Nsec+Ns].M; 85 85 M1 = PhotCat (&catalog.measure[m+0]); 86 86 M2 = PhotCat (&catalog.measure[m+1]); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/extract.c
r7917 r12008 341 341 Ncode = 0; 342 342 for (k = 0; k < catalog.average[i].Nm; k++, m++) { 343 if (code[0].code != GetPhotcodeEquivCodebyCode (catalog.measure[m]. source)) continue;343 if (code[0].code != GetPhotcodeEquivCodebyCode (catalog.measure[m].photcode)) continue; 344 344 Ncode ++; 345 345 } … … 357 357 Ncode = 0; 358 358 for (k = 0; k < catalog.average[i].Nm; k++, m++) { 359 if (code[0].code != GetPhotcodeEquivCodebyCode (catalog.measure[m]. source)) continue;360 if (catalog.measure[m]. source & (ID_MEAS_POOR | ID_MEAS_SKIP)) continue;359 if (code[0].code != GetPhotcodeEquivCodebyCode (catalog.measure[m].photcode)) continue; 360 if (catalog.measure[m].photcode & (ID_MEAS_POOR | ID_MEAS_SKIP)) continue; 361 361 Ncode ++; 362 362 } … … 407 407 vec[0].elements[N] = -32; 408 408 for (k = 0; k < catalog.average[i].Nm; k++) { 409 if (catalog.measure[m+k]. source == N1) {409 if (catalog.measure[m+k].photcode == N1) { 410 410 vec[0].elements[N] = PhotCat (&catalog.measure[m+k]); 411 411 k = catalog.average[i].Nm; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/fitsed.c
r8455 r12008 203 203 m = catalog.average[i].offset; 204 204 for (j = 0; j < catalog.average[i].Nm; j++) { 205 idx = hashcode[catalog.measure[m+j]. source];205 idx = hashcode[catalog.measure[m+j].photcode]; 206 206 if (idx == -1) continue; 207 207 // XXX do something more clever if more than one value exists per photcode 208 sourceValue.mags[idx] = catalog.measure[m+j].M _PS+ vegaToAB[idx];209 sourceError.mags[idx] = catalog.measure[m+j].dM _PS;210 if ((catalog.measure[m+j]. source == USNOred) || (catalog.measure[m+j].source == USNOblu)) {208 sourceValue.mags[idx] = catalog.measure[m+j].M + vegaToAB[idx]; 209 sourceError.mags[idx] = catalog.measure[m+j].dM; 210 if ((catalog.measure[m+j].photcode == USNOred) || (catalog.measure[m+j].photcode == USNOblu)) { 211 211 sourceError.mags[idx] = 0.3; 212 212 } -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/gimages.c
r7917 r12008 81 81 if (PhotCodeSelect) { 82 82 if ((code[0].type == PHOT_REF) || (code[0].type == PHOT_DEP)) { 83 if (code[0].code != image[i]. source) continue;83 if (code[0].code != image[i].photcode) continue; 84 84 } 85 85 if ((code[0].type == PHOT_PRI) || (code[0].type == PHOT_SEC)) { 86 if (code[0].code != GetPhotcodeEquivCodebyCode (image[i]. source)) continue;86 if (code[0].code != GetPhotcodeEquivCodebyCode (image[i].photcode)) continue; 87 87 } 88 88 } … … 104 104 if (PixelCoords) { 105 105 gprint (GP_LOG, "%3d %s %6.1f %6.1f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 106 Nfound, image[i].name, X, Y, date, image[i].nstar, image[i]. source, image[i].secz_PS, image[i].Mcal_PS, image[i].dMcal_PS, image[i].exptime, image[i].code);106 Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal, image[i].exptime, image[i].code); 107 107 } else { 108 108 XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 109 109 gprint (GP_LOG, "%3d %s %8.4f %8.4f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 110 Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i]. source, image[i].secz_PS, image[i].Mcal_PS, image[i].dMcal_PS, image[i].exptime, image[i].code);110 Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal, image[i].exptime, image[i].code); 111 111 } 112 112 sprintf (name, "IMAGEx:%d", Nfound); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/gstar.c
r8455 r12008 170 170 date = sec_to_date (catalog.measure[m].t); 171 171 gprint (GP_LOG, "%6.3f %6.3f %5.3f %20s %5.2f %5.2f %2d %3x %3d %-20s\n", 172 Mcat, Mrel, catalog.measure[m].dM _PS,173 date, catalog.measure[m].dR _PS, catalog.measure[m].dD_PS,172 Mcat, Mrel, catalog.measure[m].dM, 173 date, catalog.measure[m].dR, catalog.measure[m].dD, 174 174 catalog.measure[m].dophot, catalog.measure[m].flags, 175 catalog.measure[m]. source, GetPhotcodeNamebyCode (catalog.measure[m].source));175 catalog.measure[m].photcode, GetPhotcodeNamebyCode (catalog.measure[m].photcode)); 176 176 free (date); 177 177 } … … 180 180 vec1[0].elements[N] = Mcat; 181 181 vec2[0].elements[N] = TimeValue (catalog.measure[m].t, TimeReference, TimeFormat); 182 vec3[0].elements[N] = catalog.measure[m].airmass _PS;183 vec4[0].elements[N] = catalog.measure[m]. source;182 vec3[0].elements[N] = catalog.measure[m].airmass; 183 vec4[0].elements[N] = catalog.measure[m].photcode; 184 184 N ++; 185 185 if (N == NPTS - 1) { … … 261 261 print_value (average[0].M, average[0].M); 262 262 } else { 263 print_value (secfilt[seq].M _PS, secfilt[seq].M_PS);263 print_value (secfilt[seq].M, secfilt[seq].M); 264 264 } 265 265 break; … … 269 269 print_value (average[0].dM, average[0].dM); 270 270 } else { 271 print_value (secfilt[seq].dM _PS, secfilt[seq].dM_PS);271 print_value (secfilt[seq].dM, secfilt[seq].dM); 272 272 } 273 273 break; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/imdata.c
r8455 r12008 137 137 if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue; 138 138 n = catalog.measure[i].averef; 139 vec[0].elements[N] = catalog.average[n].R - catalog.measure[i].dR _PS/ 3600.0;139 vec[0].elements[N] = catalog.average[n].R - catalog.measure[i].dR / 3600.0; 140 140 N++; 141 141 CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000); … … 146 146 if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue; 147 147 n = catalog.measure[i].averef; 148 vec[0].elements[N] = catalog.average[n].D - catalog.measure[i].dD _PS/ 3600.0;148 vec[0].elements[N] = catalog.average[n].D - catalog.measure[i].dD / 3600.0; 149 149 N++; 150 150 CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000); … … 154 154 for (i = 0; i < catalog.Nmeasure; i++) { 155 155 if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue; 156 vec[0].elements[N] = catalog.measure[i].M _PS;156 vec[0].elements[N] = catalog.measure[i].M; 157 157 N++; 158 158 CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000); … … 162 162 for (i = 0; i < catalog.Nmeasure; i++) { 163 163 if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue; 164 vec[0].elements[N] = catalog.measure[i].dM _PS;164 vec[0].elements[N] = catalog.measure[i].dM; 165 165 N++; 166 166 CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000); … … 170 170 for (i = 0; i < catalog.Nmeasure; i++) { 171 171 if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue; 172 vec[0].elements[N] = catalog.measure[i].Mcal _PS;172 vec[0].elements[N] = catalog.measure[i].Mcal; 173 173 N++; 174 174 CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000); … … 186 186 for (i = 0; i < catalog.Nmeasure; i++) { 187 187 if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue; 188 vec[0].elements[N] = catalog.measure[i]. source;188 vec[0].elements[N] = catalog.measure[i].photcode; 189 189 N++; 190 190 CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/imextract.c
r7917 r12008 114 114 if (PhotcodeSelect) { 115 115 if (code[0].type == PHOT_DEP) { 116 if (code[0].code != image[j]. source) continue;116 if (code[0].code != image[j].photcode) continue; 117 117 } else { 118 if (code[0].code != GetPhotcodeEquivCodebyCode (image[j]. source)) continue;118 if (code[0].code != GetPhotcodeEquivCodebyCode (image[j].photcode)) continue; 119 119 } 120 120 } … … 139 139 break; 140 140 case (AIRMASS): 141 vec[0].elements[N] = image[j].secz _PS;141 vec[0].elements[N] = image[j].secz; 142 142 break; 143 143 case (MCAL): 144 vec[0].elements[N] = image[j].Mcal _PS;144 vec[0].elements[N] = image[j].Mcal; 145 145 break; 146 146 case (dMCAL): 147 vec[0].elements[N] = image[j].dMcal _PS;147 vec[0].elements[N] = image[j].dMcal; 148 148 break; 149 149 case (PHOTCODE): 150 vec[0].elements[N] = image[j]. source;150 vec[0].elements[N] = image[j].photcode; 151 151 break; 152 152 case (TIME): -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/imlist.c
r10929 r12008 77 77 if (PhotcodeSelect) { 78 78 if (PhotcodeValue[0].type == PHOT_DEP) { 79 if (PhotcodeValue[0].code != image[i]. source) continue;79 if (PhotcodeValue[0].code != image[i].photcode) continue; 80 80 } else { 81 if (PhotcodeValue[0].code != GetPhotcodeEquivCodebyCode (image[i]. source)) continue;81 if (PhotcodeValue[0].code != GetPhotcodeEquivCodebyCode (image[i].photcode)) continue; 82 82 } 83 83 } … … 90 90 } 91 91 gprint (GP_LOG, "%3d %s %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n", 92 i, image[i].name, r, d, t, image[i].nstar, image[i]. source, image[i].secz_PS, image[i].Mcal_PS, image[i].dMcal_PS);92 i, image[i].name, r, d, t, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal); 93 93 } 94 94 -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/imphot.c
r9362 r12008 65 65 switch (image[i].order) { 66 66 case 0: 67 gprint (GP_ERR, "%s: %d - %f\n", image[i].name, image[i].order, image[i].Mcal _PS);67 gprint (GP_ERR, "%s: %d - %f\n", image[i].name, image[i].order, image[i].Mcal); 68 68 break; 69 69 case 1: 70 gprint (GP_ERR, "%s: %d - %f, %d %d\n", image[i].name, image[i].order, image[i].Mcal _PS, image[i].Mx, image[i].My);70 gprint (GP_ERR, "%s: %d - %f, %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My); 71 71 break; 72 72 case 2: 73 gprint (GP_ERR, "%s: %d - %f, %d %d, %d %d %d\n", image[i].name, image[i].order, image[i].Mcal _PS, image[i].Mx, image[i].My, image[i].Mxx, image[i].Mxy, image[i].Myy);73 gprint (GP_ERR, "%s: %d - %f, %d %d, %d %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My, image[i].Mxx, image[i].Mxy, image[i].Myy); 74 74 break; 75 75 case 3: 76 gprint (GP_ERR, "%s: %d - %f, %d %d, %d %d %d, %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal _PS, image[i].Mx, image[i].My,76 gprint (GP_ERR, "%s: %d - %f, %d %d, %d %d %d, %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My, 77 77 image[i].Mxx, image[i].Mxy, image[i].Myy, image[i].Mxxx, image[i].Mxxy, image[i].Mxyy, image[i].Myyy); 78 78 break; 79 79 case 4: 80 gprint (GP_ERR, "%s: %d - %f, %d %d, %d %d %d, %d %d %d %d, %d %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal _PS, image[i].Mx, image[i].My,80 gprint (GP_ERR, "%s: %d - %f, %d %d, %d %d %d, %d %d %d %d, %d %d %d %d %d\n", image[i].name, image[i].order, image[i].Mcal, image[i].Mx, image[i].My, 81 81 image[i].Mxx, image[i].Mxy, image[i].Myy, image[i].Mxxx, image[i].Mxxy, image[i].Mxyy, image[i].Myyy, 82 82 image[i].Mxxxx, image[i].Mxxxy, image[i].Mxxyy, image[i].Mxyyy, image[i].Myyyy); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/imstats.c
r7917 r12008 45 45 gprint (GP_LOG, "seq ra (J2000) dec time (s) Nstars\n"); 46 46 for (i = 0; i < Nimage; i++) { 47 Xvec.elements[i] = image[i].secz _PS;47 Xvec.elements[i] = image[i].secz; 48 48 if (Mcal) 49 Yvec.elements[i] = image[i].Mcal _PS;49 Yvec.elements[i] = image[i].Mcal; 50 50 else 51 Yvec.elements[i] = image[i].dMcal _PS;51 Yvec.elements[i] = image[i].dMcal; 52 52 if (!FindMosaicForImage (image, Nimage, i)) continue; 53 53 XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 54 54 gprint (GP_ERR, "%d %8.4f %8.4f %10d %6d %5.3f %6.3f %6.3f\n", 55 55 i, r, d, image[i].tzero, image[i].nstar, Xvec.elements[i], 56 image[i].Mcal _PS, image[i].dMcal_PS);56 image[i].Mcal, image[i].dMcal); 57 57 } 58 58 if (AutoLimits) SetLimits (&Xvec, &Yvec, &graphmode); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/lcurve.c
r8455 r12008 130 130 m = catalog.average[N1[i]].offset; 131 131 for (j = 0; j < catalog.average[N1[i]].Nm; j++, m++) { 132 if (ErrorBars) dYvec.elements[N] = catalog.measure[m].dM _PS;132 if (ErrorBars) dYvec.elements[N] = catalog.measure[m].dM; 133 133 Xvec.elements[N] = TimeValue (catalog.measure[m].t, TimeReference, TimeFormat); 134 134 Yvec.elements[N] = PhotCat (&catalog.measure[m]); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/lightcurve.c
r8455 r12008 110 110 if (PhotCodeSelect) { 111 111 if ((code[0].type == PHOT_REF) || (code[0].type == PHOT_DEP)) { 112 if (code[0].code != catalog.measure[m]. source) continue;112 if (code[0].code != catalog.measure[m].photcode) continue; 113 113 } 114 114 if ((code[0].type == PHOT_PRI) || (code[0].type == PHOT_SEC)) { 115 if (code[0].code != GetPhotcodeEquivCodebyCode (catalog.measure[m]. source)) continue;115 if (code[0].code != GetPhotcodeEquivCodebyCode (catalog.measure[m].photcode)) continue; 116 116 } 117 117 } 118 118 119 119 tvec[0].elements[N] = TimeValue (catalog.measure[m].t, TimeReference, TimeFormat); 120 dmvec[0].elements[N] = catalog.measure[m].dM _PS;120 dmvec[0].elements[N] = catalog.measure[m].dM; 121 121 if (RELPHOT) { 122 122 mvec[0].elements[N] = PhotCat (&catalog.measure[m]); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/match_image.c
r7680 r12008 30 30 31 31 for (N = N1; N < N2; N++) { 32 if ((image[N].tzero == T) && (image[N]. source == S)) {32 if ((image[N].tzero == T) && (image[N].photcode == S)) { 33 33 return (N); 34 34 } … … 66 66 67 67 for (N = N1; N < N2; N++) { 68 if ((image[subset[N]].tzero == T) && (image[subset[N]]. source == S)) {68 if ((image[subset[N]].tzero == T) && (image[subset[N]].photcode == S)) { 69 69 return (subset[N]); 70 70 } -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/mextract.c
r8455 r12008 66 66 dvo_catalog_unlock (&catalog); 67 67 68 /* XXX need to call dvo_catalog_chipcoords here passing the loaded images */ 69 68 70 for (j = 0; j < catalog.Naverage; j++) { 69 71 M1 = NULL; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/paverage.c
r10793 r12008 116 116 while (average[i].R > Rmax) average[i].R -= 360.0; 117 117 118 mag = (Nsec == -1) ? average[i].M : secfilt[i*Nsecfilt+Nsec].M _PS;118 mag = (Nsec == -1) ? average[i].M : secfilt[i*Nsecfilt+Nsec].M; 119 119 Zvec[Npts] = MIN (1.0, MAX (0.01, (mag - Mz) / Mr)); 120 120 if (LimExclude && (Zvec[Npts] > 0.99)) continue; -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/photometry.c
r8427 r12008 7 7 case PHOT_DEP: \ 8 8 case PHOT_REF: \ 9 if (C[0].code != M. source) continue; \9 if (C[0].code != M.photcode) continue; \ 10 10 break; \ 11 11 case PHOT_PRI: \ 12 12 case PHOT_SEC: \ 13 if (C[0].code != GetPhotcodeEquivCodebyCode (M. source)) continue; \13 if (C[0].code != GetPhotcodeEquivCodebyCode (M.photcode)) continue; \ 14 14 break; \ 15 15 default: \ … … 22 22 if (TimeSelect && (M.t < tzero)) continue; \ 23 23 if (TimeSelect && (M.t > tend)) continue; \ 24 if (ErrSelect && (M.dM _PS> ErrValue)) continue; \24 if (ErrSelect && (M.dM > ErrValue)) continue; \ 25 25 if (TypeSelect && (TypeValue != GetMeasureTypeCode (&M))) continue; \ 26 26 if (iMagSelect && (PhotInst (&M) < iMagMin)) continue; \ … … 34 34 if (MODE == MAG_SYS) MOUT = PhotSys (&MEAS, average, secfilt); \ 35 35 if (MODE == MAG_REL) MOUT = PhotRel (&MEAS, average, secfilt); \ 36 if (MODE == MAG_CAL) MOUT = PhotCal (&MEAS, average, secfilt, measure, GetPhotcodeEquivbyCode (MEAS. source)); \37 if (MODE == MAG_AVE) MOUT = PhotAve (GetPhotcodeEquivbyCode (MEAS. source), average, secfilt); \38 if (MODE == MAG_REF) MOUT = PhotRef (GetPhotcodeEquivbyCode (MEAS. source), average, secfilt, measure); \36 if (MODE == MAG_CAL) MOUT = PhotCal (&MEAS, average, secfilt, measure, GetPhotcodeEquivbyCode (MEAS.photcode)); \ 37 if (MODE == MAG_AVE) MOUT = PhotAve (GetPhotcodeEquivbyCode (MEAS.photcode), average, secfilt); \ 38 if (MODE == MAG_REF) MOUT = PhotRef (GetPhotcodeEquivbyCode (MEAS.photcode), average, secfilt, measure); \ 39 39 if (ApplySelections[SelectionParam]) { \ 40 40 if (MagSelect && (MOUT > MagMax)) continue; \ … … 676 676 value = 0; 677 677 for (i = 0; i < average[0].Nm; i++) { 678 if (code[0].code != GetPhotcodeEquivCodebyCode (measure[i]. source)) continue;678 if (code[0].code != GetPhotcodeEquivCodebyCode (measure[i].photcode)) continue; 679 679 value ++; 680 680 } … … 683 683 value = 0; 684 684 for (i = 0; i < average[0].Nm; i++) { 685 if (code[0].code != GetPhotcodeEquivCodebyCode (measure[i]. source)) continue;685 if (code[0].code != GetPhotcodeEquivCodebyCode (measure[i].photcode)) continue; 686 686 if (measure[i].flags & (ID_MEAS_POOR | ID_MEAS_SKIP)) continue; 687 687 value ++; … … 691 691 value = 0; 692 692 for (i = 0; i < average[0].Nm; i++) { 693 if ((code != NULL) && (code[0].code != GetPhotcodeEquivCodebyCode (measure[i]. source))) continue;694 if (ErrSelect && (measure[i].dM _PS> ErrValue)) continue;693 if ((code != NULL) && (code[0].code != GetPhotcodeEquivCodebyCode (measure[i].photcode))) continue; 694 if (ErrSelect && (measure[i].dM > ErrValue)) continue; 695 695 if (FlagSelect && (measure[i].flags != FlagValue)) continue; 696 696 if (TypeSelect && (TypeValue != GetMeasureTypeCode (&measure[i]))) continue; … … 711 711 Nt = Nc = 0; 712 712 for (k = 0; k < average[0].Nm; k++) { 713 if ((code != NULL) && (code[0].code != GetPhotcodeEquivCodebyCode (measure[k]. source))) continue;713 if ((code != NULL) && (code[0].code != GetPhotcodeEquivCodebyCode (measure[k].photcode))) continue; 714 714 Nc ++; 715 715 if (measure[k].dophot != TypefracType) continue; … … 727 727 Nt[0] = Nt[1] = Nt[2] = 0; 728 728 for (k = 0; k < average[0].Nm; k++) { 729 if (code != GetPhotcodeEquivCodebyCode (measure[k]. source)) continue;729 if (code != GetPhotcodeEquivCodebyCode (measure[k].photcode)) continue; 730 730 N = GetMeasureTypeCode (&measure[k]); 731 731 Nt[N] ++; … … 1128 1128 break; 1129 1129 case MEAS_RA: /* OK */ 1130 value = average[0].R - measure[0].dR _PS/ 3600.0;1130 value = average[0].R - measure[0].dR / 3600.0; 1131 1131 break; 1132 1132 case MEAS_DEC: /* OK */ 1133 value = average[0].D - measure[0].dD _PS/ 3600.0;1133 value = average[0].D - measure[0].dD / 3600.0; 1134 1134 break; 1135 1135 case MEAS_dMAG: /* OK */ 1136 value = measure[0].dM _PS;1136 value = measure[0].dM; 1137 1137 break; 1138 1138 case MEAS_AIRMASS: /* OK */ 1139 value = measure[0].airmass _PS;1139 value = measure[0].airmass; 1140 1140 break; 1141 1141 case MEAS_EXPTIME: /* OK */ 1142 value = pow (10.0, measure[0].dt _PS* 0.4);1142 value = pow (10.0, measure[0].dt * 0.4); 1143 1143 break; 1144 1144 case MEAS_PHOTCODE: /* OK */ 1145 value = measure[0]. source;1145 value = measure[0].photcode; 1146 1146 break; 1147 1147 case MEAS_TIME: /* OK */ … … 1149 1149 break; 1150 1150 case MEAS_dR: /* OK */ 1151 value = measure[0].dR _PS;1151 value = measure[0].dR; 1152 1152 break; 1153 1153 case MEAS_dD: /* OK */ 1154 value = measure[0].dD _PS;1154 value = measure[0].dD; 1155 1155 break; 1156 1156 case MEAS_FWHM: /* OK */ … … 1164 1164 break; 1165 1165 case MEAS_XCCD: /* OK */ 1166 ra = average[0].R - measure[0].dR_PS / 3600.0; 1167 dec = average[0].D - measure[0].dD_PS / 3600.0; 1168 image = MatchImage (measure[0].t, measure[0].source); 1166 /* I need to perform this conversion for ELIXIR and LONEOS formats on load */ 1167 # if 0 1168 value = measure[0].Xccd; 1169 # else 1170 ra = average[0].R - measure[0].dR / 3600.0; 1171 dec = average[0].D - measure[0].dD / 3600.0; 1172 image = MatchImage (measure[0].t, measure[0].photcode); 1169 1173 if (image == NULL) break; 1170 1174 RD_to_XY (&x, &y, ra, dec, &image[0].coords); 1171 1175 value = x; 1176 # endif 1172 1177 break; 1173 1178 case MEAS_YCCD: /* OK */ 1174 ra = average[0].R - measure[0].dR_PS / 3600.0; 1175 dec = average[0].D - measure[0].dD_PS / 3600.0; 1176 image = MatchImage (measure[0].t, measure[0].source); 1179 /* I need to perform this conversion for ELIXIR and LONEOS formats on load */ 1180 # if 0 1181 value = measure[0].Yccd; 1182 # else 1183 ra = average[0].R - measure[0].dR / 3600.0; 1184 dec = average[0].D - measure[0].dD / 3600.0; 1185 image = MatchImage (measure[0].t, measure[0].photcode); 1177 1186 if (image == NULL) break; 1178 1187 RD_to_XY (&x, &y, ra, dec, &image[0].coords); 1179 1188 value = y; 1189 # endif 1180 1190 break; 1181 1191 case MEAS_XMOSAIC: /* OK */ 1182 ra = average[0].R - measure[0].dR _PS/ 3600.0;1183 dec = average[0].D - measure[0].dD _PS/ 3600.0;1184 mosaic = MatchMosaic (measure[0].t, measure[0]. source);1192 ra = average[0].R - measure[0].dR / 3600.0; 1193 dec = average[0].D - measure[0].dD / 3600.0; 1194 mosaic = MatchMosaic (measure[0].t, measure[0].photcode); 1185 1195 if (mosaic == NULL) break; 1186 1196 RD_to_XY (&x, &y, ra, dec, mosaic); … … 1188 1198 break; 1189 1199 case MEAS_YMOSAIC: /* OK */ 1190 ra = average[0].R - measure[0].dR _PS/ 3600.0;1191 dec = average[0].D - measure[0].dD _PS/ 3600.0;1192 mosaic = MatchMosaic (measure[0].t, measure[0]. source);1200 ra = average[0].R - measure[0].dR / 3600.0; 1201 dec = average[0].D - measure[0].dD / 3600.0; 1202 mosaic = MatchMosaic (measure[0].t, measure[0].photcode); 1193 1203 if (mosaic == NULL) break; 1194 1204 RD_to_XY (&x, &y, ra, dec, mosaic); -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/pmeasure.c
r10794 r12008 116 116 if (!(flags & FlagChoice)) continue; 117 117 } 118 if ((PhotcodeClip != -1) && (catalog.measure[m+k]. source != PhotcodeClip)) continue;118 if ((PhotcodeClip != -1) && (catalog.measure[m+k].photcode != PhotcodeClip)) continue; 119 119 mag = PhotCat (&catalog.measure[m+k]); 120 120 Zvec[Npts] = MIN (1.0, MAX (0.01, (mag - Mz) / Mr)); 121 121 if (LimExclude && (Zvec[Npts] > 0.99)) continue; 122 122 if (Zvec[Npts] < 0.011) continue; 123 R = catalog.average[i].R - catalog.measure[m+k].dR _PS/3600.0;124 D = catalog.average[i].D - catalog.measure[m+k].dD _PS/3600.0;123 R = catalog.average[i].R - catalog.measure[m+k].dR/3600.0; 124 D = catalog.average[i].D - catalog.measure[m+k].dD/3600.0; 125 125 // XXX drop this check 126 126 if ((R < Rmin) || (R > Rmax) || (D < -90.0) || (D > 90.0)) { 127 127 char *date; 128 128 date = sec_to_date (catalog.measure[m+k].t); 129 gprint (GP_LOG, "out: %f, %f : %s : (%f, %f) + (%f, %f)\n", R, D, date, catalog.average[i].R, catalog.average[i].D, catalog.measure[m+k].dR _PS/3600.0, catalog.measure[m+k].dD_PS/3600.0);129 gprint (GP_LOG, "out: %f, %f : %s : (%f, %f) + (%f, %f)\n", R, D, date, catalog.average[i].R, catalog.average[i].D, catalog.measure[m+k].dR/3600.0, catalog.measure[m+k].dD/3600.0); 130 130 free (date); 131 131 } -
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/subpix.c
r8455 r12008 143 143 RD_to_XY (&X, &Y, Ra, Dec, &image[I].coords); 144 144 t = TimeValue (measure[j].t, TimeReference, TimeFormat); 145 gprint (GP_LOG, "%f %6.3f %7.2f %7.2f %5.3f\n", t, Mabs, X, Y, image[I].secz _PS);145 gprint (GP_LOG, "%f %6.3f %7.2f %7.2f %5.3f\n", t, Mabs, X, Y, image[I].secz); 146 146 } 147 147 } -
branches/dvo-mods-2007-02/Ohana/src/photdbc/src/find_images.c
r7080 r12008 38 38 # if (0) 39 39 /* select images by photcode */ 40 ecode = GetPhotcodeEquivCodebyCode (timage[i]. source);40 ecode = GetPhotcodeEquivCodebyCode (timage[i].photcode); 41 41 if (ecode != photcode[0].code) continue; 42 42 -
branches/dvo-mods-2007-02/Ohana/src/photdbc/src/flag_measures.c
r7080 r12008 28 28 n = catalog[0].measure[i].averef; 29 29 Time = catalog[0].measure[i].t; 30 Photcode = catalog[0].measure[i]. source;30 Photcode = catalog[0].measure[i].photcode; 31 31 found = FALSE; 32 32 for (k = 0; !found && (k < Nimage); k++) { 33 if ((Time == image[k].tzero) && (Photcode == image[k]. source)) {33 if ((Time == image[k].tzero) && (Photcode == image[k].photcode)) { 34 34 imagelink[i] = k; 35 35 found = TRUE; … … 44 44 for (i = 0; i < catalog[0].Nmeasure; i++) { 45 45 n = catalog[0].measure[i].averef; 46 ra = catalog[0].average[n].R _PS - catalog[0].measure[i].dR_PS/ 3600.0;47 dec = catalog[0].average[n].D _PS - catalog[0].measure[i].dD_PS/ 3600.0;46 ra = catalog[0].average[n].R - catalog[0].measure[i].dR / 3600.0; 47 dec = catalog[0].average[n].D - catalog[0].measure[i].dD / 3600.0; 48 48 k = imagelink[i]; 49 49 RD_to_XY (&x, &y, ra, dec, &image[k].coords); … … 98 98 m = catalog[0].average[i].offset; 99 99 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 100 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;100 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 101 101 if (photcodes.code[Ncode].equiv != Photcode) continue; 102 102 if (photcodes.code[Ncode].type != PHOT_DEP) continue; … … 115 115 m = catalog[0].average[i].offset; 116 116 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 117 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;117 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 118 118 if (photcodes.code[Ncode].equiv != Photcode) continue; 119 119 if (photcodes.code[Ncode].type != PHOT_DEP) continue; … … 130 130 m = catalog[0].average[i].offset; 131 131 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 132 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;132 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 133 133 if (photcodes.code[Ncode].equiv != Photcode) continue; 134 134 if (photcodes.code[Ncode].type != PHOT_DEP) continue; … … 145 145 m = catalog[0].average[i].offset; 146 146 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 147 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;147 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 148 148 if (photcodes.code[Ncode].equiv != Photcode) continue; 149 149 if (photcodes.code[Ncode].type != PHOT_DEP) continue; … … 159 159 m = catalog[0].average[i].offset; 160 160 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 161 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;161 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 162 162 if (photcodes.code[Ncode].equiv != Photcode) continue; 163 163 if (photcodes.code[Ncode].type != PHOT_DEP) continue; … … 172 172 m = catalog[0].average[i].offset; 173 173 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 174 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;174 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 175 175 if (photcodes.code[Ncode].equiv != Photcode) continue; 176 176 if (photcodes.code[Ncode].type != PHOT_DEP) continue; … … 182 182 m = catalog[0].average[i].offset; 183 183 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 184 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;184 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 185 185 if (photcodes.code[Ncode].equiv != Photcode) continue; 186 186 if (photcodes.code[Ncode].type != PHOT_DEP) continue; -
branches/dvo-mods-2007-02/Ohana/src/photdbc/src/get_mags.c
r11903 r12008 44 44 m = catalog[0].average[i].offset; 45 45 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 46 if ((Ncode = photcodes.hashcode[catalog[0].measure[m]. source]) < 0) continue;46 if ((Ncode = photcodes.hashcode[catalog[0].measure[m].photcode]) < 0) continue; 47 47 if (photcodes.code[Ncode].equiv != Photcode) continue; 48 48 if (photcodes.code[Ncode].type != PHOT_DEP) continue; -
branches/dvo-mods-2007-02/Ohana/src/photdbc/src/join_stars.c
r4808 r12008 28 28 Rmid = Dmid = 0; 29 29 for (i = 0; i < Naverage; i++) { 30 Rmid += average[i].R _PS;31 Dmid += average[i].D _PS;30 Rmid += average[i].R; 31 Dmid += average[i].D; 32 32 } 33 33 Rmid /= Naverage; … … 50 50 for (i = 0; i < Naverage; i++) { 51 51 index[i] = i; 52 fRD_to_XY (&X[i], &Y[i], average[i].R _PS, average[i].D_PS, &tcoords);52 fRD_to_XY (&X[i], &Y[i], average[i].R, average[i].D, &tcoords); 53 53 } 54 54 sort_lists (X, Y, index, Naverage); … … 77 77 mpointer[Nmeas].measure = m; 78 78 mpointer[Nmeas].averef = Naves; 79 mpointer[Nmeas].R = average[Ni].R _PS - measure[m].dR_PS/ 3600.0;80 mpointer[Nmeas].D = average[Ni].D _PS - measure[m].dD_PS/ 3600.0;79 mpointer[Nmeas].R = average[Ni].R - measure[m].dR / 3600.0; 80 mpointer[Nmeas].D = average[Ni].D - measure[m].dD / 3600.0; 81 81 Nmeas ++; 82 82 } … … 113 113 mpointer[Nmeas].measure = m; 114 114 mpointer[Nmeas].averef = Ncurr; 115 mpointer[Nmeas].R = average[Nj].R _PS - measure[m].dR_PS/ 3600.0;116 mpointer[Nmeas].D = average[Nj].D _PS - measure[m].dD_PS/ 3600.0;115 mpointer[Nmeas].R = average[Nj].R - measure[m].dR / 3600.0; 116 mpointer[Nmeas].D = average[Nj].D - measure[m].dD / 3600.0; 117 117 Nmeas ++; 118 118 } … … 130 130 Sr = Sr / naverage[Ncurr].Nm; 131 131 Sd = Sd / naverage[Ncurr].Nm; 132 naverage[Ncurr].R _PS= Sr;133 naverage[Ncurr].D _PS= Sd;132 naverage[Ncurr].R = Sr; 133 naverage[Ncurr].D = Sd; 134 134 135 135 /* update original measurement offsets */ … … 137 137 m = naverage[Ncurr].offset + k; 138 138 M = mpointer[m].measure; 139 measure[M].dR _PS= 3600.0*(Sr - mpointer[m].R);140 measure[M].dD _PS= 3600.0*(Sd - mpointer[m].D);139 measure[M].dR = 3600.0*(Sr - mpointer[m].R); 140 measure[M].dD = 3600.0*(Sd - mpointer[m].D); 141 141 } 142 142 -
branches/dvo-mods-2007-02/Ohana/src/photdbc/src/make_subcatalog.c
r8630 r12008 40 40 # if 0 41 41 if (DropPhotcode) { 42 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset]. source);42 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset].photcode); 43 43 if (ecode == photcode[0].code) continue; 44 44 } … … 47 47 48 48 /* exclude measurements by measurement error */ 49 if (SIGMA_MAX && (catalog[0].measure[offset].dM _PS> SIGMA_MAX)) continue;49 if (SIGMA_MAX && (catalog[0].measure[offset].dM > SIGMA_MAX)) continue; 50 50 51 51 /* select measurements by mag limit */ -
branches/dvo-mods-2007-02/Ohana/src/photdbc/src/unique_measures.c
r8630 r12008 60 60 } 61 61 62 dR = (catalog[0].measure[ilist[j]].dR _PS - catalog[0].measure[ilist[k]].dR_PS);63 dD = (catalog[0].measure[ilist[j]].dD _PS - catalog[0].measure[ilist[k]].dD_PS);62 dR = (catalog[0].measure[ilist[j]].dR - catalog[0].measure[ilist[k]].dR); 63 dD = (catalog[0].measure[ilist[j]].dD - catalog[0].measure[ilist[k]].dD); 64 64 R = SQ(dR) + SQ(dD); 65 65 -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/GridOps.v1.c
r7080 r12008 331 331 for (i = 0; i < Nimage; i++) { 332 332 image = getimage (imlist[i]); 333 pname = GetPhotcodeNamebyCode (image[0]. source);333 pname = GetPhotcodeNamebyCode (image[0].photcode); 334 334 335 335 /* this is kind of bogus... */ -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/GridOps.v2.c
r7080 r12008 278 278 Msys = PhotSys (&catalog[c].measure[m], &catalog[c].average[n], &catalog[c].secfilt[n*PhotNsec]); 279 279 list[N] = Msys - Mrel - Mcal - Mmos; 280 dlist[N] = MAX (catalog[c].measure[m].dM _PS, MIN_ERROR);280 dlist[N] = MAX (catalog[c].measure[m].dM, MIN_ERROR); 281 281 N++; 282 282 } … … 439 439 for (i = 0; i < Nimage; i++) { 440 440 image = getimage (imlist[i]); 441 pname = GetPhotcodeNamebyCode (image[0]. source);441 pname = GetPhotcodeNamebyCode (image[0].photcode); 442 442 443 443 /* this is kind of bogus... */ -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/ImageOps.c
r6808 r12008 75 75 for (i = 0; i < Ncatalog; i++) { 76 76 for (j = 0; j < catalog[i].Nmeasure; j++) { 77 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j]. source);77 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j].photcode); 78 78 if (photcode[0].code != ecode) continue; 79 79 matchImage (catalog, j, i); … … 91 91 measure = &catalog[cat].measure[meas]; 92 92 for (i = 0; i < Nimage; i++) { 93 if (image[0]. source == -1) continue;94 if (measure[0]. source != image[i].source) continue;93 if (image[0].photcode == -1) continue; 94 if (measure[0].photcode != image[i].photcode) continue; 95 95 if (measure[0].t < start[i]) continue; 96 96 if (measure[0].t > stop[i]) continue; … … 100 100 101 101 /* identify the ccd on the basis of the photcode name */ 102 pname = GetPhotcodeNamebyCode (image[i]. source);102 pname = GetPhotcodeNamebyCode (image[i].photcode); 103 103 filter = photcode[0].name; 104 104 sprintf (base, "%s.%s.", MOSAICNAME, filter); … … 111 111 /* add this measurement to the grid cell for this chip */ 112 112 ave = measure[0].averef; 113 ra = catalog[cat].average[ave].R - measure[0].dR _PS/ 3600.0;114 dec = catalog[cat].average[ave].D - measure[0].dD _PS/ 3600.0;113 ra = catalog[cat].average[ave].R - measure[0].dR / 3600.0; 114 dec = catalog[cat].average[ave].D - measure[0].dD / 3600.0; 115 115 116 116 /* X,Y always positive-definite in range 0,0 - dX, dY */ … … 133 133 return; 134 134 } 135 /* fprintf (stderr, "can't find source image for this measurement: %d (%d)\n", measure[0].t, measure[0]. source); */135 /* fprintf (stderr, "can't find source image for this measurement: %d (%d)\n", measure[0].t, measure[0].photcode); */ 136 136 } 137 137 … … 145 145 146 146 if (image[i].code & IMAGE_BAD) return (NO_MAG); 147 value = image[i].Mcal _PS;147 value = image[i].Mcal; 148 148 return (value); 149 149 } … … 201 201 Msys = PhotSys (&catalog[c].measure[m], &catalog[c].average[n], &catalog[c].secfilt[n*PhotNsec]); 202 202 list[N] = Msys - Mrel - Mmos - Mgrid; 203 dlist[N] = MAX (catalog[c].measure[m].dM _PS, MIN_ERROR);203 dlist[N] = MAX (catalog[c].measure[m].dM, MIN_ERROR); 204 204 N++; 205 205 } … … 217 217 218 218 liststats (list, dlist, N, &stats); 219 image[i].Mcal _PS= stats.mean;220 image[i].dMcal _PS= stats.sigma;219 image[i].Mcal = stats.mean; 220 image[i].dMcal = stats.sigma; 221 221 image[i].Xm = 100.0*log10(stats.chisq); 222 222 } … … 249 249 for (i = N = 0; i < Nimage; i++) { 250 250 if (image[i].code & IMAGE_BAD) continue; 251 mlist[N] = fabs (image[i].Mcal _PS);252 slist[N] = image[i].dMcal _PS;251 mlist[N] = fabs (image[i].Mcal); 252 slist[N] = image[i].dMcal; 253 253 dlist[N] = 1; 254 254 N++; … … 266 266 mark = FALSE; 267 267 image[i].code &= ~ID_IMAGE_POOR; 268 mark = (image[i].dMcal _PS > MaxScatter) || (fabs(image[i].Mcal_PS- MedOffset) > MaxOffset);268 mark = (image[i].dMcal > MaxScatter) || (fabs(image[i].Mcal - MedOffset) > MaxOffset); 269 269 if (mark) { 270 270 Nmark ++; … … 296 296 /**** dMcal vs airmass ****/ 297 297 for (i = 0; i < Nimage; i++) { 298 Mlist[i] = image[i].Mcal _PS;299 dlist[i] = image[i].dMcal _PS;300 xlist[i] = image[i].secz _PS;298 Mlist[i] = image[i].Mcal; 299 dlist[i] = image[i].dMcal; 300 xlist[i] = image[i].secz; 301 301 } 302 302 … … 316 316 bzero (Mlist, NBIN*sizeof(double)); 317 317 for (i = 0; i < Nimage; i++) { 318 bin = image[i].dMcal _PS/ 0.00025;318 bin = image[i].dMcal / 0.00025; 319 319 bin = MAX (0, MIN (NBIN - 1, bin)); 320 320 Mlist[bin] += 1.0; … … 413 413 if (image[i].code & IMAGE_BAD) continue; 414 414 415 list[n] = image[i].Mcal _PS;415 list[n] = image[i].Mcal; 416 416 dlist[n] = 1; 417 417 n++; … … 441 441 if (image[i].code & IMAGE_BAD) continue; 442 442 443 list[n] = image[i].dMcal _PS;443 list[n] = image[i].dMcal; 444 444 dlist[n] = 1; 445 445 n++; -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/MosaicOps.c
r6808 r12008 36 36 37 37 /* select valid mosaic images by photcode */ 38 pname = GetPhotcodeNamebyCode (image[i]. source);38 pname = GetPhotcodeNamebyCode (image[i].photcode); 39 39 status = strncmp (pname, MOSAICNAME, strlen (MOSAICNAME)); 40 40 if (status) continue; … … 69 69 mosaic[Nmosaic].Xm = 0.0; 70 70 mosaic[Nmosaic].code = image[i].code; 71 mosaic[Nmosaic].secz = image[i].secz _PS;71 mosaic[Nmosaic].secz = image[i].secz; 72 72 73 73 /* add image to mosaic image list */ … … 134 134 Dmin = MIN (Dmin, D); 135 135 Dmax = MAX (Dmax, D); 136 Mcal += image[m].Mcal _PS;137 dMcal += image[m].dMcal _PS;136 Mcal += image[m].Mcal; 137 dMcal += image[m].dMcal; 138 138 Xm += image[m].Xm; 139 139 /* we are using mosaic.Mcal, not image.Mcal. reset image.Mcal */ 140 image[m].Mcal _PS= 0.0;141 image[m].dMcal _PS= image[m].Xm = NO_MAG;140 image[m].Mcal = 0.0; 141 image[m].dMcal = image[m].Xm = NO_MAG; 142 142 } 143 143 dS /= Nimlist[i]; … … 179 179 for (j = 0; j < Nimlist[i]; j++) { 180 180 im = imlist[i][j]; 181 image[im].Mcal _PS= mosaic[i].Mcal;182 image[im].dMcal _PS= mosaic[i].dMcal;181 image[im].Mcal = mosaic[i].Mcal; 182 image[im].dMcal = mosaic[i].dMcal; 183 183 image[im].Xm = mosaic[i].Xm; 184 184 image[im].code |= (mosaic[i].code & ID_IMAGE_FEW); … … 247 247 if (catalog[i].measure[j].t > TSTOP) continue; 248 248 } 249 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j]. source);249 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j].photcode); 250 250 if (photcode[0].code != ecode) continue; 251 251 matchMosaics (catalog, j, i); … … 266 266 if (USE_GRID) { 267 267 ave = catalog[cat].measure[meas].averef; 268 ra = catalog[cat].average[ave].R _PS - catalog[cat].measure[meas].dR_PS/ 3600.0;269 dec = catalog[cat].average[ave].D _PS - catalog[cat].measure[meas].dD_PS/ 3600.0;268 ra = catalog[cat].average[ave].R - catalog[cat].measure[meas].dR / 3600.0; 269 dec = catalog[cat].average[ave].D - catalog[cat].measure[meas].dD / 3600.0; 270 270 271 271 /* X,Y always positive-definite in range 0,0 - dX, dY */ … … 353 353 Msys = PhotSys (&catalog[c].measure[m], &catalog[c].average[n], &catalog[c].secfilt[n*PhotNsec]); 354 354 list[N] = Msys - Mrel - Mcal - Mgrid; 355 dlist[N] = MAX (catalog[c].measure[m].dM _PS, MIN_ERROR);355 dlist[N] = MAX (catalog[c].measure[m].dM, MIN_ERROR); 356 356 Mlist[N] = Msys; 357 357 dMlist[N] = list[N]; … … 591 591 592 592 ave = catalog[c].measure[m].averef; 593 xlist[N] = catalog[c].average[ave].R - catalog[c].measure[m].dR _PS/ 3600.0;594 ylist[N] = catalog[c].average[ave].D - catalog[c].measure[m].dD _PS/ 3600.0;593 xlist[N] = catalog[c].average[ave].R - catalog[c].measure[m].dR / 3600.0; 594 ylist[N] = catalog[c].average[ave].D - catalog[c].measure[m].dD / 3600.0; 595 595 N++; 596 596 } -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/StarOps.c
r6808 r12008 28 28 if (catalog[cat].average[ave].code & STAR_BAD) return (NO_MAG); 29 29 30 value = PhotPrimary ? catalog[cat].average[ave].M : catalog[cat].secfilt[PhotNsec*ave+PhotSec].M _PS;30 value = PhotPrimary ? catalog[cat].average[ave].M : catalog[cat].secfilt[PhotNsec*ave+PhotSec].M; 31 31 return (value); 32 32 } … … 54 54 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 55 55 list[N] = Msys - Mcal - Mmos - Mgrid; 56 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);56 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 57 57 N++; 58 58 } … … 70 70 catalog[i].average[j].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 71 71 } else { 72 catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS= stats.mean;73 catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS= stats.sigma;72 catalog[i].secfilt[PhotNsec*j+PhotSec].M = stats.mean; 73 catalog[i].secfilt[PhotNsec*j+PhotSec].dM = stats.sigma; 74 74 catalog[i].secfilt[PhotNsec*j+PhotSec].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 75 75 } … … 112 112 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 113 113 list[N] = Msys - Mcal - Mmos - Mgrid; 114 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);114 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 115 115 N++; 116 116 } … … 126 126 catalog[i].average[j].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 127 127 } else { 128 catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS= stats.mean;129 catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS= MAX (stats.error, stats.sigma);128 catalog[i].secfilt[PhotNsec*j+PhotSec].M = stats.mean; 129 catalog[i].secfilt[PhotNsec*j+PhotSec].dM = MAX (stats.error, stats.sigma); 130 130 catalog[i].secfilt[PhotNsec*j+PhotSec].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 131 131 } … … 156 156 if ((Mmos = getMmos (m, i)) == NO_MAG) continue; 157 157 if ((Mgrid = getMgrid (m, i)) == NO_MAG) continue; 158 catalog[i].measure[m].Mcal _PS= Mcal + Mmos + Mgrid;158 catalog[i].measure[m].Mcal = Mcal + Mmos + Mgrid; 159 159 } 160 160 } … … 187 187 Chisq = pow (10.0, 0.01*Xm); 188 188 xlist[Ntot] = Chisq; 189 slist[Ntot] = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;189 slist[Ntot] = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 190 190 dlist[Ntot] = 1; 191 191 Ntot ++; … … 203 203 for (i = 0; i < Ncatalog; i++) { 204 204 for (j = 0; j < catalog[i].Naverage; j++) { 205 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;205 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 206 206 Xm = PhotPrimary ? catalog[i].average[j].Xm : catalog[i].secfilt[PhotNsec*j+PhotSec].Xm; 207 207 Chisq = pow (10.0, 0.01*Xm); … … 269 269 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 270 270 list[N] = Msys - Mcal - Mmos - Mgrid; 271 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);271 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 272 272 N++; 273 273 } … … 301 301 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 302 302 list[N] = Msys - Mcal - Mmos - Mgrid; 303 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);303 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 304 304 ilist[N] = m; 305 305 N++; … … 423 423 if (catalog[i].average[j].code & STAR_BAD) continue; 424 424 425 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;425 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 426 426 list[n] = dM; 427 427 dlist[n] = 1; … … 452 452 for (j = 0; j < catalog[i].Naverage; j++) { 453 453 if (catalog[i].average[j].code & STAR_BAD) continue; 454 dMrel = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;454 dMrel = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 455 455 bin = dMrel / 0.00025; 456 456 bin = MAX (0, MIN (NBIN-1, bin)); … … 483 483 for (j = 0; j < catalog[i].Naverage; j++) { 484 484 if (catalog[i].average[j].code & STAR_BAD) continue; 485 xlist[N] = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS;485 xlist[N] = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M; 486 486 value = PhotPrimary ? catalog[i].average[j].Xm : catalog[i].secfilt[PhotNsec*j+PhotSec].Xm; 487 487 if (value == NO_MAG) continue; -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/UpdateImages.c
r11742 r12008 42 42 /* the astrometric errors are not being carried yet (but should be!) */ 43 43 /* we use the photometric mag error as a weighting term */ 44 dlistR[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);45 dlistD[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);44 dlistR[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 45 dlistD[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 46 46 N++; 47 47 } -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/UpdateObjects.c
r11742 r12008 42 42 /* the astrometric errors are not being carried yet (but should be!) */ 43 43 /* we use the photometric mag error as a weighting term */ 44 dlistR[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);45 dlistD[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);44 dlistR[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 45 dlistD[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 46 46 N++; 47 47 } -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/bcatalog.c
r8390 r12008 35 35 if (RESET) { 36 36 float *p; 37 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].M : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].M _PS;37 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].M : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].M; 38 38 *p = NO_MAG; 39 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].dM : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].dM _PS;39 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].dM : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].dM; 40 40 *p = NO_MAG; 41 41 subcatalog[0].average[Naverage].code &= ~ID_STAR_FEW; … … 49 49 50 50 /* select measurements by photcode */ 51 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset]. source);51 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset].photcode); 52 52 if (ecode != photcode[0].code) continue; 53 53 … … 66 66 67 67 /* select measurements by measurement error */ 68 if (catalog[0].measure[offset].dM _PS> SIGMA_LIM) continue;68 if (catalog[0].measure[offset].dM > SIGMA_LIM) continue; 69 69 70 70 /* select measurements by mag limit */ … … 79 79 subcatalog[0].measure[Nmeasure].averef = Naverage; 80 80 if (RESET) { 81 subcatalog[0].measure[Nmeasure].Mcal _PS= 0;81 subcatalog[0].measure[Nmeasure].Mcal = 0; 82 82 subcatalog[0].measure[Nmeasure].flags &= 0xff00; 83 83 subcatalog[0].measure[Nmeasure].flags &= ~ID_MEAS_POOR; -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/plot_scatter.c
r6808 r12008 32 32 if ((Mgrid = getMgrid (m, i)) == NO_MAG) continue; 33 33 34 Mrel = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS;34 Mrel = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M; 35 35 xlist[N] = Mrel; 36 36 ylist[N] = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]) - Mcal - Mmos - Mgrid - Mrel; -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/plotstuff.c
r10843 r12008 49 49 if (Xgraph[N] == 0) return; 50 50 51 KiiPS (Xgraph[N], TRUE, KAPA_ PS_NEWPLOT, filename);51 KiiPS (Xgraph[N], TRUE, KAPA_NEWPLOT, filename); 52 52 return; 53 53 } -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/select_images.c
r8390 r12008 76 76 77 77 /* exclude images by photcode */ 78 ecode = GetPhotcodeEquivCodebyCode (timage[i]. source);78 ecode = GetPhotcodeEquivCodebyCode (timage[i].photcode); 79 79 if (ecode != photcode[0].code) continue; 80 80 … … 135 135 if (RESET) { 136 136 assignMcal (&image[nimage], (double *) NULL, -1); 137 image[nimage].dMcal _PS= NO_MAG;137 image[nimage].dMcal = NO_MAG; 138 138 image[nimage].code &= ~ID_IMAGE_POOR; 139 139 } -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/setExclusions.c
r6808 r12008 14 14 15 15 /* select measurements by photcode */ 16 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[m]. source);16 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[m].photcode); 17 17 if (ecode != photcode[0].code) goto mark_nocal; 18 18 … … 25 25 /* select measurements by mag limit */ 26 26 if (AreaSelect) { 27 r = catalog[i].average[j].R + catalog[i].measure[m].dR _PS/ 3600.0;28 d = catalog[i].average[j].D + catalog[i].measure[m].dD _PS/ 3600.0;27 r = catalog[i].average[j].R + catalog[i].measure[m].dR / 3600.0; 28 d = catalog[i].average[j].D + catalog[i].measure[m].dD / 3600.0; 29 29 if ((coords = getCoords (m, i)) == NULL) goto markbad; 30 30 RD_to_XY (&x, &y, r, d, coords); -
branches/dvo-mods-2007-02/Ohana/src/relastro/src/setMrelFinal.c
r6808 r12008 11 11 12 12 for (i = 0; i < catalog[0].Naverage; i++) { 13 p = (PhotPrimary) ? &catalog[0].average[i].M : &catalog[0].secfilt[PhotNsec*i+PhotSec].M _PS;13 p = (PhotPrimary) ? &catalog[0].average[i].M : &catalog[0].secfilt[PhotNsec*i+PhotSec].M; 14 14 *p = NO_MAG; 15 p = (PhotPrimary) ? &catalog[0].average[i].dM : &catalog[0].secfilt[PhotNsec*i+PhotSec].dM _PS;15 p = (PhotPrimary) ? &catalog[0].average[i].dM : &catalog[0].secfilt[PhotNsec*i+PhotSec].dM; 16 16 *p = NO_MAG; 17 17 q = (PhotPrimary) ? &catalog[0].average[i].Xm : &catalog[0].secfilt[PhotNsec*i+PhotSec].Xm; … … 22 22 23 23 /* select measurements by photcode */ 24 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m]. source);24 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m].photcode); 25 25 if (ecode != photcode[0].code) continue; 26 26 … … 31 31 } 32 32 33 catalog[0].measure[m].Mcal _PS= 0;33 catalog[0].measure[m].Mcal = 0; 34 34 catalog[0].measure[m].flags &= 0xff00; 35 35 catalog[0].measure[m].flags &= ~ID_MEAS_POOR; … … 97 97 /** never use these measurements (wrong photcode, bad time range) */ 98 98 /* skipped via NOCAL, don't mark as skipped */ 99 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m]. source);99 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m].photcode); 100 100 if (ecode != photcode[0].code) continue; 101 101 -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/GridOps.c
r9633 r12008 282 282 Msys = PhotSys (&catalog[c].measure[m], &catalog[c].average[n], &catalog[c].secfilt[n*PhotNsec]); 283 283 list[N] = Msys - Mrel - Mcal - Mmos; 284 dlist[N] = MAX (catalog[c].measure[m].dM _PS, MIN_ERROR);284 dlist[N] = MAX (catalog[c].measure[m].dM, MIN_ERROR); 285 285 N++; 286 286 } … … 447 447 for (i = 0; i < Nimage; i++) { 448 448 image = getimage (imlist[i]); 449 pname = GetPhotcodeNamebyCode (image[0]. source);449 pname = GetPhotcodeNamebyCode (image[0].photcode); 450 450 451 451 /* this is kind of bogus... */ -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/ImageOps.c
r9633 r12008 75 75 for (i = 0; i < Ncatalog; i++) { 76 76 for (j = 0; j < catalog[i].Nmeasure; j++) { 77 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j]. source);77 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j].photcode); 78 78 if (photcode[0].code != ecode) continue; 79 79 matchImage (catalog, j, i); … … 82 82 } 83 83 84 /* XXX convert this to use the values of measure->Xccd,Yccd */ 85 /* XXX need to apply the conversion for ELIXIR and LONEOS formats */ 84 86 void matchImage (Catalog *catalog, int meas, int cat) { 85 87 … … 91 93 measure = &catalog[cat].measure[meas]; 92 94 for (i = 0; i < Nimage; i++) { 93 if (image[0]. source == -1) continue;94 if (measure[0]. source != image[i].source) continue;95 if (image[0].photcode == -1) continue; 96 if (measure[0].photcode != image[i].photcode) continue; 95 97 if (measure[0].t < start[i]) continue; 96 98 if (measure[0].t > stop[i]) continue; … … 100 102 101 103 /* identify the ccd on the basis of the photcode name */ 102 pname = GetPhotcodeNamebyCode (image[i]. source);104 pname = GetPhotcodeNamebyCode (image[i].photcode); 103 105 filter = photcode[0].name; 104 106 sprintf (base, "%s.%s.", MOSAICNAME, filter); … … 111 113 /* add this measurement to the grid cell for this chip */ 112 114 ave = measure[0].averef; 113 ra = catalog[cat].average[ave].R - measure[0].dR _PS/ 3600.0;114 dec = catalog[cat].average[ave].D - measure[0].dD _PS/ 3600.0;115 ra = catalog[cat].average[ave].R - measure[0].dR / 3600.0; 116 dec = catalog[cat].average[ave].D - measure[0].dD / 3600.0; 115 117 116 118 /* X,Y always positive-definite in range 0,0 - dX, dY */ … … 133 135 return; 134 136 } 135 /* fprintf (stderr, "can't find source image for this measurement: %d (%d)\n", measure[0].t, measure[0]. source); */137 /* fprintf (stderr, "can't find source image for this measurement: %d (%d)\n", measure[0].t, measure[0].photcode); */ 136 138 } 137 139 … … 145 147 146 148 if (image[i].code & IMAGE_BAD) return (NO_MAG); 147 value = image[i].Mcal _PS;149 value = image[i].Mcal; 148 150 return (value); 149 151 } … … 203 205 Msys = PhotSys (&catalog[c].measure[m], &catalog[c].average[n], &catalog[c].secfilt[n*PhotNsec]); 204 206 list[N] = Msys - Mrel - Mmos - Mgrid; 205 dlist[N] = MAX (catalog[c].measure[m].dM _PS, MIN_ERROR);207 dlist[N] = MAX (catalog[c].measure[m].dM, MIN_ERROR); 206 208 N++; 207 209 } … … 219 221 220 222 liststats (list, dlist, N, &stats); 221 image[i].Mcal _PS= stats.mean;222 image[i].dMcal _PS= stats.sigma;223 image[i].Mcal = stats.mean; 224 image[i].dMcal = stats.sigma; 223 225 image[i].Xm = 100.0*log10(stats.chisq); 224 226 } … … 251 253 for (i = N = 0; i < Nimage; i++) { 252 254 if (image[i].code & IMAGE_BAD) continue; 253 mlist[N] = fabs (image[i].Mcal _PS);254 slist[N] = image[i].dMcal _PS;255 mlist[N] = fabs (image[i].Mcal); 256 slist[N] = image[i].dMcal; 255 257 dlist[N] = 1; 256 258 N++; … … 268 270 mark = FALSE; 269 271 image[i].code &= ~ID_IMAGE_POOR; 270 mark = (image[i].dMcal _PS > MaxScatter) || (fabs(image[i].Mcal_PS- MedOffset) > MaxOffset);272 mark = (image[i].dMcal > MaxScatter) || (fabs(image[i].Mcal - MedOffset) > MaxOffset); 271 273 if (mark) { 272 274 Nmark ++; … … 298 300 /**** dMcal vs airmass ****/ 299 301 for (i = 0; i < Nimage; i++) { 300 Mlist[i] = image[i].Mcal _PS;301 dlist[i] = image[i].dMcal _PS;302 xlist[i] = image[i].secz _PS;302 Mlist[i] = image[i].Mcal; 303 dlist[i] = image[i].dMcal; 304 xlist[i] = image[i].secz; 303 305 } 304 306 … … 318 320 bzero (Mlist, NBIN*sizeof(double)); 319 321 for (i = 0; i < Nimage; i++) { 320 bin = image[i].dMcal _PS/ 0.00025;322 bin = image[i].dMcal / 0.00025; 321 323 bin = MAX (0, MIN (NBIN - 1, bin)); 322 324 Mlist[bin] += 1.0; … … 420 422 if (image[i].code & IMAGE_BAD) continue; 421 423 422 list[n] = image[i].Mcal _PS;424 list[n] = image[i].Mcal; 423 425 dlist[n] = 1; 424 426 n++; … … 448 450 if (image[i].code & IMAGE_BAD) continue; 449 451 450 list[n] = image[i].dMcal _PS;452 list[n] = image[i].dMcal; 451 453 dlist[n] = 1; 452 454 n++; -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/MosaicOps.c
r9633 r12008 36 36 37 37 /* select valid mosaic images by photcode */ 38 pname = GetPhotcodeNamebyCode (image[i]. source);38 pname = GetPhotcodeNamebyCode (image[i].photcode); 39 39 status = strncmp (pname, MOSAICNAME, strlen (MOSAICNAME)); 40 40 if (status) continue; … … 69 69 mosaic[Nmosaic].Xm = 0.0; 70 70 mosaic[Nmosaic].code = image[i].code; 71 mosaic[Nmosaic].secz = image[i].secz _PS;71 mosaic[Nmosaic].secz = image[i].secz; 72 72 73 73 /* add image to mosaic image list */ … … 134 134 Dmin = MIN (Dmin, D); 135 135 Dmax = MAX (Dmax, D); 136 Mcal += image[m].Mcal _PS;137 dMcal += image[m].dMcal _PS;136 Mcal += image[m].Mcal; 137 dMcal += image[m].dMcal; 138 138 Xm += image[m].Xm; 139 139 /* we are using mosaic.Mcal, not image.Mcal. reset image.Mcal */ 140 image[m].Mcal _PS= 0.0;141 image[m].dMcal _PS= image[m].Xm = NO_MAG;140 image[m].Mcal = 0.0; 141 image[m].dMcal = image[m].Xm = NO_MAG; 142 142 } 143 143 dS /= Nimlist[i]; … … 179 179 for (j = 0; j < Nimlist[i]; j++) { 180 180 im = imlist[i][j]; 181 image[im].Mcal _PS= mosaic[i].Mcal;182 image[im].dMcal _PS= mosaic[i].dMcal;181 image[im].Mcal = mosaic[i].Mcal; 182 image[im].dMcal = mosaic[i].dMcal; 183 183 image[im].Xm = mosaic[i].Xm; 184 184 image[im].code |= (mosaic[i].code & ID_IMAGE_FEW); … … 247 247 if (catalog[i].measure[j].t > TSTOP) continue; 248 248 } 249 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j]. source);249 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j].photcode); 250 250 if (photcode[0].code != ecode) continue; 251 251 matchMosaics (catalog, j, i); … … 266 266 if (USE_GRID) { 267 267 ave = catalog[cat].measure[meas].averef; 268 ra = catalog[cat].average[ave].R _PS - catalog[cat].measure[meas].dR_PS/ 3600.0;269 dec = catalog[cat].average[ave].D _PS - catalog[cat].measure[meas].dD_PS/ 3600.0;268 ra = catalog[cat].average[ave].R - catalog[cat].measure[meas].dR / 3600.0; 269 dec = catalog[cat].average[ave].D - catalog[cat].measure[meas].dD / 3600.0; 270 270 271 271 /* X,Y always positive-definite in range 0,0 - dX, dY */ … … 355 355 Msys = PhotSys (&catalog[c].measure[m], &catalog[c].average[n], &catalog[c].secfilt[n*PhotNsec]); 356 356 list[N] = Msys - Mrel - Mcal - Mgrid; 357 dlist[N] = MAX (catalog[c].measure[m].dM _PS, MIN_ERROR);357 dlist[N] = MAX (catalog[c].measure[m].dM, MIN_ERROR); 358 358 Mlist[N] = Msys; 359 359 dMlist[N] = list[N]; … … 596 596 597 597 ave = catalog[c].measure[m].averef; 598 xlist[N] = catalog[c].average[ave].R - catalog[c].measure[m].dR _PS/ 3600.0;599 ylist[N] = catalog[c].average[ave].D - catalog[c].measure[m].dD _PS/ 3600.0;598 xlist[N] = catalog[c].average[ave].R - catalog[c].measure[m].dR / 3600.0; 599 ylist[N] = catalog[c].average[ave].D - catalog[c].measure[m].dD / 3600.0; 600 600 N++; 601 601 } -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/StarOps.c
r10506 r12008 28 28 if (catalog[cat].average[ave].code & STAR_BAD) return (NO_MAG); 29 29 30 value = PhotPrimary ? catalog[cat].average[ave].M : catalog[cat].secfilt[PhotNsec*ave+PhotSec].M _PS;30 value = PhotPrimary ? catalog[cat].average[ave].M : catalog[cat].secfilt[PhotNsec*ave+PhotSec].M; 31 31 return (value); 32 32 } … … 65 65 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 66 66 list[N] = Msys - Mcal - Mmos - Mgrid; 67 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);67 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 68 68 N++; 69 69 } … … 81 81 catalog[i].average[j].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 82 82 } else { 83 catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS= stats.mean;84 catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS= stats.sigma;83 catalog[i].secfilt[PhotNsec*j+PhotSec].M = stats.mean; 84 catalog[i].secfilt[PhotNsec*j+PhotSec].dM = stats.sigma; 85 85 catalog[i].secfilt[PhotNsec*j+PhotSec].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 86 86 } … … 130 130 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 131 131 list[N] = Msys - Mcal - Mmos - Mgrid; 132 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);132 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 133 133 N++; 134 134 } … … 144 144 catalog[i].average[j].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 145 145 } else { 146 catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS= stats.mean;147 catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS= MAX (stats.error, stats.sigma);146 catalog[i].secfilt[PhotNsec*j+PhotSec].M = stats.mean; 147 catalog[i].secfilt[PhotNsec*j+PhotSec].dM = MAX (stats.error, stats.sigma); 148 148 catalog[i].secfilt[PhotNsec*j+PhotSec].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NO_MAG; 149 149 } … … 178 178 if (Mmos == NO_IMAGE) continue; 179 179 if ((Mgrid = getMgrid (m, i)) == NO_MAG) continue; 180 catalog[i].measure[m].Mcal _PS= Mcal + Mmos + Mgrid;180 catalog[i].measure[m].Mcal = Mcal + Mmos + Mgrid; 181 181 } 182 182 } … … 209 209 Chisq = pow (10.0, 0.01*Xm); 210 210 xlist[Ntot] = Chisq; 211 slist[Ntot] = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;211 slist[Ntot] = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 212 212 dlist[Ntot] = 1; 213 213 Ntot ++; … … 225 225 for (i = 0; i < Ncatalog; i++) { 226 226 for (j = 0; j < catalog[i].Naverage; j++) { 227 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;227 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 228 228 Xm = PhotPrimary ? catalog[i].average[j].Xm : catalog[i].secfilt[PhotNsec*j+PhotSec].Xm; 229 229 Chisq = pow (10.0, 0.01*Xm); … … 295 295 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 296 296 list[N] = Msys - Mcal - Mmos - Mgrid; 297 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);297 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 298 298 N++; 299 299 } … … 331 331 Msys = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]); 332 332 list[N] = Msys - Mcal - Mmos - Mgrid; 333 dlist[N] = MAX (catalog[i].measure[m].dM _PS, MIN_ERROR);333 dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR); 334 334 ilist[N] = m; 335 335 N++; … … 458 458 if (catalog[i].average[j].code & STAR_BAD) continue; 459 459 460 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;460 dM = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 461 461 list[n] = dM; 462 462 dlist[n] = 1; … … 487 487 for (j = 0; j < catalog[i].Naverage; j++) { 488 488 if (catalog[i].average[j].code & STAR_BAD) continue; 489 dMrel = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM _PS;489 dMrel = PhotPrimary ? catalog[i].average[j].dM : catalog[i].secfilt[PhotNsec*j+PhotSec].dM; 490 490 bin = dMrel / 0.00025; 491 491 bin = MAX (0, MIN (NBIN-1, bin)); … … 518 518 for (j = 0; j < catalog[i].Naverage; j++) { 519 519 if (catalog[i].average[j].code & STAR_BAD) continue; 520 xlist[N] = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS;520 xlist[N] = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M; 521 521 value = PhotPrimary ? catalog[i].average[j].Xm : catalog[i].secfilt[PhotNsec*j+PhotSec].Xm; 522 522 if (value == NO_MAG) continue; -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/bcatalog.c
r11062 r12008 28 28 if (RESET) { 29 29 float *p; 30 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].M : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].M _PS;30 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].M : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].M; 31 31 *p = NO_MAG; 32 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].dM : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].dM _PS;32 p = (PhotPrimary) ? &subcatalog[0].average[Naverage].dM : &subcatalog[0].secfilt[PhotNsec*Naverage+PhotSec].dM; 33 33 *p = NO_MAG; 34 34 subcatalog[0].average[Naverage].code &= ~ID_STAR_FEW; … … 42 42 43 43 /* select measurements by photcode */ 44 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset]. source);44 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset].photcode); 45 45 if (ecode != photcode[0].code) continue; 46 46 … … 60 60 61 61 /* select measurements by measurement error */ 62 if ((SIGMA_LIM > 0) && (catalog[0].measure[offset].dM _PS> SIGMA_LIM)) continue;62 if ((SIGMA_LIM > 0) && (catalog[0].measure[offset].dM > SIGMA_LIM)) continue; 63 63 64 64 /* select measurements by mag limit */ … … 73 73 subcatalog[0].measure[Nmeasure].averef = Naverage; 74 74 if (RESET) { 75 subcatalog[0].measure[Nmeasure].Mcal _PS= 0;75 subcatalog[0].measure[Nmeasure].Mcal = 0; 76 76 subcatalog[0].measure[Nmeasure].flags &= 0xff00; 77 77 subcatalog[0].measure[Nmeasure].flags &= ~ID_MEAS_POOR; -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/plot_scatter.c
r9633 r12008 36 36 if ((Mgrid = getMgrid (m, i)) == NO_MAG) continue; 37 37 38 Mrel = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M _PS;38 Mrel = PhotPrimary ? catalog[i].average[j].M : catalog[i].secfilt[PhotNsec*j+PhotSec].M; 39 39 xlist[N] = Mrel; 40 40 ylist[N] = PhotSys (&catalog[i].measure[m], &catalog[i].average[j], &catalog[i].secfilt[j*PhotNsec]) - Mcal - Mmos - Mgrid - Mrel; -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/relphot.c
r10506 r12008 44 44 /* load catalog data from region files */ 45 45 catalog = load_catalogs (skylist, &Ncatalog); 46 47 /* add in a loop over the catalogs calling dvo_catalog_chipcoords */ 46 48 47 49 /* match measurements with images, mosaics */ -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/select_images.c
r7082 r12008 76 76 77 77 /* exclude images by photcode */ 78 ecode = GetPhotcodeEquivCodebyCode (timage[i]. source);78 ecode = GetPhotcodeEquivCodebyCode (timage[i].photcode); 79 79 if (ecode != photcode[0].code) continue; 80 80 … … 135 135 if (RESET) { 136 136 assignMcal (&image[nimage], (double *) NULL, -1); 137 image[nimage].dMcal _PS= NO_MAG;137 image[nimage].dMcal = NO_MAG; 138 138 image[nimage].code &= ~ID_IMAGE_POOR; 139 139 } -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/setExclusions.c
r6683 r12008 14 14 15 15 /* select measurements by photcode */ 16 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[m]. source);16 ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[m].photcode); 17 17 if (ecode != photcode[0].code) goto mark_nocal; 18 18 … … 25 25 /* select measurements by mag limit */ 26 26 if (AreaSelect) { 27 r = catalog[i].average[j].R + catalog[i].measure[m].dR _PS/ 3600.0;28 d = catalog[i].average[j].D + catalog[i].measure[m].dD _PS/ 3600.0;27 r = catalog[i].average[j].R + catalog[i].measure[m].dR / 3600.0; 28 d = catalog[i].average[j].D + catalog[i].measure[m].dD / 3600.0; 29 29 if ((coords = getCoords (m, i)) == NULL) goto markbad; 30 30 RD_to_XY (&x, &y, r, d, coords); -
branches/dvo-mods-2007-02/Ohana/src/relphot/src/setMrelFinal.c
r10506 r12008 11 11 12 12 for (i = 0; i < catalog[0].Naverage; i++) { 13 p = (PhotPrimary) ? &catalog[0].average[i].M : &catalog[0].secfilt[PhotNsec*i+PhotSec].M _PS;13 p = (PhotPrimary) ? &catalog[0].average[i].M : &catalog[0].secfilt[PhotNsec*i+PhotSec].M; 14 14 *p = NO_MAG; 15 p = (PhotPrimary) ? &catalog[0].average[i].dM : &catalog[0].secfilt[PhotNsec*i+PhotSec].dM _PS;15 p = (PhotPrimary) ? &catalog[0].average[i].dM : &catalog[0].secfilt[PhotNsec*i+PhotSec].dM; 16 16 *p = NO_MAG; 17 17 q = (PhotPrimary) ? &catalog[0].average[i].Xm : &catalog[0].secfilt[PhotNsec*i+PhotSec].Xm; … … 22 22 23 23 /* select measurements by photcode */ 24 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m]. source);24 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m].photcode); 25 25 if (ecode != photcode[0].code) continue; 26 26 … … 31 31 } 32 32 33 catalog[0].measure[m].Mcal _PS= 0;33 catalog[0].measure[m].Mcal = 0; 34 34 catalog[0].measure[m].flags &= 0xff00; 35 35 catalog[0].measure[m].flags &= ~ID_MEAS_POOR; … … 97 97 /** never use these measurements (wrong photcode, bad time range) */ 98 98 /* skipped via NOCAL, don't mark as skipped */ 99 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m]. source);99 ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m].photcode); 100 100 if (ecode != photcode[0].code) continue; 101 101 -
branches/dvo-mods-2007-02/Ohana/src/uniphot/src/fit_groups.c
r5014 r12008 18 18 if (tgroup[i].image[j][0].code & IMAGE_BAD) continue; 19 19 sgroup = (Group *) tgroup[i].imlink[j][0].sgroup; 20 Mcal = tgroup[i].image[j][0].Mcal _PS;20 Mcal = tgroup[i].image[j][0].Mcal; 21 21 Mgrp = sgroup[0].M; 22 22 mlist[Nlist] = (Mcal - Mgrp); 23 dlist[Nlist] = tgroup[i].image[j][0].dMcal _PS;23 dlist[Nlist] = tgroup[i].image[j][0].dMcal; 24 24 Nlist ++; 25 25 } … … 56 56 if (sgroup[i].image[j][0].code & IMAGE_BAD) continue; 57 57 tgroup = (Group *) sgroup[i].imlink[j][0].tgroup; 58 Mcal = sgroup[i].image[j][0].Mcal _PS;58 Mcal = sgroup[i].image[j][0].Mcal; 59 59 Mgrp = tgroup[0].M; 60 60 mlist[Nlist] = (Mcal - Mgrp); 61 dlist[Nlist] = sgroup[i].image[j][0].dMcal _PS;61 dlist[Nlist] = sgroup[i].image[j][0].dMcal; 62 62 Nlist ++; 63 63 } -
branches/dvo-mods-2007-02/Ohana/src/uniphot/src/subset_images.c
r7080 r12008 19 19 20 20 /* select images by photcode */ 21 equiv = GetPhotcodeEquivCodebyCode (image[i]. source);21 equiv = GetPhotcodeEquivCodebyCode (image[i].photcode); 22 22 if (equiv != photcode[0].code) continue; 23 23 -
branches/dvo-mods-2007-02/Ohana/src/uniphot/src/update.c
r8388 r12008 22 22 for (i = 0; i < Nsgroup; i++) { 23 23 for (j = 0; j < sgroup[i].Nimage; j++) { 24 sgroup[i].image[j][0].Mcal _PS-= sgroup[i].M;24 sgroup[i].image[j][0].Mcal -= sgroup[i].M; 25 25 } 26 26 } -
branches/dvo-mods-2007-02/Ohana/src/uniphot/src/update_catalog.c
r6683 r12008 15 15 for (i = 0; i < catalog[0].Naverage; i++) { 16 16 17 Mp = Primary ? &catalog[0].average[i].M : &catalog[0].secfilt[i*Nsecfilt+Nsec].M _PS;17 Mp = Primary ? &catalog[0].average[i].M : &catalog[0].secfilt[i*Nsecfilt+Nsec].M; 18 18 if (*Mp != NO_MAG) *Mp += sgroup[0].M; 19 19 20 20 m = catalog[0].average[i].offset; 21 21 for (j = 0; j < catalog[0].average[i].Nm; j++, m++) { 22 code = GetPhotcodebyCode (catalog[0].measure[m]. source);22 code = GetPhotcodebyCode (catalog[0].measure[m].photcode); 23 23 if (code == NULL) continue; 24 24 if (code[0].type != PHOT_DEP) continue; 25 25 if (code[0].equiv != photcode[0].code) continue; 26 catalog[0].measure[m].Mcal _PS-= sgroup[0].M;26 catalog[0].measure[m].Mcal -= sgroup[0].M; 27 27 found ++; 28 28 }
Note:
See TracChangeset
for help on using the changeset viewer.
