25 #if !defined(ALMA_ASDM2MSFILLER_H)
26 #define ALMA_ASDM2MSFILLER_H
159 int createMS(
const std::string& msName,
161 bool withCompression,
162 const std::string& telName,
165 bool withCorrectedData=
false,
166 bool useAsdmStMan4DATA=
false);
175 double creation_time_,
177 bool withCompression,
178 const std::string& telName,
179 int intintmaxNumCorr,
181 bool withCorrectedData=
false,
182 bool useAsdmStMan4DATA=
false);
190 const std::string& station_,
200 void addData (
bool complexData,
201 std::vector<double> &time_,
202 std::vector<int> &antennaId1_,
203 std::vector<int> &antennaId2_,
204 std::vector<int> &feedId1_,
205 std::vector<int> &feedId2_,
206 std::vector<int> &dataDescId_,
209 std::vector<double> &interval_,
210 std::vector<double> &exposure_,
211 std::vector<double> &timeCentroid_,
215 std::vector<int> &stateId_,
216 std::vector<std::pair<int, int> > &nChanNPol_,
217 std::vector<double> &uvw_,
218 std::vector<double> &weight_,
219 std::vector<double> &sigma_);
221 void addData (
bool complexData,
222 std::vector<double> &time_,
223 std::vector<int> &antennaId1_,
224 std::vector<int> &antennaId2_,
225 std::vector<int> &feedId1_,
226 std::vector<int> &feedId2_,
227 std::vector<int> &dataDescId_,
229 std::vector<int> &fieldId_,
230 std::vector<double> &interval_,
231 std::vector<double> &exposure_,
232 std::vector<double> &timeCentroid_,
236 std::vector<int> &stateId_,
237 std::vector<double> &uvw_,
238 std::vector<std::vector<unsigned int> > &dataShape_,
239 std::vector<float *> &uncorrectedData_,
240 std::vector<float *> &correctedData_,
241 std::vector<unsigned int> &flag_);
243 void addData (
bool complexData,
244 std::vector<double> &time_,
245 std::vector<int> &antennaId1_,
246 std::vector<int> &antennaId2_,
247 std::vector<int> &feedId1_,
248 std::vector<int> &feedId2_,
249 std::vector<int> &dataDescId_,
251 std::vector<int> &fieldId_,
252 std::vector<double> &interval_,
253 std::vector<double> &exposure_,
254 std::vector<double> &timeCentroid_,
258 std::vector<int> &stateId_,
259 std::vector<double> &uvw_,
260 std::vector<std::vector<unsigned int> > &dataShape_,
261 std::vector<float *> &data_,
262 std::vector<unsigned int> &flag_,
263 std::vector<double> &weight_,
264 std::vector<double> &sigma_);
267 int polarizarion_id_);
270 int polarizarion_id_);
278 int spectral_window_id_,
283 std::vector<double> & beam_offset_,
284 std::vector<std::string> & pol_type_,
285 std::vector<std::complex<float> > & polarization_response_,
286 std::vector<double>& position_,
287 std::vector<double>& receptor_angle_);
289 void addField(
const std::string& name_,
290 const std::string& code_,
292 unsigned int num_poly_,
293 std::vector<std::vector<double> >& delay_dir_,
294 std::vector<std::vector<double> >& phase_dir_,
295 std::vector<std::vector<double> >& reference_dir_,
296 const std::string& direction_code_,
303 const std::string& type_,
304 const std::string& reason_,
308 std::string& command_);
312 const std::string& message_,
313 const std::string& priority_,
314 const std::string& origin_,
316 const std::string& application_,
317 const std::string& cli_command_,
318 const std::string& app_parms_ );
323 const std::string& observer_,
324 const std::vector<std::string>& log_,
325 const std::string& schedule_type_,
326 const std::vector<std::string>& schedule_,
327 const std::string& project_,
328 double release_date_);
331 std::vector<int>& antenna_id_,
332 std::vector<double>& time_,
333 std::vector<double>& interval_,
334 std::vector<double>& direction_,
335 std::vector<double>& target_,
336 std::vector<double>& pointing_offset_,
337 std::vector<double>& encoder_,
338 std::vector<bool>& tracking_,
339 bool overTheTopExists4All_,
340 std::vector<bool>& v_overTheTop_,
341 std::vector<s_overTheTop>& v_s_overTheTop_);
344 std::vector<int>& corr_type_,
345 std::vector<int>& corr_product_);
349 const std::vector<int>& corr_type_,
350 const std::vector<int>& corr_product_);
353 std::string& sub_type_,
360 int spectral_window_id_,
363 int calibration_group_,
365 std::vector<double>& direction_,
366 std::string& direction_code_,
367 std::vector<double>& position_,
368 std::vector<double>& proper_motion_,
369 std::vector<std::string>& transition_,
370 std::vector<double>& rest_frequency_,
371 std::vector<double>& sysvel_);
374 const std::string& name_,
375 double ref_frequency_,
376 const std::vector<double>& chan_freq_,
377 const std::vector<double>& chan_width_,
379 const std::vector<double>& effective_bw_,
380 const std::vector<double>& resolution_,
381 double total_bandwidth_,
386 const std::string& freq_group_name_,
388 const std::vector<int>& assoc_sp_id_,
389 const std::vector<std::string>& assoc_nature_,
390 const std::string & windowFunction_,
397 unsigned int sub_scan_,
398 std::string& obs_mode_,
407 std::string& obs_mode_);
411 int spectral_window_id,
416 std::pair<
bool, std::vector<float> >& tcal_spectrum_pair,
417 std::pair<bool, bool>& tcal_flag_pair,
418 std::pair<
bool, std::vector<float> >& trx_spectrum_pair,
419 std::pair<bool, bool>& trx_flag_pair,
420 std::pair<
bool, std::vector<float> >& tsky_spectrum_pair,
421 std::pair<bool, bool>& tsky_flag_pair,
422 std::pair<
bool, std::vector<float> >& tsys_spectrum_pair,
423 std::pair<bool, bool>& tsys_flag_pair,
424 std::pair<
bool, std::vector<float> >& tant_spectrum_pair,
425 std::pair<bool, bool>& tant_flag_pair,
426 std::pair<
bool, std::vector<float> >& tant_tsys_spectrum_pair,
427 std::pair<bool, bool>& tant_tsys_flag_pair);
432 const std::pair<bool, float>& pressure_opt_,
433 const std::pair<bool, float>& relHumidity_opt_,
434 const std::pair<bool, float>& temperature_opt_,
435 const std::pair<bool, float>& windDirection_opt_,
436 const std::pair<bool, float>& windSpeed_opt_,
437 const std::pair<bool, float>& dewPoint_opt_,
439 std::vector<double>& wx_station_position_);
454 int spectralWindowId,
457 unsigned int numCalLoad,
458 std::vector<std::string> calloadNames,
459 unsigned int numReceptor,
460 std::vector<std::vector<float> >& calEff,
461 std::vector<std::vector<float> >& noiseCal,
462 std::vector<double >& temperatureLoad);
488 int spectralWindowId,
491 unsigned int numReceptor,
492 std::vector<float>& switchedPowerDifference,
493 std::vector<float>& switchedPowerSum,
494 std::vector<float>& requantizerGain);
497 std::vector<int>& antennaId,
498 std::vector<int>& spectralWindowId,
499 std::vector<int>& feedId,
500 std::vector<double>&
time,
501 std::vector<double>& interval,
502 unsigned int numReceptor,
503 std::vector<float>& switchedPowerDifference,
504 std::vector<float>& switchedPowerSum,
505 std::vector<float>& requantizerGain);
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.
casacore::MeasurementSet * itsMS
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_)
casacore::Block< casacore::IPosition > itsDataShapes
int setNumChan(int i, int numCorr)
void addState(bool sig_, bool ref_, double cal_, double load_, int sub_scan_, std::string &obs_mode_)
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_)
void addProcessor(std::string &type_, std::string &sub_type_, int type_id_, int mode_id_)
Main interface class to a read/write table.
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.
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_)
const std::string itsName
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
casacore::MSMainColumns * itsMSCol
A structure to define a range of rows in the Pointing table where the attribute overTheTop is defined...
int itsCalDeviceNumberOfRows
const char ** getPolCombinations(int numCorr)
~ASDM2MSFiller()
Destructor.
Class ddMgr is a utility to help for the management of DataDescription, SpectralWindow and Polarizati...
int setDD(int i, int polId, int swId)
void updateEphemerisIdInField(std::vector< std::pair< int, int > > &idxEphemerisId_v)
int createMS(const std::string &msName, bool complexData, bool withCompression, const std::string &telName, int maxNumCorr, int maxNumChan, bool withCorrectedData=false, bool useAsdmStMan4DATA=false)
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)
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_)
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 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_)
int addUniqueDataDescription(int spectral_window_id_, int polarizarion_id_)
std::string path(const std::string &name)
static std::map< std::string, casacore::MDirection::Types > string2MDirectionInit()
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_)
int addUniqueState(bool sig_, bool ref_, double cal_, double load_, unsigned int sub_scan_, std::string &obs_mode_, bool flag_row_)
std::pair< casacore::Double, casacore::Double > TimeRange
int setNumCorr(int i, int numChan)
casacore::String msPath()
casacore::uInt itsMSMainRow
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)
const casacore::MeasurementSet * ms()
int addDataDescription(int spectral_window_id_, int polarizarion_id_)
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)
A Table intended to hold astronomical data (a set of Measurements).
int addPolarization(int num_corr_, std::vector< int > &corr_type_, std::vector< int > &corr_product_)
casacore::String itsMSPath
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 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_)
static std::map< std::string, casacore::MDirection::Types > string2MDirection
A class for easy read-write access to MeasurementSet main table columns.
casacore::ScalarColumn< casacore::String > * itsWinFuncCol
String: the storage and methods of handling collections of characters.
casacore::Table itsMSCalDeviceTable
int addUniquePolarization(int num_corr_, const std::vector< int > &corr_type_, const std::vector< int > &corr_product_)
struct ddMgr::@56 dd[100]
casacore::ScalarColumn< casacore::Int > * itsNumBinCol
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 addFlagCmd(double time_, double interval_, const std::string &type_, const std::string &reason_, int level_, int severity_, int applied_, std::string &command_)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.