-
Notifications
You must be signed in to change notification settings - Fork 7
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 #162 from Astroua/develop
Release 0.6.1
- Loading branch information
Showing
184 changed files
with
12,224 additions
and
3,990 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* | ||
**/ | ||
|
||
|
||
#include "ProfileHook.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,64 @@ | ||
/** | ||
* Hook for generating profile data. | ||
* | ||
**/ | ||
|
||
#pragma once | ||
|
||
#include "CartaLib/CartaLib.h" | ||
#include "CartaLib/IPlugin.h" | ||
#include "CartaLib/RegionInfo.h" | ||
#include "CartaLib/ProfileInfo.h" | ||
|
||
namespace Carta | ||
{ | ||
namespace Lib | ||
{ | ||
namespace Image { | ||
class ImageInterface; | ||
} | ||
namespace Hooks | ||
{ | ||
class ProfileHook : public BaseHook | ||
{ | ||
CARTA_HOOK_BOILER1( ProfileHook ); | ||
|
||
public: | ||
//The intensity counts | ||
typedef std::vector<double> ResultType; | ||
|
||
/** | ||
* @brief Params | ||
*/ | ||
struct Params { | ||
|
||
Params( std::shared_ptr<Image::ImageInterface> dataSource, | ||
Carta::Lib::RegionInfo regionInfo, | ||
Carta::Lib::ProfileInfo profileInfo ){ | ||
m_dataSource = dataSource; | ||
m_regionInfo = regionInfo; | ||
m_profileInfo = profileInfo; | ||
} | ||
|
||
std::shared_ptr<Image::ImageInterface> m_dataSource; | ||
Carta::Lib::RegionInfo m_regionInfo; | ||
Carta::Lib::ProfileInfo m_profileInfo; | ||
}; | ||
|
||
/** | ||
* @brief PreRender | ||
* @param pptr | ||
* | ||
* @todo make hook constructors protected, so that only hook helper can create them | ||
*/ | ||
ProfileHook( Params * pptr ) : BaseHook( staticId ), paramsPtr( pptr ) | ||
{ | ||
CARTA_ASSERT( is < Me > () ); | ||
} | ||
|
||
ResultType result; | ||
Params * paramsPtr; | ||
}; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "ProfileInfo.h" | ||
|
||
namespace Carta { | ||
namespace Lib { | ||
|
||
ProfileInfo::ProfileInfo(){ | ||
m_restFrequency = 0; | ||
m_restUnit = "GHz"; | ||
} | ||
|
||
ProfileInfo::AggregateType ProfileInfo::getAggregateType() const { | ||
return m_aggregateType; | ||
} | ||
|
||
double ProfileInfo::getRestFrequency() const { | ||
return m_restFrequency; | ||
} | ||
|
||
QString ProfileInfo::getRestUnit() const { | ||
return m_restUnit; | ||
} | ||
|
||
|
||
ProfileInfo & ProfileInfo::setAggregateType( const ProfileInfo::AggregateType & knownType ){ | ||
m_aggregateType = knownType; | ||
return * this; | ||
} | ||
|
||
ProfileInfo::~ProfileInfo(){ | ||
|
||
} | ||
} // namespace Lib | ||
} // namespace Carta |
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,64 @@ | ||
#pragma once | ||
|
||
#include <QString> | ||
|
||
namespace Carta | ||
{ | ||
namespace Lib | ||
{ | ||
class ProfileInfo | ||
{ | ||
public: | ||
/// Methods of summarizing profiles | ||
enum class AggregateType | ||
{ | ||
MEAN, | ||
MEDIAN, | ||
RMS, | ||
SUM, | ||
FLUX_DENSITY, | ||
VARIANCE, | ||
MIN, | ||
MAX, | ||
OTHER | ||
}; | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
ProfileInfo(); | ||
|
||
/** | ||
* Return the method to be used for aggregating data. | ||
* @return - the method used for aggregating data. | ||
*/ | ||
AggregateType getAggregateType() const; | ||
|
||
/** | ||
* Return the rest frequency used in generating the profile. | ||
* @return - the rest frequency used in generating the profile. | ||
*/ | ||
double getRestFrequency() const; | ||
|
||
/** | ||
* Return the rest frequency unit. | ||
* @return - the rest frequency unit. | ||
*/ | ||
QString getRestUnit() const; | ||
|
||
/** | ||
* Set the method used for aggregating data. | ||
* @param aggType - the method used for aggregating data. | ||
*/ | ||
ProfileInfo & setAggregateType( const AggregateType & aggType ); | ||
|
||
virtual ~ProfileInfo(); | ||
|
||
protected: | ||
AggregateType m_aggregateType = AggregateType::OTHER; | ||
double m_restFrequency; | ||
QString m_restUnit; | ||
}; | ||
|
||
} // namespace Lib | ||
} // namespace Carta |
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
Oops, something went wrong.