casa::ScantableSourceIterator Class Reference

#include <ScantableIterator.h>

Inheritance diagram for casa::ScantableSourceIterator:
casa::ScantableIteratorInterface

List of all members.

Public Types

typedef void * Product

Public Member Functions

 ScantableSourceIterator (Table const &table)
virtual ~ScantableSourceIterator ()
void getEntry (sdfiller::SourceRecord &record)
virtual void getProduct (Product *)

Private Attributes

ROScalarColumn< Stringname_column_
ArrayColumn< Double > direction_column_
ArrayColumn< Double > proper_motion_column_
ROScalarColumn< Double > sysvel_column_
ROScalarColumn< uInt > molecule_id_column_
ROScalarColumn< uInt > ifno_column_
ROScalarColumn< Double > time_column_
ROScalarColumn< Double > interval_column_
ArrayColumn< Double > restfrequency_column_
ArrayColumn< Stringmolecule_name_column_
Table molecules_table_
Vector< uInt > row_list_
std::map< String, Int > source_id_map_
std::map< uInt, uInt > molecule_id_map_
std::map< String, std::map
< uInt, Block< Double > > > 
time_range_

Detailed Description

Definition at line 279 of file ScantableIterator.h.


Member Typedef Documentation

Definition at line 281 of file ScantableIterator.h.


Constructor & Destructor Documentation

casa::ScantableSourceIterator::ScantableSourceIterator ( Table const &  table  )  [inline]

for (uInt i = 0; i < num_unique; ++i) { std::cout << i << ": SRCNAME \"" << name_column_(row_list_[i]) << "\" IFNO " << ifno_column_(row_list_[i]) << std::endl; }

generate molecule_id_map_

generate sorted_index_

for (auto i = time_range_.begin(); i != time_range_.end(); ++i) { std::cout << "SRCNAME \"" << i->first << "\": " << std::endl; for (auto j = i->second.begin(); j != i->second.end(); ++j) { std::cout << " " << j->first << ": " << j->second[0] << " " << j->second[1] << std::endl; } }

Definition at line 282 of file ScantableIterator.h.

References casacore::TableRecord::asTable(), casacore::ArrayColumn< T >::attach(), casacore::Array< T >::data(), ifno_column_, casa::ScantableIteratorInterface::initialize(), casa::kDay2Sec, casacore::Table::keywordSet(), casa::ScantableIteratorInterface::main_table_, molecule_id_map_, molecule_name_column_, molecules_table_, casa::name(), name_column_, casacore::Table::nrow(), casacore::Vector< T >::resize(), restfrequency_column_, row_list_, casacore::ArrayBase::size(), casacore::Sort::sort(), casacore::Sort::sortKey(), source_id_map_, and time_range_.

virtual casa::ScantableSourceIterator::~ScantableSourceIterator (  )  [inline, virtual]

Definition at line 379 of file ScantableIterator.h.


Member Function Documentation

void casa::ScantableSourceIterator::getEntry ( sdfiller::SourceRecord record  )  [inline]

2016/02/04 TN comment out the following else block since if no ID is found in molecule_id_map_ it indicates that there is no corresponding entry in MOLECULES table for given MOLECULE_ID. Serch result is always empty table. else { Table t = molecules_table_(molecules_table_.col("ID") == molecule_id, 1); if (t.nrow() == 1) { ArrayColumn<Double> rest_freq_column(t, "RESTFREQUENCY"); ArrayColumn<String> molecule_name_column(t, "NAME"); if (rest_freq_column.isDefined(0)) { record.rest_frequency = rest_freq_column(0); } if (molecule_name_column.isDefined(0)) { record.transition = molecule_name_column(0); } } }

Table t = main_table_( main_table_.col("SRCNAME") == record.name && main_table_.col("IFNO") == record.spw_id); time_column_.attach(t, "TIME"); Vector < Double > time_list = time_column_.getColumn(); Sort sorter; sorter.sortKey(time_list.data(), TpDouble); Vector < uInt > index_vector; uInt n = sorter.sort(index_vector, time_list.size()); interval_column_.attach(t, "INTERVAL"); constexpr double kDay2Sec = 86400.0; Double time_min = time_list[index_vector[0]] * kDay2Sec

  • 0.5 * interval_column_(index_vector[0]); Double time_max = time_list[index_vector[n - 1]] * kDay2Sec + 0.5 * interval_column_(index_vector[n - 1]);

Definition at line 382 of file ScantableIterator.h.

References casa::ScantableIteratorInterface::current_iter_, casa::sdfiller::SourceRecord::direction, direction_column_, ifno_column_, casa::sdfiller::SourceRecord::interval, casacore::TableColumn::isDefined(), casa::viewer::region::J2000, molecule_id_column_, molecule_id_map_, molecule_name_column_, casa::sdfiller::SourceRecord::name, name_column_, casa::sdfiller::SourceRecord::num_lines, casa::sdfiller::SourceRecord::proper_motion, proper_motion_column_, casa::sdfiller::SourceRecord::rest_frequency, restfrequency_column_, row_list_, casacore::ArrayBase::size(), casa::sdfiller::SourceRecord::source_id, source_id_map_, casa::sdfiller::SourceRecord::spw_id, casa::sdfiller::SourceRecord::sysvel, sysvel_column_, casa::sdfiller::SourceRecord::time, time_range_, and casa::sdfiller::SourceRecord::transition.

virtual void casa::ScantableSourceIterator::getProduct ( Product  )  [inline, virtual]

Definition at line 446 of file ScantableIterator.h.


Member Data Documentation

Definition at line 452 of file ScantableIterator.h.

Referenced by getEntry().

ROScalarColumn<uInt> casa::ScantableSourceIterator::ifno_column_ [private]

Definition at line 456 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

ROScalarColumn<Double> casa::ScantableSourceIterator::interval_column_ [private]

Definition at line 458 of file ScantableIterator.h.

Definition at line 455 of file ScantableIterator.h.

Referenced by getEntry().

std::map<uInt, uInt> casa::ScantableSourceIterator::molecule_id_map_ [private]

Definition at line 464 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

Definition at line 460 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

Definition at line 461 of file ScantableIterator.h.

Referenced by ScantableSourceIterator().

Definition at line 451 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

Definition at line 453 of file ScantableIterator.h.

Referenced by getEntry().

Definition at line 459 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

Definition at line 462 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

Definition at line 463 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().

ROScalarColumn<Double> casa::ScantableSourceIterator::sysvel_column_ [private]

Definition at line 454 of file ScantableIterator.h.

Referenced by getEntry().

ROScalarColumn<Double> casa::ScantableSourceIterator::time_column_ [private]

Definition at line 457 of file ScantableIterator.h.

std::map<String, std::map<uInt, Block<Double> > > casa::ScantableSourceIterator::time_range_ [private]

Definition at line 465 of file ScantableIterator.h.

Referenced by getEntry(), and ScantableSourceIterator().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1