dsp::GenericFourBitUnpacker Class Reference

Converts single-dish GMRT data from 4-bit to floating point values. More...

#include <GenericFourBitUnpacker.h>

Inheritance diagram for dsp::GenericFourBitUnpacker:
dsp::FourBitUnpacker dsp::BitUnpacker dsp::HistUnpacker dsp::Unpacker dsp::Transformation< BitSeries, TimeSeries > dsp::Operation dsp::HasInput< BitSeries > dsp::HasOutput< TimeSeries > OwnStream Reference::Able Reference::HeapTracked

Public Member Functions

 GenericFourBitUnpacker ()
 Constructor initializes bit table.
 
bool matches (const Observation *)
 Return true if this unpacker can handle the observation.
 
- Public Member Functions inherited from dsp::FourBitUnpacker
 FourBitUnpacker (const char *name="FourBitUnpacker")
 Null constructor.
 
void get_histogram (std::vector< unsigned long > &, unsigned idig) const
 Get the histogram for the specified digitizer.
 
- Public Member Functions inherited from dsp::BitUnpacker
 BitUnpacker (const char *name="BitUnpacker")
 Null constructor.
 
virtual ~BitUnpacker ()
 Virtual destructor.
 
double get_optimal_variance ()
 Get the optimal value of the output time series variance.
 
void set_table (BitTable *table)
 Set the digitisation convention.
 
const BitTableget_table () const
 Get the digitisation convention.
 
- Public Member Functions inherited from dsp::HistUnpacker
 HistUnpacker (const char *name="HistUnpacker")
 Default constructor. More...
 
virtual ~HistUnpacker ()
 Virtual destructor.
 
void combine (const Operation *)
 If Operation is a HistUnpacker, integrate its histograms. More...
 
void reset ()
 Reset the histograms. More...
 
virtual void set_ndig (unsigned ndig)
 Set the number of digitizers (histograms) More...
 
virtual unsigned get_ndig () const
 Get the number of digitizers (histograms)
 
virtual unsigned get_ndim_per_digitizer () const
 Get the dimension of the digitizer outputs (real or complex) More...
 
virtual void set_nstate (unsigned nstate)
 Set the number of states in the histogram. More...
 
unsigned get_nstate () const
 Get the number of states in the histogram.
 
virtual unsigned get_output_offset (unsigned idig) const
 Get the offset (number of floats) into output for the given digitizer. More...
 
virtual unsigned get_output_ipol (unsigned idig) const
 Get the output polarization for the given digitizer. More...
 
virtual unsigned get_output_ichan (unsigned idig) const
 Get the output frequency channel for the given digitizer;. More...
 
template<typename T >
void get_histogram (std::vector< T > &data, unsigned idig) const
 Get the histogram for the given digitizer.
 
unsigned long * get_histogram (unsigned idig, unsigned expect=0)
 Get the pointer to the histogram array.
 
const unsigned long * get_histogram (unsigned idig) const
 
double get_histogram_mean (unsigned idig) const
 Get the centroid of the histogram for the given digitizer.
 
unsigned long get_histogram_total (unsigned idig) const
 Get the total number of samples in the histogram.
 
void zero_histogram ()
 Reset histogram counts to zero.
 
- Public Member Functions inherited from dsp::Unpacker
 Unpacker (const char *name="Unpacker")
 Constructor.
 
virtual Unpackerclone () const
 Clone operator.
 
virtual bool get_order_supported (TimeSeries::Order) const
 Return true if the unpacker supports the specified output order. More...
 
virtual void set_output_order (TimeSeries::Order)
 Set the order of the dimensions in the output TimeSeries.
 
virtual bool get_device_supported (Memory *) const
 Return true if the unpacker can operate on the specified device.
 
virtual void set_device (Memory *)
 Set the device on which the unpacker will operate.
 
virtual void match_resolution (Input *)
 Match the unpacker to the resolution of the Input.
 
virtual unsigned get_resolution () const
 Return the smallest number of time samples that can be unpacked.
 
