Commits

David Mehringer authored 2f9bd365967
refactor
No tags

code/imageanalysis/ImageAnalysis/ImagePolarimetry.cc

Modified
1140 1140 ThrowCc(
1141 1141 "This Stokes coordinate has only one of Q and U. This is not useful"
1142 1142 );
1143 1143 }
1144 1144 if (! (_stokes[Q] || _stokes[U] || _stokes[V])) {
1145 1145 _cleanup();
1146 1146 ThrowCc("This image has no Stokes Q, U, nor V. This is not useful");
1147 1147 }
1148 1148 }
1149 1149
1150 -
1151 -void ImagePolarimetry::_fiddleStokesCoordinate(ImageInterface<Float>& im, Stokes::StokesTypes type) const
1152 -{
1153 - CoordinateSystem cSys = im.coordinates();
1154 - _fiddleStokesCoordinate(cSys, type);
1155 - im.setCoordinateInfo(cSys);
1150 +void ImagePolarimetry::_fiddleStokesCoordinate(
1151 + ImageInterface<Float>& im, Stokes::StokesTypes type
1152 +) const {
1153 + CoordinateSystem cSys = im.coordinates();
1154 + _fiddleStokesCoordinate(cSys, type);
1155 + im.setCoordinateInfo(cSys);
1156 1156 }
1157 1157
1158 -void ImagePolarimetry::_fiddleStokesCoordinate(CoordinateSystem& cSys, Stokes::StokesTypes type) const
1159 -{
1160 - Int afterCoord = -1;
1161 - Int iStokes = cSys.findCoordinate(Coordinate::STOKES, afterCoord);
1162 -//
1163 - Vector<Int> which(1);
1164 - which(0) = Int(type);
1165 - StokesCoordinate stokes(which);
1166 - cSys.replaceCoordinate(stokes, iStokes);
1158 +void ImagePolarimetry::_fiddleStokesCoordinate(
1159 + CoordinateSystem& cSys, Stokes::StokesTypes type
1160 +) const {
1161 + Int afterCoord = -1;
1162 + Int iStokes = cSys.findCoordinate(Coordinate::STOKES, afterCoord);
1163 + const Vector<Int> which(1, Int(type));
1164 + StokesCoordinate stokes(which);
1165 + cSys.replaceCoordinate(stokes, iStokes);
1167 1166 }
1168 1167
1169 -void ImagePolarimetry::_fiddleStokesCoordinate(ImageInterface<Complex>& ie, Stokes::StokesTypes type) const
1170 -{
1171 - CoordinateSystem cSys = ie.coordinates();
1172 -//
1173 - Int afterCoord = -1;
1174 - Int iStokes = cSys.findCoordinate(Coordinate::STOKES, afterCoord);
1175 -//
1176 - Vector<Int> which(1);
1177 - which(0) = Int(type);
1178 - StokesCoordinate stokes(which);
1179 - cSys.replaceCoordinate(stokes, iStokes);
1180 - ie.setCoordinateInfo(cSys);
1168 +void ImagePolarimetry::_fiddleStokesCoordinate(
1169 + ImageInterface<Complex>& ie, Stokes::StokesTypes type
1170 +) const {
1171 + CoordinateSystem cSys = ie.coordinates();
1172 + _fiddleStokesCoordinate(cSys, type);
1173 + ie.setCoordinateInfo(cSys);
1181 1174 }
1182 1175
1183 1176 void ImagePolarimetry::_fiddleTimeCoordinate(ImageInterface<Complex>& ie, const Quantum<Double>& f,
1184 1177 Int coord) const
1185 1178 {
1186 1179 LogIO os(LogOrigin("ImagePolarimetry", __func__, WHERE));
1187 1180 //
1188 1181 CoordinateSystem cSys = ie.coordinates();
1189 1182 Coordinate* pC = cSys.coordinate(coord).clone();
1190 1183 AlwaysAssert(pC->nPixelAxes()==1,AipsError);

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

Add shortcut