コード例 #1
0
ファイル: rfiguicontroller.cpp プロジェクト: pkgw/aoflagger
void RFIGuiController::PlotLogLogDist()
{
	if(IsImageLoaded())
	{
		TimeFrequencyData activeData = ActiveData();
		HistogramCollection histograms(activeData.PolarisationCount());
		for(unsigned p=0;p!=activeData.PolarisationCount();++p)
		{
			TimeFrequencyData *polData = activeData.CreateTFDataFromPolarisationIndex(p);
			Image2DCPtr image = polData->GetSingleImage();
			Mask2DCPtr mask = Mask2D::CreateCopy(polData->GetSingleMask());
			histograms.Add(0, 1, p, image, mask);
		}
		_rfiGuiWindow.ShowHistogram(histograms);
	}
}
コード例 #2
0
	void ChangeResolutionAction::DecreaseTimeWithMask(TimeFrequencyData &data)
	{
		size_t polCount = data.PolarisationCount();
		for(size_t i=0;i<polCount;++i)
		{
			TimeFrequencyData *polData = data.CreateTFDataFromPolarisationIndex(i);
			Mask2DCPtr mask = polData->GetSingleMask();
			for(unsigned j=0;j<polData->ImageCount();++j)
			{
				Image2DCPtr image = polData->GetImage(j);
				polData->SetImage(j, ThresholdTools::ShrinkHorizontally(_timeDecreaseFactor, image, mask));
			}
			delete polData;
		}
		size_t maskCount = data.MaskCount();
		for(size_t i=0;i<maskCount;++i)
		{
			Mask2DCPtr mask = data.GetMask(i);
			Mask2DPtr newMask = mask->ShrinkHorizontallyForAveraging(_timeDecreaseFactor);
			data.SetMask(i, newMask);
		}
	}