|
Last change
on this file since 2618 was 2613, checked in by Takeshi Nakazato, 13 years ago |
New Development: Yes
JIRA Issue: Yes CAS-2825
Ready for Test: No
Interface Changes: Yes
What Interface Changed: added new python module sd.edgemarker
Test Programs: not available
Put in Release Notes: Yes
Module(s): Module Names change impacts.
Description: Describe your changes here...
New python module edgemarker is available. The edgemarker is a tool to
detect edge of observed area and mark data near edge as OFF. It can be
used to calibrate OTF data without explicit OFF scan.
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | //
|
|---|
| 2 | // C++ Implimentation: EdgeDetector
|
|---|
| 3 | //
|
|---|
| 4 | // Description:
|
|---|
| 5 | //
|
|---|
| 6 | //
|
|---|
| 7 | // Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
|
|---|
| 8 | //
|
|---|
| 9 | // Copyright: See COPYING file that comes with this distribution
|
|---|
| 10 | //
|
|---|
| 11 | //
|
|---|
| 12 |
|
|---|
| 13 | #include "EdgeDetector.h"
|
|---|
| 14 |
|
|---|
| 15 | using namespace std ;
|
|---|
| 16 | using namespace casa ;
|
|---|
| 17 |
|
|---|
| 18 | namespace asap {
|
|---|
| 19 |
|
|---|
| 20 | EdgeDetector::EdgeDetector()
|
|---|
| 21 | : off_(),
|
|---|
| 22 | tempIP_( 1, 1 )
|
|---|
| 23 | {}
|
|---|
| 24 |
|
|---|
| 25 | EdgeDetector::~EdgeDetector()
|
|---|
| 26 | {}
|
|---|
| 27 |
|
|---|
| 28 | void EdgeDetector::setDirection( const Matrix<Double> &dir )
|
|---|
| 29 | {
|
|---|
| 30 | dir_.reference( dir ) ;
|
|---|
| 31 | resizeTempArea( dir.nrow() ) ;
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | void EdgeDetector::setTime( const Vector<Double> &t )
|
|---|
| 35 | {
|
|---|
| 36 | time_.reference( t ) ;
|
|---|
| 37 | resizeTempArea( t.nelements() ) ;
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | void EdgeDetector::resizeTempArea( const uInt &n )
|
|---|
| 41 | {
|
|---|
| 42 | if ( tempuInt_.nelements() < n ) {
|
|---|
| 43 | tempuInt_.resize( n, False, False ) ;
|
|---|
| 44 | }
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | Vector<uInt> EdgeDetector::vectorFromTempStorage( const uInt &n )
|
|---|
| 48 | {
|
|---|
| 49 | tempIP_[0] = n ;
|
|---|
| 50 | return Vector<uInt>( tempIP_, tempuInt_.storage(), COPY ) ;
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | void EdgeDetector::initDetect()
|
|---|
| 54 | {
|
|---|
| 55 | off_.resize() ;
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | void EdgeDetector::setOption( const Record &option )
|
|---|
| 59 | {
|
|---|
| 60 | this->parseOption( option ) ;
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | } // namespace asap
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.