Changeset 13335
- Timestamp:
- May 10, 2007, 9:48:35 AM (19 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
pmModel.h (modified) (2 diffs)
-
pmSource.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmModel.h
r13034 r13335 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $8 * @date $Date: 2007-0 4-26 01:20:29$7 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-05-10 19:48:35 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 PM_MODEL_OP_RES0 = 0x02, 34 34 PM_MODEL_OP_RES1 = 0x04, 35 PM_MODEL_OP_FULL = 0x07,35 PM_MODEL_OP_FULL = 0x07, 36 36 PM_MODEL_OP_SKY = 0x08, 37 PM_MODEL_OP_CENTER = 0x10,37 PM_MODEL_OP_CENTER = 0x10, 38 38 PM_MODEL_OP_NORM = 0x20, 39 PM_MODEL_OP_NOISE = 0x40, 39 40 } pmModelOpMode; 40 41 -
trunk/psModules/src/objects/pmSource.c
r13034 r13335 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-0 4-26 01:20:29$8 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-05-10 19:48:35 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 799 799 } 800 800 801 psF32 **target = source->pixels->data.F32; 802 if (mode & PM_MODEL_OP_NOISE) { 803 target = source->noise->data.F32; 804 } 805 801 806 // XXX need to respect the source and model masks? 802 807 for (int iy = 0; iy < source->modelFlux->numRows; iy++) { … … 807 812 float value = Io*source->modelFlux->data.F32[iy][ix]; 808 813 if (add) { 809 source->pixels->data.F32[oy][ox] += value;814 target[oy][ox] += value; 810 815 } else { 811 source->pixels->data.F32[oy][ox] -= value;816 target[oy][ox] -= value; 812 817 } 813 818 } … … 816 821 } 817 822 823 psImage *target = source->pixels; 824 if (mode & PM_MODEL_OP_NOISE) { 825 target = source->noise; 818 826 if (add) { 819 status = pmModelAdd ( source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);827 status = pmModelAdd (target, source->maskObj, model, PM_MODEL_OP_FULL); 820 828 } else { 821 status = pmModelSub ( source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);829 status = pmModelSub (target, source->maskObj, model, PM_MODEL_OP_FULL); 822 830 } 823 831
Note:
See TracChangeset
for help on using the changeset viewer.
