casacore
CompressComplex.h
Go to the documentation of this file.
1 //# CompressComplex.h: Virtual column engine to scale a table Complex array
2 //# Copyright (C) 2001,2002,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TABLES_COMPRESSCOMPLEX_H
29 #define TABLES_COMPRESSCOMPLEX_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/BaseMappedArrayEngine.h>
34 #include <casacore/tables/Tables/ScalarColumn.h>
35 #include <casacore/casa/Arrays/Array.h>
36 #include <casacore/casa/BasicSL/Complex.h>
37 
38 
39 namespace casacore { //# NAMESPACE CASACORE - BEGIN
40 
41 // <summary>
42 // Virtual column engine to scale a table Complex array
43 // </summary>
44 
45 // <use visibility=export>
46 
47 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tCompressComplex.cc">
48 // </reviewed>
49 
50 // <prerequisite>
51 //# Classes you should understand before using this one.
52 // <li> VirtualColumnEngine
53 // <li> VirtualArrayColumn
54 // </prerequisite>
55 
56 // <synopsis>
57 // CompressComplex is a virtual column engine which scales an array
58 // of one type to another type to save disk storage.
59 // This resembles the classic AIPS compress method which scales the
60 // data from Complex to int.
61 // The scale factor and offset values can be given in two ways:
62 // <ul>
63 // <li> As a fixed values which is used for all arrays in the column.
64 // These values have to be given when constructing of the engine.
65 // <li> As the name of a column. In this way each array in the
66 // column has its own scale and offset value.
67 // By default it uses auto-scaling (see below).
68 // Otherwise the scale and offset value in a row must be put
69 // before the array is put and should not be changed anymore.
70 // </ul>
71 // Auto-scaling means that the engine will determine the scale
72 // and offset value itself when an array (or a slice) is put.
73 // It does it by mapping the values in the array to the range [-32767,32767].
74 // At each put the scale/offset values are changed as needed.
75 // Note that with auto-scaling <src>putSlice</src> can be somewhat
76 // slower, because the entire array might need to be rescaled.
77 //
78 // As in FITS the scale and offset values are used as:
79 // <br><src> True_value = Stored_value * scale + offset; </src>
80 //
81 // An engine object should be used for one column only, because the stored
82 // column name is part of the engine. If it would be used for more than
83 // one column, they would all share the same stored column.
84 // When the engine is bound to a column, it is checked if the name
85 // of that column matches the given virtual column name.
86 //
87 // The engine can be used for a column containing any kind of array
88 // (thus direct or indirect, fixed or variable shaped)) as long as the
89 // virtual array can be stored in the stored array. Thus a fixed shaped
90 // virtual can use a variable shaped stored, but not vice versa.
91 // A fixed shape indirect virtual can use a stored with direct arrays.
92 //
93 // This class can also serve as an example of how to implement
94 // a virtual column engine.
95 // </synopsis>
96 
97 // <motivation>
98 // This class allows to store data in a smaller representation.
99 // It is needed to resemble the classic AIPS compress option.
100 //
101 // Because the engine can serve only one column, it was possible to
102 // combine the engine and the column functionality in one class.
103 // </motivation>
104 
105 // <example>
106 // <srcblock>
107 // // Create the table description and 2 columns with indirect arrays in it.
108 // // The Int column will be stored, while the double will be
109 // // used as virtual.
110 // TableDesc tableDesc ("", TableDesc::Scratch);
111 // tableDesc.addColumn (ArrayColumnDesc<Int> ("storedArray"));
112 // tableDesc.addColumn (ArrayColumnDesc<Complex> ("virtualArray"));
113 // tableDesc.addColumn (ScalarColumnDesc<Complex> ("scale"));
114 // tableDesc.addColumn (ScalarColumnDesc<Float> ("offset"));
115 //
116 // // Create a new table using the table description.
117 // SetupNewTable newtab (tableDesc, "tab.data", Table::New);
118 //
119 // // Create the array scaling engine (with auto-scale)
120 // // and bind it to the Complex column.
121 // CompressComplex scalingEngine("virtualArray", "storedArray",
122 // "scale", "offset");
123 // newtab.bindColumn ("virtualArray", scalingEngine);
124 // // Create the table.
125 // Table table (newtab);
126 //
127 // // Store a 3-D array (with dim. 2,3,4) into each row of the column.
128 // // The shape of each array in the column is implicitly set by the put
129 // // function. This will also set the shape of the underlying Int array.
130 // ArrayColumn data (table, "virtualArray");
131 // Array<double> someArray(IPosition(4,2,3,4));
132 // someArray = 0;
133 // for (rownr_t i=0, i<10; i++) { // table will have 10 rows
134 // table.addRow();
135 // data.put (i, someArray)
136 // }
137 // </srcblock>
138 // </example>
139 
140 class CompressComplex : public BaseMappedArrayEngine<Complex, Int>
141 {
142 public:
143 
144  // Construct an engine to scale all arrays in a column with
145  // the given offset and scale factor.
146  // StoredColumnName is the name of the column where the scaled
147  // data will be put and must have data type Int.
148  // The virtual column using this engine must have data type Complex.
149  CompressComplex (const String& virtualColumnName,
150  const String& storedColumnName,
151  Float scale,
152  Float offset = 0);
153 
154  // Construct an engine to scale the arrays in a column.
155  // The scale and offset values are taken from a column with
156  // the given names. In that way each array has its own scale factor
157  // and offset value.
158  // An exception is thrown if these columns do not exist.
159  // VirtualColumnName is the name of the virtual column and is used to
160  // check if the engine gets bound to the correct column.
161  // StoredColumnName is the name of the column where the scaled
162  // data will be put and must have data type Int.
163  // The virtual column using this engine must have data type Complex.
164  CompressComplex (const String& virtualColumnName,
165  const String& storedColumnName,
166  const String& scaleColumnName,
167  const String& offsetColumnName,
168  Bool autoScale = True);
169 
170  // Construct from a record specification as created by getmanagerSpec().
171  CompressComplex (const Record& spec);
172 
173  // Destructor is mandatory.
175 
176  // Return the type name of the engine (i.e. its class name).
177  virtual String dataManagerType() const;
178 
179  // Get the name given to the engine (is the virtual column name).
180  virtual String dataManagerName() const;
181 
182  // Record a record containing data manager specifications.
183  virtual Record dataManagerSpec() const;
184 
185  // Return the name of the class.
186  // This includes the names of the template arguments.
187  static String className();
188 
189  // Register the class name and the static makeObject "constructor".
190  // This will make the engine known to the table system.
191  static void registerClass();
192 
193 protected:
194  // Copy constructor is only used by clone() and derived class.
195  // (so it is made private).
197 
198 private:
199  // Assignment is not needed and therefore forbidden
200  // (so it is made private and not implemented).
202 
203  // Clone the engine object.
204  virtual DataManager* clone() const;
205 
206 protected:
207  // Initialize the object for a new table.
208  // It defines the keywords containing the engine parameters.
209  virtual void create64 (rownr_t initialNrrow);
210 
211 private:
212  // Preparing consists of setting the writable switch and
213  // adding the initial number of rows in case of create.
214  // Furthermore it reads the keywords containing the engine parameters.
215  virtual void prepare();
216 
217  // Reopen the engine for read/write access.
218  // It makes the column writable if the underlying column is writable.
219  virtual void reopenRW();
220 
221  // Add rows to the table.
222  // If auto-scaling, it initializes the scale column with 0
223  // to indicate that no data has been processed yet.
224  virtual void addRowInit (rownr_t startRow, rownr_t nrrow);
225 
226  // Get an array in the given row.
227  // This will scale and offset from the underlying array.
228  virtual void getArray (rownr_t rownr, Array<Complex>& array);
229 
230  // Put an array in the given row.
231  // This will scale and offset to the underlying array.
232  virtual void putArray (rownr_t rownr, const Array<Complex>& array);
233 
234  // Get a section of the array in the given row.
235  // This will scale and offset from the underlying array.
236  virtual void getSlice (rownr_t rownr, const Slicer& slicer,
238 
239  // Put into a section of the array in the given row.
240  // This will scale and offset to the underlying array.
241  virtual void putSlice (rownr_t rownr, const Slicer& slicer,
242  const Array<Complex>& array);
243 
244  // Get an entire column.
245  // This will scale and offset from the underlying array.
247 
248  // Put an entire column.
249  // This will scale and offset to the underlying array.
250  virtual void putArrayColumn (const Array<Complex>& array);
251 
252  // Get some array values in the column.
253  // This will scale and offset from the underlying array.
254  virtual void getArrayColumnCells (const RefRows& rownrs,
255  Array<Complex>& data);
256 
257  // Put some array values in the column.
258  // This will scale and offset to the underlying array.
259  virtual void putArrayColumnCells (const RefRows& rownrs,
260  const Array<Complex>& data);
261 
262  // Get a section of all arrays in the column.
263  // This will scale and offset from the underlying array.
264  virtual void getColumnSlice (const Slicer& slicer, Array<Complex>& array);
265 
266  // Put a section of all arrays in the column.
267  // This will scale and offset to the underlying array.
268  virtual void putColumnSlice (const Slicer& slicer,
269  const Array<Complex>& array);
270 
271  // Get a section of some arrays in the column.
272  // This will scale and offset from the underlying array.
273  virtual void getColumnSliceCells (const RefRows& rownrs,
274  const Slicer& slicer,
275  Array<Complex>& data);
276 
277  // Put into a section of some arrays in the column.
278  // This will scale and offset to the underlying array.
279  virtual void putColumnSliceCells (const RefRows& rownrs,
280  const Slicer& slicer,
281  const Array<Complex>& data);
282 
283  // Scale and/or offset target to array.
284  // This is meant when reading an array from the stored column.
285  // It optimizes for scale=1 and/or offset=0.
286  virtual void scaleOnGet (Float scale, Float offset,
288  const Array<Int>& target);
289 
290  // Scale and/or offset array to target.
291  // This is meant when writing an array into the stored column.
292  // It optimizes for scale=1 and/or offset=0.
293  virtual void scaleOnPut (Float scale, Float offset,
294  const Array<Complex>& array,
295  Array<Int>& target);
296 
297  // Scale and/or offset target to array for the entire column.
298  // When the scale and offset are fixed, it will do the entire array.
299  // Otherwise it iterates through the array and applies the scale
300  // and offset per row.
302  const Array<Int>& target);
303 
304  // Scale and/or offset array to target for the entire column.
305  // When the scale and offset are fixed, it will do the entire array.
306  // Otherwise it iterates through the array and applies the scale
307  // and offset per row.
309  Array<Int>& target);
310 
311 protected:
312  //# Now define the data members.
313  String scaleName_p; //# name of scale column
314  String offsetName_p; //# name of offset column
315  Float scale_p; //# fixed scale factor
316  Float offset_p; //# fixed offset value
317  Bool fixed_p; //# scale/offset is fixed
318  Bool autoScale_p; //# determine scale/offset automatically
319  ScalarColumn<Float>* scaleColumn_p; //# column with scale value
320  ScalarColumn<Float>* offsetColumn_p; //# column with offset value
321  Array<Int> buffer_p; //# buffer to avoid Array constructions
322  //# (makes multi-threading harder)
323 
324  // Get the scale value for this row.
325  Float getScale (rownr_t rownr);
326 
327  // Get the offset value for this row.
328  Float getOffset (rownr_t rownr);
329 
330  // Find minimum and maximum from the array data.
331  // NaN and infinite values are ignored. If no values are finite,
332  // minimum and maximum are set to NaN.
333  virtual void findMinMax (Float& minVal, Float& maxVal,
334  const Array<Complex>& array) const;
335 
336  // Make scale and offset from the minimum and maximum of the array data.
337  // If minVal is NaN, scale is set to 0.
338  void makeScaleOffset (Float& scale, Float& offset,
339  Float minVal, Float maxVal) const;
340 
341  // Put a part of an array in a row using given scale/offset values.
342  void putPart (rownr_t rownr, const Slicer& slicer,
343  const Array<Complex>& array,
344  Float scale, Float offset);
345 
346  // Fill the array part into the full array and put it using the
347  // given min/max values.
348  void putFullPart (rownr_t rownr, const Slicer& slicer,
349  Array<Complex>& fullArray,
350  const Array<Complex>& partArray,
351  Float minVal, Float maxVal);
352 
353 public:
354  // Define the "constructor" to construct this engine when a
355  // table is read back.
356  // This "constructor" has to be registered by the user of the engine.
357  // If the engine is commonly used, its registration can be added
358  // to the registerAllCtor function in DataManager.cc.
359  // That function gets automatically invoked by the table system.
361  const Record& spec);
362 };
363 
364 
365 
366 
367 // <summary>
368 // Virtual column engine to scale a table Complex array for Single Dish data
369 // </summary>
370 
371 // <use visibility=export>
372 
373 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tCompressComplex.cc">
374 // </reviewed>
375 
376 // <prerequisite>
377 //# Classes you should understand before using this one.
378 // <li> CompressComplex
379 // </prerequisite>
380 
381 // <synopsis>
382 // CompressComplexSD is similar to CompressComplex, but compresses
383 // in a slighty different way optimized for single dish data.
384 // Usually the imaginary part of single dish data is 0, so the scaling
385 // is optimized for it.
386 // <br>If the imaginary part is 0, the real part is scaled with 15 bits
387 // extra to get a higher precision. The least significant bit is set to 0
388 // indicating the imag==0.
389 // <br>If the imaginary part is not 0, the real part is scaled normally.
390 // The imaginary part is scaled with 1 bit less. The least significant bit
391 // is set to 1 indicating that imag!=0.
392 // </synopsis>
393 
394 // <motivation>
395 // This class is created on top of CompressComplex to cope with SD data
396 // in a better way. Using CompressComplex often makes the imag part non-zero
397 // if it is scaled as 0.
398 // </motivation>
399 
400 // <example>
401 // <srcblock>
402 // // Create the table description and 2 columns with indirect arrays in it.
403 // // The Int column will be stored, while the double will be
404 // // used as virtual.
405 // TableDesc tableDesc ("", TableDesc::Scratch);
406 // tableDesc.addColumn (ArrayColumnDesc<Int> ("storedArray"));
407 // tableDesc.addColumn (ArrayColumnDesc<Complex> ("virtualArray"));
408 // tableDesc.addColumn (ScalarColumnDesc<Complex> ("scale"));
409 // tableDesc.addColumn (ScalarColumnDesc<Float> ("offset"));
410 //
411 // // Create a new table using the table description.
412 // SetupNewTable newtab (tableDesc, "tab.data", Table::New);
413 //
414 // // Create the array scaling engine (with auto-scale)
415 // // and bind it to the Complex column.
416 // CompressComplexSD scalingEngine("virtualArray", "storedArray",
417 // "scale", "offset");
418 // newtab.bindColumn ("virtualArray", scalingEngine);
419 // // Create the table.
420 // Table table (newtab);
421 //
422 // // Store a 3-D array (with dim. 2,3,4) into each row of the column.
423 // // The shape of each array in the column is implicitly set by the put
424 // // function. This will also set the shape of the underlying Int array.
425 // ArrayColumn data (table, "virtualArray");
426 // Array<double> someArray(IPosition(4,2,3,4));
427 // someArray = 0;
428 // for (rownr_t i=0, i<10; i++) { // table will have 10 rows
429 // table.addRow();
430 // data.put (i, someArray)
431 // }
432 // </srcblock>
433 // </example>
434 
436 {
437 public:
438 
439  // Construct an engine to scale all arrays in a column with
440  // the given offset and scale factor.
441  // StoredColumnName is the name of the column where the scaled
442  // data will be put and must have data type Int.
443  // The virtual column using this engine must have data type Complex.
444  CompressComplexSD (const String& virtualColumnName,
445  const String& storedColumnName,
446  Float scale,
447  Float offset = 0);
448 
449  // Construct an engine to scale the arrays in a column.
450  // The scale and offset values are taken from a column with
451  // the given names. In that way each array has its own scale factor
452  // and offset value.
453  // An exception is thrown if these columns do not exist.
454  // VirtualColumnName is the name of the virtual column and is used to
455  // check if the engine gets bound to the correct column.
456  // StoredColumnName is the name of the column where the scaled
457  // data will be put and must have data type Int.
458  // The virtual column using this engine must have data type Complex.
459  CompressComplexSD (const String& virtualColumnName,
460  const String& storedColumnName,
461  const String& scaleColumnName,
462  const String& offsetColumnName,
463  Bool autoScale = True);
464 
465  // Construct from a record specification as created by getmanagerSpec().
466  CompressComplexSD (const Record& spec);
467 
468  // Destructor is mandatory.
470 
471  // Return the type name of the engine (i.e. its class name).
472  virtual String dataManagerType() const;
473 
474  // Return the name of the class.
475  // This includes the names of the template arguments.
476  static String className();
477 
478  // Register the class name and the static makeObject "constructor".
479  // This will make the engine known to the table system.
480  static void registerClass();
481 
482 private:
483  // Copy constructor is only used by clone().
484  // (so it is made private).
486 
487  // Assignment is not needed and therefore forbidden
488  // (so it is made private and not implemented).
490 
491  // Clone the engine object.
492  virtual DataManager* clone() const;
493 
494  // Initialize the object for a new table.
495  // It defines the keywords containing the engine parameters.
496  virtual void create64 (rownr_t initialNrrow);
497 
498  // Scale and/or offset target to array.
499  // This is meant when reading an array from the stored column.
500  // It optimizes for scale=1 and/or offset=0.
501  virtual void scaleOnGet (Float scale, Float offset,
503  const Array<Int>& target);
504 
505  // Scale and/or offset array to target.
506  // This is meant when writing an array into the stored column.
507  // It optimizes for scale=1 and/or offset=0.
508  virtual void scaleOnPut (Float scale, Float offset,
509  const Array<Complex>& array,
510  Array<Int>& target);
511 
512  // Find minimum and maximum from the array data.
513  // NaN and infinite values and zero imaginary parts are ignored.
514  // If no values are finite, minimum and maximum are set to NaN.
515  virtual void findMinMax (Float& minVal, Float& maxVal,
516  const Array<Complex>& array) const;
517 
518 public:
519  // Define the "constructor" to construct this engine when a
520  // table is read back.
521  // This "constructor" has to be registered by the user of the engine.
522  // If the engine is commonly used, its registration can be added
523  // to the registerAllCtor function in DataManager.cc.
524  // That function gets automatically invoked by the table system.
526  const Record& spec);
527 };
528 
529 
530 
531 
533 {
534  return (fixed_p ? scale_p : (*scaleColumn_p)(rownr));
535 }
537 {
538  return (fixed_p ? offset_p : (*offsetColumn_p)(rownr));
539 }
540 
541 
542 
543 } //# NAMESPACE CASACORE - END
544 
545 #endif
Virtual column engine to scale a table Complex array for Single Dish data.
CompressComplexSD(const String &virtualColumnName, const String &storedColumnName, const String &scaleColumnName, const String &offsetColumnName, Bool autoScale=True)
Construct an engine to scale the arrays in a column.
virtual void create64(rownr_t initialNrrow)
Initialize the object for a new table.
virtual void findMinMax(Float &minVal, Float &maxVal, const Array< Complex > &array) const
Find minimum and maximum from the array data.
static void registerClass()
Register the class name and the static makeObject "constructor".
static String className()
Return the name of the class.
CompressComplexSD & operator=(const CompressComplexSD &)
Assignment is not needed and therefore forbidden (so it is made private and not implemented).
~CompressComplexSD()
Destructor is mandatory.
virtual void scaleOnPut(Float scale, Float offset, const Array< Complex > &array, Array< Int > &target)
Scale and/or offset array to target.
virtual DataManager * clone() const
Clone the engine object.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
CompressComplexSD(const String &virtualColumnName, const String &storedColumnName, Float scale, Float offset=0)
Construct an engine to scale all arrays in a column with the given offset and scale factor.
virtual void scaleOnGet(Float scale, Float offset, Array< Complex > &array, const Array< Int > &target)
Scale and/or offset target to array.
CompressComplexSD(const Record &spec)
Construct from a record specification as created by getmanagerSpec().
virtual String dataManagerType() const
Return the type name of the engine (i.e.
CompressComplexSD(const CompressComplexSD &)
Copy constructor is only used by clone().
virtual DataManager * clone() const
Clone the engine object.
CompressComplex(const CompressComplex &)
Copy constructor is only used by clone() and derived class.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< Complex > &data)
Put some array values in the column.
void putFullPart(rownr_t rownr, const Slicer &slicer, Array< Complex > &fullArray, const Array< Complex > &partArray, Float minVal, Float maxVal)
Fill the array part into the full array and put it using the given min/max values.
virtual String dataManagerName() const
Get the name given to the engine (is the virtual column name).
CompressComplex(const String &virtualColumnName, const String &storedColumnName, Float scale, Float offset=0)
Construct an engine to scale all arrays in a column with the given offset and scale factor.
static void registerClass()
Register the class name and the static makeObject "constructor".
CompressComplex(const String &virtualColumnName, const String &storedColumnName, const String &scaleColumnName, const String &offsetColumnName, Bool autoScale=True)
Construct an engine to scale the arrays in a column.
virtual void getArrayColumn(Array< Complex > &array)
Get an entire column.
virtual void getSlice(rownr_t rownr, const Slicer &slicer, Array< Complex > &array)
Get a section of the array in the given row.
void putPart(rownr_t rownr, const Slicer &slicer, const Array< Complex > &array, Float scale, Float offset)
Put a part of an array in a row using given scale/offset values.
ScalarColumn< Float > * scaleColumn_p
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, const Array< Complex > &data)
Put into a section of some arrays in the column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< Complex > &data)
Get a section of some arrays in the column.
void makeScaleOffset(Float &scale, Float &offset, Float minVal, Float maxVal) const
Make scale and offset from the minimum and maximum of the array data.
CompressComplex(const Record &spec)
Construct from a record specification as created by getmanagerSpec().
virtual void scaleOnPut(Float scale, Float offset, const Array< Complex > &array, Array< Int > &target)
Scale and/or offset array to target.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
virtual void getColumnSlice(const Slicer &slicer, Array< Complex > &array)
Get a section of all arrays in the column.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
virtual void putArray(rownr_t rownr, const Array< Complex > &array)
Put an array in the given row.
virtual void addRowInit(rownr_t startRow, rownr_t nrrow)
Add rows to the table.
void scaleColumnOnGet(Array< Complex > &array, const Array< Int > &target)
Scale and/or offset target to array for the entire column.
virtual void putSlice(rownr_t rownr, const Slicer &slicer, const Array< Complex > &array)
Put into a section of the array in the given row.
virtual void findMinMax(Float &minVal, Float &maxVal, const Array< Complex > &array) const
Find minimum and maximum from the array data.
virtual void putArrayColumn(const Array< Complex > &array)
Put an entire column.
virtual void scaleOnGet(Float scale, Float offset, Array< Complex > &array, const Array< Int > &target)
Scale and/or offset target to array.
Float getScale(rownr_t rownr)
Get the scale value for this row.
virtual void reopenRW()
Reopen the engine for read/write access.
virtual void getArray(rownr_t rownr, Array< Complex > &array)
Get an array in the given row.
ScalarColumn< Float > * offsetColumn_p
virtual void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
virtual void create64(rownr_t initialNrrow)
Initialize the object for a new table.
void scaleColumnOnPut(const Array< Complex > &array, Array< Int > &target)
Scale and/or offset array to target for the entire column.
static String className()
Return the name of the class.
Float getOffset(rownr_t rownr)
Get the offset value for this row.
virtual void getArrayColumnCells(const RefRows &rownrs, Array< Complex > &data)
Get some array values in the column.
virtual String dataManagerType() const
Return the type name of the engine (i.e.
CompressComplex & operator=(const CompressComplex &)
Assignment is not needed and therefore forbidden (so it is made private and not implemented).
virtual void putColumnSlice(const Slicer &slicer, const Array< Complex > &array)
Put a section of all arrays in the column.
~CompressComplex()
Destructor is mandatory.
Abstract base class for a data manager.
Definition: DataManager.h:221
String: the storage and methods of handling collections of characters.
Definition: String.h:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
Definition: ExprNode.h:1929
float Float
Definition: aipstype.h:54
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
const Bool True
Definition: aipstype.h:43
uInt64 rownr_t
Define the type of a row number in a table.
Definition: aipsxtype.h:46