Changeset 20307
- Timestamp:
- Oct 21, 2008, 4:11:36 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
psModules/src/camera/pmFPAMaskWeight.c (modified) (1 diff)
-
psModules/src/objects/pmModel.c (modified) (3 diffs)
-
psModules/src/objects/pmSourcePhotometry.c (modified) (5 diffs)
-
psphot/src/psphotMakeResiduals.c (modified) (5 diffs)
-
pswarp/src/pswarp.h (modified) (1 diff)
-
pswarp/src/pswarpTransformReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.c
r20095 r20307 453 453 psImage *weight = readout->weight; // Weight map 454 454 455 psImageInterpolat eOptions *interp = psImageInterpolateOptionsAlloc(mode, image, weight, mask, maskVal,456 NAN, NAN, maskBad, maskPoor, poorFrac);455 psImageInterpolation *interp = psImageInterpolationAlloc(mode, image, weight, mask, maskVal, 456 NAN, NAN, maskBad, maskPoor, poorFrac, 0); 457 457 interp->shifting = false; // Turn off "exact shifts" so we get proper interpolation 458 458 -
trunk/psModules/src/objects/pmModel.c
r15977 r20307 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2008- 01-02 20:36:36$8 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-10-22 02:11:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 222 222 psImage *myRx = NULL; 223 223 psImage *myRy = NULL; 224 psImageInterpolat eOptions*Ro = NULL;225 psImageInterpolat eOptions*Rx = NULL;226 psImageInterpolat eOptions*Ry = NULL;224 psImageInterpolation *Ro = NULL; 225 psImageInterpolation *Rx = NULL; 226 psImageInterpolation *Ry = NULL; 227 227 if (model->residuals && (mode & (PM_MODEL_OP_RES0 | PM_MODEL_OP_RES1))) { 228 228 // if the residual image and object image don't match, … … 274 274 } 275 275 276 Ro = psImageInterpolat eOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRo, NULL, mask, 0, 0.0, 0.0, 1, 0, 0.0);277 Rx = psImageInterpolat eOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRx, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);278 Ry = psImageInterpolat eOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRy, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);276 Ro = psImageInterpolationAlloc(PS_INTERPOLATE_BILINEAR, myRo, NULL, mask, 0, 0.0, 0.0, 1, 0, 0.0, 0); 277 Rx = psImageInterpolationAlloc(PS_INTERPOLATE_BILINEAR, myRx, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0, 0); 278 Ry = psImageInterpolationAlloc(PS_INTERPOLATE_BILINEAR, myRy, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0, 0); 279 279 280 280 } -
trunk/psModules/src/objects/pmSourcePhotometry.c
r20077 r20307 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $6 * @date $Date: 2008-10- 13 01:59:05$5 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-10-22 02:11:08 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 122 122 if (source->modelFits) { 123 123 for (int i = 0; i < source->modelFits->n; i++) { 124 pmModel *model = source->modelFits->data[i];125 status = pmSourcePhotometryModel (&model->mag, model);124 pmModel *model = source->modelFits->data[i]; 125 status = pmSourcePhotometryModel (&model->mag, model); 126 126 } 127 127 if (source->modelEXT) { 128 source->extMag = source->modelEXT->mag;128 source->extMag = source->modelEXT->mag; 129 129 } 130 130 } else { 131 131 if (source->modelEXT) { 132 status = pmSourcePhotometryModel (&source->extMag, source->modelEXT);132 status = pmSourcePhotometryModel (&source->extMag, source->modelEXT); 133 133 } 134 134 } … … 177 177 178 178 if (!psImageShiftMask(&flux, &mask, source->pixels, source->maskObj, maskVal, dx, dy, 179 NAN, 0xff, PS_INTERPOLATE_BI CUBE)) {179 NAN, 0xff, PS_INTERPOLATE_BIQUADRATIC)) { 180 180 // Not much we can do about it 181 181 psErrorClear(); … … 256 256 } 257 257 if (mode & PM_SOURCE_PHOT_APCORR) { 258 rflux = pow (10.0, 0.4*source->psfMag);259 source->apMag -= PS_SQR(model->radiusFit)*rflux * psf->skyBias + psf->skySat / rflux;258 rflux = pow (10.0, 0.4*source->psfMag); 259 source->apMag -= PS_SQR(model->radiusFit)*rflux * psf->skyBias + psf->skySat / rflux; 260 260 } 261 261 } … … 333 333 } 334 334 if (apSum <= 0) { 335 *apMag = NAN;335 *apMag = NAN; 336 336 return true; 337 337 } -
trunk/psphot/src/psphotMakeResiduals.c
r18583 r20307 105 105 // we will interpolate the image and weight - include the mask or not? 106 106 // XXX consider better values for the mask bits 107 psImageInterpolat eOptions*interp =108 psImageInterpolat eOptionsAlloc(mode, image, weight, NULL, 0xff, 0.0, 0.0, badMask, poorMask, 0.0);107 psImageInterpolation *interp = 108 psImageInterpolationAlloc(mode, image, weight, NULL, 0xff, 0.0, 0.0, badMask, poorMask, 0.0, 0); 109 109 psArrayAdd (input, 100, interp); 110 110 … … 149 149 for (int ox = 0; ox < resid->Ro->numCols; ox++) { 150 150 151 int nGoodPixel = 0; // pixel is off the image152 151 int nGoodPixel = 0; // pixel is off the image 152 153 153 // build the vector of data values for this output pixel 154 154 for (int i = 0; i < input->n; i++) { 155 155 156 psImageInterpolat eOptions*interp = input->data[i];156 psImageInterpolation *interp = input->data[i]; 157 157 158 158 // fractional image position … … 165 165 // This pixel is off the image 166 166 offImage = true; 167 fmasks->data.U8[i] = 1;168 // fprintf (stderr, "off image: %f %f : %f %f\n", ix, iy, flux, dflux);169 } 167 fmasks->data.U8[i] = 1; 168 // fprintf (stderr, "off image: %f %f : %f %f\n", ix, iy, flux, dflux); 169 } 170 170 fluxes->data.F32[i] = flux; 171 171 dfluxes->data.F32[i] = dflux; 172 172 fmasks->data.U8[i] = mflux; 173 if (isnan(flux)) { 174 fmasks->data.U8[i] = 1;175 }176 if (fmasks->data.U8[i] == 0) {177 nGoodPixel ++;178 } 179 }180 181 // skip pixels which are off the image...182 bool validPixel = (SPATIAL_ORDER == 0) ? (nGoodPixel > 1) : (nGoodPixel > 3);173 if (isnan(flux)) { 174 fmasks->data.U8[i] = 1; 175 } 176 if (fmasks->data.U8[i] == 0) { 177 nGoodPixel ++; 178 } 179 } 180 181 // skip pixels which are off the image... 182 bool validPixel = (SPATIAL_ORDER == 0) ? (nGoodPixel > 1) : (nGoodPixel > 3); 183 183 if (!validPixel) { 184 184 resid->Ro->data.F32[oy][ox] = 0.0; 185 185 resid->Rx->data.F32[oy][ox] = 0.0; 186 resid->Ry->data.F32[oy][ox] = 0.0;187 resid->mask->data.U8[oy][ox] = 1;188 continue;186 resid->Ry->data.F32[oy][ox] = 0.0; 187 resid->mask->data.U8[oy][ox] = 1; 188 continue; 189 189 } 190 190 … … 216 216 //resid->weight->data.F32[oy][ox] = fluxStats->sampleStdev; 217 217 218 if (resid->Ro->data.F32[oy][ox] < pixelSN*fluxStats->sampleStdev) {219 resid->mask->data.U8[oy][ox] = 1;220 }218 if (resid->Ro->data.F32[oy][ox] < pixelSN*fluxStats->sampleStdev) { 219 resid->mask->data.U8[oy][ox] = 1; 220 } 221 221 222 222 } else { … … 254 254 resid->Ry->data.F32[oy][ox] = B->data.F64[2]; 255 255 256 float dRo = sqrt(A->data.F32[0][0]);257 if (resid->Ro->data.F32[oy][ox] < pixelSN*dRo) {258 resid->mask->data.U8[oy][ox] = 1;259 }256 float dRo = sqrt(A->data.F32[0][0]); 257 if (resid->Ro->data.F32[oy][ox] < pixelSN*dRo) { 258 resid->mask->data.U8[oy][ox] = 1; 259 } 260 260 //resid->weight->data.F32[oy][ox] = XXX; 261 261 } -
trunk/pswarp/src/pswarp.h
r19395 r20307 43 43 pmReadout *output; 44 44 pswarpMapGrid *grid; 45 psImageInterpolat eOptions*interp;45 psImageInterpolation *interp; 46 46 psImage *region; 47 47 -
trunk/pswarp/src/pswarpTransformReadout.c
r19395 r20307 64 64 65 65 // Interpolation options : move these from the arguments to explicit assignments 66 psImageInterpolat eOptions *interp = psImageInterpolateOptionsAlloc(interpolationMode, input->image,67 input->weight, input->mask, maskIn,68 NAN, NAN, maskBad, maskPoor, poorFrac);66 psImageInterpolation *interp = psImageInterpolationAlloc(interpolationMode, input->image, 67 input->weight, input->mask, maskIn, 68 NAN, NAN, maskBad, maskPoor, poorFrac, 0); 69 69 70 70 if (input->weight && !output->weight) { … … 143 143 float varFactor = psImageInterpolateVarianceFactor(input->image->numCols / 2.0 + input->image->col0, 144 144 input->image->numRows / 2.0 + input->image->row0, 145 interp );145 interp->mode); 146 146 psMetadataItem *vfItem = psMetadataLookup(output->analysis, PSWARP_ANALYSIS_VARFACTOR); 147 147 if (vfItem) {
Note:
See TracChangeset
for help on using the changeset viewer.
