DP3
AmplitudeOnlyConstraint.h
Go to the documentation of this file.
1 // Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 #ifndef DP3_DDECAL_AMPLITUDE_ONLY_CONSTRAINT_H_
5 #define DP3_DDECAL_AMPLITUDE_ONLY_CONSTRAINT_H_
6 
7 #include "Constraint.h"
8 
9 #include <vector>
10 
11 namespace dp3 {
12 namespace ddecal {
13 
18 class AmplitudeOnlyConstraint final : public Constraint {
19  public:
20  void Apply(SolutionSpan& solutions, double time) override {
21  solutions = xt::abs(solutions);
22  }
23 };
24 
25 } // namespace ddecal
26 } // namespace dp3
27 
28 #endif
This class constrains the phases of the solution to be zero, but keeps the amplitude information.
Definition: AmplitudeOnlyConstraint.h:18
void Apply(SolutionSpan &solutions, double time) override
Definition: AmplitudeOnlyConstraint.h:20
This class is the base class for classes that implement a constraint on calibration solutions....
Definition: Constraint.h:27
aocommon::xt::Span< std::complex< double >, 4 > SolutionSpan
Definition: Solutions.h:20
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53