casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ASDM2MSFiller Class Reference

Class ASDM2MSFiller. More...

#include <ASDM2MSFiller.h>

Public Member Functions

 ASDM2MSFiller (const std::string &name_, double creation_time_, bool complexData, bool withCompression, const std::string &telName, int intintmaxNumCorr, int maxNumChan, bool withCorrectedData=false, bool useAsdmStMan4DATA=false)
 
 ~ASDM2MSFiller ()
 Destructor. More...
 
const casacore::MeasurementSetms ()
 
int addAntenna (const std::string &name_, const std::string &station_, double lx_, double ly_, double lz_, double offset_x_, double offset_y_, double offset_z_, float dish_diam_)
 
void addData (bool complexData, std::vector< double > &time_, std::vector< int > &antennaId1_, std::vector< int > &antennaId2_, std::vector< int > &feedId1_, std::vector< int > &feedId2_, std::vector< int > &dataDescId_, int processorId_, int fieldId_, std::vector< double > &interval_, std::vector< double > &exposure_, std::vector< double > &timeCentroid_, int scanNumber_, int arrayId_, int observationId_, std::vector< int > &stateId_, std::vector< std::pair< int, int > > &nChanNPol_, std::vector< double > &uvw_, std::vector< double > &weight_, std::vector< double > &sigma_)
 
void addData (bool complexData, std::vector< double > &time_, std::vector< int > &antennaId1_, std::vector< int > &antennaId2_, std::vector< int > &feedId1_, std::vector< int > &feedId2_, std::vector< int > &dataDescId_, int processorId_, std::vector< int > &fieldId_, std::vector< double > &interval_, std::vector< double > &exposure_, std::vector< double > &timeCentroid_, int scanNumber_, int arrayId_, int observationId_, std::vector< int > &stateId_, std::vector< double > &uvw_, std::vector< std::vector< unsigned int > > &dataShape_, std::vector< float * > &uncorrectedData_, std::vector< float * > &correctedData_, std::vector< unsigned int > &flag_)
 
void addData (bool complexData, std::vector< double > &time_, std::vector< int > &antennaId1_, std::vector< int > &antennaId2_, std::vector< int > &feedId1_, std::vector< int > &feedId2_, std::vector< int > &dataDescId_, int processorId_, std::vector< int > &fieldId_, std::vector< double > &interval_, std::vector< double > &exposure_, std::vector< double > &timeCentroid_, int scanNumber_, int arrayId_, int observationId_, std::vector< int > &stateId_, std::vector< double > &uvw_, std::vector< std::vector< unsigned int > > &dataShape_, std::vector< float * > &data_, std::vector< unsigned int > &flag_, std::vector< double > &weight_, std::vector< double > &sigma_)
 
int addDataDescription (int spectral_window_id_, int polarizarion_id_)
 
int addUniqueDataDescription (int spectral_window_id_, int polarizarion_id_)
 
int exists (char *path)
 
casacore::String msPath ()
 
void addFeed (int antenna_id_, int feed_id_, int spectral_window_id_, double time_, double interval_, int num_receptors_, int beam_id_, std::vector< double > &beam_offset_, std::vector< std::string > &pol_type_, std::vector< std::complex< float > > &polarization_response_, std::vector< double > &position_, std::vector< double > &receptor_angle_)
 
void addField (const std::string &name_, const std::string &code_, double time_, unsigned int num_poly_, std::vector< std::vector< double > > &delay_dir_, std::vector< std::vector< double > > &phase_dir_, std::vector< std::vector< double > > &reference_dir_, const std::string &direction_code_, int source_id_)
 
void updateEphemerisIdInField (std::vector< std::pair< int, int > > &idxEphemerisId_v)
 
void addFlagCmd (double time_, double interval_, const std::string &type_, const std::string &reason_, int level_, int severity_, int applied_, std::string &command_)
 
void addHistory (double time_, int observation_id_, const std::string &message_, const std::string &priority_, const std::string &origin_, int object_id_, const std::string &application_, const std::string &cli_command_, const std::string &app_parms_)
 
void addObservation (const std::string &telescopeName_, double startTime_, double endTime_, const std::string &observer_, const std::vector< std::string > &log_, const std::string &schedule_type_, const std::vector< std::string > &schedule_, const std::string &project_, double release_date_)
 
