Commits
C. Enrique Garcia Dabo authored 932eb028a87 Merge
164 164 | bool complexData, |
165 165 | bool withCompression, |
166 166 | const string& telName, |
167 167 | int maxNumCorr, |
168 168 | int maxNumChan, |
169 169 | bool withCorrectedData=false, |
170 170 | bool useAsdmStMan4DATA=false); |
171 171 | |
172 172 | const char** getPolCombinations(int numCorr); |
173 173 | |
174 - | static map<string, casacore::MDirection::Types> string2MDirection; |
175 - | static map<string, casacore::MDirection::Types> string2MDirectionInit(); |
174 + | static std::map<string, casacore::MDirection::Types> string2MDirection; |
175 + | static std::map<string, casacore::MDirection::Types> string2MDirectionInit(); |
176 176 | |
177 177 | public: |
178 178 | ASDM2MSFiller (const string& name_, |
179 179 | double creation_time_, |
180 180 | bool withRadioMeters, |
181 181 | bool complexData, |
182 182 | bool withCompression, |
183 183 | const string& telName, |
184 184 | int intintmaxNumCorr, |
185 185 | int maxNumChan, |
196 196 | double lx_, |
197 197 | double ly_, |
198 198 | double lz_, |
199 199 | double offset_x_, |
200 200 | double offset_y_, |
201 201 | double offset_z_, |
202 202 | float dish_diam_); |
203 203 | |
204 204 | |
205 205 | void addData (bool complexData, |
206 - | vector<double> &time_, |
207 - | vector<int> &antennaId1_, |
208 - | vector<int> &antennaId2_, |
209 - | vector<int> &feedId1_, |
210 - | vector<int> &feedId2_, |
211 - | vector<int> &dataDescId_, |
206 + | std::vector<double> &time_, |
207 + | std::vector<int> &antennaId1_, |
208 + | std::vector<int> &antennaId2_, |
209 + | std::vector<int> &feedId1_, |
210 + | std::vector<int> &feedId2_, |
211 + | std::vector<int> &dataDescId_, |
212 212 | int processorId_, |
213 213 | int fieldId_, |
214 - | vector<double> &interval_, |
215 - | vector<double> &exposure_, |
216 - | vector<double> &timeCentroid_, |
214 + | std::vector<double> &interval_, |
215 + | std::vector<double> &exposure_, |
216 + | std::vector<double> &timeCentroid_, |
217 217 | int scanNumber_, |
218 218 | int arrayId_, |
219 219 | int observationId_, |
220 - | vector<int> &stateId_, |
221 - | vector<pair<int, int> > &nChanNPol_, |
222 - | vector<double> &uvw_, |
223 - | vector<double> &weight_, |
224 - | vector<double> &sigma_); |
220 + | std::vector<int> &stateId_, |
221 + | std::vector<std::pair<int, int> > &nChanNPol_, |
222 + | std::vector<double> &uvw_, |
223 + | std::vector<double> &weight_, |
224 + | std::vector<double> &sigma_); |
225 225 | |
226 226 | void addData (bool complexData, |
227 - | vector<double> &time_, |
228 - | vector<int> &antennaId1_, |
229 - | vector<int> &antennaId2_, |
230 - | vector<int> &feedId1_, |
231 - | vector<int> &feedId2_, |
232 - | vector<int> &dataDescId_, |
227 + | std::vector<double> &time_, |
228 + | std::vector<int> &antennaId1_, |
229 + | std::vector<int> &antennaId2_, |
230 + | std::vector<int> &feedId1_, |
231 + | std::vector<int> &feedId2_, |
232 + | std::vector<int> &dataDescId_, |
233 233 | int processorId_, |
234 - | vector<int> &fieldId_, |
235 - | vector<double> &interval_, |
236 - | vector<double> &exposure_, |
237 - | vector<double> &timeCentroid_, |
234 + | std::vector<int> &fieldId_, |
235 + | std::vector<double> &interval_, |
236 + | std::vector<double> &exposure_, |
237 + | std::vector<double> &timeCentroid_, |
238 238 | int scanNumber_, |
239 239 | int arrayId_, |
240 240 | int observationId_, |
241 - | vector<int> &stateId_, |
242 - | vector<double> &uvw_, |
243 - | vector<vector<unsigned int> > &dataShape_, |
244 - | vector<float *> &uncorrectedData_, |
245 - | vector<float *> &correctedData_, |
246 - | vector<unsigned int> &flag_); |
241 + | std::vector<int> &stateId_, |
242 + | std::vector<double> &uvw_, |
243 + | std::vector<std::vector<unsigned int> > &dataShape_, |
244 + | std::vector<float *> &uncorrectedData_, |
245 + | std::vector<float *> &correctedData_, |
246 + | std::vector<unsigned int> &flag_); |
247 247 | |
248 248 | void addData (bool complexData, |
249 - | vector<double> &time_, |
250 - | vector<int> &antennaId1_, |
251 - | vector<int> &antennaId2_, |
252 - | vector<int> &feedId1_, |
253 - | vector<int> &feedId2_, |
254 - | vector<int> &dataDescId_, |
249 + | std::vector<double> &time_, |
250 + | std::vector<int> &antennaId1_, |
251 + | std::vector<int> &antennaId2_, |
252 + | std::vector<int> &feedId1_, |
253 + | std::vector<int> &feedId2_, |
254 + | std::vector<int> &dataDescId_, |
255 255 | int processorId_, |
256 - | vector<int> &fieldId_, |
257 - | vector<double> &interval_, |
258 - | vector<double> &exposure_, |
259 - | vector<double> &timeCentroid_, |
256 + | std::vector<int> &fieldId_, |
257 + | std::vector<double> &interval_, |
258 + | std::vector<double> &exposure_, |
259 + | std::vector<double> &timeCentroid_, |
260 260 | int scanNumber_, |
261 261 | int arrayId_, |
262 262 | int observationId_, |
263 - | vector<int> &stateId_, |
264 - | vector<double> &uvw_, |
265 - | vector<vector<unsigned int> > &dataShape_, |
266 - | vector<float *> &data_, |
267 - | vector<unsigned int> &flag_, |
268 - | vector<double> &weight_, |
269 - | vector<double> &sigma_); |
263 + | std::vector<int> &stateId_, |
264 + | std::vector<double> &uvw_, |
265 + | std::vector<std::vector<unsigned int> > &dataShape_, |
266 + | std::vector<float *> &data_, |
267 + | std::vector<unsigned int> &flag_, |
268 + | std::vector<double> &weight_, |
269 + | std::vector<double> &sigma_); |
270 270 | |
271 271 | |
272 272 | |
273 273 | int addDataDescription(int spectral_window_id_, |
274 274 | int polarizarion_id_); |
275 275 | |
276 276 | int addUniqueDataDescription(int spectral_window_id_, |
277 277 | int polarizarion_id_); |
278 278 | |
279 279 | int exists(char *path); |
280 280 | casacore::String msPath(); |
281 281 | |
282 282 | |
283 283 | void addFeed(int antenna_id_, |
284 284 | int feed_id_, |
285 285 | int spectral_window_id_, |
286 286 | double time_, |
287 287 | double interval_, |
288 288 | int num_receptors_, |
289 289 | int beam_id_, |
290 - | vector<double> & beam_offset_, |
291 - | vector<std::string> & pol_type_, |
292 - | vector<std::complex<float> > & polarization_response_, |
293 - | vector<double>& position_, // Must be a 3 elements vector !!! |
294 - | vector<double>& receptor_angle_); |
290 + | std::vector<double> & beam_offset_, |
291 + | std::vector<std::string> & pol_type_, |
292 + | std::vector<std::complex<float> > & polarization_response_, |
293 + | std::vector<double>& position_, // Must be a 3 elements vector !!! |
294 + | std::vector<double>& receptor_angle_); |
295 295 | |
296 296 | void addField( const string& name_, |
297 297 | const string& code_, |
298 298 | double time_, |
299 299 | unsigned int num_poly_, |
300 - | vector<vector<double> >& delay_dir_, |
301 - | vector<vector<double> >& phase_dir_, |
302 - | vector<vector<double> >& reference_dir_, |
300 + | std::vector<std::vector<double> >& delay_dir_, |
301 + | std::vector<std::vector<double> >& phase_dir_, |
302 + | std::vector<std::vector<double> >& reference_dir_, |
303 303 | const string& direction_code_, |
304 304 | int source_id_); |
305 305 | |
306 - | void updateEphemerisIdInField(vector<pair<int, int> >& idxEphemerisId_v); |
306 + | void updateEphemerisIdInField(std::vector<std::pair<int, int> >& idxEphemerisId_v); |
307 307 | |
308 308 | void addFlagCmd(double time_, |
309 309 | double interval_, |
310 310 | const string& type_, |
311 311 | const string& reason_, |
312 312 | int level_, |
313 313 | int severity_, |
314 314 | int applied_, |
315 315 | string& command_); |
316 316 | |
321 321 | const string& origin_, |
322 322 | int object_id_, |
323 323 | const string& application_, |
324 324 | const string& cli_command_, |
325 325 | const string& app_parms_ ); |
326 326 | |
327 327 | void addObservation(const string& telescopeName_, |
328 328 | double startTime_, |
329 329 | double endTime_, |
330 330 | const string& observer_, |
331 - | const vector<string>& log_, |
331 + | const std::vector<string>& log_, |
332 332 | const string& schedule_type_, |
333 - | const vector<string>& schedule_, |
333 + | const std::vector<string>& schedule_, |
334 334 | const string& project_, |
335 335 | double release_date_); |
336 336 | |
337 337 | void addPointingSlice(unsigned int n_row_, |
338 - | vector<int>& antenna_id_, |
339 - | vector<double>& time_, |
340 - | vector<double>& interval_, |
341 - | vector<double>& direction_, |
342 - | vector<double>& target_, |
343 - | vector<double>& pointing_offset_, |
344 - | vector<double>& encoder_, |
345 - | vector<bool>& tracking_, |
338 + | std::vector<int>& antenna_id_, |
339 + | std::vector<double>& time_, |
340 + | std::vector<double>& interval_, |
341 + | std::vector<double>& direction_, |
342 + | std::vector<double>& target_, |
343 + | std::vector<double>& pointing_offset_, |
344 + | std::vector<double>& encoder_, |
345 + | std::vector<bool>& tracking_, |
346 346 | bool overTheTopExists4All_, |
347 - | vector<bool>& v_overTheTop_, |
348 - | vector<s_overTheTop>& v_s_overTheTop_); |
347 + | std::vector<bool>& v_overTheTop_, |
348 + | std::vector<s_overTheTop>& v_s_overTheTop_); |
349 349 | |
350 350 | int addPolarization(int num_corr_, |
351 - | vector<int>& corr_type_, |
352 - | vector<int>& corr_product_); |
351 + | std::vector<int>& corr_type_, |
352 + | std::vector<int>& corr_product_); |
353 353 | |
354 354 | int addUniquePolarization(int num_corr_, |
355 - | // const vector<casacore::Stokes::StokesTypes>& corr_type_, |
356 - | const vector<int>& corr_type_, |
357 - | const vector<int>& corr_product_); |
355 + | // const std::vector<casacore::Stokes::StokesTypes>& corr_type_, |
356 + | const std::vector<int>& corr_type_, |
357 + | const std::vector<int>& corr_product_); |
358 358 | |
359 359 | void addProcessor(string& type_, |
360 360 | string& sub_type_, |
361 361 | int type_id_, |
362 362 | int mode_id_); |
363 363 | |
364 364 | void addSource(int source_id_, |
365 365 | double time_, |
366 366 | double interval_, |
367 367 | int spectral_window_id_, |
368 368 | int num_lines_, |
369 369 | string& name_, |
370 370 | int calibration_group_, |
371 371 | string& code_, |
372 - | vector<double>& direction_, |
372 + | std::vector<double>& direction_, |
373 373 | string& direction_code_, |
374 - | vector<double>& position_, |
375 - | vector<double>& proper_motion_, |
376 - | vector<string>& transition_, |
377 - | vector<double>& rest_frequency_, |
378 - | vector<double>& sysvel_); |
374 + | std::vector<double>& position_, |
375 + | std::vector<double>& proper_motion_, |
376 + | std::vector<string>& transition_, |
377 + | std::vector<double>& rest_frequency_, |
378 + | std::vector<double>& sysvel_); |
379 379 | |
380 380 | int addSpectralWindow(int num_chan_, |
381 381 | const string& name_, |
382 382 | double ref_frequency_, |
383 - | const vector<double>& chan_freq_, |
384 - | const vector<double>& chan_width_, |
383 + | const std::vector<double>& chan_freq_, |
384 + | const std::vector<double>& chan_width_, |
385 385 | int meas_freq_ref_, |
386 - | const vector<double>& effective_bw_, |
387 - | const vector<double>& resolution_, |
386 + | const std::vector<double>& effective_bw_, |
387 + | const std::vector<double>& resolution_, |
388 388 | double total_bandwidth_, |
389 389 | int net_sideband_, |
390 390 | int bbc_no_, |
391 391 | int if_conv_chain_, |
392 392 | int freq_group_, |
393 393 | const string& freq_group_name_, |
394 394 | int num_assoc_, |
395 - | const vector<int>& assoc_sp_id_, |
396 - | const vector<string>& assoc_nature_); |
395 + | const std::vector<int>& assoc_sp_id_, |
396 + | const std::vector<string>& assoc_nature_); |
397 397 | |
398 398 | int addUniqueState(bool sig_, |
399 399 | bool ref_, |
400 400 | double cal_, |
401 401 | double load_, |
402 402 | unsigned int sub_scan_, |
403 403 | string& obs_mode_, |
404 404 | bool flag_row_); |
405 405 | |
406 406 | |
411 411 | int sub_scan_, |
412 412 | string& obs_mode_); |
413 413 | |
414 414 | void addSysCal(int antenna_id, |
415 415 | int feed_id, |
416 416 | int spectral_window_id, |
417 417 | double time_, |
418 418 | double interval_, |
419 419 | int numReceptor_, |
420 420 | int numChan_, |
421 - | pair<bool, vector<float> >& tcal_spectrum_pair, |
422 - | pair<bool, bool>& tcal_flag_pair, |
423 - | pair<bool, vector<float> >& trx_spectrum_pair, |
424 - | pair<bool, bool>& trx_flag_pair, |
425 - | pair<bool, vector<float> >& tsky_spectrum_pair, |
426 - | pair<bool, bool>& tsky_flag_pair, |
427 - | pair<bool, vector<float> >& tsys_spectrum_pair, |
428 - | pair<bool, bool>& tsys_flag_pair, |
429 - | pair<bool, vector<float> >& tant_spectrum_pair, |
430 - | pair<bool, bool>& tant_flag_pair, |
431 - | pair<bool, vector<float> >& tant_tsys_spectrum_pair, |
432 - | pair<bool, bool>& tant_tsys_flag_pair); |
421 + | std::pair<bool, std::vector<float> >& tcal_spectrum_pair, |
422 + | std::pair<bool, bool>& tcal_flag_pair, |
423 + | std::pair<bool, std::vector<float> >& trx_spectrum_pair, |
424 + | std::pair<bool, bool>& trx_flag_pair, |
425 + | std::pair<bool, std::vector<float> >& tsky_spectrum_pair, |
426 + | std::pair<bool, bool>& tsky_flag_pair, |
427 + | std::pair<bool, std::vector<float> >& tsys_spectrum_pair, |
428 + | std::pair<bool, bool>& tsys_flag_pair, |
429 + | std::pair<bool, std::vector<float> >& tant_spectrum_pair, |
430 + | std::pair<bool, bool>& tant_flag_pair, |
431 + | std::pair<bool, std::vector<float> >& tant_tsys_spectrum_pair, |
432 + | std::pair<bool, bool>& tant_tsys_flag_pair); |
433 433 | |
434 434 | void addWeather(int antenna_id_, |
435 435 | double time_, |
436 436 | double interval_, |
437 - | const pair<bool, float>& pressure_opt_, |
438 - | const pair<bool, float>& relHumidity_opt_, |
439 - | const pair<bool, float>& temperature_opt_, |
440 - | const pair<bool, float>& windDirection_opt_, |
441 - | const pair<bool, float>& windSpeed_opt_, |
442 - | const pair<bool, float>& dewPoint_opt_, |
437 + | const std::pair<bool, float>& pressure_opt_, |
438 + | const std::pair<bool, float>& relHumidity_opt_, |
439 + | const std::pair<bool, float>& temperature_opt_, |
440 + | const std::pair<bool, float>& windDirection_opt_, |
441 + | const std::pair<bool, float>& windSpeed_opt_, |
442 + | const std::pair<bool, float>& dewPoint_opt_, |
443 443 | int wx_station_id_, |
444 - | vector<double>& wx_station_position_); |
444 + | std::vector<double>& wx_station_position_); |
445 445 | |
446 446 | /** |
447 447 | * Add one row in the casacore::MS CALDEVICE table. |
448 448 | * |
449 449 | * @param antennaId the index in the ANTENNA table of the antenna for which this row is defined. |
450 450 | * @param feedId the index in the FEED table of the feeds for which this row is defined. |
451 451 | * @param spectralWindowId the index in the SPECTRAL WINDOW table of the spectral window for which this row is defined. |
452 452 | * @param time the midpoint time of measurement. |
453 453 | * @param interval the interval of measurement. |
454 454 | * @param numCalload the number of calibration loads. |
455 455 | * @param calLoadNames a vector of strings. |
456 456 | */ |
457 457 | void addCalDevice(int antennaId, |
458 458 | int feedId, |
459 459 | int spectralWindowId, |
460 460 | double time, |
461 461 | double interval, |
462 462 | unsigned int numCalLoad, |
463 - | vector<string> calloadNames, |
463 + | std::vector<string> calloadNames, |
464 464 | unsigned int numReceptor, |
465 - | vector<vector<float> >& calEff, |
466 - | vector<vector<float> >& noiseCal, |
467 - | vector<double >& temperatureLoad); |
465 + | std::vector<std::vector<float> >& calEff, |
466 + | std::vector<std::vector<float> >& noiseCal, |
467 + | std::vector<double >& temperatureLoad); |
468 468 | |
469 469 | /** |
470 470 | * Adds one row in the casacore::MS SYSPOWER table. |
471 471 | * |
472 472 | * |
473 473 | * @param antennaId the index in the ANTENNA table of the antenna for which this row is defined. |
474 474 | * @param feedId the index in the FEED table of the feeds for which this row is defined. |
475 475 | * @param spectralWindowId the index in the SPECTRAL WINDOW table of the spectral window for which this row is defined. |
476 476 | * @param time the midpoint time of measurement. |
477 477 | * @param interval the interval of measurement. |
487 487 | * the basis of one value per receptor. If the size of the vector is null then it'll be ignored. |
488 488 | * @param temperatureLoad a vector of float number containing the requantizer gains on the basis of one value per receptor. If the size |
489 489 | * of the vector is null then it'll be ignored. |
490 490 | */ |
491 491 | void addSysPower(int antennaId, |
492 492 | int feedId, |
493 493 | int spectralWindowId, |
494 494 | double time, |
495 495 | double interval, |
496 496 | unsigned int numReceptor, |
497 - | vector<float>& switchedPowerDifference, |
498 - | vector<float>& switchedPowerSum, |
499 - | vector<float>& requantizerGain); |
497 + | std::vector<float>& switchedPowerDifference, |
498 + | std::vector<float>& switchedPowerSum, |
499 + | std::vector<float>& requantizerGain); |
500 500 | |
501 501 | void addSysPowerSlice(unsigned int nRow, |
502 - | vector<int>& antennaId, |
503 - | vector<int>& spectralWindowId, |
504 - | vector<int>& feedId, |
505 - | vector<double>& time, |
506 - | vector<double>& interval, |
502 + | std::vector<int>& antennaId, |
503 + | std::vector<int>& spectralWindowId, |
504 + | std::vector<int>& feedId, |
505 + | std::vector<double>& time, |
506 + | std::vector<double>& interval, |
507 507 | unsigned int numReceptor, |
508 - | vector<float>& switchedPowerDifference, |
509 - | vector<float>& switchedPowerSum, |
510 - | vector<float>& requantizerGain); |
508 + | std::vector<float>& switchedPowerDifference, |
509 + | std::vector<float>& switchedPowerSum, |
510 + | std::vector<float>& requantizerGain); |
511 511 | |
512 512 | void end(); |
513 513 | }; |
514 514 | |
515 515 |