- Timestamp:
- Jan 29, 2009, 4:26:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_20090128/ppSim/src/ppSimLoadForceSources.c
r18011 r21230 56 56 // Select the spots within range of this readout. Project the spots to this chip 57 57 for (int i = 0; i < spots->n; i++) { 58 pmAstromObj *obj = spots->data[i];58 pmAstromObj *obj = spots->data[i]; 59 59 60 psProject (obj->TP, obj->sky, fpa->toSky);61 psPlaneTransformApply (obj->FP, fpa->fromTPA, obj->TP);62 psPlaneTransformApply (obj->chip, chip->fromFPA, obj->FP);60 psProject (obj->TP, obj->sky, fpa->toSky); 61 psPlaneTransformApply (obj->FP, fpa->fromTPA, obj->TP); 62 psPlaneTransformApply (obj->chip, chip->fromFPA, obj->FP); 63 63 64 // limit the X,Y range of the objs to the selected chip65 if (obj->chip->x < minX) continue;66 if (obj->chip->x > maxX) continue;67 if (obj->chip->y < minY) continue;68 if (obj->chip->y > maxY) continue;64 // limit the X,Y range of the objs to the selected chip 65 if (obj->chip->x < minX) continue; 66 if (obj->chip->x > maxX) continue; 67 if (obj->chip->y < minY) continue; 68 if (obj->chip->y > maxY) continue; 69 69 70 // convert the pmAstromObj to pmSource70 // convert the pmAstromObj to pmSource 71 71 72 72 // instantiate a model for the PSF at this location, Io = 1.0 … … 74 74 75 75 // XXX let the flux limit be a user-defined number of sky sigmas (not just 1.0) 76 // XXX use a fixed radius??76 // XXX use a fixed radius?? 77 77 // float radius = model->modelRadius (model->params, roughNoise); 78 78 // radius = PS_MAX (radius, 1.0); 79 float radius = 5.0;79 float radius = 5.0; 80 80 81 81 // construct a source, with model flux pixels set, based on the model … … 87 87 // psF64 Area = 2.0 * M_PI * axes.major * axes.minor; 88 88 89 // these are not really needed since we will be fitting for them89 // these are not really needed since we will be fitting for them 90 90 source->psfMag = NAN; 91 91 source->errMag = NAN; 92 92 93 93 // insert the source flux in the image 94 // XXX not sure the offset is really 0,094 // XXX not sure the offset is really 0,0 95 95 pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, 0.0, 0.0); 96 96 pmSourceAddWithOffset (source, PM_MODEL_OP_FULL | PM_MODEL_OP_NOISE, 0xff, 0.0, 0.0); … … 98 98 // Blow away the image parts of the source, which makes the memory explode 99 99 RESET(source->pixels); 100 RESET(source-> weight);100 RESET(source->variance); 101 101 RESET(source->maskObj); 102 102 RESET(source->maskView); … … 105 105 RESET(source->blends); 106 106 107 psArrayAdd (sources, 100, source);107 psArrayAdd (sources, 100, source); 108 108 psFree(source); // Drop local reference 109 109 }
Note:
See TracChangeset
for help on using the changeset viewer.