void addPointingSlice (unsigned int n_row_, std::vector< int > &antenna_id_, std::vector< double > &time_, std::vector< double > &interval_, std::vector< double > &direction_, std::vector< double > &target_, std::vector< double > &pointing_offset_, std::vector< double > &encoder_, std::vector< bool > &tracking_, bool overTheTopExists4All_, std::vector< bool > &v_overTheTop_, std::vector< s_overTheTop > &v_s_overTheTop_)
 
int addPolarization (int num_corr_, std::vector< int > &corr_type_, std::vector< int > &corr_product_)
 
int addUniquePolarization (int num_corr_, const std::vector< int > &corr_type_, const std::vector< int > &corr_product_)
 
void addProcessor (std::string &type_, std::string &sub_type_, int type_id_, int mode_id_)
 
void addSource (int source_id_, double time_, double interval_, int spectral_window_id_, int num_lines_, std::string &name_, int calibration_group_, std::string &code_, std::vector< double > &direction_, std::string &direction_code_, std::vector< double > &position_, std::vector< double > &proper_motion_, std::vector< std::string > &transition_, std::vector< double > &rest_frequency_, std::vector< double > &sysvel_)
 
int addSpectralWindow (int num_chan_, const std::string &name_, double ref_frequency_, const std::vector< double > &chan_freq_, const std::vector< double > &chan_width_, int meas_freq_ref_, const std::vector< double > &effective_bw_, const std::vector< double > &resolution_, double total_bandwidth_, int net_sideband_, int bbc_no_, int if_conv_chain_, int freq_group_, const std::string &freq_group_name_, int num_assoc_, const std::vector< int > &assoc_sp_id_, const std::vector< std::string > &assoc_nature_, const std::string &windowFunction_, int numBin_)
 
int addUniqueState (bool sig_, bool ref_, double cal_, double load_, unsigned int sub_scan_, std::string &obs_mode_, bool flag_row_)
 
void addState (bool sig_, bool ref_, double cal_, double load_, int sub_scan_, std::string &obs_mode_)
 
void addSysCal (int antenna_id, int feed_id, int spectral_window_id, double time_, double interval_, int numReceptor_, int numChan_, std::pair< bool, std::vector< float > > &tcal_spectrum_pair, std::pair< bool, bool > &tcal_flag_pair, std::pair< bool, std::vector< float > > &trx_spectrum_pair, std::pair< bool, bool > &trx_flag_pair, std::pair< bool, std::vector< float > > &tsky_spectrum_pair, std::pair< bool, bool > &tsky_flag_pair, std::pair< bool, std::vector< float > > &tsys_spectrum_pair, std::pair< bool, bool > &tsys_flag_pair, std::pair< bool, std::vector< float > > &tant_spectrum_pair, std::pair< bool, bool > &tant_flag_pair, std::pair< bool, std::vector< float > > &tant_tsys_spectrum_pair, std::pair< bool, bool > &tant_tsys_flag_pair)
 
void addWeather (int antenna_id_, double time_, double interval_, const std::pair< bool, float > &pressure_opt_, const std::pair< bool, float > &relHumidity_opt_, const std::pair< bool, float > &temperature_opt_, const std::pair< bool, float > &windDirection_opt_, const std::pair< bool, float > &windSpeed_opt_, const std::pair< bool, float > &dewPoint_opt_, int wx_station_id_, std::vector< double > &wx_station_position_)
 
void addCalDevice (int antennaId, int feedId, int spectralWindowId, double time, double interval, unsigned int numCalLoad, std::vector< std::string > calloadNames, unsigned int numReceptor, std::vector< std::vector< float > > &calEff, std::vector< std::vector< float > > &noiseCal, std::vector< double > &temperatureLoad)
 Add one row in the casacore::MS CALDEVICE table. More...
 
void addSysPower (int antennaId, int feedId, int spectralWindowId, double time, double interval, unsigned int numReceptor, std::vector< float > &switchedPowerDifference, std::vector< float > &switchedPowerSum, std::vector< float > &requantizerGain)
 Adds one row in the casacore::MS SYSPOWER table. More...
 
