Skip to content
Snippets Groups Projects
Commit f210a689 authored by Tobias Winchen's avatar Tobias Winchen
Browse files

Removed obsolete options

parent 36075d34
Branches
No related tags found
No related merge requests found
...@@ -284,8 +284,6 @@ public: ...@@ -284,8 +284,6 @@ public:
* @param naccumulate Number of samples to integrate in the individual * @param naccumulate Number of samples to integrate in the individual
* FFT bins * FFT bins
* @param nbits Bit depth of the sampled signal * @param nbits Bit depth of the sampled signal
* @param input_level Normalization level of the input signal
* @param output_level Normalization level of the output signal
* @param handler Output handler * @param handler Output handler
* *
*/ */
...@@ -293,7 +291,6 @@ public: ...@@ -293,7 +291,6 @@ public:
std::size_t selectedSideChannel, std::size_t selectedBit, std::size_t selectedSideChannel, std::size_t selectedBit,
std::size_t fft_length, std::size_t fft_length,
std::size_t naccumulate, std::size_t nbits, std::size_t naccumulate, std::size_t nbits,
float input_level, float output_level,
HandlerType &handler); HandlerType &handler);
~GatedSpectrometer(); ~GatedSpectrometer();
......
...@@ -61,8 +61,6 @@ public: ...@@ -61,8 +61,6 @@ public:
* @param naccumulate Number of samples to integrate in the individual * @param naccumulate Number of samples to integrate in the individual
* FFT bins * FFT bins
* @param nbits Bit depth of the sampled signal * @param nbits Bit depth of the sampled signal
* @param input_level Normalization level of the input signal
* @param output_level Normalization level of the output signal
* @param handler Output handler * @param handler Output handler
* *
*/ */
...@@ -70,7 +68,6 @@ public: ...@@ -70,7 +68,6 @@ public:
std::size_t selectedSideChannel, std::size_t selectedBit, std::size_t selectedSideChannel, std::size_t selectedBit,
std::size_t fft_length, std::size_t fft_length,
std::size_t naccumulate, std::size_t nbits, std::size_t naccumulate, std::size_t nbits,
float input_level, float output_level,
HandlerType &handler); HandlerType &handler);
~GatedStokesSpectrometer(); ~GatedStokesSpectrometer();
......
...@@ -67,7 +67,7 @@ template <class HandlerType, class InputType, class OutputType> ...@@ -67,7 +67,7 @@ template <class HandlerType, class InputType, class OutputType>
GatedSpectrometer<HandlerType, InputType, OutputType>::GatedSpectrometer( GatedSpectrometer<HandlerType, InputType, OutputType>::GatedSpectrometer(
const DadaBufferLayout &dadaBufferLayout, std::size_t selectedSideChannel, const DadaBufferLayout &dadaBufferLayout, std::size_t selectedSideChannel,
std::size_t selectedBit, std::size_t fft_length, std::size_t naccumulate, std::size_t selectedBit, std::size_t fft_length, std::size_t naccumulate,
std::size_t nbits, float input_level, float output_level, HandlerType std::size_t nbits, HandlerType
&handler) : _dadaBufferLayout(dadaBufferLayout), &handler) : _dadaBufferLayout(dadaBufferLayout),
_selectedSideChannel(selectedSideChannel), _selectedBit(selectedBit), _selectedSideChannel(selectedSideChannel), _selectedBit(selectedBit),
_fft_length(fft_length), _naccumulate(naccumulate), _fft_length(fft_length), _naccumulate(naccumulate),
......
...@@ -152,8 +152,7 @@ template <class HandlerType, class InputType> ...@@ -152,8 +152,7 @@ template <class HandlerType, class InputType>
GatedStokesSpectrometer<HandlerType>::GatedStokesSpectrometer( GatedStokesSpectrometer<HandlerType>::GatedStokesSpectrometer(
const DadaBufferLayout &dadaBufferLayout, const DadaBufferLayout &dadaBufferLayout,
std::size_t selectedSideChannel, std::size_t selectedBit, std::size_t fft_length, std::size_t naccumulate, std::size_t selectedSideChannel, std::size_t selectedBit, std::size_t fft_length, std::size_t naccumulate,
std::size_t nbits, float input_level, float output_level, std::size_t nbits, HandlerType &handler) : _dadaBufferLayout(dadaBufferLayout),
HandlerType &handler) : _dadaBufferLayout(dadaBufferLayout),
_selectedSideChannel(selectedSideChannel), _selectedBit(selectedBit), _selectedSideChannel(selectedSideChannel), _selectedBit(selectedBit),
_fft_length(fft_length), _fft_length(fft_length),
_naccumulate(naccumulate), _nbits(nbits), _handler(handler), _fft_plan(0), _naccumulate(naccumulate), _nbits(nbits), _handler(handler), _fft_plan(0),
......
...@@ -34,8 +34,6 @@ struct GatedSpectrometerInputParameters ...@@ -34,8 +34,6 @@ struct GatedSpectrometerInputParameters
size_t fft_length; size_t fft_length;
size_t naccumulate; size_t naccumulate;
unsigned int nbits; unsigned int nbits;
float input_level;
float output_level;
std::string filename; std::string filename;
std::string output_type; std::string output_type;
}; };
...@@ -57,8 +55,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i) ...@@ -57,8 +55,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i)
effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType>
spectrometer(i.dadaBufferLayout, spectrometer(i.dadaBufferLayout,
i.selectedSideChannel, i.selectedBit, i.selectedSideChannel, i.selectedBit,
i.fft_length, i.naccumulate, i.nbits, i.input_level, i.fft_length, i.naccumulate, i.nbits, sink);
i.output_level, sink);
DadaInputStream<decltype(spectrometer)> istream(i.dadaBufferLayout.getInputkey(), log, DadaInputStream<decltype(spectrometer)> istream(i.dadaBufferLayout.getInputkey(), log,
spectrometer); spectrometer);
...@@ -69,8 +66,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i) ...@@ -69,8 +66,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i)
DadaOutputStream sink(string_to_key(i.filename), log); DadaOutputStream sink(string_to_key(i.filename), log);
effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> spectrometer(i.dadaBufferLayout, effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> spectrometer(i.dadaBufferLayout,
i.selectedSideChannel, i.selectedBit, i.selectedSideChannel, i.selectedBit,
i.fft_length, i.naccumulate, i.nbits, i.input_level, i.fft_length, i.naccumulate, i.nbits, sink);
i.output_level, sink);
DadaInputStream<decltype(spectrometer)> istream(i.dadaBufferLayout.getInputkey(), log, DadaInputStream<decltype(spectrometer)> istream(i.dadaBufferLayout.getInputkey(), log,
spectrometer); spectrometer);
...@@ -81,8 +77,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i) ...@@ -81,8 +77,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i)
NullSink sink; NullSink sink;
effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> spectrometer(i.dadaBufferLayout, effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> spectrometer(i.dadaBufferLayout,
i.selectedSideChannel, i.selectedBit, i.selectedSideChannel, i.selectedBit,
i.fft_length, i.naccumulate, i.nbits, i.input_level, i.fft_length, i.naccumulate, i.nbits, sink);
i.output_level, sink);
std::vector<char> buffer(i.dadaBufferLayout.getBufferSize()); std::vector<char> buffer(i.dadaBufferLayout.getBufferSize());
cudaHostRegister(buffer.data(), buffer.size(), cudaHostRegisterPortable); cudaHostRegister(buffer.data(), buffer.size(), cudaHostRegisterPortable);
...@@ -141,7 +136,6 @@ int main(int argc, char **argv) { ...@@ -141,7 +136,6 @@ int main(int argc, char **argv) {
std::string input_polarizations = "Single"; std::string input_polarizations = "Single";
std::string output_format = "Power"; std::string output_format = "Power";
unsigned int output_bit_depth;
/** Define and parse the program options /** Define and parse the program options
*/ */
...@@ -159,10 +153,6 @@ int main(int argc, char **argv) { ...@@ -159,10 +153,6 @@ int main(int argc, char **argv) {
"output_type", po::value<std::string>(&ip.output_type)->default_value("file"), "output_type", po::value<std::string>(&ip.output_type)->default_value("file"),
"output type [dada, file, profile]. Default is file. Profile executes the spectrometer 10x on random data and passes the ouput to a null sink." "output type [dada, file, profile]. Default is file. Profile executes the spectrometer 10x on random data and passes the ouput to a null sink."
); );
desc.add_options()(
"output_bit_depth", po::value<unsigned int>(&output_bit_depth)->default_value(32),
"output_bit_depth [8, 32]. Default is 32."
);
desc.add_options()( desc.add_options()(
"output_key,o", po::value<std::string>(&ip.filename)->default_value(default_filename), "output_key,o", po::value<std::string>(&ip.filename)->default_value(default_filename),
"The key of the output bnuffer / name of the output file to write spectra " "The key of the output bnuffer / name of the output file to write spectra "
...@@ -204,17 +194,6 @@ int main(int argc, char **argv) { ...@@ -204,17 +194,6 @@ int main(int argc, char **argv) {
desc.add_options()("naccumulate,a", desc.add_options()("naccumulate,a",
po::value<size_t>(&ip.naccumulate)->required(), po::value<size_t>(&ip.naccumulate)->required(),
"The number of samples to integrate in each channel"); "The number of samples to integrate in each channel");
desc.add_options()("input_level",
po::value<float>()->default_value(100.)->notifier(
[&ip](float in) { ip.input_level = in; }),
"The input power level (standard "
"deviation, used for 8-bit conversion)");
desc.add_options()("output_level",
po::value<float>()->default_value(100.)->notifier(
[&ip](float in) { ip.output_level = in; }),
"The output power level (standard "
"deviation, used for 8-bit "
"conversion)");
desc.add_options()( desc.add_options()(
"log_level", po::value<std::string>()->default_value("info")->notifier( "log_level", po::value<std::string>()->default_value("info")->notifier(
[](std::string level) { set_log_level(level); }), [](std::string level) { set_log_level(level); }),
...@@ -269,16 +248,7 @@ int main(int argc, char **argv) { ...@@ -269,16 +248,7 @@ int main(int argc, char **argv) {
ip.dadaBufferLayout.intitialize(input_key, ip.speadHeapSize, ip.nSideChannels); ip.dadaBufferLayout.intitialize(input_key, ip.speadHeapSize, ip.nSideChannels);
// ToDo: Supprot only single output depth
if (output_bit_depth == 32)
{
io_eval<float>(ip, input_polarizations, output_format); io_eval<float>(ip, input_polarizations, output_format);
}
else
{
throw po::validation_error(po::validation_error::invalid_option_value, "Output bit depth must be 8 or 32");
}
} catch (std::exception &e) { } catch (std::exception &e) {
std::cerr << "Unhandled Exception reached the top of main: " << e.what() std::cerr << "Unhandled Exception reached the top of main: " << e.what()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment