28 #ifndef TABLES_COMPRESSCOMPLEX_H
29 #define TABLES_COMPRESSCOMPLEX_H
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>
150 const String& storedColumnName,
165 const String& storedColumnName,
166 const String& scaleColumnName,
167 const String& offsetColumnName,
445 const String& storedColumnName,
460 const String& storedColumnName,
461 const String& scaleColumnName,
462 const String& offsetColumnName,
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.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.