void addSysPowerSlice (unsigned int nRow, std::vector< int > &antennaId, std::vector< int > &spectralWindowId, std::vector< int > &feedId, std::vector< double > &time, std::vector< double > &interval, unsigned int numReceptor, std::vector< float > &switchedPowerDifference, std::vector< float > &switchedPowerSum, std::vector< float > &requantizerGain)
 
void end ()
 

Private Member Functions

int createMS (const std::string &msName, bool complexData, bool withCompression, const std::string &telName, int maxNumCorr, int maxNumChan, bool withCorrectedData=false, bool useAsdmStMan4DATA=false)
 
const char ** getPolCombinations (int numCorr)
 

Static Private Member Functions

static std::map< std::string,
casacore::MDirection::Types
string2MDirectionInit ()
 

Private Attributes

double itsCreationTime
 
const std::string itsName
 
int itsNumAntenna
 
casacore::MeasurementSetitsMS
 
casacore::MSMainColumnsitsMSCol
 
casacore::ScalarColumn
< casacore::String > * 
itsWinFuncCol
 
casacore::ScalarColumn
< casacore::Int > * 
itsNumBinCol
 
casacore::String itsMSPath
 
casacore::uInt itsMSMainRow
 
casacore::Block
< casacore::IPosition
itsDataShapes
 
int itsScanNumber
 
int itsNCat
 
ddMgr itsDDMgr
 
int itsCalDeviceNumberOfRows
 
casacore::Table itsMSCalDeviceTable
 

Static Private Attributes

static std::map< std::string,
casacore::MDirection::Types
string2MDirection
 

Detailed Description

Class ASDM2MSFiller.

Definition at line 137 of file ASDM2MSFiller.h.

Constructor & Destructor Documentation

ASDM2MSFiller::ASDM2MSFiller ( const std::string &  name_,
double  creation_time_,
bool  complexData,
bool  withCompression,
const std::string &  telName,
int  intintmaxNumCorr,
int  maxNumChan,
bool  withCorrectedData = false,
bool  useAsdmStMan4DATA = false 
)
ASDM2MSFiller::~ASDM2MSFiller ( )

Destructor.

Member Function Documentation

int ASDM2MSFiller::addAntenna ( const std::string &  name_,
const std::string &  station_,
double  lx_,
double  ly_,
double  lz_,
double  offset_x_,
double  offset_y_,
double  offset_z_,
float  dish_diam_ 
)
void ASDM2MSFiller::addCalDevice ( int  antennaId,
int  feedId,
int  spectralWindowId,
double  time,
double  interval,
unsigned int  numCalLoad,
std::vector< std::string >  calloadNames,
unsigned int  numReceptor,
std::vector< std::vector< float > > &  calEff,
std::vector< std::vector< float > > &  noiseCal,
std::vector< double > &  temperatureLoad 
)

Add one row in the casacore::MS CALDEVICE table.

Parameters
antennaIdthe index in the ANTENNA table of the antenna for which this row is defined.
feedIdthe index in the FEED table of the feeds for which this row is defined.
spectralWindowIdthe index in the SPECTRAL WINDOW table of the spectral window for which this row is defined.
timethe midpoint time of measurement.
intervalthe interval of measurement.
numCalloadthe number of calibration loads.
calLoadNamesa vector of strings.
void ASDM2MSFiller::addData ( bool  complexData,
std::vector< double > &  time_,
std::vector< int > &  antennaId1_,
std::vector< int > &  antennaId2_,
std::vector< int > &  feedId1_,
std::vector< int > &  feedId2_,
std::vector< int > &  dataDescId_,
int  processorId_,
int  fieldId_,
std::vector< double > &  interval_,
std::vector< double > &  exposure_,
std::vector< double > &  timeCentroid_,
int  scanNumber_,
int  arrayId_,
int  observationId_,
std::vector< int > &  stateId_,
std::vector< std::pair< int, int > > &  nChanNPol_,
std::vector< double > &  uvw_,
std::vector< double > &  weight_,
std::vector< double > &  sigma_ 
)
void ASDM2MSFiller::addData ( bool  complexData,
std::vector< double > &  time_,
std::vector< int > &  antennaId1_,
std::vector< int > &  antennaId2_,
std::vector< int > &  feedId1_,
std::vector< int > &  feedId2_,
std::vector< int > &  dataDescId_,
int  processorId_,
std::vector< int > &  fieldId_,
std::vector< double > &  interval_,
std::vector< double > &  exposure_,
std::vector< double > &  timeCentroid_,
int  scanNumber_,
int  arrayId_,
int  observationId_,
std::vector< int > &  stateId_,
std::vector< double > &  uvw_,
std::vector< std::vector< unsigned int > > &  dataShape_,
std::vector< float * > &  uncorrectedData_,
std::vector< float * > &  correctedData_,
std::vector< unsigned int > &  flag_ 
)
void ASDM2MSFiller::addData ( bool  complexData,
std::vector< double > &  time_,
std::vector< int > &  antennaId1_,
std::vector< int > &  antennaId2_,
std::vector< int > &  feedId1_,
std::vector< int > &  feedId2_,
std::vector< int > &  dataDescId_,
int  processorId_,
std::vector< int > &  fieldId_,
std::vector< double > &  interval_,
std::vector< double > &  exposure_,
std::vector< double > &  timeCentroid_,
int  scanNumber_,
int  arrayId_,
int  observationId_,
std::vector< int > &  stateId_,
std::vector< double > &  uvw_,
std::vector< std::vector< unsigned int > > &  dataShape_,
std::vector< float * > &  data_,
std::vector< unsigned int > &  flag_,
std::vector< double > &  weight_,
std::vector< double > &  sigma_ 
)
int ASDM2MSFiller::addDataDescription ( int  spectral_window_id_,
int  polarizarion_id_ 
)
void ASDM2MSFiller::addFeed ( int  antenna_id_,
int  feed_id_,
int  spectral_window_id_,
double  time_,
double  interval_,
int  num_receptors_,
int  beam_id_,
std::vector< double > &  beam_offset_,
std::vector< std::string > &  pol_type_,
std::vector< std::complex< float > > &  polarization_response_,
std::vector< double > &  position_,
std::vector< double > &  receptor_angle_ 
)
void ASDM2MSFiller::addField ( const std::string &  name_,
const std::string &  code_,
double  time_,
unsigned int  num_poly_,
std::vector< std::vector< double > > &  delay_dir_,
std::vector< std::vector< double > > &  phase_dir_,
std::vector< std::vector< double > > &  reference_dir_,
const std::string &  direction_code_,
int  source_id_ 
)
void ASDM2MSFiller::addFlagCmd ( double  time_,
double  interval_,
const std::string &  type_,
const std::string &  reason_,
int  level_,
int  severity_,
int  applied_,
std::string &  command_ 
)
void ASDM2MSFiller::addHistory ( double  time_,
int  observation_id_,
const std::string &  message_,
const std::string &  priority_,
const std::string &  origin_,
int  object_id_,
const std::string &  application_,
const std::string &  cli_command_,
const std::string &  app_parms_ 
)
void ASDM2MSFiller::addObservation ( const std::string &  telescopeName_,
double  startTime_,
double  endTime_,
const std::string &  observer_,
const std::vector< std::string > &  log_,
const std::string &  schedule_type_,
const std::vector< std::string > &  schedule_,
const std::string &  project_,
double  release_date_ 
)
void ASDM2MSFiller::addPointingSlice ( unsigned int  n_row_,
std::vector< int > &  antenna_id_,
std::vector< double > &  time_,
std::vector< double > &  interval_,
std::vector< double > &  direction_,
std::vector< double > &  target_,
std::vector< double > &  pointing_offset_,
std::vector< double > &  encoder_,
std::vector< bool > &  tracking_,
bool  overTheTopExists4All_,
std::vector< bool > &  v_overTheTop_,
std::vector< s_overTheTop > &  v_s_overTheTop_ 
)
int ASDM2MSFiller::addPolarization ( int  num_corr_,
std::vector< int > &  corr_type_,
std::vector< int > &  corr_product_ 
)
void ASDM2MSFiller::addProcessor ( std::string &  type_,
std::string &  sub_type_,
int  type_id_,
int  mode_id_ 
)
void ASDM2MSFiller::addSource ( int  source_id_,
double  time_,
double  interval_,
int  spectral_window_id_,
int  num_lines_,
std::string &  name_,
int  calibration_group_,
std::string &  code_,
std::vector< double > &  direction_,
std::string &  direction_code_,
std::vector< double > &  position_,
std::vector< double > &  proper_motion_,
std::vector< std::string > &  transition_,
std::vector< double > &  rest_frequency_,
std::vector< double > &  sysvel_ 
)
int ASDM2MSFiller::addSpectralWindow ( int  num_chan_,
const std::string &  name_,
double  ref_frequency_,
const std::vector< double > &  chan_freq_,
const std::vector< double > &  chan_width_,
int  meas_freq_ref_,
const std::vector< double > &  effective_bw_,
const std::vector< double > &  resolution_,
double  total_bandwidth_,
int  net_sideband_,
int  bbc_no_,
int  if_conv_chain_,
int  freq_group_,
const std::string &  freq_group_name_,
int  num_assoc_,
const std::vector< int > &  assoc_sp_id_,
const std::vector< std::string > &  assoc_nature_,
const std::string &  windowFunction_,
int  numBin_ 
)
void ASDM2MSFiller::addState ( bool  sig_,
bool  ref_,
double  cal_,
double  load_,
int  sub_scan_,
std::string &  obs_mode_ 
)
void ASDM2MSFiller::addSysCal ( int  antenna_id,
int  feed_id,
int  spectral_window_id,
double  time_,
double  interval_,
int  numReceptor_,
int  numChan_,
std::pair< bool, std::vector< float > > &  tcal_spectrum_pair,
std::pair< bool, bool > &  tcal_flag_pair,
std::pair< bool, std::vector< float > > &  trx_spectrum_pair,
std::pair< bool, bool > &  trx_flag_pair,
std::pair< bool, std::vector< float > > &  tsky_spectrum_pair,
std::pair< bool, bool > &  tsky_flag_pair,
std::pair< bool, std::vector< float > > &  tsys_spectrum_pair,
std::pair< bool, bool > &  tsys_flag_pair,
std::pair< bool, std::vector< float > > &  tant_spectrum_pair,
std::pair< bool, bool > &  tant_flag_pair,
std::pair< bool, std::vector< float > > &  tant_tsys_spectrum_pair,
std::pair< bool, bool > &  tant_tsys_flag_pair 
)
void ASDM2MSFiller::addSysPower ( int  antennaId,
int  feedId,
int  spectralWindowId,
double  time,
double  interval,
unsigned int  numReceptor,
std::vector< float > &  switchedPowerDifference,
std::vector< float > &  switchedPowerSum,
std::vector< float > &  requantizerGain 
)

