Changeset 7637
- Timestamp:
- Jun 22, 2006, 10:17:06 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroMosaicGetRefstars.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroMosaicGetRefstars.c
r7332 r7637 52 52 float minY = -fieldExtra*Ny; 53 53 float maxY = (1+fieldExtra)*Ny; 54 54 55 55 // the refstars is a subset within range of this chip 56 56 psArray *refstars = psArrayAlloc (100); 57 58 int Nst = 0;59 57 60 58 // select the reference objects within range of this readout … … 68 66 69 67 // limit the X,Y range of the refs to the selected chip 70 if (ref->chip->x < minX) continue; 71 if (ref->chip->x > maxX) continue; 72 if (ref->chip->y < minY) continue; 73 if (ref->chip->y > maxY) continue; 74 75 if (Nst < 0) { 76 fprintf (stderr, "dn: %f,%f <- %f,%f <- %f,%f <- %f,%f\n", 77 ref->chip->x, ref->chip->y, 78 ref->FP->x, ref->FP->y, 79 ref->TP->x, ref->TP->y, 80 ref->sky->r, ref->sky->d); 81 82 psSphere *sk = psSphereAlloc(); 83 psPlane *fp = psPlaneAlloc(); 84 psPlane *tp = psPlaneAlloc(); 85 86 psPlaneTransformApply (fp, chip->toFPA, ref->chip); 87 psPlaneDistortApply (tp, fpa->toTangentPlane, fp, 0.0, 0.0); 88 p_psDeproject (sk, tp, fpa->projection); 89 90 fprintf (stderr, "up: %f,%f -> %f,%f -> %f,%f -> %f,%f\n", 91 ref->chip->x, ref->chip->y, 92 fp->x, fp->y, 93 tp->x, tp->y, 94 sk->r, sk->d); 95 } 96 Nst ++; 68 if (ref->chip->x < minX) goto skip; 69 if (ref->chip->x > maxX) goto skip; 70 if (ref->chip->y < minY) goto skip; 71 if (ref->chip->y > maxY) goto skip; 97 72 98 73 psArrayAdd (refstars, 100, ref); 74 skip: 75 psFree (ref); 99 76 } 100 77 psTrace (__func__, 4, "Added %d refstars\n", refstars->n); 101 102 78 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.REFSTARS", PS_DATA_ARRAY, "astrometry matches", refstars); 103 104 // XXX test point105 if (0) {106 pmChip *chip1 = fpa->chips->data[10];107 pmCell *cell1 = chip1->cells->data[0];108 pmReadout *readout1 = cell1->readouts->data[0];109 psArray *refstars1 = psMetadataLookupPtr (NULL, readout1->analysis, "PSASTRO.REFSTARS");110 pmAstromObj *ref1 = refstars1->data[0];111 fprintf (stderr, "test 3: %f %f %f %f %f %f\n", ref1->chip->x, ref1->chip->y, ref1->FP->x, ref1->FP->y, ref1->sky->r, ref1->sky->d);112 }113 79 114 80 psFree (refstars);
Note:
See TracChangeset
for help on using the changeset viewer.
