Changeset 25450
- Timestamp:
- Sep 18, 2009, 4:32:13 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/src/ppstampMakeStamp.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/src/ppstampMakeStamp.c
r25446 r25450 321 321 322 322 323 static void skyToChip(pmAstromObj *pt, pmFPA *fpa, pmChip *chip) 324 { 325 // convert from sky to TP to FP 326 psProject(pt->TP, pt->sky, fpa->toSky); 323 static void TPToChip(pmAstromObj *pt, pmFPA *fpa, pmChip *chip) 324 { 327 325 psPlaneTransformApply(pt->FP, fpa->fromTPA, pt->TP); 328 326 // convert from FP to chip 329 327 psPlaneTransformApply(pt->chip, chip->fromFPA, pt->FP); 328 } 329 static void skyToChip(pmAstromObj *pt, pmFPA *fpa, pmChip *chip) 330 { 331 // convert from sky to TP to FP 332 psProject(pt->TP, pt->sky, fpa->toSky); 333 TPToChip(pt, fpa, chip); 330 334 } 331 335 … … 337 341 psPlaneTransformApply(pt->TP, fpa->toTPA, pt->FP); 338 342 psDeproject(pt->sky, pt->TP, fpa->toSky); 339 340 343 } 341 344 … … 359 362 360 363 if (!options->roip.celestialCenter) { 361 // Center was specified in chip coordinates, transform to the sky 364 // Center was specified in chip coordinates, transform to the sky and the TP 362 365 chipToSky(center, fpa, chip); 363 366 } … … 371 374 options->roi.y1 = -INFINITY; 372 375 373 pt->sky->rErr = 0; 374 pt->sky->dErr = 0; 375 376 pt->sky->r = center->sky->r - options->roip.dRA/2; 377 pt->sky->d = center->sky->d - options->roip.dDEC/2; 378 skyToChip(pt, fpa, chip); 376 double dx = 0.5 * options->roip.dRA / fpa->toSky->Xs; 377 double dy = 0.5 * options->roip.dDEC / fpa->toSky->Ys; 378 379 pt->TP->xErr = 0; 380 pt->TP->yErr = 0; 381 382 pt->TP->x = center->TP->x - dx; 383 pt->TP->y = center->TP->y - dy; 384 TPToChip(pt, fpa, chip); 379 385 compareToBox(&options->roi, pt->chip); 380 386 381 pt-> sky->r = center->sky->r + options->roip.dRA/2;382 pt-> sky->d = center->sky->d - options->roip.dDEC/2;383 skyToChip(pt, fpa, chip);387 pt->TP->x = center->TP->x + dx; 388 pt->TP->y = center->TP->y - dy; 389 TPToChip(pt, fpa, chip); 384 390 compareToBox(&options->roi, pt->chip); 385 391 386 pt-> sky->r = center->sky->r + options->roip.dRA/2;387 pt-> sky->d = center->sky->d + options->roip.dDEC/2;388 skyToChip(pt, fpa, chip);392 pt->TP->x = center->TP->x + dx; 393 pt->TP->y = center->TP->y + dy; 394 TPToChip(pt, fpa, chip); 389 395 compareToBox(&options->roi, pt->chip); 390 396 391 pt-> sky->r = center->sky->r - options->roip.dRA/2;392 pt-> sky->d = center->sky->d + options->roip.dDEC/2;393 skyToChip(pt, fpa, chip);397 pt->TP->x = center->TP->x - dx; 398 pt->TP->y = center->TP->y + dy; 399 TPToChip(pt, fpa, chip); 394 400 compareToBox(&options->roi, pt->chip); 395 401
Note:
See TracChangeset
for help on using the changeset viewer.
