Last change
on this file since 236 was
220,
checked in by Matthew Whiting, 17 years ago
|
- Two new files: plots.cc and feedback.cc. Introduced to separate the declarations and definitions for various classes.
- Mostly just improving the documentation for use with Doxygen.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[60] | 1 | #include <Cubes/cubes.hh> |
---|
[193] | 2 | #include <Detection/detection.hh> |
---|
[60] | 3 | |
---|
| 4 | void Cube::invert() |
---|
| 5 | { |
---|
| 6 | /** |
---|
[220] | 7 | * A function that multiplies all non-Blank pixels by -1. |
---|
| 8 | * This is used when searching for negative features. |
---|
[60] | 9 | */ |
---|
| 10 | for(int i=0; i<this->numPixels; i++) |
---|
[193] | 11 | if(!this->isBlank(i)){ |
---|
| 12 | this->array[i] *= -1.; |
---|
| 13 | if(this->reconExists) this->recon[i] *= -1.; |
---|
| 14 | } |
---|
[60] | 15 | } |
---|
| 16 | |
---|
| 17 | void Cube::reInvert() |
---|
| 18 | { |
---|
| 19 | /** |
---|
[220] | 20 | * A function that switches the array back to the original sign. |
---|
| 21 | * Any objects will have the flux of each pixel inverted as well. |
---|
| 22 | * This is used when searching for negative features. |
---|
[60] | 23 | */ |
---|
[61] | 24 | for(int i=0; i<this->numPixels; i++){ |
---|
| 25 | if(!this->isBlank(i)){ |
---|
| 26 | this->array[i] *= -1.; |
---|
| 27 | if(this->reconExists) this->recon[i] *= -1.; |
---|
| 28 | } |
---|
| 29 | } |
---|
[60] | 30 | |
---|
| 31 | for(int i=0; i<this->objectList.size(); i++){ |
---|
[62] | 32 | this->objectList[i].setNegative(true); |
---|
[60] | 33 | for(int pix=0; pix<this->objectList[i].getSize(); pix++){ |
---|
| 34 | this->objectList[i].setF(pix, -1. * this->objectList[i].getF(pix) ); |
---|
| 35 | } |
---|
| 36 | this->objectList[i].calcParams(); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.