Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
SinglePulseImpl.h
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef SKA_CHEETAH_PIPELINE_SINGLEPULSEIMPL_H
25 #define SKA_CHEETAH_PIPELINE_SINGLEPULSEIMPL_H
26 
27 #include "cheetah/pipeline/PipelineHandler.h"
28 #include "cheetah/pipeline/Dedispersion.h"
29 #include "cheetah/sps/Sps.h"
30 #include "cheetah/spsift/SpSift.h"
31 #include "cheetah/sps_clustering/SpsClustering.h"
32 
33 namespace ska {
34 namespace cheetah {
35 namespace pipeline {
36 
37 template<typename NumericalT>
38 class CheetahConfig;
39 
40 template<typename NumericalT>
41 class BeamConfig;
42 
47 template<typename NumericalT>
48 class SinglePulseImpl : public Dedispersion<NumericalT>
49 {
50  public:
54  typedef typename Sps::DmHandler DmHandler;
55  typedef typename Sps::DmTrialType DmTrialType;
56 
57  public:
58  SinglePulseImpl(CheetahConfig<NumericalT> const& config, BeamConfig<NumericalT> const& beam_config, DmHandler const& dm_handler = [](std::shared_ptr<DmTrialType>){});
60  ~SinglePulseImpl();
61 
62  void operator()(TimeFrequencyType& data) override;
63 
64  protected:
65  typedef typename Sps::SpType SpType;
66 
67  class SpsHandler {
68  public:
69  SpsHandler(SinglePulseImpl&);
70  void operator()(std::shared_ptr<SpType> const&) const;
71 
72  private:
73  SinglePulseImpl& _pipeline;
74  };
75 
76  private:
77  SpsHandler _sps_handler;
78 
79  protected:
80  Sps _sps;
81 
82  private:
83  spsift::SpSift _spsifter;
84  sps_clustering::SpsClustering _spclusterer;
85 };
86 
87 
88 } // namespace pipeline
89 } // namespace cheetah
90 } // namespace ska
91 #include "SinglePulseImpl.cpp"
92 
93 #endif // SKA_CHEETAH_PIPELINE_SINGLEPULSEIMPL_H
A class that will merge candidates that have been labeled in the same group.
Definition: SpsClustering.h:39
Single Pulse Search top level interface.
Definition: Sps.h:61
Some limits and constants for FLDO.
Definition: Brdz.h:35
Parse configuration parameters for a single beam in the pipeline instance of cheetah.
Definition: BeamConfig.h:48
Base class for Cheetah Pipeline Handlers.
Definition: Pipeline.h:37
A Single Pulse Search Pipeline without rfim.
A module to sift through Single Pulse candidates based on some threshold in width, DM and S/N.
Definition: SpSift.h:39
Base class for dedispersion pipeline handlers.
Definition: Dedispersion.h:46
A continuous memory container for dispersion measure trials of varying downsamplings.
Definition: DmTrials.h:62
void operator()(TimeFrequencyType &data) override
called each time data becomes available