DP3
Classes | Functions
dp3::sky_model Namespace Reference

Classes

class  Patch
 A set of sources for which direction dependent effects are assumed to be equal. More...
 
class  PatchInfo
 Info about a patch. More...
 
class  PatchSumInfo
 Info about a patch direction. More...
 
class  SkyModel
 
class  SkyModelCache
 
class  SkyModelSelection
 
class  Source
 Class holding data of a source. More...
 
class  SourceInfo
 

Functions

bool CheckAnyOrientationIsAbsolute (const sky_model::SkyModel &sky_model, const std::vector< std::string > &patch_names)
 Check whether any source in a skymodel-sourcedb has absolute orientation. More...
 
bool CheckPolarized (const sky_model::SkyModel &source_db, const std::vector< std::string > &patch_names)
 
std::vector< std::shared_ptr< Patch > > clusterProximateSources (const std::vector< std::shared_ptr< Patch >> &patchList, double proximityLimit)
 
std::vector< std::vector< std::string > > MakeDirectionList (const std::vector< std::string > &packed_directions, const std::string &sky_model_filename)
 
std::vector< std::shared_ptr< Patch > > makeOnePatchPerComponent (const std::vector< std::shared_ptr< Patch >> &)
 From a given patch list, create a new one with one patch per component. More...
 
std::vector< std::shared_ptr< Patch > > MakePatches (const sky_model::SkyModel &source_db, const std::vector< std::string > &patch_names)
 
std::vector< std::string > MakePatchList (const sky_model::SkyModel &source_db, const std::vector< std::string > &patterns)
 
std::vector< std::pair< std::shared_ptr< base::ModelComponent >, std::shared_ptr< Patch > > > makeSourceList (std::vector< std::shared_ptr< Patch >> &patchList)
 
std::ostream & operator<< (std::ostream &os, const PatchInfo &info)
 Show the contents of a PatchInfo object. More...
 
std::string ReadFormat (const std::string &file, const std::string &cat_file)
 
SkyModel ReadSkyModel (const std::string &filename)
 
SkyModel ReadSkyModel (const std::string &filename, const std::string &format)
 
void SetPatchIndices (std::vector< std::shared_ptr< Patch >> &patch_list)
 
void toSkyModel (std::ostream &output, const PatchInfo &patch)
 Output a patch to a sky_model text file. More...
 
void toSkyModel (std::ostream &output, const Source &source)
 

Function Documentation

◆ CheckAnyOrientationIsAbsolute()

bool dp3::sky_model::CheckAnyOrientationIsAbsolute ( const sky_model::SkyModel sky_model,
const std::vector< std::string > &  patch_names 
)

Check whether any source in a skymodel-sourcedb has absolute orientation.

◆ CheckPolarized()

bool dp3::sky_model::CheckPolarized ( const sky_model::SkyModel source_db,
const std::vector< std::string > &  patch_names 
)

◆ clusterProximateSources()

std::vector<std::shared_ptr<Patch> > dp3::sky_model::clusterProximateSources ( const std::vector< std::shared_ptr< Patch >> &  patchList,
double  proximityLimit 
)

◆ MakeDirectionList()

std::vector<std::vector<std::string> > dp3::sky_model::MakeDirectionList ( const std::vector< std::string > &  packed_directions,
const std::string &  sky_model_filename 
)

Creates a list of directions, using packed directions and/or a SourceDB file.

Parameters
packed_directionsPacked direction lists. Each string should contain a list of directions, e.g., "[direction1, direction2, direction3]".
sky_model_filenameA filename of a sky model file.
Returns
A list of patches.

◆ makeOnePatchPerComponent()

std::vector<std::shared_ptr<Patch> > dp3::sky_model::makeOnePatchPerComponent ( const std::vector< std::shared_ptr< Patch >> &  )

From a given patch list, create a new one with one patch per component.

◆ MakePatches()

std::vector<std::shared_ptr<Patch> > dp3::sky_model::MakePatches ( const sky_model::SkyModel source_db,
const std::vector< std::string > &  patch_names 
)

◆ MakePatchList()

std::vector<std::string> dp3::sky_model::MakePatchList ( const sky_model::SkyModel source_db,
const std::vector< std::string > &  patterns 
)

◆ makeSourceList()

std::vector< std::pair<std::shared_ptr<base::ModelComponent>, std::shared_ptr<Patch> > > dp3::sky_model::makeSourceList ( std::vector< std::shared_ptr< Patch >> &  patchList)

Create a source list (with patch name) from a patchlist Needed for efficient multithreading

◆ operator<<()

std::ostream& dp3::sky_model::operator<< ( std::ostream &  os,
const PatchInfo info 
)

Show the contents of a PatchInfo object.

◆ ReadFormat()

std::string dp3::sky_model::ReadFormat ( const std::string &  file,
const std::string &  cat_file 
)

◆ ReadSkyModel() [1/2]

SkyModel dp3::sky_model::ReadSkyModel ( const std::string &  filename)
inline

◆ ReadSkyModel() [2/2]

SkyModel dp3::sky_model::ReadSkyModel ( const std::string &  filename,
const std::string &  format 
)

◆ SetPatchIndices()

void dp3::sky_model::SetPatchIndices ( std::vector< std::shared_ptr< Patch >> &  patch_list)

Makes sure that every Patch's stored index is set to the index the patch has in the list.

See also
Patch::Index().

◆ toSkyModel() [1/2]

void dp3::sky_model::toSkyModel ( std::ostream &  output,
const PatchInfo patch 
)

Output a patch to a sky_model text file.

◆ toSkyModel() [2/2]

void dp3::sky_model::toSkyModel ( std::ostream &  output,
const Source source 
)

Output a source to a sky_model text file.

The output format is used for

showsourcedb mode=sky_model