Adds one row in the casacore::MS SYSPOWER table.

Parameters
antennaIdthe index in the ANTENNA table of the antenna for which this row is defined.
feedIdthe index in the FEED table of the feeds for which this row is defined.
spectralWindowIdthe index in the SPECTRAL WINDOW table of the spectral window for which this row is defined.
timethe midpoint time of measurement.
intervalthe interval of measurement.
numReceptora null value will be interpreted as "all the optional attributes" are absent, otherwise it will be considered as as the number of useful values to read in the next three vectors. More precisely, for any of the parameters switchedPowerDifference, switchedPowerSum and requantizedGain, if its size is null then the parameter is considered as "absent" and ignored otherwise its first numReceptor values will be copied into the casacore::MS CalDevice table corresponding field. If the size of one the parameters is not null but smaller than numReceptor then the code will crash miserably.
switchedPowerDifferencea vector of float numbers containing the switched power differences in its numReceptor first elements on the basis of one value per receptor. If the size of the vector is null then it'll be ignored.
switchedPowerSuma vector of float numbers containing the switched power sums in its numReceptor first elements on the basis of one value per receptor. If the size of the vector is null then it'll be ignored.
temperatureLoada vector of float number containing the requantizer gains on the basis of one value per receptor. If the size of the vector is null then it'll be ignored.
void ASDM2MSFiller::addSysPowerSlice ( unsigned int  nRow,
std::vector< int > &  antennaId,
std::vector< int > &  spectralWindowId,
std::vector< int > &  feedId,
std::vector< double > &  time,
std::vector< double > &  interval,
unsigned int  numReceptor,
std::vector< float > &  switchedPowerDifference,
std::vector< float > &  switchedPowerSum,
std::vector< float > &  requantizerGain 
)
int ASDM2MSFiller::addUniqueDataDescription ( int  spectral_window_id_,
int  polarizarion_id_ 
)
int ASDM2MSFiller::addUniquePolarization ( int  num_corr_,
const std::vector< int > &  corr_type_,
const std::vector< int > &  corr_product_ 
)
Parameters
corr_type_const std::vector<casacore::Stokes::StokesTypes>& corr_type_,
int ASDM2MSFiller::addUniqueState ( bool  sig_,
bool  ref_,
double  cal_,
double  load_,
unsigned int  sub_scan_,
std::string &  obs_mode_,
bool  flag_row_ 
)
void ASDM2MSFiller::addWeather ( int  antenna_id_,
double  time_,
double  interval_,
const std::pair< bool, float > &  pressure_opt_,
const std::pair< bool, float > &  relHumidity_opt_,
const std::pair< bool, float > &  temperature_opt_,
const std::pair< bool, float > &  windDirection_opt_,
const std::pair< bool, float > &  windSpeed_opt_,
const std::pair< bool, float > &  dewPoint_opt_,
int  wx_station_id_,
std::vector< double > &  wx_station_position_ 
)
int ASDM2MSFiller::createMS ( const std::string &  msName,
bool  complexData,
bool  withCompression,
const std::string &  telName,
int  maxNumCorr,
int  maxNumChan,
bool  withCorrectedData = false,
bool  useAsdmStMan4DATA = false 
)
private
void ASDM2MSFiller::end ( )
int ASDM2MSFiller::exists ( char *  path)
const char** ASDM2MSFiller::getPolCombinations ( int  numCorr)
private
const casacore::MeasurementSet* ASDM2MSFiller::ms ( )
casacore::String ASDM2MSFiller::msPath ( )
static std::map<std::string, casacore::MDirection::Types> ASDM2MSFiller::string2MDirectionInit ( )
staticprivate
void ASDM2MSFiller::updateEphemerisIdInField ( std::vector< std::pair< int, int > > &  idxEphemerisId_v)

