Changeset 24328
- Timestamp:
- Jun 4, 2009, 3:31:44 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r23753 r24328 297 297 } 298 298 299 // Correct image for change in the plate scale 300 { 301 psAssert(input && input->fpa && input->fpa->toSky, "Require astrometry for input"); 302 psAssert(outFPA && outFPA && outFPA->toSky, "Require astrometry for output"); 303 304 double inScale = input->fpa->toSky->Xs + input->fpa->toSky->Ys; // Plate scale for input 305 double outScale = outFPA->toSky->Xs + outFPA->toSky->Ys; // Plate scale for output 306 float correction = PS_SQR(outScale / inScale); // Correction factor to apply to image 307 psLogMsg("pswarp", PS_LOG_INFO, "Correcting flux by %f to account for pixel scales", correction); 308 309 psBinaryOp(output->image, output->image, "*", psScalarAlloc(correction, PS_TYPE_F32)); 310 if (output->variance) { 311 psBinaryOp(output->variance, output->variance, "*", 312 psScalarAlloc(PS_SQR(correction), PS_TYPE_F32)); 313 } 314 } 315 316 299 317 // Set variance factor 300 318 {
Note:
See TracChangeset
for help on using the changeset viewer.
