Skip to content

Commit

Permalink
Remove ObserverPoint: Was deprecated in version 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmerten committed Jan 8, 2024
1 parent 9b1d476 commit 68e4732
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## CRPropa vNext

### Bug fixes:
* Fixed sign for exponential decay of magn. field strength with Galactic height in LogarithmicSpiralField

### New features:

Expand All @@ -10,6 +11,7 @@

### Removed features
* AMRMagneticField - underlying library (saga) is no longer supported.
* ObserverPoint: Use Observer1D instead.

### New plugins and resources linked on the webpages

Expand Down
13 changes: 0 additions & 13 deletions include/crpropa/module/Observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,6 @@ class ObserverTracking: public ObserverFeature {
};


/**
@class ObserverPoint
@brief Detects particles when reaching x = 0
Should be removed and replaced by Observer1D
*/
class ObserverPoint: public ObserverFeature {
public:
DetectionState checkDetection(Candidate *candidate) const;
std::string getDescription() const;
};


/**
@class Observer1D
@brief Detects particles when reaching x = 0
Expand Down
17 changes: 0 additions & 17 deletions src/module/Observer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,6 @@ std::string ObserverTracking::getDescription() const {
return ss.str();
}

// ObserverPoint --------------------------------------------------------------
DetectionState ObserverPoint::checkDetection(Candidate *candidate) const {
KISS_LOG_WARNING << "ObserverPoint is deprecated and is no longer supported. Please use Observer1D instead.\n";
double x = candidate->current.getPosition().x;
if (x > 0) {
// Limits the next step size to prevent candidates from overshooting in case of non-detection
candidate->limitNextStep(x);
return NOTHING;
}
// Detects particles when reaching x = 0
return DETECTED;
}

std::string ObserverPoint::getDescription() const {
return "ObserverPoint: observer at x = 0";
}

// Observer1D --------------------------------------------------------------
DetectionState Observer1D::checkDetection(Candidate *candidate) const {
double x = candidate->current.getPosition().x;
Expand Down

0 comments on commit 68e4732

Please sign in to comment.