- Timestamp:
- Jul 3, 2026, 3:08:04 PM (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimInsertStars.c
r41397 r43068 31 31 float nSigmaLim = psMetadataLookupF32(NULL, recipe, "STARS.SIGMA.LIM"); // significance of faintest stars 32 32 33 char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME"); // 34 char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME"); // 35 33 36 float readnoise = psMetadataLookupF32(NULL, cell->concepts, "CELL.READNOISE");// CCD read noise, e 34 37 if (isnan(readnoise)) { … … 62 65 assert (psf); 63 66 67 // EAM : I think this dX,dY double-counts the offset applied to xChip,yChip in pmSourceFromModel 64 68 int dX = PM_CELL_TO_CHIP (0.0, x0Cell, xParityCell, binning); 65 69 int dY = PM_CELL_TO_CHIP (0.0, y0Cell, yParityCell, binning); 70 dX = 0; dY = 0; 66 71 67 72 psArray *sources = psArrayAllocEmpty (stars->n); … … 70 75 char outname[1024]; 71 76 char *outroot = psMetadataLookupStr(&mdok, config->arguments, "OUTPUT"); 72 sprintf (outname, "%s. dat", outroot);77 sprintf (outname, "%s.%s.%s.dat", outroot, chipName, cellName); 73 78 74 79 FILE *outfile = fopen (outname, "w"); … … 81 86 for (long i = 0; i < stars->n; i++) { 82 87 ppSimStar *star = stars->data[i]; 83 psTrace("ppSim", 10, "Inserting star at %.1f,%.1f --> %.2f\n", star->x, star->y, star->flux);84 85 88 // star->x,y are in fpa coordinates 86 89 … … 92 95 float xCell = PM_CHIP_TO_CELL(xChip, x0Cell, xParityCell, binning); 93 96 float yCell = PM_CHIP_TO_CELL(yChip, y0Cell, yParityCell, binning); 97 98 psTrace("ppSim", 10, "Inserting star at %.1f %.1f --> %.2f : %.1f %.1f : %.1f %.1f\n", star->x, star->y, star->flux, xChip, yChip, xCell, yCell); 94 99 95 100 // XXX Note, the below does not put the edges of stars on the readout if they fall slightly off … … 105 110 106 111 // instantiate a model for the PSF at this location, set desired flux 112 // EAM : we use xChip,yChip here, corrected to xCell,yCell in pmSourceFromModel 107 113 pmModel *model = pmModelFromPSFforXY (psf, xChip, yChip, 1.0); 108 114 pmModelSetFlux (model, flux);
Note:
See TracChangeset
for help on using the changeset viewer.
