- Timestamp:
- Apr 18, 2015, 6:33:51 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 35 edited
- 6 copied
-
. (modified) (1 prop)
-
Ohana/src/addstar/src/FilterStars.c (modified) (1 diff)
-
Ohana/src/addstar/src/ReadXradFITS.c (modified) (1 diff)
-
Ohana/src/addstar/src/resort_catalog.c (modified) (1 diff)
-
Ohana/src/dvolens/Makefile (modified) (2 diffs)
-
Ohana/src/dvolens/include/dvolens.h (modified) (2 diffs)
-
Ohana/src/dvolens/src/myIndex.c (copied) (copied from branches/eam_branches/ipp-20150405/Ohana/src/dvolens/src/myIndex.c )
-
Ohana/src/dvolens/src/update_objects_catalog.c (modified) (11 diffs)
-
Ohana/src/dvopsps/src/insert_FWobjects_dvopsps_catalog.c (modified) (4 diffs)
-
Ohana/src/dvopsps/src/insert_diffobj_dvopsps_catalog.c (modified) (1 diff)
-
Ohana/src/kapa2/doc/rainbow.cm (copied) (copied from branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/rainbow.cm )
-
Ohana/src/kapa2/doc/vista.cm (copied) (copied from branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/vista.cm )
-
Ohana/src/kapa2/src/DrawObjects.c (modified) (4 diffs)
-
Ohana/src/kapa2/src/InterpretKeys.c (modified) (2 diffs)
-
Ohana/src/kapa2/src/PSObjects.c (modified) (4 diffs)
-
Ohana/src/kapa2/src/SetColormap.c (modified) (1 diff)
-
Ohana/src/kapa2/src/bDrawObjects.c (modified) (4 diffs)
-
Ohana/src/libautocode/Makefile.Targets (modified) (2 diffs)
-
Ohana/src/libautocode/def/lensing-ps1-v5-r3.d (copied) (copied from branches/eam_branches/ipp-20150405/Ohana/src/libautocode/def/lensing-ps1-v5-r3.d )
-
Ohana/src/libautocode/def/lensing.d (modified) (3 diffs)
-
Ohana/src/libautocode/def/lensobj-ps1-v5-r0.d (copied) (copied from branches/eam_branches/ipp-20150405/Ohana/src/libautocode/def/lensobj-ps1-v5-r0.d )
-
Ohana/src/libautocode/def/lensobj-ps1-v5-r1.d (copied) (copied from branches/eam_branches/ipp-20150405/Ohana/src/libautocode/def/lensobj-ps1-v5-r1.d )
-
Ohana/src/libautocode/def/lensobj-ps1-v5.d (deleted)
-
Ohana/src/libautocode/def/lensobj.d (modified) (2 diffs)
-
Ohana/src/libdvo/include/dvo.h (modified) (1 diff)
-
Ohana/src/libdvo/include/dvodb.h (modified) (3 diffs)
-
Ohana/src/libdvo/include/ps1_v5_defs.h (modified) (1 diff)
-
Ohana/src/libdvo/src/dbExtractAverages.c (modified) (1 diff)
-
Ohana/src/libdvo/src/dbExtractMeasures.c (modified) (2 diffs)
-
Ohana/src/libdvo/src/dbFields.c (modified) (4 diffs)
-
Ohana/src/libdvo/src/dvo_catalog_split.c (modified) (3 diffs)
-
Ohana/src/libdvo/src/dvo_convert.c (modified) (9 diffs)
-
Ohana/src/libdvo/src/dvo_convert_PS1_V5.c (modified) (8 diffs)
-
Ohana/src/libdvo/src/dvo_photcode_ops.c (modified) (1 diff)
-
Ohana/src/libkapa/src/KapaColors.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.data (modified) (1 prop)
-
Ohana/src/opihi/cmd.data/imhist.c (modified) (6 diffs)
-
Ohana/src/opihi/lib.data/graphtools.c (modified) (4 diffs)
-
Ohana/src/relphot/src/setMrelCatalog.c (modified) (1 diff)
-
dbconfig/changes.txt (modified) (1 prop)
-
ippconfig (modified) (1 prop)
-
psModules/src/objects (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20150405 (added) merged: 38084-38085,38098-38101,38135-38136,38139-38143,38146-38152
- Property svn:mergeinfo changed
-
trunk/Ohana/src/addstar/src/FilterStars.c
r37357 r38153 105 105 stars[N].measure.dFluxAp /= image[0].exptime; 106 106 } 107 if (stars[N].lensing) { 108 if (!isnan(stars[N].lensing-> F_ApR5)) stars[N].lensing-> F_ApR5 /= image[0].exptime; 109 if (!isnan(stars[N].lensing->dF_ApR5)) stars[N].lensing->dF_ApR5 /= image[0].exptime; 110 if (!isnan(stars[N].lensing->sF_ApR5)) stars[N].lensing->sF_ApR5 /= image[0].exptime; 111 if (!isnan(stars[N].lensing->fF_ApR5)) stars[N].lensing->fF_ApR5 /= image[0].exptime; 112 113 if (!isnan(stars[N].lensing-> F_ApR6)) stars[N].lensing-> F_ApR6 /= image[0].exptime; 114 if (!isnan(stars[N].lensing->dF_ApR6)) stars[N].lensing->dF_ApR6 /= image[0].exptime; 115 if (!isnan(stars[N].lensing->sF_ApR6)) stars[N].lensing->sF_ApR6 /= image[0].exptime; 116 if (!isnan(stars[N].lensing->fF_ApR6)) stars[N].lensing->fF_ApR6 /= image[0].exptime; 117 118 if (!isnan(stars[N].lensing-> F_ApR7)) stars[N].lensing-> F_ApR7 /= image[0].exptime; 119 if (!isnan(stars[N].lensing->dF_ApR7)) stars[N].lensing->dF_ApR7 /= image[0].exptime; 120 if (!isnan(stars[N].lensing->sF_ApR7)) stars[N].lensing->sF_ApR7 /= image[0].exptime; 121 if (!isnan(stars[N].lensing->fF_ApR7)) stars[N].lensing->fF_ApR7 /= image[0].exptime; 122 } 107 123 108 124 // the external ID is supplied, but do we trust it? -
trunk/Ohana/src/addstar/src/ReadXradFITS.c
r37357 r38153 72 72 } 73 73 74 stars[i].lensing-> F_ApR5 = AperFlux [Nap*Ncol + 3];75 stars[i].lensing->dF_ApR5 = AperFluxErr[Nap*Ncol + 3];76 stars[i].lensing->sF_ApR5 = AperFluxStd[Nap*Ncol + 3];77 stars[i].lensing->fF_ApR5 = AperFill [Nap*Ncol + 3];74 // XXX this is all hard-wired and should make use of the headers. 75 // psphot cmfs have 5 radial apertures: 76 // array 0, 1, 2, 3, 4 77 // SDSS 3, 4, 5, 6, 7 78 78 79 stars[i].lensing-> F_ApR6 = AperFlux [Nap*Ncol + 4]; 80 stars[i].lensing->dF_ApR6 = AperFluxErr[Nap*Ncol + 4]; 81 stars[i].lensing->sF_ApR6 = AperFluxStd[Nap*Ncol + 4]; 82 stars[i].lensing->fF_ApR6 = AperFill [Nap*Ncol + 4]; 79 stars[i].lensing-> F_ApR5 = AperFlux [Nap*Ncol + 2]; 80 stars[i].lensing->dF_ApR5 = AperFluxErr[Nap*Ncol + 2]; 81 stars[i].lensing->sF_ApR5 = AperFluxStd[Nap*Ncol + 2]; 82 stars[i].lensing->fF_ApR5 = AperFill [Nap*Ncol + 2]; 83 84 stars[i].lensing-> F_ApR6 = AperFlux [Nap*Ncol + 3]; 85 stars[i].lensing->dF_ApR6 = AperFluxErr[Nap*Ncol + 3]; 86 stars[i].lensing->sF_ApR6 = AperFluxStd[Nap*Ncol + 3]; 87 stars[i].lensing->fF_ApR6 = AperFill [Nap*Ncol + 3]; 88 89 stars[i].lensing-> F_ApR7 = AperFlux [Nap*Ncol + 4]; 90 stars[i].lensing->dF_ApR7 = AperFluxErr[Nap*Ncol + 4]; 91 stars[i].lensing->sF_ApR7 = AperFluxStd[Nap*Ncol + 4]; 92 stars[i].lensing->fF_ApR7 = AperFill [Nap*Ncol + 4]; 83 93 Nap ++; 84 94 } -
trunk/Ohana/src/addstar/src/resort_catalog.c
r37807 r38153 40 40 resort_catalog_lensing (catalog); 41 41 resort_catalog_starpar (catalog); 42 43 // XXX somehow need to set the value of lensing->measure offset here 44 45 42 46 } 43 47 -
trunk/Ohana/src/dvolens/Makefile
r37358 r38153 29 29 $(SRC)/help.$(ARCH).o \ 30 30 $(SRC)/initialize.$(ARCH).o \ 31 $(SRC)/myIndex.$(ARCH).o \ 31 32 $(SRC)/update_objects.$(ARCH).o \ 32 33 $(SRC)/update_objects_catalog.$(ARCH).o \ … … 44 45 $(SRC)/help.$(ARCH).o \ 45 46 $(SRC)/initialize.$(ARCH).o \ 47 $(SRC)/myIndex.$(ARCH).o \ 46 48 $(SRC)/update_objects.$(ARCH).o \ 47 49 $(SRC)/update_objects_catalog.$(ARCH).o \ -
trunk/Ohana/src/dvolens/include/dvolens.h
r37358 r38153 4 4 # include <signal.h> 5 5 # include <pthread.h> 6 7 # ifndef MAX_INT 8 # define MAX_INT 2147483647 9 # endif 10 11 typedef struct { 12 int minID; 13 int maxID; 14 int *index; 15 int Nindex; 16 int NINDEX; 17 } myIndexType; 6 18 7 19 typedef enum { … … 63 75 int client_logger_message PROTO((char *format,...)); 64 76 77 myIndexType *myIndexAlloc (); 78 int myIndexFree (myIndexType *myIndex); 79 void myIndexInit (myIndexType *myIndex); 80 int myIndexUpdateLimits (myIndexType *myIndex, int value); 81 int myIndexSetRange (myIndexType *myIndex); 82 int myIndexSetEntry (myIndexType *myIndex, int value, int entry); 83 int myIndexGetEntry (myIndexType *myIndex, int value); -
trunk/Ohana/src/dvolens/src/update_objects_catalog.c
r37358 r38153 1 1 # include "dvolens.h" 2 # define SCALE 0.001 3 float MagToFlux (float Mag); // in libdvo, but not exposed? 2 4 3 5 int update_objects_catalog (Catalog *catalog) { … … 11 13 int Nsecfilt = GetPhotcodeNsecfilt (); 12 14 15 float *Mxx_obj = NULL; 16 float *Mxy_obj = NULL; 17 float *Myy_obj = NULL; 18 19 ALLOCATE (Mxx_obj, float, Nsecfilt); 20 ALLOCATE (Mxy_obj, float, Nsecfilt); 21 ALLOCATE (Myy_obj, float, Nsecfilt); 22 13 23 // I think we have already allocated lensobj 14 24 REALLOCATE (catalog->lensobj, Lensobj, catalog->Naverage * Nsecfilt); … … 19 29 int Nlensobj = 0; 20 30 31 myIndexType *measureIndex = myIndexAlloc(); 32 21 33 for (i = 0; i < catalog->Naverage; i++) { 22 34 Average *average = &catalog->average[i]; … … 27 39 for (j = 0; j < Nsecfilt; j++) { 28 40 dvo_lensobj_init (&lensobj[j], TRUE); // init accumulated values to 0 41 Mxx_obj[j] = 0.0; 42 Mxy_obj[j] = 0.0; 43 Myy_obj[j] = 0.0; 29 44 } 30 45 31 46 // reset the average values 32 33 47 off_t Loff = average->lensingOffset; 34 48 off_t Moff = average->measureOffset; 49 50 // I have Nmeasure entries for this object. I need to match measure to lensing (by imageID) 51 // I could generated a sorted list (imageID, measureSeq) and use bisection to find the desired imageID 52 // I could make an index measureSeq[imageID-imageIDmin] 53 54 myIndexInit (measureIndex); 55 56 // generate an index for these measure entries (based on Mj and imageID) 57 for (Mj = 0; Mj < average->Nmeasure; Mj++) { 58 myIndexUpdateLimits (measureIndex, catalog->measure[Moff + Mj].imageID); 59 } 60 myIndexSetRange (measureIndex); 61 for (Mj = 0; Mj < average->Nmeasure; Mj++) { 62 // if there are duplicates (multiple measures from the same image), 63 // myIndexSetEntry will only select one 64 myIndexSetEntry (measureIndex, catalog->measure[Moff + Mj].imageID, Mj); 65 } 35 66 36 67 // loop over the lensing measurements. for each one, I need to find the corresponding measurement (make an index in lensing?) … … 41 72 if (!isfinite(lensing->X11_sm_obj)) continue; 42 73 74 // pointer from lensing entry to corresponding measure entry (keep updated?) 75 // XX ALT int Mseq = lensing->measureSeq; 76 // XX ALT myAssert (Mseq < average->Nmeasure, "oops"); 77 // XX ALT Measure *measure = &catalog->measure[Moff + Mseq]; 78 // XX ALT myAssert (measure->imageID == lensing->imageID, "oops, deux"); 79 80 Mj = myIndexGetEntry (measureIndex, lensing->imageID); 81 myAssert (Mj > -1, "missing index"); 82 83 Measure *measure = &catalog->measure[Moff + Mj]; 84 myAssert (measure->imageID == lensing->imageID, "oops, deux"); 85 86 # if (0) 43 87 Measure *measure = NULL; 44 88 int found = FALSE; … … 54 98 abort(); 55 99 } 100 # endif 56 101 57 102 // skip measurements that do not match the current photcode … … 67 112 if (measure->psfQFperf < 0.85) continue; 68 113 69 114 // I should probably only use lensing entries which correspond to warps 115 // included in the mean warp flux (setMrelCatalog.c) 116 if ((measure->dbFlags & ID_MEAS_WARP_USED) == 0) continue; 117 118 Mxx_obj[Nsec] += measure->Mxx; 119 Mxy_obj[Nsec] += measure->Mxy; 120 Myy_obj[Nsec] += measure->Myy; 121 70 122 lensobj[Nsec].X11_sm_obj += lensing->X11_sm_obj; 71 123 lensobj[Nsec].X12_sm_obj += lensing->X12_sm_obj; … … 92 144 lensobj[Nsec]. E2_sh_psf += lensing-> E2_sh_psf; 93 145 94 lensobj[Nsec]. F_ApR5 += lensing-> F_ApR5; 95 lensobj[Nsec].dF_ApR5 += SQ(lensing->dF_ApR5); 96 lensobj[Nsec].sF_ApR5 += SQ(lensing->sF_ApR5); 97 lensobj[Nsec].fF_ApR5 += lensing->fF_ApR5; 98 99 lensobj[Nsec]. F_ApR6 += lensing-> F_ApR6; 100 lensobj[Nsec].dF_ApR6 += SQ(lensing->dF_ApR6); 101 lensobj[Nsec].sF_ApR6 += SQ(lensing->sF_ApR6); 102 lensobj[Nsec].fF_ApR6 += lensing->fF_ApR6; 146 // relphot sets measure->Mcal (setMcalOutput.c, called by setMrelFinal.c) 147 float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure->Mcal; 148 float Fcal = 3630.8 * MagToFlux(Mcal); 149 150 // lensing->F_ApR5, etc need to be in units of DN/sec 151 // Fcal * lensing->F_ApR5 is in Jy 152 153 lensobj[Nsec]. F_ApR5 += Fcal * lensing-> F_ApR5; 154 lensobj[Nsec].dF_ApR5 += SQ(Fcal * lensing->dF_ApR5); 155 lensobj[Nsec].sF_ApR5 += SQ(Fcal * lensing->sF_ApR5); 156 lensobj[Nsec].fF_ApR5 += lensing->fF_ApR5; 157 158 lensobj[Nsec]. F_ApR6 += Fcal * lensing-> F_ApR6; 159 lensobj[Nsec].dF_ApR6 += SQ(Fcal * lensing->dF_ApR6); 160 lensobj[Nsec].sF_ApR6 += SQ(Fcal * lensing->sF_ApR6); 161 lensobj[Nsec].fF_ApR6 += lensing->fF_ApR6; 162 163 lensobj[Nsec]. F_ApR7 += Fcal * lensing-> F_ApR7; 164 lensobj[Nsec].dF_ApR7 += SQ(Fcal * lensing->dF_ApR7); 165 lensobj[Nsec].sF_ApR7 += SQ(Fcal * lensing->sF_ApR7); 166 lensobj[Nsec].fF_ApR7 += lensing->fF_ApR7; 103 167 104 168 lensobj[Nsec].Nmeas ++; … … 139 203 lensobj[j].sF_ApR5 /= Nmeas; 140 204 lensobj[j].fF_ApR5 /= Nmeas; 205 141 206 lensobj[j]. F_ApR6 /= Nmeas; 142 207 lensobj[j].dF_ApR6 /= Nmeas; … … 144 209 lensobj[j].fF_ApR6 /= Nmeas; 145 210 211 lensobj[j]. F_ApR7 /= Nmeas; 212 lensobj[j].dF_ApR7 /= Nmeas; 213 lensobj[j].sF_ApR7 /= Nmeas; 214 lensobj[j].fF_ApR7 /= Nmeas; 215 146 216 lensobj[j].dF_ApR5 = sqrt(lensobj[j].dF_ApR5); 147 217 lensobj[j].sF_ApR5 = sqrt(lensobj[j].sF_ApR5); 148 218 lensobj[j].dF_ApR6 = sqrt(lensobj[j].dF_ApR6); 149 219 lensobj[j].sF_ApR6 = sqrt(lensobj[j].sF_ApR6); 220 lensobj[j].dF_ApR7 = sqrt(lensobj[j].dF_ApR7); 221 lensobj[j].sF_ApR7 = sqrt(lensobj[j].sF_ApR7); 150 222 151 223 // somewhere in here I should calculate the values of E1, E2, and gamma 224 225 float e0 = Mxx_obj[j] + Myy_obj[j]; 226 lensobj[j].E1 = (Mxx_obj[j] - Myy_obj[j]) / e0; 227 lensobj[j].E2 = 2.0 * Mxy_obj[j] / e0; 152 228 } 153 229 … … 159 235 } 160 236 237 free (Mxx_obj); 238 free (Mxy_obj); 239 free (Myy_obj); 240 241 myIndexFree (measureIndex); 242 161 243 catalog->Nlensobj = Nlensobj; 162 244 catalog->Nlensobj_disk = 0; -
trunk/Ohana/src/dvopsps/src/insert_FWobjects_dvopsps_catalog.c
r37926 r38153 188 188 "FLUX_STD_AP_R5 FLOAT, " 189 189 "FLUX_FIL_AP_R5 FLOAT, " 190 190 191 "FLUX_AP_R6 FLOAT, " 191 192 "FLUX_ERR_AP_R6 FLOAT, " 192 193 "FLUX_STD_AP_R6 FLOAT, " 193 194 "FLUX_FIL_AP_R6 FLOAT, " 195 196 "FLUX_AP_R7 FLOAT, " 197 "FLUX_ERR_AP_R7 FLOAT, " 198 "FLUX_STD_AP_R7 FLOAT, " 199 "FLUX_FIL_AP_R7 FLOAT, " 194 200 195 201 "X11_SM_OBJ FLOAT, " … … 281 287 "FLUX_STD_AP_R5, " 282 288 "FLUX_FIL_AP_R5, " 289 283 290 "FLUX_AP_R6, " 284 291 "FLUX_ERR_AP_R6, " 285 292 "FLUX_STD_AP_R6, " 286 293 "FLUX_FIL_AP_R6, " 294 295 "FLUX_AP_R7, " 296 "FLUX_ERR_AP_R7, " 297 "FLUX_STD_AP_R7, " 298 "FLUX_FIL_AP_R7, " 287 299 288 300 "X11_SM_OBJ, " … … 367 379 368 380 // use %e? 369 PRINT_FLOAT(sec_buffer, meanPSFFlux, "%.6 f, "); // uflux precision370 PRINT_FLOAT(sec_buffer, meanPSFFluxErr, "%.6 f, "); // uflux precision371 PRINT_FLOAT(sec_buffer, meanPSFFluxStd, "%.6 f, "); // uflux precision372 373 PRINT_FLOAT(sec_buffer, meanKronFlux, "%.6 f, "); // uflux precision374 PRINT_FLOAT(sec_buffer, meanKronFluxErr, "%.6 f, "); // uflux precision375 PRINT_FLOAT(sec_buffer, meanKronFluxStd, "%.6 f, "); // uflux precision376 377 PRINT_FLOAT(sec_buffer, meanApFlux, "%.6 f, "); // uflux precision378 PRINT_FLOAT(sec_buffer, meanApFluxErr, "%.6 f, "); // uflux precision379 PRINT_FLOAT(sec_buffer, meanApFluxStd, "%.6 f, "); // uflux precision381 PRINT_FLOAT(sec_buffer, meanPSFFlux, "%.6e, "); // uflux precision 382 PRINT_FLOAT(sec_buffer, meanPSFFluxErr, "%.6e, "); // uflux precision 383 PRINT_FLOAT(sec_buffer, meanPSFFluxStd, "%.6e, "); // uflux precision 384 385 PRINT_FLOAT(sec_buffer, meanKronFlux, "%.6e, "); // uflux precision 386 PRINT_FLOAT(sec_buffer, meanKronFluxErr, "%.6e, "); // uflux precision 387 PRINT_FLOAT(sec_buffer, meanKronFluxStd, "%.6e, "); // uflux precision 388 389 PRINT_FLOAT(sec_buffer, meanApFlux, "%.6e, "); // uflux precision 390 PRINT_FLOAT(sec_buffer, meanApFluxErr, "%.6e, "); // uflux precision 391 PRINT_FLOAT(sec_buffer, meanApFluxStd, "%.6e, "); // uflux precision 380 392 381 393 PrintIOBuffer (sec_buffer, "%u ", secfilt->flags); … … 390 402 PrintIOBuffer (cpy_buffer, "%hd, ", lensobj->photcode); 391 403 392 PRINT_FLOAT(cpy_buffer, lensobj-> F_ApR5, "%.8f, "); 393 PRINT_FLOAT(cpy_buffer, lensobj->dF_ApR5, "%.8f, "); 394 PRINT_FLOAT(cpy_buffer, lensobj->sF_ApR5, "%.8f, "); 395 PRINT_FLOAT(cpy_buffer, lensobj->fF_ApR5, "%.8f, "); 396 PRINT_FLOAT(cpy_buffer, lensobj-> F_ApR6, "%.8f, "); 397 PRINT_FLOAT(cpy_buffer, lensobj->dF_ApR6, "%.8f, "); 398 PRINT_FLOAT(cpy_buffer, lensobj->sF_ApR6, "%.8f, "); 399 PRINT_FLOAT(cpy_buffer, lensobj->fF_ApR6, "%.8f, "); 400 401 PRINT_FLOAT(cpy_buffer, lensobj->X11_sm_obj, "%.8f, "); 402 PRINT_FLOAT(cpy_buffer, lensobj->X12_sm_obj, "%.8f, "); 403 PRINT_FLOAT(cpy_buffer, lensobj->X22_sm_obj, "%.8f, "); 404 PRINT_FLOAT(cpy_buffer, lensobj->E1_sm_obj, "%.8f, "); 405 PRINT_FLOAT(cpy_buffer, lensobj->E2_sm_obj, "%.8f, "); 406 PRINT_FLOAT(cpy_buffer, lensobj->X11_sh_obj, "%.8f, "); 407 PRINT_FLOAT(cpy_buffer, lensobj->X12_sh_obj, "%.8f, "); 408 PRINT_FLOAT(cpy_buffer, lensobj->X22_sh_obj, "%.8f, "); 409 PRINT_FLOAT(cpy_buffer, lensobj->E1_sh_obj, "%.8f, "); 410 PRINT_FLOAT(cpy_buffer, lensobj->E2_sh_obj, "%.8f, "); 411 412 PRINT_FLOAT(cpy_buffer, lensobj->X11_sm_psf, "%.8f, "); 413 PRINT_FLOAT(cpy_buffer, lensobj->X12_sm_psf, "%.8f, "); 414 PRINT_FLOAT(cpy_buffer, lensobj->X22_sm_psf, "%.8f, "); 415 PRINT_FLOAT(cpy_buffer, lensobj->E1_sm_psf, "%.8f, "); 416 PRINT_FLOAT(cpy_buffer, lensobj->E2_sm_psf, "%.8f, "); 417 PRINT_FLOAT(cpy_buffer, lensobj->X11_sh_psf, "%.8f, "); 418 PRINT_FLOAT(cpy_buffer, lensobj->X12_sh_psf, "%.8f, "); 419 PRINT_FLOAT(cpy_buffer, lensobj->X22_sh_psf, "%.8f, "); 420 PRINT_FLOAT(cpy_buffer, lensobj->E1_sh_psf, "%.8f, "); 421 PRINT_FLOAT(cpy_buffer, lensobj->E2_sh_psf, "%.8f, "); 422 423 PRINT_FLOAT(cpy_buffer, lensobj->gamma, "%.8f, "); 424 PRINT_FLOAT(cpy_buffer, lensobj->E1, "%.8f, "); 425 PRINT_FLOAT(cpy_buffer, lensobj->E2, "%.8f, "); 404 PRINT_FLOAT(cpy_buffer, lensobj-> F_ApR5, "%.6e, "); 405 PRINT_FLOAT(cpy_buffer, lensobj->dF_ApR5, "%.6e, "); 406 PRINT_FLOAT(cpy_buffer, lensobj->sF_ApR5, "%.6e, "); 407 PRINT_FLOAT(cpy_buffer, lensobj->fF_ApR5, "%.6e, "); 408 PRINT_FLOAT(cpy_buffer, lensobj-> F_ApR6, "%.6e, "); 409 PRINT_FLOAT(cpy_buffer, lensobj->dF_ApR6, "%.6e, "); 410 PRINT_FLOAT(cpy_buffer, lensobj->sF_ApR6, "%.6e, "); 411 PRINT_FLOAT(cpy_buffer, lensobj->fF_ApR6, "%.6e, "); 412 PRINT_FLOAT(cpy_buffer, lensobj-> F_ApR7, "%.6e, "); 413 PRINT_FLOAT(cpy_buffer, lensobj->dF_ApR7, "%.6e, "); 414 PRINT_FLOAT(cpy_buffer, lensobj->sF_ApR7, "%.6e, "); 415 PRINT_FLOAT(cpy_buffer, lensobj->fF_ApR7, "%.6e, "); 416 PRINT_FLOAT(cpy_buffer, lensobj->X11_sm_obj, "%.6e, "); 417 PRINT_FLOAT(cpy_buffer, lensobj->X12_sm_obj, "%.6e, "); 418 PRINT_FLOAT(cpy_buffer, lensobj->X22_sm_obj, "%.6e, "); 419 PRINT_FLOAT(cpy_buffer, lensobj->E1_sm_obj, "%.6e, "); 420 PRINT_FLOAT(cpy_buffer, lensobj->E2_sm_obj, "%.6e, "); 421 PRINT_FLOAT(cpy_buffer, lensobj->X11_sh_obj, "%.6e, "); 422 PRINT_FLOAT(cpy_buffer, lensobj->X12_sh_obj, "%.6e, "); 423 PRINT_FLOAT(cpy_buffer, lensobj->X22_sh_obj, "%.6e, "); 424 PRINT_FLOAT(cpy_buffer, lensobj->E1_sh_obj, "%.6e, "); 425 PRINT_FLOAT(cpy_buffer, lensobj->E2_sh_obj, "%.6e, "); 426 PRINT_FLOAT(cpy_buffer, lensobj->X11_sm_psf, "%.6e, "); 427 PRINT_FLOAT(cpy_buffer, lensobj->X12_sm_psf, "%.6e, "); 428 PRINT_FLOAT(cpy_buffer, lensobj->X22_sm_psf, "%.6e, "); 429 PRINT_FLOAT(cpy_buffer, lensobj->E1_sm_psf, "%.6e, "); 430 PRINT_FLOAT(cpy_buffer, lensobj->E2_sm_psf, "%.6e, "); 431 PRINT_FLOAT(cpy_buffer, lensobj->X11_sh_psf, "%.6e, "); 432 PRINT_FLOAT(cpy_buffer, lensobj->X12_sh_psf, "%.6e, "); 433 PRINT_FLOAT(cpy_buffer, lensobj->X22_sh_psf, "%.6e, "); 434 PRINT_FLOAT(cpy_buffer, lensobj->E1_sh_psf, "%.6e, "); 435 PRINT_FLOAT(cpy_buffer, lensobj->E2_sh_psf, "%.6e, "); 436 PRINT_FLOAT(cpy_buffer, lensobj->gamma, "%.6e, "); 437 PRINT_FLOAT(cpy_buffer, lensobj->E1, "%.6e, "); 438 PRINT_FLOAT(cpy_buffer, lensobj->E2, "%.6e, "); 426 439 427 440 PrintIOBuffer (cpy_buffer, "%u ", lensobj->Nmeas); // NOTE: PRINT_FLOAT always adds a trailing comma -- need to use a different method on the last entry -
trunk/Ohana/src/dvopsps/src/insert_diffobj_dvopsps_catalog.c
r37924 r38153 258 258 259 259 // use %e? 260 PRINT_FLOAT(sec_buffer, meanPSFFlux, "%.6 f, "); // uflux precision261 PRINT_FLOAT(sec_buffer, meanPSFFluxErr, "%.6 f, "); // uflux precision262 PRINT_FLOAT(sec_buffer, meanPSFFluxStd, "%.6 f, "); // uflux precision263 264 PRINT_FLOAT(sec_buffer, meanKronFlux, "%.6 f, "); // uflux precision265 PRINT_FLOAT(sec_buffer, meanKronFluxErr, "%.6 f, "); // uflux precision266 PRINT_FLOAT(sec_buffer, meanKronFluxStd, "%.6 f, "); // uflux precision267 268 PRINT_FLOAT(sec_buffer, meanApFlux, "%.6 f, "); // uflux precision269 PRINT_FLOAT(sec_buffer, meanApFluxErr, "%.6 f, "); // uflux precision270 PRINT_FLOAT(sec_buffer, meanApFluxStd, "%.6 f, "); // uflux precision260 PRINT_FLOAT(sec_buffer, meanPSFFlux, "%.6e, "); // uflux precision 261 PRINT_FLOAT(sec_buffer, meanPSFFluxErr, "%.6e, "); // uflux precision 262 PRINT_FLOAT(sec_buffer, meanPSFFluxStd, "%.6e, "); // uflux precision 263 264 PRINT_FLOAT(sec_buffer, meanKronFlux, "%.6e, "); // uflux precision 265 PRINT_FLOAT(sec_buffer, meanKronFluxErr, "%.6e, "); // uflux precision 266 PRINT_FLOAT(sec_buffer, meanKronFluxStd, "%.6e, "); // uflux precision 267 268 PRINT_FLOAT(sec_buffer, meanApFlux, "%.6e, "); // uflux precision 269 PRINT_FLOAT(sec_buffer, meanApFluxErr, "%.6e, "); // uflux precision 270 PRINT_FLOAT(sec_buffer, meanApFluxStd, "%.6e, "); // uflux precision 271 271 272 272 PrintIOBuffer (sec_buffer, "%u ", secfilt->flags); -
trunk/Ohana/src/kapa2/src/DrawObjects.c
r38062 r38153 248 248 249 249 /* connect first point to second point */ 250 sxa = sx0 - 0.5*(sx1 - sx0);250 sxa = MIN (MAX (sx0 - 0.5*(sx1 - sx0), X0), X1); 251 251 sya = MAX (sy0, Y0); 252 252 DrawLine (sx0, sy0, sxa, sy0); … … 254 254 255 255 /* draw segment equal distance behind first point and down to x-axis */ 256 sxa = 0.5*(sx0 + sx1);256 sxa = MIN (MAX (0.5*(sx0 + sx1), X0), X1); 257 257 DrawLine (sx0, sy0, sxa, sy0); 258 258 DrawLine (sxa, sy0, sxa, sy1); … … 269 269 sx1 = MIN (MAX (sx1, X0), X1); 270 270 sy1 = MAX (MIN (sy1, Y0), Y1); 271 sxa = 0.5*(sx0 + sx1);271 sxa = MIN (MAX (0.5*(sx0 + sx1), X0), X1); 272 272 DrawLine (sx0, sy0, sxa, sy0); 273 273 DrawLine (sxa, sy0, sxa, sy1); … … 278 278 279 279 /* draw segment equal distance after last point and down to x-axis */ 280 sxa = sx1 + 0.5*(sx1 - sxo);280 sxa = MIN (MAX (sx1 + 0.5*(sx1 - sxo), X0), X1); 281 281 sya = MAX (sy1, Y0); 282 282 DrawLine (sx1, sy1, sxa, sy1); -
trunk/Ohana/src/kapa2/src/InterpretKeys.c
r38062 r38153 1 1 # include "Ximage.h" 2 # define FILTER_MODS 1 2 3 3 4 int InterpretKeys (Graphic *graphic, XKeyEvent *event) { … … 32 33 // skip the following keys: 33 34 if (name == NULL) goto skip_cursor; 34 if (!strcmp (name, "Shift_L")) goto skip_cursor; 35 if (!strcmp (name, "Shift_R")) goto skip_cursor; 36 if (!strcmp (name, "Control_L")) goto skip_cursor; 37 if (!strcmp (name, "Control_R")) goto skip_cursor; 38 if (!strcmp (name, "Alt_L")) goto skip_cursor; 39 if (!strcmp (name, "Alt_R")) goto skip_cursor; 40 if (!strcmp (name, "Super_L")) goto skip_cursor; 41 if (!strcmp (name, "Super_R")) goto skip_cursor; 42 if (!strcmp (name, "Caps_Lock")) goto skip_cursor; 43 if (!strcmp (name, "Pause")) goto skip_cursor; 44 if (!strcmp (name, "Continue")) goto skip_cursor; 45 if (!strcmp (name, "Num_Lock")) goto skip_cursor; 46 if (!strcmp (name, "Scroll_Lock")) goto skip_cursor; 47 if (!strcmp (name, "Print")) goto skip_cursor; 48 if (!strcmp (name, "(null)")) goto skip_cursor; 35 if (FILTER_MODS) { 36 if (!strcmp (name, "Shift_L")) goto skip_cursor; 37 if (!strcmp (name, "Shift_R")) goto skip_cursor; 38 if (!strcmp (name, "Control_L")) goto skip_cursor; 39 if (!strcmp (name, "Control_R")) goto skip_cursor; 40 if (!strcmp (name, "Alt_L")) goto skip_cursor; 41 if (!strcmp (name, "Alt_R")) goto skip_cursor; 42 if (!strcmp (name, "Super_L")) goto skip_cursor; 43 if (!strcmp (name, "Super_R")) goto skip_cursor; 44 if (!strcmp (name, "Caps_Lock")) goto skip_cursor; 45 if (!strcmp (name, "Pause")) goto skip_cursor; 46 if (!strcmp (name, "Continue")) goto skip_cursor; 47 if (!strcmp (name, "Num_Lock")) goto skip_cursor; 48 if (!strcmp (name, "Scroll_Lock")) goto skip_cursor; 49 if (!strcmp (name, "Print")) goto skip_cursor; 50 if (!strcmp (name, "(null)")) goto skip_cursor; 51 } 49 52 50 53 Z = -1; -
trunk/Ohana/src/kapa2/src/PSObjects.c
r38062 r38153 211 211 212 212 /* connect first point to second point */ 213 sxa = sx0 - 0.5*(sx1 - sx0);213 sxa = MIN (MAX (sx0 - 0.5*(sx1 - sx0), X0), X1); 214 214 sya = MAX (sy0, Y0); 215 215 DrawLine (sx0, sy0, sxa, sy0); … … 217 217 218 218 /* draw segment equal distance behind first point and down to x-axis */ 219 sxa = 0.5*(sx0 + sx1);219 sxa = MIN (MAX (0.5*(sx0 + sx1), X0), X1); 220 220 DrawLine (sx0, sy0, sxa, sy0); 221 221 DrawLine (sxa, sy0, sxa, sy1); … … 232 232 sx1 = MIN (MAX (sx1, X0), X1); 233 233 sy1 = MAX (MIN (sy1, Y0), Y1); 234 sxa = 0.5*(sx0 + sx1);234 sxa = MIN (MAX (0.5*(sx0 + sx1), X0), X1); 235 235 DrawLine (sx0, sy0, sxa, sy0); 236 236 DrawLine (sxa, sy0, sxa, sy1); … … 241 241 242 242 /* draw segment equal distance after last point and down to x-axis */ 243 sxa = sx1 + 0.5*(sx1 - sxo);243 sxa = MIN (MAX (sx1 + 0.5*(sx1 - sxo), X0), X1); 244 244 sya = MAX (sy1, Y0); 245 245 DrawLine (sx1, sy1, sxa, sy1); -
trunk/Ohana/src/kapa2/src/SetColormap.c
r35106 r38153 166 166 goto store_colors; 167 167 } 168 /* anuenue */ 169 if (!strcasecmp (name, "anuenue")) { 170 redRef = 0.25*MaxValue*scale*4.0; // value at 0.0 171 greenRef = 0.50*MaxValue*scale*4.0; 172 blueRef = 1.33*MaxValue*scale; 173 for (i = 0; i < (int)(0.50*MaxValue); i++) { 174 SETVALUE (graphic[0].cmap[i].green, 0.0, 0, 0xffff); // red is a ramp from 0 to 0xffff 175 graphic[0].cmap[i].flags = DoRed | DoGreen | DoBlue; 176 } 177 for (i = (int)(0.50*MaxValue); i < (int)(0.75*MaxValue); i++) { 178 SETVALUE (graphic[0].cmap[i].green, 4.0*i*scale - 0x20000, 0, 0xffff); // red is a ramp from 0 to 0xffff 179 graphic[0].cmap[i].flags = DoRed | DoGreen | DoBlue; 180 } 181 for (i = (int)(0.75*MaxValue); i < MaxValue; i++) { 182 SETVALUE (graphic[0].cmap[i].green, 0xffff, 0, 0xffff); // red is a ramp from 0 to 0xffff 183 graphic[0].cmap[i].flags = DoRed | DoGreen | DoBlue; 184 } 185 186 for (i = 0; i < (int)(0.25*MaxValue); i++) { 187 SETVALUE (graphic[0].cmap[i].red, 4*i*scale, 0, 0xffff); 188 } 189 for (i = (int)(0.25*MaxValue); i < (int)(0.50*MaxValue); i++) { 190 SETVALUE (graphic[0].cmap[i].red, 0x20000 - 4*i*scale, 0, 0xffff); 191 } 192 for (i = (int)(0.50*MaxValue); i < MaxValue; i++) { 193 SETVALUE (graphic[0].cmap[i].red, 2*i*scale - 0xffff, 0, 0xffff); 194 } 195 196 for (i = 0; i < (int)(0.50*MaxValue); i++) { 197 SETVALUE (graphic[0].cmap[i].blue, 2*i*scale, 0, 0xffff); 198 } 199 for (i = (int)(0.50*MaxValue); i < (int)(0.75*MaxValue); i++) { 200 SETVALUE (graphic[0].cmap[i].blue, 0x30000 - 4*i*scale, 0, 0xffff); 201 } 202 for (i = (int)(0.75*MaxValue); i < MaxValue; i++) { 203 SETVALUE (graphic[0].cmap[i].blue, 4*i*scale - 0x30000, 0, 0xffff); 204 } 205 goto store_colors; 206 } 207 208 /* anuenue */ 209 if (!strncmp (name, "file:", 5)) { 210 FILE *f = fopen (&name[5], "r"); 211 if (!f) { 212 fprintf (stderr, "failed to open colormap file %s\n", &name[5]); 213 return FALSE; 214 } 215 char line[1024]; 216 217 int lastIndex = 0; 218 float lastRed = 0.0; 219 float lastBlue = 0.0; 220 float lastGreen = 0.0; 221 222 float fracIndex, fracRed, fracBlue, fracGreen; 223 224 while (scan_line_maxlen (f, line, 1024) != EOF) { 225 // file contains f R G B : f = 0.0 - 1.0, R,G,B = 0.0 - 1.0 226 int Nscan = sscanf (line, "%f %f %f %f", &fracIndex, &fracRed, &fracBlue, &fracGreen); 227 if (Nscan != 4) continue; 228 229 int nextIndex = fracIndex * MaxValue; 230 if (nextIndex <= lastIndex) { 231 lastRed = fracRed; 232 lastBlue = fracBlue; 233 lastGreen = fracGreen; 234 continue; 235 } 236 float dRdI = (fracRed - lastRed) / (float) (nextIndex - lastIndex); 237 float dBdI = (fracBlue - lastBlue) / (float) (nextIndex - lastIndex); 238 float dGdI = (fracGreen - lastGreen) / (float) (nextIndex - lastIndex); 239 for (i = lastIndex; i < nextIndex; i++) { 240 float redValue = 0xffff * (dRdI * (i - lastIndex) + lastRed); 241 float blueValue = 0xffff * (dBdI * (i - lastIndex) + lastBlue); 242 float greenValue = 0xffff * (dGdI * (i - lastIndex) + lastGreen); 243 SETVALUE (graphic[0].cmap[i].red, redValue, 0, 0xffff); 244 SETVALUE (graphic[0].cmap[i].blue, blueValue, 0, 0xffff); 245 SETVALUE (graphic[0].cmap[i].green, greenValue, 0, 0xffff); 246 } 247 lastRed = fracRed; 248 lastBlue = fracBlue; 249 lastGreen = fracGreen; 250 lastIndex = nextIndex; 251 } 252 fclose (f); 253 254 if ((int) (MaxValue*fracIndex) < MaxValue) { 255 float dRdI = (1.0 - lastRed) / (float) (MaxValue - lastIndex); 256 float dBdI = (1.0 - lastBlue) / (float) (MaxValue - lastIndex); 257 float dGdI = (1.0 - lastGreen) / (float) (MaxValue - lastIndex); 258 for (i = lastIndex; i < MaxValue; i++) { 259 float redValue = 0xffff * (dRdI * (i - lastIndex) + lastRed); 260 float blueValue = 0xffff * (dBdI * (i - lastIndex) + lastBlue); 261 float greenValue = 0xffff * (dGdI * (i - lastIndex) + lastGreen); 262 SETVALUE (graphic[0].cmap[i].red, redValue, 0, 0xffff); 263 SETVALUE (graphic[0].cmap[i].blue, blueValue, 0, 0xffff); 264 SETVALUE (graphic[0].cmap[i].green, greenValue, 0, 0xffff); 265 } 266 } 267 goto store_colors; 268 } 269 168 270 return (FALSE); 169 271 -
trunk/Ohana/src/kapa2/src/bDrawObjects.c
r38062 r38153 198 198 199 199 /* connect first point to second point */ 200 sxa = sx0 - 0.5*(sx1 - sx0);200 sxa = MIN (MAX (sx0 - 0.5*(sx1 - sx0), X0), X1); 201 201 sya = MAX (sy0, Y0); 202 202 DrawLine (buffer, sx0, sy0, sxa, sy0); … … 204 204 205 205 /* draw segment equal distance behind first point and down to x-axis */ 206 sxa = 0.5*(sx0 + sx1);206 sxa = MIN (MAX (0.5*(sx0 + sx1), X0), X1); 207 207 DrawLine (buffer, sx0, sy0, sxa, sy0); 208 208 DrawLine (buffer, sxa, sy0, sxa, sy1); … … 219 219 sx1 = MIN (MAX (sx1, X0), X1); 220 220 sy1 = MAX (MIN (sy1, Y0), Y1); 221 sxa = 0.5*(sx0 + sx1);221 sxa = MIN (MAX (0.5*(sx0 + sx1), X0), X1); 222 222 DrawLine (buffer, sx0, sy0, sxa, sy0); 223 223 DrawLine (buffer, sxa, sy0, sxa, sy1); … … 228 228 229 229 /* draw segment equal distance after last point and down to x-axis */ 230 sxa = sx1 + 0.5*(sx1 - sxo);230 sxa = MIN (MAX (sx1 + 0.5*(sx1 - sxo), X0), X1); 231 231 sya = MAX (sy1, Y0); 232 232 DrawLine (buffer, sx1, sy1, sxa, sy1); -
trunk/Ohana/src/libautocode/Makefile.Targets
r37995 r38153 48 48 $(ASRC)/lensing-ps1-v5-r1.$(ARCH).o \ 49 49 $(ASRC)/lensing-ps1-v5-r2.$(ARCH).o \ 50 $(ASRC)/lensing-ps1-v5-r3.$(ARCH).o \ 50 51 $(ASRC)/lensobj.$(ARCH).o \ 51 $(ASRC)/lensobj-ps1-v5.$(ARCH).o \ 52 $(ASRC)/lensobj-ps1-v5-r0.$(ARCH).o \ 53 $(ASRC)/lensobj-ps1-v5-r1.$(ARCH).o \ 52 54 $(ASRC)/starpar.$(ARCH).o \ 53 55 $(ASRC)/starpar-ps1-v5.$(ARCH).o \ … … 156 158 $(AINC)/lensing-ps1-v5-r1.h \ 157 159 $(AINC)/lensing-ps1-v5-r2.h \ 160 $(AINC)/lensing-ps1-v5-r3.h \ 158 161 $(AINC)/lensobj.h \ 159 $(AINC)/lensobj-ps1-v5.h \ 162 $(AINC)/lensobj-ps1-v5-r0.h \ 163 $(AINC)/lensobj-ps1-v5-r1.h \ 160 164 $(AINC)/starpar.h \ 161 165 $(AINC)/starpar-ps1-v5.h \ -
trunk/Ohana/src/libautocode/def/lensing.d
r37992 r38153 2 2 EXTNAME DVO_LENSING 3 3 TYPE BINTABLE 4 SIZE 1 444 SIZE 160 5 5 DESCRIPTION DVO Lensing Table 6 6 … … 32 32 FIELD E2_psf, E2_PSF, float, polarization psf stars E2 33 33 34 FIELD F_ApR5, FLUX_AP_R5,float, Flux inside r = 534 FIELD F_ApR5, FLUX_AP_R5, float, Flux inside r = 5 35 35 FIELD dF_ApR5, FLUX_ERR_AP_R5, float, error on Flux inside r = 5 36 36 FIELD sF_ApR5, FLUX_STD_AP_R5, float, stdev of Flux inside r = 5 37 37 FIELD fF_ApR5, FLUX_FIL_AP_R5, float, fill factor for Flux inside r = 5 38 38 39 FIELD F_ApR6, FLUX_AP_R6, float, Flux inside r = 5 40 FIELD dF_ApR6, FLUX_ERR_AP_R6, float, error on Flux inside r = 5 41 FIELD sF_ApR6, FLUX_STD_AP_R6, float, stdev of Flux inside r = 5 42 FIELD fF_ApR6, FLUX_FIL_AP_R6, float, fill factor for Flux inside r = 5 39 FIELD F_ApR6, FLUX_AP_R6, float, Flux inside r = 6 40 FIELD dF_ApR6, FLUX_ERR_AP_R6, float, error on Flux inside r = 6 41 FIELD sF_ApR6, FLUX_STD_AP_R6, float, stdev of Flux inside r = 6 42 FIELD fF_ApR6, FLUX_FIL_AP_R6, float, fill factor for Flux inside r = 6 43 44 FIELD F_ApR7, FLUX_AP_R7, float, Flux inside r = 7 45 FIELD dF_ApR7, FLUX_ERR_AP_R7, float, error on Flux inside r = 7 46 FIELD sF_ApR7, FLUX_STD_AP_R7, float, stdev of Flux inside r = 7 47 FIELD fF_ApR7, FLUX_FIL_AP_R7, float, fill factor for Flux inside r = 7 43 48 44 49 FIELD detID, DET_ID, int, detection ID … … 48 53 49 54 FIELD imageID, IMAGE_ID, int, reference to DVO image ID 50 FIELD padding, PADDING, int, padding55 FIELD padding, PADDING, int, filler 51 56 52 # 28 x float 53 # 5 x int + padding 54 # = 136 bytes / detection 57 # 160 bytes / detection 55 58 # for 2.5G objects + 60 overlaps, expect 15TB for forced warp -
trunk/Ohana/src/libautocode/def/lensobj.d
r37807 r38153 2 2 EXTNAME DVO_LENSOBJ 3 3 TYPE BINTABLE 4 SIZE 1 364 SIZE 152 5 5 DESCRIPTION DVO Lensobj Table 6 6 … … 29 29 FIELD E2_sh_psf, E2_SH_PSF, float, mean lensing shear psf stars E2 30 30 31 FIELD F_ApR5, FLUX_AP_R5,float, Flux inside r = 531 FIELD F_ApR5, FLUX_AP_R5, float, Flux inside r = 5 32 32 FIELD dF_ApR5, FLUX_ERR_AP_R5, float, error on Flux inside r = 5 33 33 FIELD sF_ApR5, FLUX_STD_AP_R5, float, stdev of Flux inside r = 5 34 34 FIELD fF_ApR5, FLUX_FIL_AP_R5, float, fill factor for Flux inside r = 5 35 35 36 FIELD F_ApR6, FLUX_AP_R6, float, Flux inside r = 5 37 FIELD dF_ApR6, FLUX_ERR_AP_R6, float, error on Flux inside r = 5 38 FIELD sF_ApR6, FLUX_STD_AP_R6, float, stdev of Flux inside r = 5 39 FIELD fF_ApR6, FLUX_FIL_AP_R6, float, fill factor for Flux inside r = 5 36 FIELD F_ApR6, FLUX_AP_R6, float, Flux inside r = 6 37 FIELD dF_ApR6, FLUX_ERR_AP_R6, float, error on Flux inside r = 6 38 FIELD sF_ApR6, FLUX_STD_AP_R6, float, stdev of Flux inside r = 6 39 FIELD fF_ApR6, FLUX_FIL_AP_R6, float, fill factor for Flux inside r = 6 40 41 FIELD F_ApR7, FLUX_AP_R7, float, Flux inside r = 7 42 FIELD dF_ApR7, FLUX_ERR_AP_R7, float, error on Flux inside r = 7 43 FIELD sF_ApR7, FLUX_STD_AP_R7, float, stdev of Flux inside r = 7 44 FIELD fF_ApR7, FLUX_FIL_AP_R7, float, fill factor for Flux inside r = 7 40 45 41 46 FIELD gamma, GAMMA, float -
trunk/Ohana/src/libdvo/include/dvo.h
r38062 r38153 1150 1150 LENSFIELD(E2_sh_psf) 1151 1151 1152 LENSFIELD( F_ApR5); 1153 LENSFIELD(dF_ApR5); 1154 LENSFIELD(sF_ApR5); 1155 LENSFIELD(fF_ApR5); 1156 1157 LENSFIELD( F_ApR6); 1158 LENSFIELD(dF_ApR6); 1159 LENSFIELD(sF_ApR6); 1160 LENSFIELD(fF_ApR6); 1161 1162 LENSFIELD( F_ApR7); 1163 LENSFIELD(dF_ApR7); 1164 LENSFIELD(sF_ApR7); 1165 LENSFIELD(fF_ApR7); 1166 1167 LENSFIELD(E1); 1168 LENSFIELD(E2); 1169 1152 1170 # undef LENSFIELD 1153 1171 -
trunk/Ohana/src/libdvo/include/dvodb.h
r38062 r38153 89 89 MAG_OPTION_F_STDEV_AP_R6, 90 90 MAG_OPTION_F_FILL_AP_R6, 91 92 MAG_OPTION_F_AP_R7, 93 MAG_OPTION_F_ERR_AP_R7, 94 MAG_OPTION_F_STDEV_AP_R7, 95 MAG_OPTION_F_FILL_AP_R7, 96 97 MAG_OPTION_E1, 98 MAG_OPTION_E2, 91 99 } dvoMagOptionType; 92 100 … … 207 215 MEAS_REF_COLOR_BLUE, 208 216 MEAS_REF_COLOR_RED, 217 209 218 MEAS_X11_SM_OBJ, 210 219 MEAS_X12_SM_OBJ, … … 227 236 MEAS_E1_SH_PSF, 228 237 MEAS_E2_SH_PSF, 238 239 MEAS_F_AP_R5, 240 MEAS_F_ERR_AP_R5, 241 MEAS_F_STDEV_AP_R5, 242 MEAS_F_FILL_AP_R5, 243 244 MEAS_F_AP_R6, 245 MEAS_F_ERR_AP_R6, 246 MEAS_F_STDEV_AP_R6, 247 MEAS_F_FILL_AP_R6, 248 249 MEAS_F_AP_R7, 250 MEAS_F_ERR_AP_R7, 251 MEAS_F_STDEV_AP_R7, 252 MEAS_F_FILL_AP_R7, 253 229 254 MEAS_E_BV, // extinction (mags) 230 255 MEAS_E_BV_ERR, -
trunk/Ohana/src/libdvo/include/ps1_v5_defs.h
r37995 r38153 8 8 SecFilt_PS1_V5 *SecFiltInternalTo_PS1_V5 (SecFilt *in, off_t Nvalues); 9 9 10 typedef Lensing_PS1_V5_R2 Lensing_PS1_V5; 10 Lensobj *Lensobj_PS1_V5_R0_ToInternal (Lensobj_PS1_V5_R0 *in, off_t Nvalues); 11 Lensobj *Lensobj_PS1_V5_R1_ToInternal (Lensobj_PS1_V5_R1 *in, off_t Nvalues); 11 12 12 Lensing *Lensing_PS1_V5_ToInternal (Lensing_PS1_V5 *in, off_t Nvalues); 13 Lensing_PS1_V5_R2 *LensingInternalTo_PS1_V5_R2 (Lensing *in, off_t Nvalues); 14 Lensobj *Lensobj_PS1_V5_ToInternal (Lensobj_PS1_V5 *in, off_t Nvalues); 15 Lensobj_PS1_V5 *LensobjInternalTo_PS1_V5 (Lensobj *in, off_t Nvalues); 13 Lensobj_PS1_V5_R1 *LensobjInternalTo_PS1_V5_R1 (Lensobj *in, off_t Nvalues); 16 14 17 15 Lensing *Lensing_PS1_V5_R0_ToInternal (Lensing_PS1_V5_R0 *in, off_t Nvalues); 18 16 Lensing *Lensing_PS1_V5_R1_ToInternal (Lensing_PS1_V5_R1 *in, off_t Nvalues); 19 17 Lensing *Lensing_PS1_V5_R2_ToInternal (Lensing_PS1_V5_R2 *in, off_t Nvalues); 18 Lensing *Lensing_PS1_V5_R3_ToInternal (Lensing_PS1_V5_R3 *in, off_t Nvalues); 19 20 Lensing_PS1_V5_R3 *LensingInternalTo_PS1_V5_R3 (Lensing *in, off_t Nvalues); 20 21 21 22 StarPar *StarPar_PS1_V5_ToInternal (StarPar_PS1_V5 *in, off_t Nvalues); -
trunk/Ohana/src/libdvo/src/dbExtractAverages.c
r38062 r38153 386 386 case MAG_OPTION_E1_SH_PSF: { value.Flt = LensValue_E1_sh_psf (field->photcode, lensobj); break; } 387 387 case MAG_OPTION_E2_SH_PSF: { value.Flt = LensValue_E2_sh_psf (field->photcode, lensobj); break; } 388 389 case MAG_OPTION_F_AP_R5: { value.Flt = LensValue_F_ApR5 (field->photcode, lensobj); break; } 390 case MAG_OPTION_F_ERR_AP_R5: { value.Flt = LensValue_dF_ApR5 (field->photcode, lensobj); break; } 391 case MAG_OPTION_F_STDEV_AP_R5: { value.Flt = LensValue_sF_ApR5 (field->photcode, lensobj); break; } 392 case MAG_OPTION_F_FILL_AP_R5: { value.Flt = LensValue_fF_ApR5 (field->photcode, lensobj); break; } 393 394 case MAG_OPTION_F_AP_R6: { value.Flt = LensValue_F_ApR6 (field->photcode, lensobj); break; } 395 case MAG_OPTION_F_ERR_AP_R6: { value.Flt = LensValue_dF_ApR6 (field->photcode, lensobj); break; } 396 case MAG_OPTION_F_STDEV_AP_R6: { value.Flt = LensValue_sF_ApR6 (field->photcode, lensobj); break; } 397 case MAG_OPTION_F_FILL_AP_R6: { value.Flt = LensValue_fF_ApR6 (field->photcode, lensobj); break; } 398 399 case MAG_OPTION_F_AP_R7: { value.Flt = LensValue_F_ApR7 (field->photcode, lensobj); break; } 400 case MAG_OPTION_F_ERR_AP_R7: { value.Flt = LensValue_dF_ApR7 (field->photcode, lensobj); break; } 401 case MAG_OPTION_F_STDEV_AP_R7: { value.Flt = LensValue_sF_ApR7 (field->photcode, lensobj); break; } 402 case MAG_OPTION_F_FILL_AP_R7: { value.Flt = LensValue_fF_ApR7 (field->photcode, lensobj); break; } 403 404 case MAG_OPTION_E1: { value.Flt = LensValue_E1 (field->photcode, lensobj); break; } 405 case MAG_OPTION_E2: { value.Flt = LensValue_E2 (field->photcode, lensobj); break; } 388 406 389 407 case MAG_OPTION_NONE: -
trunk/Ohana/src/libdvo/src/dbExtractMeasures.c
r38062 r38153 277 277 case MAG_OPTION_F_STDEV_AP_R6: 278 278 case MAG_OPTION_F_FILL_AP_R6: 279 case MAG_OPTION_F_AP_R7: 280 case MAG_OPTION_F_ERR_AP_R7: 281 case MAG_OPTION_F_STDEV_AP_R7: 282 case MAG_OPTION_F_FILL_AP_R7: 283 case MAG_OPTION_E1: 284 case MAG_OPTION_E2: 279 285 280 286 case MAG_OPTION_NONE: … … 735 741 } 736 742 break; 743 744 case MEAS_X11_SM_OBJ: { value.Flt = lensing->X11_sm_obj; break; } 745 case MEAS_X12_SM_OBJ: { value.Flt = lensing->X12_sm_obj; break; } 746 case MEAS_X22_SM_OBJ: { value.Flt = lensing->X22_sm_obj; break; } 747 case MEAS_E1_SM_OBJ: { value.Flt = lensing->E1_sm_obj; break; } 748 case MEAS_E2_SM_OBJ: { value.Flt = lensing->E2_sm_obj; break; } 749 case MEAS_X11_SH_OBJ: { value.Flt = lensing->X11_sh_obj; break; } 750 case MEAS_X12_SH_OBJ: { value.Flt = lensing->X12_sh_obj; break; } 751 case MEAS_X22_SH_OBJ: { value.Flt = lensing->X22_sh_obj; break; } 752 case MEAS_E1_SH_OBJ: { value.Flt = lensing->E1_sh_obj; break; } 753 case MEAS_E2_SH_OBJ: { value.Flt = lensing->E2_sh_obj; break; } 754 case MEAS_X11_SM_PSF: { value.Flt = lensing->X11_sm_psf; break; } 755 case MEAS_X12_SM_PSF: { value.Flt = lensing->X12_sm_psf; break; } 756 case MEAS_X22_SM_PSF: { value.Flt = lensing->X22_sm_psf; break; } 757 case MEAS_E1_SM_PSF: { value.Flt = lensing->E1_sm_psf; break; } 758 case MEAS_E2_SM_PSF: { value.Flt = lensing->E2_sm_psf; break; } 759 case MEAS_X11_SH_PSF: { value.Flt = lensing->X11_sh_psf; break; } 760 case MEAS_X12_SH_PSF: { value.Flt = lensing->X12_sh_psf; break; } 761 case MEAS_X22_SH_PSF: { value.Flt = lensing->X22_sh_psf; break; } 762 case MEAS_E1_SH_PSF: { value.Flt = lensing->E1_sh_psf; break; } 763 case MEAS_E2_SH_PSF: { value.Flt = lensing->E2_sh_psf; break; } 764 765 case MEAS_F_AP_R5: { value.Flt = lensing-> F_ApR5; break; } 766 case MEAS_F_ERR_AP_R5: { value.Flt = lensing->dF_ApR5; break; } 767 case MEAS_F_STDEV_AP_R5: { value.Flt = lensing->sF_ApR5; break; } 768 case MEAS_F_FILL_AP_R5: { value.Flt = lensing->fF_ApR5; break; } 769 case MEAS_F_AP_R6: { value.Flt = lensing-> F_ApR6; break; } 770 case MEAS_F_ERR_AP_R6: { value.Flt = lensing->dF_ApR6; break; } 771 case MEAS_F_STDEV_AP_R6: { value.Flt = lensing->sF_ApR6; break; } 772 case MEAS_F_FILL_AP_R6: { value.Flt = lensing->fF_ApR6; break; } 773 case MEAS_F_AP_R7: { value.Flt = lensing-> F_ApR7; break; } 774 case MEAS_F_ERR_AP_R7: { value.Flt = lensing->dF_ApR7; break; } 775 case MEAS_F_STDEV_AP_R7: { value.Flt = lensing->sF_ApR7; break; } 776 case MEAS_F_FILL_AP_R7: { value.Flt = lensing->fF_ApR7; break; } 737 777 738 778 case MEAS_E_BV: { value.Flt = starpar->Ebv; break; } -
trunk/Ohana/src/libdvo/src/dbFields.c
r38062 r38153 61 61 if (fields[i].ID == MEAS_E1_SH_PSF) return TRUE; 62 62 if (fields[i].ID == MEAS_E2_SH_PSF) return TRUE; 63 64 if (fields[i].ID == MEAS_F_AP_R5) return TRUE; 65 if (fields[i].ID == MEAS_F_ERR_AP_R5) return TRUE; 66 if (fields[i].ID == MEAS_F_STDEV_AP_R5) return TRUE; 67 if (fields[i].ID == MEAS_F_FILL_AP_R5) return TRUE; 68 69 if (fields[i].ID == MEAS_F_AP_R6) return TRUE; 70 if (fields[i].ID == MEAS_F_ERR_AP_R6) return TRUE; 71 if (fields[i].ID == MEAS_F_STDEV_AP_R6) return TRUE; 72 if (fields[i].ID == MEAS_F_FILL_AP_R6) return TRUE; 73 74 if (fields[i].ID == MEAS_F_AP_R7) return TRUE; 75 if (fields[i].ID == MEAS_F_ERR_AP_R7) return TRUE; 76 if (fields[i].ID == MEAS_F_STDEV_AP_R7) return TRUE; 77 if (fields[i].ID == MEAS_F_FILL_AP_R7) return TRUE; 63 78 } 64 79 return FALSE; … … 90 105 if (fields[i].magOption == MAG_OPTION_E1_SH_PSF) return TRUE; 91 106 if (fields[i].magOption == MAG_OPTION_E2_SH_PSF) return TRUE; 107 108 if (fields[i].magOption == MAG_OPTION_F_AP_R5) return TRUE; 109 if (fields[i].magOption == MAG_OPTION_F_ERR_AP_R5) return TRUE; 110 if (fields[i].magOption == MAG_OPTION_F_STDEV_AP_R5) return TRUE; 111 if (fields[i].magOption == MAG_OPTION_F_FILL_AP_R5) return TRUE; 112 113 if (fields[i].magOption == MAG_OPTION_F_AP_R6) return TRUE; 114 if (fields[i].magOption == MAG_OPTION_F_ERR_AP_R6) return TRUE; 115 if (fields[i].magOption == MAG_OPTION_F_STDEV_AP_R6) return TRUE; 116 if (fields[i].magOption == MAG_OPTION_F_FILL_AP_R6) return TRUE; 117 118 if (fields[i].magOption == MAG_OPTION_F_AP_R7) return TRUE; 119 if (fields[i].magOption == MAG_OPTION_F_ERR_AP_R7) return TRUE; 120 if (fields[i].magOption == MAG_OPTION_F_STDEV_AP_R7) return TRUE; 121 if (fields[i].magOption == MAG_OPTION_F_FILL_AP_R7) return TRUE; 122 123 if (fields[i].magOption == MAG_OPTION_E1) return TRUE; 124 if (fields[i].magOption == MAG_OPTION_E2) return TRUE; 92 125 } 93 126 return FALSE; … … 199 232 if (!strcasecmp (string, "E1_SH_PSF")) return MAG_OPTION_E1_SH_PSF; 200 233 if (!strcasecmp (string, "E2_SH_PSF")) return MAG_OPTION_E2_SH_PSF; 201 // if (!strcasecmp (string, "F_AP_R5")) return MAG_OPTION_F_AP_R5; 202 // if (!strcasecmp (string, "F_ERR_AP_R5")) return MAG_OPTION_F_ERR_AP_R5; 203 // if (!strcasecmp (string, "F_STDEV_AP_R5")) return MAG_OPTION_F_STDEV_AP_R5; 204 // if (!strcasecmp (string, "F_FILL_AP_R5")) return MAG_OPTION_F_FILL_AP_R5; 205 // if (!strcasecmp (string, "F_AP_R6")) return MAG_OPTION_F_AP_R6; 206 // if (!strcasecmp (string, "F_ERR_AP_R6")) return MAG_OPTION_F_ERR_AP_R6; 207 // if (!strcasecmp (string, "F_STDEV_AP_R6")) return MAG_OPTION_F_STDEV_AP_R6; 208 // if (!strcasecmp (string, "F_FILL_AP_R6")) return MAG_OPTION_F_FILL_AP_R6; 234 if (!strcasecmp (string, "F_AP_R5")) return MAG_OPTION_F_AP_R5; 235 if (!strcasecmp (string, "F_ERR_AP_R5")) return MAG_OPTION_F_ERR_AP_R5; 236 if (!strcasecmp (string, "F_STDEV_AP_R5")) return MAG_OPTION_F_STDEV_AP_R5; 237 if (!strcasecmp (string, "F_FILL_AP_R5")) return MAG_OPTION_F_FILL_AP_R5; 238 if (!strcasecmp (string, "F_AP_R6")) return MAG_OPTION_F_AP_R6; 239 if (!strcasecmp (string, "F_ERR_AP_R6")) return MAG_OPTION_F_ERR_AP_R6; 240 if (!strcasecmp (string, "F_STDEV_AP_R6")) return MAG_OPTION_F_STDEV_AP_R6; 241 if (!strcasecmp (string, "F_FILL_AP_R6")) return MAG_OPTION_F_FILL_AP_R6; 242 if (!strcasecmp (string, "F_AP_R7")) return MAG_OPTION_F_AP_R7; 243 if (!strcasecmp (string, "F_ERR_AP_R7")) return MAG_OPTION_F_ERR_AP_R7; 244 if (!strcasecmp (string, "F_STDEV_AP_R7")) return MAG_OPTION_F_STDEV_AP_R7; 245 if (!strcasecmp (string, "F_FILL_AP_R7")) return MAG_OPTION_F_FILL_AP_R7; 246 if (!strcasecmp (string, "E1")) return MAG_OPTION_E1; 247 if (!strcasecmp (string, "E2")) return MAG_OPTION_E2; 209 248 210 249 return MAG_OPTION_NONE; … … 534 573 if (!strcasecmp (fieldName, "E2_SH_PSF")) ESCAPE (MEAS_E2_SH_PSF, OPIHI_FLT); 535 574 575 if (!strcasecmp (fieldName, "F_AP_R5")) ESCAPE (MEAS_F_AP_R5, OPIHI_FLT); 576 if (!strcasecmp (fieldName, "F_ERR_AP_R5")) ESCAPE (MEAS_F_ERR_AP_R5, OPIHI_FLT); 577 if (!strcasecmp (fieldName, "F_STDEV_AP_R5")) ESCAPE (MEAS_F_STDEV_AP_R5, OPIHI_FLT); 578 if (!strcasecmp (fieldName, "F_FILL_AP_R5")) ESCAPE (MEAS_F_FILL_AP_R5, OPIHI_FLT); 579 if (!strcasecmp (fieldName, "F_AP_R6")) ESCAPE (MEAS_F_AP_R6, OPIHI_FLT); 580 if (!strcasecmp (fieldName, "F_ERR_AP_R6")) ESCAPE (MEAS_F_ERR_AP_R6, OPIHI_FLT); 581 if (!strcasecmp (fieldName, "F_STDEV_AP_R6")) ESCAPE (MEAS_F_STDEV_AP_R6, OPIHI_FLT); 582 if (!strcasecmp (fieldName, "F_FILL_AP_R6")) ESCAPE (MEAS_F_FILL_AP_R6, OPIHI_FLT); 583 if (!strcasecmp (fieldName, "F_AP_R7")) ESCAPE (MEAS_F_AP_R7, OPIHI_FLT); 584 if (!strcasecmp (fieldName, "F_ERR_AP_R7")) ESCAPE (MEAS_F_ERR_AP_R7, OPIHI_FLT); 585 if (!strcasecmp (fieldName, "F_STDEV_AP_R7")) ESCAPE (MEAS_F_STDEV_AP_R7, OPIHI_FLT); 586 if (!strcasecmp (fieldName, "F_FILL_AP_R7")) ESCAPE (MEAS_F_FILL_AP_R7, OPIHI_FLT); 587 536 588 if (!strcasecmp (fieldName, "E_BV")) ESCAPE (MEAS_E_BV , OPIHI_FLT); 537 589 if (!strcasecmp (fieldName, "E_BV_ERR")) ESCAPE (MEAS_E_BV_ERR , OPIHI_FLT); -
trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
r37807 r38153 992 992 assert (catalog[0].Nlensing_disk >= catalog[0].Nlensing_off); 993 993 994 // convert to external table format (note that the block above does not damage or free catalog.average) 995 if (!LensingToFtable (&ftable, &catalog[0].lensing[first], Nrows, catalog[0].catformat)) { 996 fprintf (stderr, "trouble converting format\n"); 997 goto failure; 998 } 999 1000 // write out Lensing table 1001 if (!dvo_catalog_save_subcat (catalog[0].lensing_catalog, &ftable, start, Nrows, catalog[0].Nlensing_disk, Nlensing_disk_new)) { 1002 fprintf (stderr, "trouble writing Lensing table\n"); 1003 goto failure; 1004 } 1005 gfits_free_header (&header); 1006 gfits_free_table (&ftable); 994 if (catalog[0].Nlensing) { 995 // convert to external table format (note that the block above does not damage or free catalog.average) 996 if (!LensingToFtable (&ftable, &catalog[0].lensing[first], Nrows, catalog[0].catformat)) { 997 fprintf (stderr, "trouble converting format\n"); 998 goto failure; 999 } 1000 1001 // write out Lensing table 1002 if (!dvo_catalog_save_subcat (catalog[0].lensing_catalog, &ftable, start, Nrows, catalog[0].Nlensing_disk, Nlensing_disk_new)) { 1003 fprintf (stderr, "trouble writing Lensing table\n"); 1004 goto failure; 1005 } 1006 gfits_free_header (&header); 1007 gfits_free_table (&ftable); 1008 } 1007 1009 } 1008 1010 … … 1019 1021 assert (catalog[0].Nlensobj_disk >= catalog[0].Nlensobj_off); 1020 1022 1021 // convert to external table format (note that the block above does not damage or free catalog.average) 1022 if (!LensobjToFtable (&ftable, &catalog[0].lensobj[first], Nrows, catalog[0].catformat)) { 1023 fprintf (stderr, "trouble converting format\n"); 1024 goto failure; 1025 } 1026 1027 // write out Lensobj table 1028 if (!dvo_catalog_save_subcat (catalog[0].lensobj_catalog, &ftable, start, Nrows, catalog[0].Nlensobj_disk, Nlensobj_disk_new)) { 1029 fprintf (stderr, "trouble writing Lensobj table\n"); 1030 goto failure; 1031 } 1032 gfits_free_header (&header); 1033 gfits_free_table (&ftable); 1023 if (catalog[0].Nlensobj) { 1024 // convert to external table format (note that the block above does not damage or free catalog.average) 1025 if (!LensobjToFtable (&ftable, &catalog[0].lensobj[first], Nrows, catalog[0].catformat)) { 1026 fprintf (stderr, "trouble converting format\n"); 1027 goto failure; 1028 } 1029 1030 // write out Lensobj table 1031 if (!dvo_catalog_save_subcat (catalog[0].lensobj_catalog, &ftable, start, Nrows, catalog[0].Nlensobj_disk, Nlensobj_disk_new)) { 1032 fprintf (stderr, "trouble writing Lensobj table\n"); 1033 goto failure; 1034 } 1035 gfits_free_header (&header); 1036 gfits_free_table (&ftable); 1037 } 1034 1038 } 1035 1039 … … 1046 1050 assert (catalog[0].Nstarpar_disk >= catalog[0].Nstarpar_off); 1047 1051 1048 // convert to external table format (note that the block above does not damage or free catalog.average) 1049 if (!StarParToFtable (&ftable, &catalog[0].starpar[first], Nrows, catalog[0].catformat)) { 1050 fprintf (stderr, "trouble converting format\n"); 1051 goto failure; 1052 } 1053 1054 // write out StarPar table 1055 if (!dvo_catalog_save_subcat (catalog[0].starpar_catalog, &ftable, start, Nrows, catalog[0].Nstarpar_disk, Nstarpar_disk_new)) { 1056 fprintf (stderr, "trouble writing StarPar table\n"); 1057 goto failure; 1058 } 1059 gfits_free_header (&header); 1060 gfits_free_table (&ftable); 1052 if (catalog[0].Nstarpar) { 1053 // convert to external table format (note that the block above does not damage or free catalog.average) 1054 if (!StarParToFtable (&ftable, &catalog[0].starpar[first], Nrows, catalog[0].catformat)) { 1055 fprintf (stderr, "trouble converting format\n"); 1056 goto failure; 1057 } 1058 1059 // write out StarPar table 1060 if (!dvo_catalog_save_subcat (catalog[0].starpar_catalog, &ftable, start, Nrows, catalog[0].Nstarpar_disk, Nstarpar_disk_new)) { 1061 fprintf (stderr, "trouble writing StarPar table\n"); 1062 goto failure; 1063 } 1064 gfits_free_header (&header); 1065 gfits_free_table (&ftable); 1066 } 1061 1067 } 1062 1068 -
trunk/Ohana/src/libdvo/src/dvo_convert.c
r38062 r38153 455 455 return (lensing); } 456 456 457 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 144)) { 458 Lensing_PS1_V5_R2 *tmpLensing; 459 tmpLensing = gfits_table_get_Lensing_PS1_V5_R2 (ftable, Nlensing, NULL); 460 if (!tmpLensing) { 461 fprintf (stderr, "ERROR: failed to read lensings\n"); 462 exit (2); 463 } 464 lensing = Lensing_PS1_V5_R2_ToInternal (tmpLensing, *Nlensing); 465 free (tmpLensing); 466 *format = DVO_FORMAT_PS1_V5; 467 return (lensing); } 468 469 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \ 470 if (!strcmp (extname, NAME)) { \ 471 fprintf (stderr, "ERROR: format %s not defined for lensing, skipping\n", NAME); \ 472 *Nlensing = 0; \ 473 return NULL; \ 474 } 475 457 476 # define CONVERT_FORMAT(NAME, FORMAT, TYPE) \ 458 477 if (!strcmp (extname, NAME)) { \ … … 468 487 return (lensing); } 469 488 470 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \471 if (!strcmp (extname, NAME)) { \472 fprintf (stderr, "ERROR: format %s not defined for lensing, skipping\n", NAME); \473 *Nlensing = 0; \474 return NULL; \475 }476 477 489 if (!strcmp (extname, "DVO_LENSING")) { 478 490 lensing = gfits_table_get_Lensing (ftable, Nlensing, NULL); … … 496 508 SKIPPING_FORMAT ("DVO_LENSING_PS1_V3", PS1_V3, PS1_V3); 497 509 SKIPPING_FORMAT ("DVO_LENSING_PS1_V4", PS1_V4, PS1_V4); 498 CONVERT_FORMAT ("DVO_LENSING_PS1_V5", PS1_V5, PS1_V5_R2); 510 CONVERT_FORMAT ("DVO_LENSING_PS1_V5", PS1_V5, PS1_V5_R3); 511 SKIPPING_FORMAT ("DVO_LENSING_PS1_SIM", PS1_SIM, PS1_SIM); 499 512 # undef CONVERT_FORMAT 513 # undef SKIPPING_FORMAT 500 514 501 515 fprintf (stderr, "table format unknown: %s\n", extname); … … 533 547 // FORMAT_CASE (PS1_V3, PS1_V3); 534 548 // FORMAT_CASE (PS1_V4, PS1_V4); 535 FORMAT_CASE (PS1_V5, PS1_V5_R 2);549 FORMAT_CASE (PS1_V5, PS1_V5_R3); 536 550 # undef FORMAT_CASE 537 551 … … 554 568 fprintf (stderr, "EXTNAME missing for lensobj table\n"); 555 569 return (FALSE); 570 } 571 572 if (!strcmp (extname, "DVO_LENSOBJ_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) { 573 Lensobj_PS1_V5_R0 *tmpLensobj; 574 tmpLensobj = gfits_table_get_Lensobj_PS1_V5_R0 (ftable, Nlensobj, NULL); 575 if (!tmpLensobj) { 576 fprintf (stderr, "ERROR: failed to read lensobjs\n"); 577 exit (2); 578 } 579 lensobj = Lensobj_PS1_V5_R0_ToInternal (tmpLensobj, *Nlensobj); 580 free (tmpLensobj); 581 *format = DVO_FORMAT_PS1_V5; 582 return (lensobj); } 583 584 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \ 585 if (!strcmp (extname, NAME)) { \ 586 fprintf (stderr, "ERROR: format %s not defined for lensobj, skipping\n", NAME); \ 587 *Nlensobj = 0; \ 588 return NULL; \ 556 589 } 557 590 … … 579 612 } 580 613 581 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_REF", PS1_REF, PS1_REF); 582 // CONVERT_FORMAT ("DVO_LENSOBJ_ELIXIR", ELIXIR, Elixir); 583 // CONVERT_FORMAT ("DVO_LENSOBJ_LONEOS", LONEOS, Loneos); 584 // CONVERT_FORMAT ("DVO_LENSOBJ_PANSTARRS_DEV_0", PANSTARRS_DEV_0, Panstarrs_DEV_0); 585 // CONVERT_FORMAT ("DVO_LENSOBJ_PANSTARRS_DEV_1", PANSTARRS_DEV_1, Panstarrs_DEV_1); 586 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_DEV_1", PS1_DEV_1, PS1_DEV_1); 587 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_DEV_2", PS1_DEV_2, PS1_DEV_2); 588 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V1", PS1_V1, PS1_V1); 589 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V2", PS1_V2, PS1_V2); 590 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V3", PS1_V3, PS1_V3); 591 // CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V4", PS1_V4, PS1_V4); 592 CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V5", PS1_V5, PS1_V5); 614 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_REF", PS1_REF, PS1_REF); 615 SKIPPING_FORMAT ("DVO_LENSOBJ_ELIXIR", ELIXIR, Elixir); 616 SKIPPING_FORMAT ("DVO_LENSOBJ_LONEOS", LONEOS, Loneos); 617 SKIPPING_FORMAT ("DVO_LENSOBJ_PANSTARRS_DEV_0", PANSTARRS_DEV_0, Panstarrs_DEV_0); 618 SKIPPING_FORMAT ("DVO_LENSOBJ_PANSTARRS_DEV_1", PANSTARRS_DEV_1, Panstarrs_DEV_1); 619 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_DEV_1", PS1_DEV_1, PS1_DEV_1); 620 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_DEV_2", PS1_DEV_2, PS1_DEV_2); 621 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V1", PS1_V1, PS1_V1); 622 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V2", PS1_V2, PS1_V2); 623 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V3", PS1_V3, PS1_V3); 624 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V4", PS1_V4, PS1_V4); 625 CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V5", PS1_V5, PS1_V5_R1); 626 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_SIM", PS1_SIM, PS1_SIM); 593 627 # undef CONVERT_FORMAT 628 # undef SKIPPING_FORMAT 594 629 595 630 fprintf (stderr, "table format unknown: %s\n", extname); … … 627 662 // FORMAT_CASE (PS1_V3, PS1_V3); 628 663 // FORMAT_CASE (PS1_V4, PS1_V4); 629 FORMAT_CASE (PS1_V5, PS1_V5 );664 FORMAT_CASE (PS1_V5, PS1_V5_R1); 630 665 # undef FORMAT_CASE 631 666 … … 648 683 fprintf (stderr, "EXTNAME missing for starpar table\n"); 649 684 return (FALSE); 685 } 686 687 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \ 688 if (!strcmp (extname, NAME)) { \ 689 fprintf (stderr, "ERROR: format %s not defined for starpar, skipping\n", NAME); \ 690 *Nstarpar = 0; \ 691 return NULL; \ 650 692 } 651 693 … … 673 715 } 674 716 675 CONVERT_FORMAT ("DVO_STARPAR_PS1_SIM", PS1_SIM, PS1_SIM); 676 // CONVERT_FORMAT ("DVO_STARPAR_PS1_REF", PS1_REF, PS1_REF); 677 // CONVERT_FORMAT ("DVO_STARPAR_ELIXIR", ELIXIR, Elixir); 678 // CONVERT_FORMAT ("DVO_STARPAR_LONEOS", LONEOS, Loneos); 679 // CONVERT_FORMAT ("DVO_STARPAR_PANSTARRS_DEV_0", PANSTARRS_DEV_0, Panstarrs_DEV_0); 680 // CONVERT_FORMAT ("DVO_STARPAR_PANSTARRS_DEV_1", PANSTARRS_DEV_1, Panstarrs_DEV_1); 681 // CONVERT_FORMAT ("DVO_STARPAR_PS1_DEV_1", PS1_DEV_1, PS1_DEV_1); 682 // CONVERT_FORMAT ("DVO_STARPAR_PS1_DEV_2", PS1_DEV_2, PS1_DEV_2); 683 // CONVERT_FORMAT ("DVO_STARPAR_PS1_V1", PS1_V1, PS1_V1); 684 // CONVERT_FORMAT ("DVO_STARPAR_PS1_V2", PS1_V2, PS1_V2); 685 // CONVERT_FORMAT ("DVO_STARPAR_PS1_V3", PS1_V3, PS1_V3); 686 // CONVERT_FORMAT ("DVO_STARPAR_PS1_V4", PS1_V4, PS1_V4); 687 CONVERT_FORMAT ("DVO_STARPAR_PS1_V5", PS1_V5, PS1_V5); 688 // CONVERT_FORMAT ("DVO_STELLAR_PARAMS_PS1_V5", PS1_V5, PS1_V5); 689 // XXX fix in libauto: STELLAR_PARAMS to STARPAR 717 CONVERT_FORMAT ("DVO_STARPAR_PS1_SIM", PS1_SIM, PS1_SIM); 718 SKIPPING_FORMAT ("DVO_STARPAR_PS1_REF", PS1_REF, PS1_REF); 719 SKIPPING_FORMAT ("DVO_STARPAR_ELIXIR", ELIXIR, Elixir); 720 SKIPPING_FORMAT ("DVO_STARPAR_LONEOS", LONEOS, Loneos); 721 SKIPPING_FORMAT ("DVO_STARPAR_PANSTARRS_DEV_0", PANSTARRS_DEV_0, Panstarrs_DEV_0); 722 SKIPPING_FORMAT ("DVO_STARPAR_PANSTARRS_DEV_1", PANSTARRS_DEV_1, Panstarrs_DEV_1); 723 SKIPPING_FORMAT ("DVO_STARPAR_PS1_DEV_1", PS1_DEV_1, PS1_DEV_1); 724 SKIPPING_FORMAT ("DVO_STARPAR_PS1_DEV_2", PS1_DEV_2, PS1_DEV_2); 725 SKIPPING_FORMAT ("DVO_STARPAR_PS1_V1", PS1_V1, PS1_V1); 726 SKIPPING_FORMAT ("DVO_STARPAR_PS1_V2", PS1_V2, PS1_V2); 727 SKIPPING_FORMAT ("DVO_STARPAR_PS1_V3", PS1_V3, PS1_V3); 728 SKIPPING_FORMAT ("DVO_STARPAR_PS1_V4", PS1_V4, PS1_V4); 729 CONVERT_FORMAT ("DVO_STARPAR_PS1_V5", PS1_V5, PS1_V5); 690 730 # undef CONVERT_FORMAT 731 # undef SKIPPING_FORMAT 691 732 692 733 fprintf (stderr, "table format unknown: %s\n", extname); -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c
r38062 r38153 448 448 } 449 449 450 Lensing *Lensing_PS1_V5_R 2_ToInternal (Lensing_PS1_V5_R2*in, off_t Nvalues) {450 Lensing *Lensing_PS1_V5_R0_ToInternal (Lensing_PS1_V5_R0 *in, off_t Nvalues) { 451 451 452 452 off_t i; … … 481 481 out[i].E1_sh_psf = in[i].E1_sh_psf; 482 482 out[i].E2_sh_psf = in[i].E2_sh_psf; 483 484 out[i].E1_psf = in[i].E1_psf;485 out[i].E2_psf = in[i].E2_psf;486 483 487 484 out[i].F_ApR5 = in[i].F_ApR5; … … 499 496 out[i].catID = in[i].catID; 500 497 out[i].averef = in[i].averef; 501 502 out[i].imageID = in[i].imageID; 503 } 504 return (out); 505 } 506 507 Lensing_PS1_V5_R2 *LensingInternalTo_PS1_V5_R2 (Lensing *in, off_t Nvalues) { 508 509 off_t i; 510 Lensing_PS1_V5_R2 *out; 511 512 ALLOCATE_ZERO (out, Lensing_PS1_V5, Nvalues); 513 514 for (i = 0; i < Nvalues; i++) { 498 } 499 return (out); 500 } 501 502 Lensing *Lensing_PS1_V5_R1_ToInternal (Lensing_PS1_V5_R1 *in, off_t Nvalues) { 503 504 off_t i; 505 Lensing *out; 506 507 ALLOCATE_ZERO (out, Lensing, Nvalues); 508 509 for (i = 0; i < Nvalues; i++) { 510 dvo_lensing_init (&out[i]); 515 511 516 512 out[i].X11_sm_obj = in[i].X11_sm_obj; … … 537 533 out[i].E1_sh_psf = in[i].E1_sh_psf; 538 534 out[i].E2_sh_psf = in[i].E2_sh_psf; 539 540 out[i].E1_psf = in[i].E1_psf;541 out[i].E2_psf = in[i].E2_psf;542 535 543 536 out[i].F_ApR5 = in[i].F_ApR5; … … 561 554 } 562 555 563 Lensobj *Lensobj_PS1_V5_ToInternal (Lensobj_PS1_V5 *in, off_t Nvalues) { 556 Lensing *Lensing_PS1_V5_R2_ToInternal (Lensing_PS1_V5_R2 *in, off_t Nvalues) { 557 558 off_t i; 559 Lensing *out; 560 561 ALLOCATE_ZERO (out, Lensing, Nvalues); 562 563 for (i = 0; i < Nvalues; i++) { 564 dvo_lensing_init (&out[i]); 565 566 out[i].X11_sm_obj = in[i].X11_sm_obj; 567 out[i].X12_sm_obj = in[i].X12_sm_obj; 568 out[i].X22_sm_obj = in[i].X22_sm_obj; 569 out[i].E1_sm_obj = in[i].E1_sm_obj; 570 out[i].E2_sm_obj = in[i].E2_sm_obj; 571 572 out[i].X11_sh_obj = in[i].X11_sh_obj; 573 out[i].X12_sh_obj = in[i].X12_sh_obj; 574 out[i].X22_sh_obj = in[i].X22_sh_obj; 575 out[i].E1_sh_obj = in[i].E1_sh_obj; 576 out[i].E2_sh_obj = in[i].E2_sh_obj; 577 578 out[i].X11_sm_psf = in[i].X11_sm_psf; 579 out[i].X12_sm_psf = in[i].X12_sm_psf; 580 out[i].X22_sm_psf = in[i].X22_sm_psf; 581 out[i].E1_sm_psf = in[i].E1_sm_psf; 582 out[i].E2_sm_psf = in[i].E2_sm_psf; 583 584 out[i].X11_sh_psf = in[i].X11_sh_psf; 585 out[i].X12_sh_psf = in[i].X12_sh_psf; 586 out[i].X22_sh_psf = in[i].X22_sh_psf; 587 out[i].E1_sh_psf = in[i].E1_sh_psf; 588 out[i].E2_sh_psf = in[i].E2_sh_psf; 589 590 out[i].E1_psf = in[i].E1_psf; 591 out[i].E2_psf = in[i].E2_psf; 592 593 out[i].F_ApR5 = in[i].F_ApR5; 594 out[i].dF_ApR5 = in[i].dF_ApR5; 595 out[i].sF_ApR5 = in[i].sF_ApR5; 596 out[i].fF_ApR5 = in[i].fF_ApR5; 597 598 out[i].F_ApR6 = in[i].F_ApR6; 599 out[i].dF_ApR6 = in[i].dF_ApR6; 600 out[i].sF_ApR6 = in[i].sF_ApR6; 601 out[i].fF_ApR6 = in[i].fF_ApR6; 602 603 out[i].detID = in[i].detID; 604 out[i].objID = in[i].objID; 605 out[i].catID = in[i].catID; 606 out[i].averef = in[i].averef; 607 608 out[i].imageID = in[i].imageID; 609 } 610 return (out); 611 } 612 613 Lensing *Lensing_PS1_V5_R3_ToInternal (Lensing_PS1_V5_R3 *in, off_t Nvalues) { 614 615 off_t i; 616 Lensing *out; 617 618 ALLOCATE_ZERO (out, Lensing, Nvalues); 619 620 for (i = 0; i < Nvalues; i++) { 621 dvo_lensing_init (&out[i]); 622 623 out[i].X11_sm_obj = in[i].X11_sm_obj; 624 out[i].X12_sm_obj = in[i].X12_sm_obj; 625 out[i].X22_sm_obj = in[i].X22_sm_obj; 626 out[i].E1_sm_obj = in[i].E1_sm_obj; 627 out[i].E2_sm_obj = in[i].E2_sm_obj; 628 629 out[i].X11_sh_obj = in[i].X11_sh_obj; 630 out[i].X12_sh_obj = in[i].X12_sh_obj; 631 out[i].X22_sh_obj = in[i].X22_sh_obj; 632 out[i].E1_sh_obj = in[i].E1_sh_obj; 633 out[i].E2_sh_obj = in[i].E2_sh_obj; 634 635 out[i].X11_sm_psf = in[i].X11_sm_psf; 636 out[i].X12_sm_psf = in[i].X12_sm_psf; 637 out[i].X22_sm_psf = in[i].X22_sm_psf; 638 out[i].E1_sm_psf = in[i].E1_sm_psf; 639 out[i].E2_sm_psf = in[i].E2_sm_psf; 640 641 out[i].X11_sh_psf = in[i].X11_sh_psf; 642 out[i].X12_sh_psf = in[i].X12_sh_psf; 643 out[i].X22_sh_psf = in[i].X22_sh_psf; 644 out[i].E1_sh_psf = in[i].E1_sh_psf; 645 out[i].E2_sh_psf = in[i].E2_sh_psf; 646 647 out[i].E1_psf = in[i].E1_psf; 648 out[i].E2_psf = in[i].E2_psf; 649 650 out[i].F_ApR5 = in[i].F_ApR5; 651 out[i].dF_ApR5 = in[i].dF_ApR5; 652 out[i].sF_ApR5 = in[i].sF_ApR5; 653 out[i].fF_ApR5 = in[i].fF_ApR5; 654 655 out[i].F_ApR6 = in[i].F_ApR6; 656 out[i].dF_ApR6 = in[i].dF_ApR6; 657 out[i].sF_ApR6 = in[i].sF_ApR6; 658 out[i].fF_ApR6 = in[i].fF_ApR6; 659 660 out[i].F_ApR7 = in[i].F_ApR7; 661 out[i].dF_ApR7 = in[i].dF_ApR7; 662 out[i].sF_ApR7 = in[i].sF_ApR7; 663 out[i].fF_ApR7 = in[i].fF_ApR7; 664 665 out[i].detID = in[i].detID; 666 out[i].objID = in[i].objID; 667 out[i].catID = in[i].catID; 668 out[i].averef = in[i].averef; 669 670 out[i].imageID = in[i].imageID; 671 } 672 return (out); 673 } 674 675 Lensing_PS1_V5_R3 *LensingInternalTo_PS1_V5_R3 (Lensing *in, off_t Nvalues) { 676 677 off_t i; 678 Lensing_PS1_V5_R3 *out; 679 680 ALLOCATE_ZERO (out, Lensing_PS1_V5_R3, Nvalues); 681 682 for (i = 0; i < Nvalues; i++) { 683 684 out[i].X11_sm_obj = in[i].X11_sm_obj; 685 out[i].X12_sm_obj = in[i].X12_sm_obj; 686 out[i].X22_sm_obj = in[i].X22_sm_obj; 687 out[i].E1_sm_obj = in[i].E1_sm_obj; 688 out[i].E2_sm_obj = in[i].E2_sm_obj; 689 690 out[i].X11_sh_obj = in[i].X11_sh_obj; 691 out[i].X12_sh_obj = in[i].X12_sh_obj; 692 out[i].X22_sh_obj = in[i].X22_sh_obj; 693 out[i].E1_sh_obj = in[i].E1_sh_obj; 694 out[i].E2_sh_obj = in[i].E2_sh_obj; 695 696 out[i].X11_sm_psf = in[i].X11_sm_psf; 697 out[i].X12_sm_psf = in[i].X12_sm_psf; 698 out[i].X22_sm_psf = in[i].X22_sm_psf; 699 out[i].E1_sm_psf = in[i].E1_sm_psf; 700 out[i].E2_sm_psf = in[i].E2_sm_psf; 701 702 out[i].X11_sh_psf = in[i].X11_sh_psf; 703 out[i].X12_sh_psf = in[i].X12_sh_psf; 704 out[i].X22_sh_psf = in[i].X22_sh_psf; 705 out[i].E1_sh_psf = in[i].E1_sh_psf; 706 out[i].E2_sh_psf = in[i].E2_sh_psf; 707 708 out[i].E1_psf = in[i].E1_psf; 709 out[i].E2_psf = in[i].E2_psf; 710 711 out[i].F_ApR5 = in[i].F_ApR5; 712 out[i].dF_ApR5 = in[i].dF_ApR5; 713 out[i].sF_ApR5 = in[i].sF_ApR5; 714 out[i].fF_ApR5 = in[i].fF_ApR5; 715 716 out[i].F_ApR6 = in[i].F_ApR6; 717 out[i].dF_ApR6 = in[i].dF_ApR6; 718 out[i].sF_ApR6 = in[i].sF_ApR6; 719 out[i].fF_ApR6 = in[i].fF_ApR6; 720 721 out[i].F_ApR7 = in[i].F_ApR7; 722 out[i].dF_ApR7 = in[i].dF_ApR7; 723 out[i].sF_ApR7 = in[i].sF_ApR7; 724 out[i].fF_ApR7 = in[i].fF_ApR7; 725 726 out[i].detID = in[i].detID; 727 out[i].objID = in[i].objID; 728 out[i].catID = in[i].catID; 729 out[i].averef = in[i].averef; 730 731 out[i].imageID = in[i].imageID; 732 } 733 return (out); 734 } 735 736 Lensobj *Lensobj_PS1_V5_R0_ToInternal (Lensobj_PS1_V5_R0 *in, off_t Nvalues) { 564 737 565 738 off_t i; … … 618 791 } 619 792 620 Lensobj_PS1_V5 *LensobjInternalTo_PS1_V5 (Lensobj *in, off_t Nvalues) { 621 622 off_t i; 623 Lensobj_PS1_V5 *out; 624 625 ALLOCATE_ZERO (out, Lensobj_PS1_V5, Nvalues); 626 627 for (i = 0; i < Nvalues; i++) { 793 Lensobj *Lensobj_PS1_V5_R1_ToInternal (Lensobj_PS1_V5_R1 *in, off_t Nvalues) { 794 795 off_t i; 796 Lensobj *out; 797 798 ALLOCATE_ZERO (out, Lensobj, Nvalues); 799 800 for (i = 0; i < Nvalues; i++) { 801 dvo_lensobj_init (&out[i], FALSE); 628 802 629 803 out[i].X11_sm_obj = in[i].X11_sm_obj; … … 660 834 out[i].sF_ApR6 = in[i].sF_ApR6; 661 835 out[i].fF_ApR6 = in[i].fF_ApR6; 836 837 out[i].F_ApR7 = in[i].F_ApR7; 838 out[i].dF_ApR7 = in[i].dF_ApR7; 839 out[i].sF_ApR7 = in[i].sF_ApR7; 840 out[i].fF_ApR7 = in[i].fF_ApR7; 841 842 out[i].gamma = in[i].gamma; 843 out[i].E1 = in[i].E1; 844 out[i].E2 = in[i].E2; 845 846 out[i].objID = in[i].objID; 847 out[i].catID = in[i].catID; 848 849 out[i].photcode = in[i].photcode; 850 out[i].Nmeas = in[i].Nmeas; 851 } 852 return (out); 853 } 854 855 Lensobj_PS1_V5_R1 *LensobjInternalTo_PS1_V5_R1 (Lensobj *in, off_t Nvalues) { 856 857 off_t i; 858 Lensobj_PS1_V5_R1 *out; 859 860 ALLOCATE_ZERO (out, Lensobj_PS1_V5_R1, Nvalues); 861 862 for (i = 0; i < Nvalues; i++) { 863 864 out[i].X11_sm_obj = in[i].X11_sm_obj; 865 out[i].X12_sm_obj = in[i].X12_sm_obj; 866 out[i].X22_sm_obj = in[i].X22_sm_obj; 867 out[i].E1_sm_obj = in[i].E1_sm_obj; 868 out[i].E2_sm_obj = in[i].E2_sm_obj; 869 870 out[i].X11_sh_obj = in[i].X11_sh_obj; 871 out[i].X12_sh_obj = in[i].X12_sh_obj; 872 out[i].X22_sh_obj = in[i].X22_sh_obj; 873 out[i].E1_sh_obj = in[i].E1_sh_obj; 874 out[i].E2_sh_obj = in[i].E2_sh_obj; 875 876 out[i].X11_sm_psf = in[i].X11_sm_psf; 877 out[i].X12_sm_psf = in[i].X12_sm_psf; 878 out[i].X22_sm_psf = in[i].X22_sm_psf; 879 out[i].E1_sm_psf = in[i].E1_sm_psf; 880 out[i].E2_sm_psf = in[i].E2_sm_psf; 881 882 out[i].X11_sh_psf = in[i].X11_sh_psf; 883 out[i].X12_sh_psf = in[i].X12_sh_psf; 884 out[i].X22_sh_psf = in[i].X22_sh_psf; 885 out[i].E1_sh_psf = in[i].E1_sh_psf; 886 out[i].E2_sh_psf = in[i].E2_sh_psf; 887 888 out[i].F_ApR5 = in[i].F_ApR5; 889 out[i].dF_ApR5 = in[i].dF_ApR5; 890 out[i].sF_ApR5 = in[i].sF_ApR5; 891 out[i].fF_ApR5 = in[i].fF_ApR5; 892 893 out[i].F_ApR6 = in[i].F_ApR6; 894 out[i].dF_ApR6 = in[i].dF_ApR6; 895 out[i].sF_ApR6 = in[i].sF_ApR6; 896 out[i].fF_ApR6 = in[i].fF_ApR6; 897 898 out[i].F_ApR7 = in[i].F_ApR7; 899 out[i].dF_ApR7 = in[i].dF_ApR7; 900 out[i].sF_ApR7 = in[i].sF_ApR7; 901 out[i].fF_ApR7 = in[i].fF_ApR7; 662 902 663 903 out[i].gamma = in[i].gamma; … … 1271 1511 } 1272 1512 return (data); 1273 }1274 1275 Lensing *Lensing_PS1_V5_R0_ToInternal (Lensing_PS1_V5_R0 *in, off_t Nvalues) {1276 1277 off_t i;1278 Lensing *out;1279 1280 ALLOCATE_ZERO (out, Lensing, Nvalues);1281 1282 for (i = 0; i < Nvalues; i++) {1283 dvo_lensing_init (&out[i]);1284 1285 out[i].X11_sm_obj = in[i].X11_sm_obj;1286 out[i].X12_sm_obj = in[i].X12_sm_obj;1287 out[i].X22_sm_obj = in[i].X22_sm_obj;1288 out[i].E1_sm_obj = in[i].E1_sm_obj;1289 out[i].E2_sm_obj = in[i].E2_sm_obj;1290 1291 out[i].X11_sh_obj = in[i].X11_sh_obj;1292 out[i].X12_sh_obj = in[i].X12_sh_obj;1293 out[i].X22_sh_obj = in[i].X22_sh_obj;1294 out[i].E1_sh_obj = in[i].E1_sh_obj;1295 out[i].E2_sh_obj = in[i].E2_sh_obj;1296 1297 out[i].X11_sm_psf = in[i].X11_sm_psf;1298 out[i].X12_sm_psf = in[i].X12_sm_psf;1299 out[i].X22_sm_psf = in[i].X22_sm_psf;1300 out[i].E1_sm_psf = in[i].E1_sm_psf;1301 out[i].E2_sm_psf = in[i].E2_sm_psf;1302 1303 out[i].X11_sh_psf = in[i].X11_sh_psf;1304 out[i].X12_sh_psf = in[i].X12_sh_psf;1305 out[i].X22_sh_psf = in[i].X22_sh_psf;1306 out[i].E1_sh_psf = in[i].E1_sh_psf;1307 out[i].E2_sh_psf = in[i].E2_sh_psf;1308 1309 out[i].F_ApR5 = in[i].F_ApR5;1310 out[i].dF_ApR5 = in[i].dF_ApR5;1311 out[i].sF_ApR5 = in[i].sF_ApR5;1312 out[i].fF_ApR5 = in[i].fF_ApR5;1313 1314 out[i].F_ApR6 = in[i].F_ApR6;1315 out[i].dF_ApR6 = in[i].dF_ApR6;1316 out[i].sF_ApR6 = in[i].sF_ApR6;1317 out[i].fF_ApR6 = in[i].fF_ApR6;1318 1319 out[i].detID = in[i].detID;1320 out[i].objID = in[i].objID;1321 out[i].catID = in[i].catID;1322 out[i].averef = in[i].averef;1323 }1324 return (out);1325 }1326 1327 Lensing *Lensing_PS1_V5_R1_ToInternal (Lensing_PS1_V5_R1 *in, off_t Nvalues) {1328 1329 off_t i;1330 Lensing *out;1331 1332 ALLOCATE_ZERO (out, Lensing, Nvalues);1333 1334 for (i = 0; i < Nvalues; i++) {1335 dvo_lensing_init (&out[i]);1336 1337 out[i].X11_sm_obj = in[i].X11_sm_obj;1338 out[i].X12_sm_obj = in[i].X12_sm_obj;1339 out[i].X22_sm_obj = in[i].X22_sm_obj;1340 out[i].E1_sm_obj = in[i].E1_sm_obj;1341 out[i].E2_sm_obj = in[i].E2_sm_obj;1342 1343 out[i].X11_sh_obj = in[i].X11_sh_obj;1344 out[i].X12_sh_obj = in[i].X12_sh_obj;1345 out[i].X22_sh_obj = in[i].X22_sh_obj;1346 out[i].E1_sh_obj = in[i].E1_sh_obj;1347 out[i].E2_sh_obj = in[i].E2_sh_obj;1348 1349 out[i].X11_sm_psf = in[i].X11_sm_psf;1350 out[i].X12_sm_psf = in[i].X12_sm_psf;1351 out[i].X22_sm_psf = in[i].X22_sm_psf;1352 out[i].E1_sm_psf = in[i].E1_sm_psf;1353 out[i].E2_sm_psf = in[i].E2_sm_psf;1354 1355 out[i].X11_sh_psf = in[i].X11_sh_psf;1356 out[i].X12_sh_psf = in[i].X12_sh_psf;1357 out[i].X22_sh_psf = in[i].X22_sh_psf;1358 out[i].E1_sh_psf = in[i].E1_sh_psf;1359 out[i].E2_sh_psf = in[i].E2_sh_psf;1360 1361 out[i].F_ApR5 = in[i].F_ApR5;1362 out[i].dF_ApR5 = in[i].dF_ApR5;1363 out[i].sF_ApR5 = in[i].sF_ApR5;1364 out[i].fF_ApR5 = in[i].fF_ApR5;1365 1366 out[i].F_ApR6 = in[i].F_ApR6;1367 out[i].dF_ApR6 = in[i].dF_ApR6;1368 out[i].sF_ApR6 = in[i].sF_ApR6;1369 out[i].fF_ApR6 = in[i].fF_ApR6;1370 1371 out[i].detID = in[i].detID;1372 out[i].objID = in[i].objID;1373 out[i].catID = in[i].catID;1374 out[i].averef = in[i].averef;1375 1376 out[i].imageID = in[i].imageID;1377 }1378 return (out);1379 1513 } 1380 1514 -
trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c
r37807 r38153 1822 1822 LENSFIELD(E1_sh_psf); 1823 1823 LENSFIELD(E2_sh_psf); 1824 1825 LENSFIELD( F_ApR5); 1826 LENSFIELD(dF_ApR5); 1827 LENSFIELD(sF_ApR5); 1828 LENSFIELD(fF_ApR5); 1829 1830 LENSFIELD( F_ApR6); 1831 LENSFIELD(dF_ApR6); 1832 LENSFIELD(sF_ApR6); 1833 LENSFIELD(fF_ApR6); 1834 1835 LENSFIELD( F_ApR7); 1836 LENSFIELD(dF_ApR7); 1837 LENSFIELD(sF_ApR7); 1838 LENSFIELD(fF_ApR7); 1839 1840 LENSFIELD(E1); 1841 LENSFIELD(E2); -
trunk/Ohana/src/libkapa/src/KapaColors.c
r27817 r38153 1 1 # include <kapa_internal.h> 2 2 3 # define N_KAPA_COLORS 233 # define N_KAPA_COLORS 42 4 4 5 5 static char KAPA_COLORS[N_KAPA_COLORS][3][16] = { … … 14 14 {"green", "green", "0.00 1.00 0.00"}, 15 15 {"darkgreen", "darkgreen", "0.00 0.40 0.00"}, 16 {"darkblue", "darkblue", "0.50 0.50 1.00"}, 16 17 {"blue", "blue", "0.00 0.00 1.00"}, 17 18 {"skyblue", "skyblue", "0.53 0.81 0.92"}, 18 19 {"indigo", "mediumpurple", "0.57 0.44 0.86"}, 19 20 {"violet", "darkviolet", "0.58 0.00 0.88"}, 21 {"blue10", "rgb:00/00/33", "0.00 0.00 0.20"}, 22 {"blue20", "rgb:00/00/66", "0.00 0.00 0.40"}, 23 {"blue30", "rgb:00/00/99", "0.00 0.00 0.60"}, 24 {"blue40", "rgb:00/00/cc", "0.00 0.00 0.80"}, 25 {"blue50", "rgb:00/00/ff", "0.00 0.00 1.00"}, 26 {"blue60", "rgb:33/33/ff", "0.20 0.20 1.00"}, 27 {"blue70", "rgb:66/66/ff", "0.40 0.40 1.00"}, 28 {"blue80", "rgb:99/99/ff", "0.60 0.60 1.00"}, 29 {"blue90", "rgb:cc/cc/ff", "0.80 0.80 1.00"}, 30 {"red10", "rgb:33/00/00", "0.20 0.00 0.00"}, 31 {"red20", "rgb:66/00/00", "0.40 0.00 0.00"}, 32 {"red30", "rgb:99/00/00", "0.60 0.00 0.00"}, 33 {"red40", "rgb:cc/00/00", "0.80 0.00 0.00"}, 34 {"red50", "rgb:ff/00/00", "1.00 0.00 0.00"}, 35 {"red60", "rgb:ff/33/33", "1.00 0.20 0.20"}, 36 {"red70", "rgb:ff/66/66", "1.00 0.40 0.40"}, 37 {"red80", "rgb:ff/99/99", "1.00 0.60 0.60"}, 38 {"red90", "rgb:ff/cc/cc", "1.00 0.80 0.80"}, 20 39 {"grey10", "grey10", "0.10 0.10 0.10"}, 21 40 {"grey20", "grey20", "0.20 0.20 0.20"}, -
trunk/Ohana/src/opihi/cmd.data
- Property svn:mergeinfo set to
-
trunk/Ohana/src/opihi/cmd.data/imhist.c
r20936 r38153 3 3 int imhist (int argc, char **argv) { 4 4 5 int i, j, N, Nbins , Quiet;6 int sx, sy, nx, ny,bin;7 float *V , delta;8 double max, min,dx;5 int i, j, N, Nbins; 6 int bin; 7 float *V; 8 double dx; 9 9 Vector *vec1, *vec2; 10 10 Buffer *buf; 11 11 12 Quiet = FALSE;12 int Quiet = FALSE; 13 13 if ((N = get_argument (argc, argv, "-q"))) { 14 14 Quiet = TRUE; … … 20 20 } 21 21 22 delta = 0;22 float delta = 0; 23 23 if ((N = get_argument (argc, argv, "-delta"))) { 24 24 remove_argument (N, &argc, argv); … … 27 27 } 28 28 29 min = max = 0.0; 29 int ClipNAN = FALSE; 30 if ((N = get_argument (argc, argv, "-clip-nan"))) { 31 remove_argument (N, &argc, argv); 32 ClipNAN = TRUE; 33 } 34 35 double min = 0.0, max = 0.0; 30 36 if ((N = get_argument (argc, argv, "-range"))) { 31 37 remove_argument (N, &argc, argv); … … 36 42 } 37 43 38 sx = sy = 0.0;39 nx = ny = 0.0;44 int sx = 0, sy = 0; 45 int nx = 0, ny = 0; 40 46 if ((N = get_argument (argc, argv, "-region"))) { 41 47 remove_argument (N, &argc, argv); … … 84 90 V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + sx; 85 91 for (i = 0; i < nx; i++, V++) { 92 if (ClipNAN && isnan(*V)) continue; 86 93 max = MAX (max, *V); 87 94 min = MIN (min, *V); … … 113 120 V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + sx; 114 121 for (i = 0; i < nx; i++, V++) { 122 if (ClipNAN && isnan(*V)) continue; 115 123 bin = MAX (MIN (Nbins, (*V - min) / dx), 0); 116 124 vec2[0].elements.Flt[bin] += 1.0; -
trunk/Ohana/src/opihi/lib.data/graphtools.c
r31160 r38153 10 10 if (xvec != NULL) { 11 11 if (xvec->type == OPIHI_FLT) { 12 maxX = minX = xvec[0].elements.Flt[0]; 13 for (i = 1; i < xvec[0].Nelements; i++) { 12 maxX = DBL_MIN; 13 minX = DBL_MAX; 14 for (i = 0; i < xvec[0].Nelements; i++) { 14 15 if (!finite(xvec[0].elements.Flt[i])) continue; 15 16 maxX = MAX (maxX, xvec[0].elements.Flt[i]); … … 19 20 maxX = minX = xvec[0].elements.Int[0]; 20 21 for (i = 1; i < xvec[0].Nelements; i++) { 21 if (!finite(xvec[0].elements.Int[i])) continue;22 22 maxX = MAX (maxX, xvec[0].elements.Int[i]); 23 23 minX = MIN (minX, xvec[0].elements.Int[i]); … … 33 33 if (yvec != NULL) { 34 34 if (yvec->type == OPIHI_FLT) { 35 maxY = minY = yvec[0].elements.Flt[0]; 36 for (i = 1; i < yvec[0].Nelements; i++) { 35 maxY = DBL_MIN; 36 minY = DBL_MAX; 37 for (i = 0; i < yvec[0].Nelements; i++) { 37 38 if (!finite(yvec[0].elements.Flt[i])) continue; 38 39 maxY = MAX (maxY, yvec[0].elements.Flt[i]); … … 42 43 maxY = minY = yvec[0].elements.Int[0]; 43 44 for (i = 1; i < yvec[0].Nelements; i++) { 44 if (!finite(yvec[0].elements.Int[i])) continue;45 45 maxY = MAX (maxY, yvec[0].elements.Int[i]); 46 46 minY = MIN (minY, yvec[0].elements.Int[i]); -
trunk/Ohana/src/relphot/src/setMrelCatalog.c
r37924 r38153 756 756 757 757 if (IS_DIFF_DB) { 758 if (!MatchImageSkycellID (meas, cat, priTessID, priProjID, priSkycellID)) continue; 758 if (MatchImageSkycellID (meas, cat, priTessID, priProjID, priSkycellID)) { 759 measure[k].dbFlags |= ID_MEAS_STACK_PRIMARY; 760 } else { 761 continue; 762 } 759 763 } else { 760 764 if (!MatchImageSkycellID (meas, cat, stkTessID, stkProjID, stkSkycellID)) continue; -
trunk/dbconfig/changes.txt
- Property svn:mergeinfo set to
-
trunk/ippconfig
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20150405/ippconfig (added) merged: 38152
- Property svn:mergeinfo changed
-
trunk/psModules/src/objects
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20150405/psModules/src/objects (added) merged: 38152
- Property svn:mergeinfo changed
Note:
See TracChangeset
for help on using the changeset viewer.
