IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 17, 2007, 11:53:28 AM (19 years ago)
Author:
Paul Price
Message:

Adding const to view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotMergeSources.c

    r13225 r13411  
    55
    66    for (int i = 0; i < newSources->n; i++) {
    7         pmSource *source = newSources->data[i];
    8         psArrayAdd (oldSources, 100, source);
     7        pmSource *source = newSources->data[i];
     8        psArrayAdd (oldSources, 100, source);
    99    }
    1010    return true;
    1111}
    1212
    13 // merge the externally supplied sources with the existing sources.  mark them as having 
     13// merge the externally supplied sources with the existing sources.  mark them as having
    1414// mode PM_SOURCE_MODE_EXTERNAL
    15 bool psphotLoadExtSources (pmConfig *config, pmFPAview *view, psArray *sources) {
     15bool psphotLoadExtSources (pmConfig *config, const pmFPAview *view, psArray *sources) {
    1616
    1717    // find the currently selected readout
    1818    pmReadout  *readout = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT.CMF");
    1919    if (!readout) {
    20         psLogMsg ("psphot", 3, "no external sources supplied");
    21         return true;
     20        psLogMsg ("psphot", 3, "no external sources supplied");
     21        return true;
    2222    }
    2323
    2424    psArray *extSources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES");
    2525    if (!extSources) {
    26         psLogMsg ("psphot", 3, "no external sources for this readout");
    27         return true;
     26        psLogMsg ("psphot", 3, "no external sources for this readout");
     27        return true;
    2828    }
    2929
    3030    for (int i = 0; i < extSources->n; i++) {
    31         pmSource *source = extSources->data[i];
    32         source->mode |= PM_SOURCE_MODE_EXTERNAL;
    33         pmModel *model = source->modelPSF;
     31        pmSource *source = extSources->data[i];
     32        source->mode |= PM_SOURCE_MODE_EXTERNAL;
     33        pmModel *model = source->modelPSF;
    3434
    35         float xpos = model->params->data.F32[PM_PAR_XPOS];
    36         float ypos = model->params->data.F32[PM_PAR_YPOS];
     35        float xpos = model->params->data.F32[PM_PAR_XPOS];
     36        float ypos = model->params->data.F32[PM_PAR_YPOS];
    3737
    38         source->peak = pmPeakAlloc(xpos, ypos, 1.0, PM_PEAK_LONE);
    39         source->peak->xf = xpos;
    40         source->peak->yf = ypos;
    41         source->peak->flux = 1.0;
    42        
    43         // drop the loaded source modelPSF
    44         psFree (source->modelPSF);
    45         source->modelPSF = NULL;
     38        source->peak = pmPeakAlloc(xpos, ypos, 1.0, PM_PEAK_LONE);
     39        source->peak->xf = xpos;
     40        source->peak->yf = ypos;
     41        source->peak->flux = 1.0;
     42
     43        // drop the loaded source modelPSF
     44        psFree (source->modelPSF);
     45        source->modelPSF = NULL;
    4646    }
    4747
Note: See TracChangeset for help on using the changeset viewer.