Commits

Kumar Golap authored 53476540cc0
Fixed a mosweight=T bug
No tags

casa5/code/synthesis/TransformMachines2/BriggsCubeWeightor.cc

Modified
170 170 ephemtab);
171 171 if(msInUse.size() > 1){
172 172
173 173 if((allSwingPad > 4) && (allSwingPad > uInt(templateimage.shape()[3]/10)))
174 174 inOneGo=False;
175 175 //cerr << "allSwingPad " << allSwingPad << " inOneGo " << inOneGo << endl;
176 176
177 177 }
178 178
179 179
180 - ///Lets process the ms independently as swingpad can become very large for MSs seperated by large epochs
180 +
181 181 if(inOneGo){
182 182 fillImgWeightCol(vi, inRec, -1, fieldsToUse, allSwingPad, templateimage.shape(), cs);
183 183 }
184 184 else{
185 -
185 + ///Lets process the ms independently as swingpad can become very large for MSs seperated by large epochs
186 186 for (auto msiter=msInUse.begin(); msiter != msInUse.end(); ++msiter){
187 187 uInt swingpad=estimateSwingChanPad(vi, *msiter, cs, templateimage.shape()[3],
188 188 ephemtab);
189 189 fillImgWeightCol(vi, inRec, *msiter, fieldsToUse, swingpad, templateimage.shape(), cs);
190 190
191 191 }
192 192 }
193 193 initialized_p=True;
194 194 wgtTab_p->unlock();
195 195 return imWgtColName_p;
196 196
197 197 }
198 198
199 - void BriggsCubeWeightor::fillImgWeightCol(vi::VisibilityIterator2& vi, const Record& inRec, const Int msid, std::vector<pair<Int, Int> >& fieldsToUse, const uInt swingpad, const IPosition& origShp, CoordinateSystem cs){
199 + void BriggsCubeWeightor::fillImgWeightCol(vi::VisibilityIterator2& vi, const Record& inRec, const Int msid, std::vector<pair<Int, Int> >& fieldsToUse, const uInt swingpad, const IPosition& origShp, CoordinateSystem csOrig){
200 200 vi::VisBuffer2 *vb=vi.getVisBuffer();
201 -
202 201 for (uInt k=0; k < fieldsToUse.size(); ++k){
203 202 vi.originChunks();
204 203 vi.origin();
205 204 //cerr << "####nchannels " << vb->nChannels() << " swingpad " << swingpad << endl;
206 205 IPosition shp=origShp;
207 206 nx_p=shp[0];
208 207 ny_p=shp[1];
208 + CoordinateSystem cs= csOrig;
209 209 //CoordinateSystem cs=templateimage.coordinates();
210 210 refFreq_p=cs.toWorld(IPosition(4,0,0,0,0))[3];
211 211 Vector<String> units = cs.worldAxisUnits();
212 212 units[0]="rad"; units[1]="rad";
213 213 cs.setWorldAxisUnits(units);
214 214 Vector<Double> incr=cs.increment();
215 215 uscale_p=(nx_p*incr[0]);
216 216 vscale_p=(ny_p*incr[1]);
217 217 uorigin_p=nx_p/2;
218 218 vorigin_p=ny_p/2;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut