HOPS
HOPS class reference
Public Member Functions | Static Public Member Functions | List of all members
hops::MHO_BasicFringeDataConfiguration Class Reference

Class MHO_BasicFringeDataConfiguration. More...

#include <MHO_BasicFringeDataConfiguration.hh>

Public Member Functions

 MHO_BasicFringeDataConfiguration ()
 
virtual ~MHO_BasicFringeDataConfiguration ()
 

Static Public Member Functions

static void configure_station_data (MHO_ScanDataStore *scanStore, MHO_ContainerStore *containerStore, std::string ref_station_mk4id, std::string rem_station_mk4id)
 Configures station data by loading and renaming objects in MHO_ScanDataStore and MHO_ContainerStore. More...
 
static void configure_visibility_data (MHO_ContainerStore *store)
 Configures visibility data by checking and processing visibility_type and weight_type objects in the store. More...
 
static mho_json ConvertProfileEvents (std::vector< MHO_ProfileEvent > &events)
 Converts a vector of profile events into a JSON object. More...
 
static void determine_baselines (const std::string &dir, const std::string &baseline, std::vector< std::pair< std::string, std::string > > &baseline_files)
 Determines baselines present for each scan in a given directory matching a specified baseline pattern. More...
 
static void determine_fgroups_polproducts (const std::string &filename, const std::string &cmd_fgroup, const std::string &cmd_pprod, std::vector< std::string > &fgroups, std::vector< std::string > &pprods)
 Determines frequency groups and polarization products to process for each baseline from a given filename. More...
 
static void determine_passes (MHO_ParameterStore *cmdline_params, std::string &cscans, std::string &croots, std::string &cbaselines, std::string &cfgroups, std::string &cpolprods)
 Determines and concatenates data passes for processing, including scans, baselines, frequency groups, and polarization products. More...
 
static std::vector< std::string > determine_required_pol_products (std::string polprod)
 Parses a polarization product string to determine required pol-products. More...
 
static void determine_scans (const std::string &initial_dir, std::vector< std::string > &scans, std::vector< std::string > &roots)
 Determines scan directories and associated root files for processing. More...
 
static std::string find_associated_root_file (std::string dir)
 Finds and returns the associated root (ovex) file in the given directory. More...
 
static void init_and_exec_operators (MHO_OperatorBuilderManager *build_manager, MHO_OperatorToolbox *opToolbox, const char *category)
 Initializes and executes (in priority value order) all operators associated with a given category. More...
 
static bool initialize_scan_data (MHO_ParameterStore *, MHO_ScanDataStore *scanStore)
 Initializes scan data store using parameters and sets root file name. More...
 
static void parse_baseline_freqgrp (std::string baseline_freqgrp, std::string &baseline, std::string &freqgrp)
 Parses baseline_freqgrp string into separate baseline and freqgrp strings (expects ':' as separator). More...
 
static int parse_fourfit_command_line (int argc, char **argv, MHO_ParameterStore *paramStore)
 Parses command line arguments and stores them in a parameter store for later use by fourfit. More...
 
static std::string parse_set_string (const std::vector< std::string > &arglist, int &set_arg_index)
 Parses a vector of strings to extract and concatenate control file syntax after 'set' command. More...
 
static void populate_initial_parameters (MHO_ParameterStore *paramStore, MHO_ScanDataStore *scanStore)
 Initializes parameter store and scan store for fringe processing, sets initial values. More...
 
static std::string sanitize_directory (std::string dir)
 Sanitizes a directory path by ensuring it ends with '/' and exists. More...
 
static int sanity_check (MHO_ParameterStore *paramStore)
 Performs a sanity check on command line parameters after parsing. More...
 
static void split_passes (std::vector< mho_json > &pass_vector, const std::string &cscans, const std::string &croots, const std::string &cbaselines, const std::string &cfgroups, const std::string &cpolprods)
 Breaks concatenated strings into vector of json objects describing data items for each processing pass. More...
 

Detailed Description

Class MHO_BasicFringeDataConfiguration.

collection of helper functions for fringe fitter start-up

Author
J. Barrettj - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Wed Sep 20 16:40:35 2023 -0400 Tue Sep 19 04:11:24 PM EDT 2023

Constructor & Destructor Documentation

◆ MHO_BasicFringeDataConfiguration()

hops::MHO_BasicFringeDataConfiguration::MHO_BasicFringeDataConfiguration ( )
inline

◆ ~MHO_BasicFringeDataConfiguration()

virtual hops::MHO_BasicFringeDataConfiguration::~MHO_BasicFringeDataConfiguration ( )
inlinevirtual

Member Function Documentation

◆ configure_station_data()

void hops::MHO_BasicFringeDataConfiguration::configure_station_data ( MHO_ScanDataStore scanStore,
MHO_ContainerStore containerStore,
std::string  ref_station_mk4id,
std::string  rem_station_mk4id 
)
static

Configures station data by loading and renaming objects in MHO_ScanDataStore and MHO_ContainerStore.

Parameters
scanStorePointer to MHO_ScanDataStore for loading station data
containerStorePointer to MHO_ContainerStore for renaming objects
ref_station_mk4idReference station's mk4id for loading and renaming
rem_station_mk4idRemote station's mk4id for loading and renaming
Note
This is a static function.

◆ configure_visibility_data()

void hops::MHO_BasicFringeDataConfiguration::configure_visibility_data ( MHO_ContainerStore store)
static

Configures visibility data by checking and processing visibility_type and weight_type objects in the store.

Parameters
storePointer to MHO_ContainerStore containing visibility and weight data.
Note
This is a static function.

◆ ConvertProfileEvents()

mho_json hops::MHO_BasicFringeDataConfiguration::ConvertProfileEvents ( std::vector< MHO_ProfileEvent > &  events)
static

Converts a vector of profile events into a JSON object.

Parameters
eventsInput vector of MHO_ProfileEvent objects
Returns
JSON object containing event details
Note
This is a static function.

◆ determine_baselines()

void hops::MHO_BasicFringeDataConfiguration::determine_baselines ( const std::string &  dir,
const std::string &  baseline,
std::vector< std::pair< std::string, std::string > > &  baseline_files 
)
static

Determines baselines present for each scan in a given directory matching a specified baseline pattern.

Parameters
dirInput directory path
baselineBaseline pattern to match (2-char code or wildcard)
baseline_filesOutput vector of baseline-file pairs
Note
This is a static function.

◆ determine_fgroups_polproducts()

void hops::MHO_BasicFringeDataConfiguration::determine_fgroups_polproducts ( const std::string &  filename,
const std::string &  cmd_fgroup,
const std::string &  cmd_pprod,
std::vector< std::string > &  fgroups,
std::vector< std::string > &  pprods 
)
static

Determines frequency groups and polarization products to process for each baseline from a given filename.

Parameters
filenameInput filename containing (visibility) data
cmd_fgroupCommand line argument for frequency group filter
cmd_pprodCommand line argument for polarization product filter
fgroupsOutput vector of frequency groups to process
pprodsOutput vector of polarization products to process
Note
This is a static function.

◆ determine_passes()

void hops::MHO_BasicFringeDataConfiguration::determine_passes ( MHO_ParameterStore cmdline_params,
std::string &  cscans,
std::string &  croots,
std::string &  cbaselines,
std::string &  cfgroups,
std::string &  cpolprods 
)
static

Determines and concatenates data passes for processing, including scans, baselines, frequency groups, and polarization products.

Parameters
cmdline_paramsPointer to MHO_ParameterStore containing command line parameters
cscansReference to string storing concatenated scan directories
crootsReference to string storing concatenated associated root files
cbaselinesReference to string storing concatenated baseline files
cfgroupsReference to string storing concatenated frequency groups
cpolprodsReference to string storing concatenated polarization products
Note
This is a static function.

◆ determine_required_pol_products()

std::vector< std::string > hops::MHO_BasicFringeDataConfiguration::determine_required_pol_products ( std::string  polprod)
static

Parses a polarization product string to determine required pol-products.

Parameters
polprodInput polarization product string.
Returns
Vector of unique required polarization products.
Note
This is a static function.

◆ determine_scans()

void hops::MHO_BasicFringeDataConfiguration::determine_scans ( const std::string &  initial_dir,
std::vector< std::string > &  scans,
std::vector< std::string > &  roots 
)
static

Determines scan directories and associated root files for processing.

Parameters
initial_dirInitial directory to start search.
scansOutput vector of scan directories found.
rootsOutput vector of associated root files.
Note
This is a static function.

◆ find_associated_root_file()

std::string hops::MHO_BasicFringeDataConfiguration::find_associated_root_file ( std::string  dir)
static

Finds and returns the associated root (ovex) file in the given directory.