void prepare ()
 Copy the input attributes to the output.
 
void reserve ()
 Reserve the maximum amount of space required in the output.
 
Iterator get_iterator (unsigned idig)
 Return the iterator for the specified digitizer.
 
- Public Member Functions inherited from dsp::Transformation< BitSeries, TimeSeries >
 Transformation (const char *_name, Behaviour _type)
 All sub-classes must specify name and capacity for inplace operation.
 
virtual ~Transformation ()
 Destructor.
 
void reserve ()
 Set the size of the output to that of the input by default.
 
void set_input (const BitSeries *input)
 Set the container from which input data will be read.
 
void set_output (TimeSeries *output)
 Set the container into which output data will be written.
 
Behaviour get_type () const
 Return the Transformation type.
 
virtual void set_buffering_policy (BufferingPolicy *policy)
 Set the policy for buffering input and/or output data.
 
bool has_buffering_policy () const
 Returns true if buffering_policy is set.
 
BufferingPolicyget_buffering_policy () const
 
void reset_min_samps ()
 Reset minimum_samps_can_process.
 
std::string name (const std::string &function) const
 String preceding output in verbose mode.
 
virtual void set_cerr (std::ostream &os) const
 Set verbosity ostream.
 
- Public Member Functions inherited from dsp::Operation
 Operation (const char *name)
 All sub-classes must specify a unique name. More...
 
 Operation (const Operation &)
 Copy constructor.
 
virtual ~Operation ()
 Virtual destructor.
 
virtual bool operate ()
 Call this method to operate on data Returns false on failure. More...
 
virtual void add_extensions (Extensions *)
 Add any extensions.
 
virtual void report () const
 Report operation statistics.
 
std::string get_name () const
 Return the unique name of this operation.
 
double get_total_time () const
 Return the total time spent on this Operation in seconds.
 
double get_elapsed_time () const
 Get the time spent in the last invocation of operate()
 
virtual uint64_t get_total_weights () const
 Return the total number of timesample weights encountered. More...
 
virtual uint64_t get_discarded_weights () const
 Return the number of invalid timesample weights encountered.
 
int get_id ()
 Inquire the unique instantiation id.
 
virtual Function get_function () const
 Get the function classification of this operation.
 
virtual double get_delay_time () const
 Get the time delay of this operation, if any, in seconds.
 
virtual void set_scratch (Scratch *)
 Set the scratch space.
 
bool scratch_was_set () const
 
virtual uint64_t bytes_storage () const
 The number of bytes of additional storage used by the operation.
 
virtual uint64_t bytes_scratch () const
 The number of bytes of scratch space used by the operation. More...
 
- Public Member Functions inherited from OwnStream
 OwnStream (const OwnStream &)
 
const OwnStreamoperator= (const OwnStream &)
 
virtual void set_cout (std::ostream &) const
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 
- Public Member Functions inherited from dsp::HasInput< BitSeries >
virtual ~HasInput ()
 Destructor.
 
const BitSeriesget_input () const
 Return pointer to the container from which input data will be read.
 
bool has_input () const
 Returns true if input is set.
 
- Public Member Functions inherited from dsp::HasOutput< TimeSeries >
virtual ~HasOutput ()
 Destructor.
 
virtual TimeSeriesget_output () const
 Return pointer to the container into which output data will be written.
 
bool has_output () const
 Returns true if output is set.
 

Additional Inherited Members

- Public Types inherited from dsp::Unpacker
typedef Registry::List< UnpackerRegister
 typedef used to simplify template syntax in Unpacker_registry.C
 
- Public Types inherited from dsp::Operation
enum  Function { Producer, Procedural, Structural }
 The function of the operator. More...
 
- Static Public Member Functions inherited from dsp::Unpacker
static Unpackercreate (const Observation *observation)
 Return a pointer to a new instance of the appropriate sub-class.
 
- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 
- Public Attributes inherited from dsp::Transformation< BitSeries, TimeSeries >
Callback< Transformation * > pre_transformation
 Functions called before the transformation takes place.
 