Member Data Documentation

int ASDM2MSFiller::itsCalDeviceNumberOfRows
private

Definition at line 156 of file ASDM2MSFiller.h.

double ASDM2MSFiller::itsCreationTime
private

Definition at line 139 of file ASDM2MSFiller.h.

casacore::Block<casacore::IPosition> ASDM2MSFiller::itsDataShapes
private

Definition at line 149 of file ASDM2MSFiller.h.

ddMgr ASDM2MSFiller::itsDDMgr
private

Definition at line 154 of file ASDM2MSFiller.h.

casacore::MeasurementSet* ASDM2MSFiller::itsMS
private

Definition at line 142 of file ASDM2MSFiller.h.

casacore::Table ASDM2MSFiller::itsMSCalDeviceTable
private

Definition at line 157 of file ASDM2MSFiller.h.

casacore::MSMainColumns* ASDM2MSFiller::itsMSCol
private

Definition at line 143 of file ASDM2MSFiller.h.

casacore::uInt ASDM2MSFiller::itsMSMainRow
private

Definition at line 147 of file ASDM2MSFiller.h.

casacore::String ASDM2MSFiller::itsMSPath
private

Definition at line 146 of file ASDM2MSFiller.h.

const std::string ASDM2MSFiller::itsName
private

Definition at line 140 of file ASDM2MSFiller.h.

int ASDM2MSFiller::itsNCat
private

Definition at line 152 of file ASDM2MSFiller.h.

int ASDM2MSFiller::itsNumAntenna
private

Definition at line 141 of file ASDM2MSFiller.h.

casacore::ScalarColumn<casacore::Int>* ASDM2MSFiller::itsNumBinCol
private

Definition at line 145 of file ASDM2MSFiller.h.

int ASDM2MSFiller::itsScanNumber
private

Definition at line 151 of file ASDM2MSFiller.h.

casacore::ScalarColumn<casacore::String>* ASDM2MSFiller::itsWinFuncCol
private

Definition at line 144 of file ASDM2MSFiller.h.

std::map<std::string, casacore::MDirection::Types> ASDM2MSFiller::string2MDirection
staticprivate

Definition at line 170 of file ASDM2MSFiller.h.


The documentation for this class was generated from the following file: