Changeset 12984
- Timestamp:
- Apr 24, 2007, 7:04:52 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_02_branch/psModules/src/objects/pmSource.c
r12980 r12984 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.25.4. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-04-24 03:15:27$8 * @version $Revision: 1.25.4.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-04-24 17:04:52 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 755 755 // in some places (psphotEnsemble), we need a normalized version 756 756 // in others, we just want the model. which is more commonly used? 757 // modelFlux always has unity normalization (I0 = 1.0) 757 758 pmModelAdd (source->modelFlux, source->maskObj, model, PM_MODEL_OP_FULL | PM_MODEL_OP_NORM); 758 759 return true; … … 779 780 assert (dX >= 0); 780 781 assert (dY >= 0); 781 assert (dX + source->modelFlux->numCols < source->pixels->numCols);782 assert (dY + source->modelFlux->numRows < source->pixels->numRows);782 assert (dX + source->modelFlux->numCols <= source->pixels->numCols); 783 assert (dY + source->modelFlux->numRows <= source->pixels->numRows); 783 784 784 float Io = 1.0; 785 // modelFlux has unity normalization 786 float Io = model->params->data.F32[PM_PAR_I0]; 785 787 if (mode & PM_MODEL_OP_NORM) { 786 Io = 1.0 / model->params->data.F32[PM_PAR_I0]; 788 Io = 1.0; 789 } 790 791 psU8 **mask = NULL; 792 if (source->maskObj) { 793 mask = source->maskObj->data.U8; 787 794 } 788 795 … … 792 799 for (int ix = 0; ix < source->modelFlux->numCols; ix++) { 793 800 int ox = ix + dX; 801 if (mask && mask[iy][ix]) continue; 794 802 float value = Io*source->modelFlux->data.F32[iy][ix]; 795 803 if (add) {
Note:
See TracChangeset
for help on using the changeset viewer.