Callback< Transformation * > post_transformation
 Functions called after the transformation takes place.
 
- Static Public Attributes inherited from dsp::HistUnpacker
static bool keep_histogram = true
 Maintain a diagnostic histogram of digitizer statistics.
 
- Static Public Attributes inherited from dsp::Operation
static bool record_time = false
 Global flag enables stopwatch to record the time spent operating. More...
 
static bool report_time = true
 Global flag enables report of time spent in operation on descruction. More...
 
static bool verbose = false
 Global verbosity flag.
 
static int operation_status = 0
 Operations can set this to non-zero in operation() if they fail.
 
static bool check_state = true
 Operations should perform internal consistency checks.
 
static int instantiation_count = 0
 Counts how many Operation instantiations there have been Used for setting the unique instantiation ID. More...
 
- Protected Member Functions inherited from dsp::FourBitUnpacker
void unpack (uint64_t ndat, const unsigned char *from, const unsigned nskip, float *into, const unsigned fskip, unsigned long *hist)
 Unpack a single digitizer output.
 
- Protected Member Functions inherited from dsp::BitUnpacker
virtual void unpack ()
 Unpack all channels, polarizations, real/imag, etc.
 
- Protected Member Functions inherited from dsp::HistUnpacker
virtual void set_default_ndig ()
 Compute the default number of digitizers.
 
void set_nstate_internal (unsigned _nstate)
 Set the number of states in the internal representation of the histogram.
 
unsigned get_nstate_internal () const
 
- Protected Member Functions inherited from dsp::Unpacker
virtual void transformation ()
 The operation unpacks n-bit into floating point TimeSeries. More...
 
virtual void match (const Observation *observation)
 Specialize the Unpacker for the Observation. More...
 
template<class T >
const T * get_Input ()
 Provide BitSeries::input attribute access to derived classes.
 
- Protected Member Functions inherited from dsp::Transformation< BitSeries, TimeSeries >
virtual bool can_operate ()
 Return false if the input doesn't have enough data to proceed.
 
virtual void operation ()
 Define the Operation pure virtual method.
 
virtual void vchecks ()
 Makes sure input & output are okay before calling transformation()
 
- Protected Member Functions inherited from dsp::Operation
virtual void set_name (const std::string &_name)
 Set the name!
 
int timers_index (const std::string &op_name)
 Returns the index in the 'timers' array of a particular timer.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 
- Static Protected Member Functions inherited from dsp::Unpacker
static Registerget_register ()
 Return the list of registered sub-classes.
 
- Protected Attributes inherited from dsp::BitUnpacker
Reference::To< BitTabletable
 The bit table generator

 
- Protected Attributes inherited from dsp::Unpacker
TimeSeries::Order output_order
 The order of the dimensions in the output TimeSeries.
 
- Protected Attributes inherited from dsp::Transformation< BitSeries, TimeSeries >
Reference::To< BufferingPolicybuffering_policy
 The buffering policy in place (if any)
 
int64_t minimum_samps_can_process
 If input doesn't have this many samples, operate() returns false.
 
- Protected Attributes inherited from dsp::Operation
Scratchscratch
 Shared scratch space, if needed.
 
bool set_scratch_called
 
std::string name
 Operation name.
 
uint64_t discarded_weights
 Number of time sample weights encountered that are flagged invalid.
 
uint64_t total_weights
 Total number of time sample weights encountered.
 
RealTimer optime
 Stop watch records the amount of time spent performing this operation.
 
int id
 Unique instantiation id.
 
bool prepared
 Set true when preparation optimizations are completed.
 
- Protected Attributes inherited from dsp::HasInput< BitSeries >
Reference::To< const BitSeriesinput
 Container from which input data will be read.
 
- Protected Attributes inherited from dsp::HasOutput< TimeSeries >
Reference::To< TimeSeriesoutput
 Container into which output data will be written.
 

Detailed Description

Converts single-dish GMRT data from 4-bit to floating point values.


The documentation for this class was generated from the following files:

Generated using doxygen 1.8.17