Changeset 441
- Timestamp:
- 02/15/05 11:21:48 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r439 r441 712 712 Bool toStokes) const 713 713 { 714 715 // Get flags 716 717 Array<uChar> farr; 718 flagsCol_.get(whichRow, farr); 719 720 // Get data and convert mask 721 714 722 Array<Float> arr; 715 Array<uChar> farr; 723 Array<Bool> mask; 724 uInt polSel = polSel_; 716 725 if (toStokes) { 717 726 stokesCol_.get(whichRow, arr); 727 // 728 Array<Bool> tMask(farr.shape()); 729 convertArray(tMask, farr); 730 mask = SDPolUtil::stokesMask (tMask, True); 731 // 732 IPosition shape = arr.shape(); 733 uInt nPol = shape(asap::PolAxis); 734 if (nPol<=2) polSel = 0; // XX and XX,YY -> I 718 735 } else { 719 736 specCol_.get(whichRow, arr); 720 }721 flagsCol_.get(whichRow, farr);722 Array<Bool> barr(farr.shape());723 convertArray(barr, farr); 737 mask.resize(farr.shape()); 738 convertArray(mask, farr); 739 } 740 // 724 741 MaskedArray<Float> marr; 725 742 if (useSelection) { … … 729 746 aa1.reset(aa1.begin(uInt(IFSel_)));// go to IF 730 747 ArrayAccessor<Float, Axis<asap::PolAxis> > aa2(aa1); 731 aa2.reset(aa2.begin(uInt(polSel _)));// go to pol732 733 ArrayAccessor<Bool, Axis<asap::BeamAxis> > baa0( barr);748 aa2.reset(aa2.begin(uInt(polSel)));// go to pol 749 750 ArrayAccessor<Bool, Axis<asap::BeamAxis> > baa0(mask); 734 751 baa0.reset(baa0.begin(uInt(beamSel_)));//go to beam 735 752 ArrayAccessor<Bool, Axis<asap::IFAxis> > baa1(baa0); 736 753 baa1.reset(baa1.begin(uInt(IFSel_)));// go to IF 737 754 ArrayAccessor<Bool, Axis<asap::PolAxis> > baa2(baa1); 738 baa2.reset(baa2.begin(uInt(polSel _)));// go to pol755 baa2.reset(baa2.begin(uInt(polSel)));// go to pol 739 756 740 757 Vector<Float> a(arr.shape()(3)); 741 Vector<Bool> b( barr.shape()(3));758 Vector<Bool> b(mask.shape()(3)); 742 759 ArrayAccessor<Float, Axis<asap::BeamAxis> > a0(a); 743 760 ArrayAccessor<Bool, Axis<asap::BeamAxis> > b0(b); … … 754 771 marr.setData(a,b); 755 772 } else { 756 marr.setData(arr,! barr);773 marr.setData(arr,!mask); 757 774 } 758 775 return marr; -
trunk/src/SDMemTable.h
r439 r441 111 111 casa::Float paOffset=0.0) const; 112 112 113 // Get RR or LL at cursor location ( not polSel_)113 // Get RR or LL at cursor location (except not polSel_) 114 114 virtual std::vector<float> getCircularSpectrum(casa::Int whichRow=0, 115 115 casa::Bool rr=casa::True) const;
Note:
See TracChangeset
for help on using the changeset viewer.