File: dummygridder.h

package info (click to toggle)
wsclean 2.8-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 2,196 kB
  • sloc: cpp: 34,504; ansic: 234; python: 174; makefile: 10
file content (86 lines) | stat: -rw-r--r-- 1,633 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef DUMMY_GRIDDER_H
#define DUMMY_GRIDDER_H

#include <complex>
#include <vector>

#include "interface.h"

class DummyGridder : public HighLevelGridderInterface
{
public:
	virtual ~DummyGridder() { }

	virtual void set_frequencies(const double* frequencyList, size_t channelCount)  
	{
		_channelCount = channelCount;
	}

	virtual void set_stations(const size_t nStations)  
	{ }

	virtual void set_kernel(size_t kernelSize, const double* kernel)  
	{ }

	virtual void start_w_layer(double layerWInLambda)  
	{ }

	virtual void finish_w_layer()  
	{ }

	virtual void start_aterm(const std::complex<double>* aterm)  
	{ }

	virtual void finish_aterm()  
	{ }

	virtual void set_grid(std::complex<double>* grid)  
	{ }

	virtual void grid_visibility(
			const std::complex<float>* visibility, // size CH x PL
			const double* uvwInMeters,
			size_t antenna1,
			size_t antenna2,
			size_t timeIndex
	)  
	{ }
	
	virtual void transform_grid_after_gridding()  
	{ }
	
	virtual void transform_grid_before_sampling()  
	{ }

	virtual void queue_visibility_sampling(
			const double* uvwInMeters,
			size_t antenna1,
			size_t antenna2,
			size_t timeIndex,
			size_t rowId,
			bool& isBufferFull
	)
	{
		rowIds.push_back(rowId);
	}

	virtual void finish_sampled_visibilities()  
	{ }

	virtual void get_sampled_visibilities(size_t index, std::complex<float>* data, size_t& rowID) const  
	{
		for(size_t i=0; i!=_channelCount*4; ++i)
			data[i] = 1.0;
		rowID = rowIds[index];
	}
	
	virtual size_t get_sampling_buffer_size() const  
	{
		return rowIds.size();
	}
private:
	std::vector<size_t> rowIds;
	size_t _channelCount;
};

#endif