Parameters
dirInput directory path as a string.
Returns
The full path of the associated root (ovex) file as a string.
Note
This is a static function.

◆ init_and_exec_operators()

void hops::MHO_BasicFringeDataConfiguration::init_and_exec_operators ( MHO_OperatorBuilderManager build_manager,
MHO_OperatorToolbox opToolbox,
const char *  category 
)
static

Initializes and executes (in priority value order) all operators associated with a given category.

Parameters
build_managerPointer to MHO_OperatorBuilderManager for building operators.
opToolboxPointer to MHO_OperatorToolbox for getting operators by category.
categoryCategory name as string.
Note
This is a static function.

◆ initialize_scan_data()

bool hops::MHO_BasicFringeDataConfiguration::initialize_scan_data ( MHO_ParameterStore paramStore,
MHO_ScanDataStore scanStore 
)
static

Initializes scan data store using parameters and sets root file name.

Parameters
param1Pointer to MHO_ParameterStore containing initialization parameters
scanStorePointer to MHO_ScanDataStore to be initialized
Returns
True if scan store is valid, false otherwise
Note
This is a static function.

◆ parse_baseline_freqgrp()

void hops::MHO_BasicFringeDataConfiguration::parse_baseline_freqgrp ( std::string  baseline_freqgrp,
std::string &  baseline,
std::string &  freqgrp 
)
static

Parses baseline_freqgrp string into separate baseline and freqgrp strings (expects ':' as separator).

Parameters
baseline_freqgrpInput string containing baseline and frequency group information.
baseline(std::string&)
freqgrp(std::string&)
Note
This is a static function.

◆ parse_fourfit_command_line()

int hops::MHO_BasicFringeDataConfiguration::parse_fourfit_command_line ( int  argc,
char **  argv,
MHO_ParameterStore paramStore 
)
static

Parses command line arguments and stores them in a parameter store for later use by fourfit.

Parameters
argcNumber of command line arguments
argvArray of command line argument strings
paramStorePointer to MHO_ParameterStore object to store parsed arguments
Returns
0 if successful, non-zero otherwise
Note
This is a static function.

◆ parse_set_string()

std::string hops::MHO_BasicFringeDataConfiguration::parse_set_string ( const std::vector< std::string > &  arglist,
int &  set_arg_index 
)
static

Parses a vector of strings to extract and concatenate control file syntax after 'set' command.

Parameters
arglistInput vector of strings containing commands and arguments
set_arg_indexOutput index of 'set' command position in arglist
Returns
Concatenated string of control file syntax after 'set' command
Note
This is a static function.

◆ populate_initial_parameters()

void hops::MHO_BasicFringeDataConfiguration::populate_initial_parameters ( MHO_ParameterStore paramStore,
MHO_ScanDataStore scanStore 
)
static

Initializes parameter store and scan store for fringe processing, sets initial values.

Parameters
paramStorePointer to MHO_ParameterStore object for storing parameters
scanStorePointer to MHO_ScanDataStore object for handling scan data
Note
This is a static function.

◆ sanitize_directory()

std::string hops::MHO_BasicFringeDataConfiguration::sanitize_directory ( std::string  dir)
static

Sanitizes a directory path by ensuring it ends with '/' and exists.

Parameters
dirInput directory path to sanitize.
Returns
Sanitized directory path (preserves symlinks).
Note
This is a static function.

◆ sanity_check()

int hops::MHO_BasicFringeDataConfiguration::sanity_check ( MHO_ParameterStore paramStore)
static

Performs a sanity check on command line parameters after parsing.

Parameters
paramStorePointer to MHO_ParameterStore containing parsed command line arguments.
Returns
0 if parameters are valid, 1 otherwise.
Note
This is a static function.

◆ split_passes()

void hops::MHO_BasicFringeDataConfiguration::split_passes ( std::vector< mho_json > &  pass_vector,
const std::string &  cscans,
const std::string &  croots,
const std::string &  cbaselines,
const std::string &  cfgroups,
const std::string &  cpolprods 
)
static

Breaks concatenated strings into vector of json objects describing data items for each processing pass.

Parameters
pass_vectorOutput vector of mho_json objects representing data passes
cscansConcatenated string of scan directories
crootsConcatenated string of root (ovex) files
cbaselinesConcatenated string of baselines
cfgroupsConcatenated string of frequency groups
cpolprodsConcatenated string of polarization product
Note
This is a static function.

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