IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 3, 2026, 3:08:04 PM (4 weeks ago)
Author:
eugene
Message:

add -mjd-obs; add chip & cell names to output test file; more trace verbosity; fix chebyshev scales for bias variations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimInsertStars.c

    r41397 r43068  
    3131    float nSigmaLim = psMetadataLookupF32(NULL, recipe, "STARS.SIGMA.LIM"); // significance of faintest stars
    3232
     33    char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME"); //
     34    char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME"); //
     35
    3336    float readnoise = psMetadataLookupF32(NULL, cell->concepts, "CELL.READNOISE");// CCD read noise, e
    3437    if (isnan(readnoise)) {
     
    6265    assert (psf);
    6366
     67    // EAM : I think this dX,dY double-counts the offset applied to xChip,yChip in pmSourceFromModel
    6468    int dX = PM_CELL_TO_CHIP (0.0, x0Cell, xParityCell, binning);
    6569    int dY = PM_CELL_TO_CHIP (0.0, y0Cell, yParityCell, binning);
     70    dX = 0; dY = 0;
    6671
    6772    psArray *sources = psArrayAllocEmpty (stars->n);
     
    7075    char outname[1024];
    7176    char *outroot = psMetadataLookupStr(&mdok, config->arguments, "OUTPUT");
    72     sprintf (outname, "%s.dat", outroot);
     77    sprintf (outname, "%s.%s.%s.dat", outroot, chipName, cellName);
    7378
    7479    FILE *outfile = fopen (outname, "w");
     
    8186    for (long i = 0; i < stars->n; i++) {
    8287        ppSimStar *star = stars->data[i];
    83         psTrace("ppSim", 10, "Inserting star at %.1f,%.1f --> %.2f\n", star->x, star->y, star->flux);
    84 
    8588        // star->x,y are in fpa coordinates
    8689
     
    9295        float xCell = PM_CHIP_TO_CELL(xChip, x0Cell, xParityCell, binning);
    9396        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);
    9499
    95100        // XXX Note, the below does not put the edges of stars on the readout if they fall slightly off
     
    105110
    106111        // 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
    107113        pmModel *model = pmModelFromPSFforXY (psf, xChip, yChip, 1.0);
    108114        pmModelSetFlux (model, flux);
Note: See TracChangeset for help on using the changeset viewer.