-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #588 from astrorama/develop
Release 0.22
- Loading branch information
Showing
37 changed files
with
1,185 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
SEImplementation/SEImplementation/Configuration/RngConfig.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* RngConfig.h | ||
* | ||
* Created on: Mar 21, 2024 | ||
* Author: mschefer | ||
*/ | ||
|
||
#ifndef _SEIMPLEMENTATION_CONFIGURATION_RNGCONFIG_H_ | ||
#define _SEIMPLEMENTATION_CONFIGURATION_RNGCONFIG_H_ | ||
|
||
#include "Configuration/Configuration.h" | ||
#include "AlexandriaKernel/ThreadPool.h" | ||
|
||
namespace SourceXtractor { | ||
|
||
class RngConfig : public Euclid::Configuration::Configuration { | ||
public: | ||
explicit RngConfig(long manager_id); | ||
|
||
virtual ~RngConfig() = default; | ||
|
||
std::map<std::string, OptionDescriptionList> getProgramOptions() override; | ||
|
||
void initialize(const UserValues& args) override; | ||
|
||
unsigned int getSeed() const { | ||
return m_seed; | ||
} | ||
|
||
private: | ||
unsigned int m_seed; | ||
}; | ||
|
||
|
||
} | ||
|
||
|
||
#endif /* _SEIMPLEMENTATION_CONFIGURATION_RNGCONFIG_H_ */ |
50 changes: 50 additions & 0 deletions
50
SEImplementation/SEImplementation/Grouping/AssocGrouping.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** Copyright © 2019 - 2023 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 3.0 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#ifndef _SEIMPLEMENTATION_GROUPING_ASSOCGROUPING_H_ | ||
#define _SEIMPLEMENTATION_GROUPING_ASSOCGROUPING_H_ | ||
|
||
#include <map> | ||
|
||
#include "SEFramework/Pipeline/SourceGrouping.h" | ||
|
||
namespace SourceXtractor { | ||
|
||
class AssocGrouping : public SourceGroupingInterface { | ||
public: | ||
|
||
AssocGrouping(std::shared_ptr<SourceGroupFactory> group_factory, unsigned int hard_limit); | ||
virtual ~AssocGrouping() = default; | ||
|
||
std::set<PropertyId> requiredProperties() const override; | ||
|
||
/// Handles a new Source | ||
void receiveSource(std::unique_ptr<SourceInterface> source) override; | ||
|
||
/// Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping | ||
void receiveProcessSignal(const ProcessSourcesEvent& event) override; | ||
|
||
private: | ||
std::shared_ptr<SourceGroupFactory> m_group_factory; | ||
std::map<unsigned int, std::unique_ptr<SourceGroupInterface>> m_source_groups; | ||
unsigned int m_hard_limit; | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif /* _SEIMPLEMENTATION_GROUPING_ASSOCGROUPING_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
SEImplementation/SEImplementation/Grouping/MoffatGrouping.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/** Copyright © 2019-2024 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 3.0 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#ifndef _SEIMPLEMENTATION_GROUPING_MOFFATGROUPING_H_ | ||
#define _SEIMPLEMENTATION_GROUPING_MOFFATGROUPING_H_ | ||
|
||
#include "SEFramework/Pipeline/SourceGrouping.h" | ||
#include "SEUtils/QuadTree.h" | ||
|
||
#include <map> | ||
#include <vector> | ||
#include <functional> | ||
|
||
namespace SourceXtractor { | ||
|
||
class MoffatGrouping : public SourceGroupingInterface { | ||
public: | ||
struct SourceInfo { | ||
std::unique_ptr<SourceInterface> m_source; | ||
double m_x, m_y; | ||
size_t m_group_id; | ||
}; | ||
|
||
using Group = std::vector<std::shared_ptr<SourceInfo>>; | ||
|
||
MoffatGrouping(std::shared_ptr<GroupingCriteria> grouping_criteria, | ||
std::shared_ptr<SourceGroupFactory> group_factory, unsigned int hard_limit, float max_range); | ||
virtual ~MoffatGrouping() = default; | ||
|
||
std::set<PropertyId> requiredProperties() const override; | ||
|
||
/// Handles a new Source | ||
void receiveSource(std::unique_ptr<SourceInterface> source) override; | ||
|
||
/// Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping | ||
void receiveProcessSignal(const ProcessSourcesEvent& event) override; | ||
|
||
private: | ||
void processGroup(unsigned int group_id); | ||
|
||
std::shared_ptr<GroupingCriteria> m_grouping_criteria; | ||
std::shared_ptr<SourceGroupFactory> m_group_factory; | ||
unsigned int m_hard_limit; | ||
float m_max_range; | ||
|
||
size_t m_group_counter; | ||
std::map<unsigned int, std::shared_ptr<Group>> m_groups; | ||
QuadTree<std::shared_ptr<SourceInfo>> m_tree; | ||
}; | ||
|
||
} | ||
|
||
#endif /* _SEIMPLEMENTATION_GROUPING_MOFFATGROUPING_H_ */ |
50 changes: 50 additions & 0 deletions
50
SEImplementation/SEImplementation/Grouping/SplitSourcesGrouping.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** Copyright © 2019 - 2023 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 3.0 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#ifndef _SEIMPLEMENTATION_GROUPING_SPLITSOURCESGROUPING_H_ | ||
#define _SEIMPLEMENTATION_GROUPING_SPLITSOURCESGROUPING_H_ | ||
|
||
#include "SEFramework/Pipeline/SourceGrouping.h" | ||
|
||
#include <map> | ||
|
||
namespace SourceXtractor { | ||
|
||
class SplitSourcesGrouping : public SourceGroupingInterface { | ||
public: | ||
|
||
SplitSourcesGrouping(std::shared_ptr<SourceGroupFactory> group_factory, unsigned int hard_limit); | ||
virtual ~SplitSourcesGrouping() = default; | ||
|
||
std::set<PropertyId> requiredProperties() const override; | ||
|
||
/// Handles a new Source | ||
void receiveSource(std::unique_ptr<SourceInterface> source) override; | ||
|
||
/// Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGrouping | ||
void receiveProcessSignal(const ProcessSourcesEvent& event) override; | ||
|
||
private: | ||
std::shared_ptr<SourceGroupFactory> m_group_factory; | ||
std::map<unsigned int, std::unique_ptr<SourceGroupInterface>> m_source_groups; | ||
unsigned int m_hard_limit; | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif /* _SEIMPLEMENTATION_GROUPING_SPLITSOURCESGROUPING_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.