HOPS
HOPS class reference
Classes | Public Member Functions | Protected Member Functions | List of all members
hops::MHO_AdhocFlagging Class Reference

Port of the legacy fourfit adhoc_flag() capability into the HOPS4 calibration operator framework. More...

#include <MHO_AdhocFlagging.hh>

Inheritance diagram for hops::MHO_AdhocFlagging:
[legend]

Public Member Functions

 MHO_AdhocFlagging ()
 
virtual ~MHO_AdhocFlagging ()
 
const std::string & GetRefFlagFile () const
 Get the flag file path for the reference station. More...
 
const std::string & GetRemFlagFile () const
 Get the flag file path for the remote station. More...
 
void SetParameterStore (MHO_ParameterStore *pstore)
 Provide a parameter store so the operator can update /fringe/total_summed_weights after zeroing flagged APs. More...
 
void SetRefFlagFile (const std::string &filename)
 Set the flag file for the reference station. More...
 
void SetRemFlagFile (const std::string &filename)
 Set the flag file for the remote station. More...
 
- Public Member Functions inherited from hops::MHO_UnaryOperator< weight_type >
 MHO_UnaryOperator ()
 
virtual ~MHO_UnaryOperator ()
 
virtual bool Execute () override
 Executes operation using provided arguments and return type. More...
 
virtual bool Execute () override=0
 Function Execute. More...
 
virtual bool Initialize () override
 Initializes the system using in-place or out-of-place arguments. More...
 
virtual bool Initialize () override=0
 Function Initialize. More...
 
 MHO_Operator ()
 
void SetArgs (const weight_type *in, weight_type *out)
 Setter for args. More...
 
void SetArgs (weight_type *in)
 Setter for args. More...
 
- Public Member Functions inherited from hops::MHO_Operator
 MHO_Operator ()
 
virtual ~MHO_Operator ()
 
std::string GetName () const
 Getter for operator name. More...
 
double Priority () const
 Get the the priority field value. More...
 
void SetName (std::string name)
 Setter for operator name. More...
 
void SetPriority (double priority)
 Setter for operator priority (determines order of execution within a operator category) More...
 

Protected Member Functions

virtual bool ExecuteInPlace (weight_type *in) override
 
virtual bool InitializeInPlace (weight_type *in) override
 
virtual bool InitializeOutOfPlace (const weight_type *in, weight_type *out) override
 
- Protected Member Functions inherited from hops::MHO_UnaryOperator< weight_type >
virtual bool ExecuteOutOfPlace (const weight_type *in, weight_type *out)
 

Additional Inherited Members

- Protected Attributes inherited from hops::MHO_UnaryOperator< weight_type >
bool fInPlace
 
std::tuple< weight_type * > fInPlaceArgs
 
std::tuple< const weight_type *, weight_type * > fOutOfPlaceArgs
 

Detailed Description

Port of the legacy fourfit adhoc_flag() capability into the HOPS4 calibration operator framework.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du

Reads up to two ASCII flag files (one per station: reference and remote) and zeroes out weights for (channel, time) combinations where the flag data indicates data should be discarded.

Flag file format:

where t_fpday is fractional days since beginning of year and hex_string encodes 64 flag bytes (one per frequency channel). Each byte has the bit assignments (msb to lsb):

USB-RL, LSB-RL, USB-LR, LSB-LR, USB-RR, LSB-RR, USB-LL, LSB-LL

A bit set to 1 means the corresponding data should be RETAINED. Short hex strings are padded by repeating the last nibble pair.

USB data for channel ch is retained when (ref_byte[ch] & rem_byte[ch] & 0xAA) != 0. LSB data for channel ch is retained when (ref_byte[ch] & rem_byte[ch] & 0x55) != 0.

If a station file is empty/unset, that station's bytes are treated as 0xFF (no flagging contribution from that station). Time values outside the file's range are also treated as 0xFF (no flagging).

Constructor & Destructor Documentation

◆ MHO_AdhocFlagging()

hops::MHO_AdhocFlagging::MHO_AdhocFlagging ( )

◆ ~MHO_AdhocFlagging()

hops::MHO_AdhocFlagging::~MHO_AdhocFlagging ( )
virtual

Member Function Documentation

◆ ExecuteInPlace()

bool hops::MHO_AdhocFlagging::ExecuteInPlace ( weight_type in)
overrideprotectedvirtual

◆ GetRefFlagFile()

const std::string& hops::MHO_AdhocFlagging::GetRefFlagFile ( ) const
inline

Get the flag file path for the reference station.

◆ GetRemFlagFile()

const std::string& hops::MHO_AdhocFlagging::GetRemFlagFile ( ) const
inline

Get the flag file path for the remote station.

◆ InitializeInPlace()

bool hops::MHO_AdhocFlagging::InitializeInPlace ( weight_type in)
overrideprotectedvirtual

◆ InitializeOutOfPlace()

bool hops::MHO_AdhocFlagging::InitializeOutOfPlace ( const weight_type in,
weight_type out 
)
overrideprotectedvirtual

◆ SetParameterStore()

void hops::MHO_AdhocFlagging::SetParameterStore ( MHO_ParameterStore pstore)
inline

Provide a parameter store so the operator can update /fringe/total_summed_weights after zeroing flagged APs.

◆ SetRefFlagFile()

void hops::MHO_AdhocFlagging::SetRefFlagFile ( const std::string &  filename)
inline

Set the flag file for the reference station.

Parameters
filenamePath to the flag file; empty string disables ref flagging.

◆ SetRemFlagFile()

void hops::MHO_AdhocFlagging::SetRemFlagFile ( const std::string &  filename)
inline

Set the flag file for the remote station.

Parameters
filenamePath to the flag file; empty string disables rem flagging.

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