Last change
on this file since 220 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
|
Line | |
---|
1 | #include <Cubes/cubes.hh> |
---|
2 | #include <Detection/detection.hh> |
---|
3 | |
---|
4 | void Cube::invert() |
---|
5 | { |
---|
6 | /** |
---|
7 | * A function that multiplies all non-Blank pixels by -1. |
---|
8 | * This is used when searching for negative features. |
---|
9 | */ |
---|
10 | for(int i=0; i<this->numPixels; i++) |
---|
11 | if(!this->isBlank(i)){ |
---|
12 | this->array[i] *= -1.; |
---|
13 | if(this->reconExists) this->recon[i] *= -1.; |
---|
14 | } |
---|
15 | } |
---|
16 | |
---|
17 | void Cube::reInvert() |
---|
18 | { |
---|
19 | /** |
---|
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. |
---|
23 | */ |
---|
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 | } |
---|
30 | |
---|
31 | for(int i=0; i<this->objectList.size(); i++){ |
---|
32 | this->objectList[i].setNegative(true); |
---|
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.