DP3
SkyModelFunctions.h
Go to the documentation of this file.
1 // Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
6 
7 #ifndef DP3_SKY_MODEL_SKY_MODEL_FUNCTIONS_H_
8 #define DP3_SKY_MODEL_SKY_MODEL_FUNCTIONS_H_
9 
10 #include <optional>
11 #include <string>
12 #include <string_view>
13 #include <vector>
14 
15 #include "sky_model/SkyModel.h"
16 
17 #include "Patch.h"
18 
19 namespace dp3::sky_model {
20 
21 std::vector<std::shared_ptr<Patch>> MakePatches(
22  const sky_model::SkyModel &source_db,
23  const std::vector<std::string> &patch_names);
24 
27 std::vector<
28  std::pair<std::shared_ptr<base::ModelComponent>, std::shared_ptr<Patch>>>
29 makeSourceList(std::vector<std::shared_ptr<Patch>> &patchList);
30 
35 void SetPatchIndices(std::vector<std::shared_ptr<Patch>> &patch_list);
36 
38 std::vector<std::shared_ptr<Patch>> makeOnePatchPerComponent(
39  const std::vector<std::shared_ptr<Patch>> &);
40 
41 std::vector<std::shared_ptr<Patch>> clusterProximateSources(
42  const std::vector<std::shared_ptr<Patch>> &patchList,
43  double proximityLimit);
44 
45 std::vector<std::string> MakePatchList(
46  const sky_model::SkyModel &source_db,
47  const std::vector<std::string> &patterns);
48 
57 std::vector<std::vector<std::string>> MakeDirectionList(
58  const std::vector<std::string> &packed_directions,
59  const std::string &sky_model_filename);
60 
61 bool CheckPolarized(const sky_model::SkyModel &source_db,
62  const std::vector<std::string> &patch_names);
63 
66  const std::vector<std::string> &patch_names);
67 
68 } // namespace dp3::sky_model
69 
70 #endif
Definition: SkyModel.h:15
Definition: Patch.h:14
std::vector< std::shared_ptr< Patch > > MakePatches(const sky_model::SkyModel &source_db, const std::vector< std::string > &patch_names)
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.
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.
std::vector< std::pair< std::shared_ptr< base::ModelComponent >, std::shared_ptr< Patch > > > makeSourceList(std::vector< std::shared_ptr< Patch >> &patchList)
std::vector< std::string > MakePatchList(const sky_model::SkyModel &source_db, const std::vector< std::string > &patterns)
std::vector< std::shared_ptr< Patch > > clusterProximateSources(const std::vector< std::shared_ptr< Patch >> &patchList, double proximityLimit)
bool CheckPolarized(const sky_model::SkyModel &source_db, const std::vector< std::string > &patch_names)
void SetPatchIndices(std::vector< std::shared_ptr< Patch >> &patch_list)
std::vector< std::vector< std::string > > MakeDirectionList(const std::vector< std::string > &packed_directions, const std::string &sky_model_filename)