Commits
Ville Suoranta authored 7e945f54f07 Merge
2283 2283 | return ::casa::ITUPLE(f, c, d, dc); |
2284 2284 | } |
2285 2285 | |
2286 2286 | bool image::fromascii( |
2287 2287 | const string& outfile, const string& infile, |
2288 2288 | const vector<int>& shape, const string& sep, const record& csys, |
2289 2289 | bool linear, bool overwrite |
2290 2290 | ) { |
2291 2291 | try { |
2292 2292 | _log << _ORIGIN; |
2293 + | _log << LogIO::WARN << __func__ << "() IS DEPRECATED AND WILL BE " |
2294 + | << "REMOVED IN A NEAR-FUTURE VERSION OF CASA. YOU SHOULD USE " |
2295 + | << "ANOTHER SET OF IMAGE EXPORT AND IMPORT METHODS SUCH AS " |
2296 + | << "tofits()/fromfits() TO EXPORT AND IMPORT CASA IMAGES. IF YOU " |
2297 + | << "SIMPLY WISH TO MODIFY PIXEL VALUES, USE getchunk()/putchunk() " |
2298 + | << "OR getregion()/putregion() FOR THAT" << LogIO::POST; |
2293 2299 | ThrowIf(infile.empty(), "infile must be specified"); |
2294 2300 | ThrowIf( |
2295 2301 | shape.size() == 1 && shape[0] == -1, |
2296 2302 | "Image shape must be specified" |
2297 2303 | ); |
2298 2304 | std::unique_ptr<Record> coordsys(toRecord(csys)); |
2299 2305 | _reset(); |
2300 2306 | _imageF = ImageFactory::fromASCII( |
2301 2307 | outfile, infile, IPosition(Vector<Int>(shape)), |
2302 2308 | sep, *coordsys, linear, overwrite |
6151 6157 | } |
6152 6158 | |
6153 6159 | bool image::toASCII( |
6154 6160 | const string& outfile, const variant& region, |
6155 6161 | const variant& mask, const string& sep, |
6156 6162 | const string& format, double maskvalue, bool overwrite, |
6157 6163 | bool stretch |
6158 6164 | ) { |
6159 6165 | // sep is hard-wired as ' ' which is what imagefromascii expects |
6160 6166 | _log << _ORIGIN; |
6167 + | _log << LogIO::WARN << __func__ << "() IS DEPRECATED AND WILL BE REMOVED " |
6168 + | << "IN A NEAR-FUTURE VERSION OF CASA. YOU SHOULD USE ANOTHER IMAGE " |
6169 + | << "EXPORT METHOD SUCH AS tofits() TO EXPORT CASA IMAGES. IF YOU " |
6170 + | << "SIMPLY WISH TO MODIFY PIXEL VALUES, USE getchunk()/putchunk() OR " |
6171 + | << "getregion()/putregion() FOR THAT" << LogIO::POST; |
6161 6172 | if (_detached()) { |
6162 6173 | return false; |
6163 6174 | } |
6164 6175 | try { |
6165 6176 | _notSupported(__func__); |
6166 6177 | String Mask; |
6167 6178 | if (mask.type() == variant::BOOLVEC) { |
6168 6179 | Mask = ""; |
6169 6180 | } |
6170 6181 | else if ( |