File: telescopefile.h

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (60 lines) | stat: -rw-r--r-- 2,301 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef DEFAULTSTRATEGYSET_H
#define DEFAULTSTRATEGYSET_H

#include <string>
#include <memory>
#include <vector>

#include "../interface/aoflagger.h"

class TelescopeFile {
 public:
  /**
   * The contents of this enum needs to be equal to aoflagger::StrategyId
   * defined in interfaces/aoflagger.h
   */
  enum TelescopeId {
    GENERIC_TELESCOPE = (int)aoflagger::TelescopeId::GENERIC_TELESCOPE,
    AARTFAAC_TELESCOPE = (int)aoflagger::TelescopeId::AARTFAAC_TELESCOPE,
    APERTIF_TELESCOPE = (int)aoflagger::TelescopeId::APERTIF_TELESCOPE,
    ARECIBO_TELESCOPE = (int)aoflagger::TelescopeId::ARECIBO_TELESCOPE,
    ATCA_TELESCOPE = (int)aoflagger::TelescopeId::ATCA_TELESCOPE,
    BIGHORNS_TELESCOPE = (int)aoflagger::TelescopeId::BIGHORNS_TELESCOPE,
    JVLA_TELESCOPE = (int)aoflagger::TelescopeId::JVLA_TELESCOPE,
    LOFAR_TELESCOPE = (int)aoflagger::TelescopeId::LOFAR_TELESCOPE,
    MWA_TELESCOPE = (int)aoflagger::TelescopeId::MWA_TELESCOPE,
    NENUFAR_TELESCOPE = (int)aoflagger::TelescopeId::NENUFAR_TELESCOPE,
    PARKES_TELESCOPE = (int)aoflagger::TelescopeId::PARKES_TELESCOPE,
    WSRT_TELESCOPE = (int)aoflagger::TelescopeId::WSRT_TELESCOPE
  };

  static std::vector<TelescopeFile::TelescopeId> List() {
    return std::vector<TelescopeFile::TelescopeId>{
        GENERIC_TELESCOPE, AARTFAAC_TELESCOPE, APERTIF_TELESCOPE,
        ARECIBO_TELESCOPE, ATCA_TELESCOPE,     BIGHORNS_TELESCOPE,
        JVLA_TELESCOPE,    LOFAR_TELESCOPE,    MWA_TELESCOPE,
        NENUFAR_TELESCOPE, PARKES_TELESCOPE,   WSRT_TELESCOPE};
  }

  /**
   * @brief Searches a strategy for a given telescope.
   *
   * @param telescopeId One of the telescopes, if known, otherwise
   * GENERIC_TELESCOPE.
   * @param scenario Used as 'suffix' to the name of the telescope. This allows
   * multiple versions for the same telescope.
   * @returns Path to the strategy, or empty string if not found.
   */
  static std::string FindStrategy(enum TelescopeId telescopeId,
                                  const std::string& scenario = "");

  static std::string TelescopeName(TelescopeFile::TelescopeId telescopeId);

  static std::string TelescopeDescription(
      TelescopeFile::TelescopeId telescopeId);

  static TelescopeFile::TelescopeId TelescopeIdFromName(
      const std::string& name);
};

#endif