Commit f210a689 authored by Tobias Winchen's avatar Tobias Winchen
Browse files

Removed obsolete options

parent 36075d34
......@@ -284,8 +284,6 @@ public:
* @param naccumulate Number of samples to integrate in the individual
* FFT bins
* @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
*
*/
......@@ -293,7 +291,6 @@ public:
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,
HandlerType &handler);
~GatedSpectrometer();
......
......@@ -61,8 +61,6 @@ public:
* @param naccumulate Number of samples to integrate in the individual
* FFT bins
* @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
*
*/
......@@ -70,7 +68,6 @@ public:
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,
HandlerType &handler);
~GatedStokesSpectrometer();
......
......@@ -67,7 +67,7 @@ template <class HandlerType, class InputType, class OutputType>
GatedSpectrometer<HandlerType, InputType, OutputType>::GatedSpectrometer(
const DadaBufferLayout &dadaBufferLayout, 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, HandlerType
std::size_t nbits, HandlerType
&handler) : _dadaBufferLayout(dadaBufferLayout),
_selectedSideChannel(selectedSideChannel), _selectedBit(selectedBit),
_fft_length(fft_length), _naccumulate(naccumulate),
......
......@@ -152,8 +152,7 @@ template <class HandlerType, class InputType>
GatedStokesSpectrometer<HandlerType>::GatedStokesSpectrometer(
const DadaBufferLayout &dadaBufferLayout,
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,
HandlerType &handler) : _dadaBufferLayout(dadaBufferLayout),
std::size_t nbits, HandlerType &handler) : _dadaBufferLayout(dadaBufferLayout),
_selectedSideChannel(selectedSideChannel), _selectedBit(selectedBit),
_fft_length(fft_length),
_naccumulate(naccumulate), _nbits(nbits), _handler(handler), _fft_plan(0),
......
......@@ -34,8 +34,6 @@ struct GatedSpectrometerInputParameters
size_t fft_length;
size_t naccumulate;
unsigned int nbits;
float input_level;
float output_level;
std::string filename;
std::string output_type;
};
......@@ -57,8 +55,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i)
effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType>
spectrometer(i.dadaBufferLayout,
i.selectedSideChannel, i.selectedBit,
i.fft_length, i.naccumulate, i.nbits, i.input_level,
i.output_level, sink);
i.fft_length, i.naccumulate, i.nbits, sink);
DadaInputStream<decltype(spectrometer)> istream(i.dadaBufferLayout.getInputkey(), log,
spectrometer);
......@@ -69,8 +66,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i)
DadaOutputStream sink(string_to_key(i.filename), log);
effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> spectrometer(i.dadaBufferLayout,
i.selectedSideChannel, i.selectedBit,
i.fft_length, i.naccumulate, i.nbits, i.input_level,
i.output_level, sink);
i.fft_length, i.naccumulate, i.nbits, sink);
DadaInputStream<decltype(spectrometer)> istream(i.dadaBufferLayout.getInputkey(), log,
spectrometer);
......@@ -81,8 +77,7 @@ void launchSpectrometer(const GatedSpectrometerInputParameters &i)
NullSink sink;
effelsberg::edd::GatedSpectrometer<decltype(sink), InputType, OutputType> spectrometer(i.dadaBufferLayout,
i.selectedSideChannel, i.selectedBit,
i.fft_length, i.naccumulate, i.nbits, i.input_level,
i.output_level, sink);
i.fft_length, i.naccumulate, i.nbits, sink);
std::vector<char> buffer(i.dadaBufferLayout.getBufferSize());
cudaHostRegister(buffer.data(), buffer.size(), cudaHostRegisterPortable);
......@@ -141,7 +136,6 @@ int main(int argc, char **argv) {
std::string input_polarizations = "Single";
std::string output_format = "Power";
unsigned int output_bit_depth;
/** Define and parse the program options
*/
......@@ -159,10 +153,6 @@ int main(int argc, char **argv) {
"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."
);
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()(
"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 "
......@@ -204,17 +194,6 @@ int main(int argc, char **argv) {
desc.add_options()("naccumulate,a",
po::value<size_t>(&ip.naccumulate)->required(),
"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()(
"log_level", po::value<std::string>()->default_value("info")->notifier(
[](std::string level) { set_log_level(level); }),
......@@ -269,16 +248,7 @@ int main(int argc, char **argv) {
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);
}
else
{
throw po::validation_error(po::validation_error::invalid_option_value, "Output bit depth must be 8 or 32");
}
io_eval<float>(ip, input_polarizations, output_format);
} catch (std::exception &e) {
std::cerr << "Unhandled Exception reached the top of main: " << e.what()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment