diff --git a/psrdada_cpp/effelsberg/edd/GatedSpectrometer.cuh b/psrdada_cpp/effelsberg/edd/GatedSpectrometer.cuh index 827022d6d2ddf6b5b0f37e8a457b01e20e280c5e..7d9622629091245beb8c3b71f7100e89f8bbd08e 100644 --- a/psrdada_cpp/effelsberg/edd/GatedSpectrometer.cuh +++ b/psrdada_cpp/effelsberg/edd/GatedSpectrometer.cuh @@ -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(); diff --git a/psrdada_cpp/effelsberg/edd/GatedStokesSpectrometer.cuh b/psrdada_cpp/effelsberg/edd/GatedStokesSpectrometer.cuh index b55cb1940f7133ccb2ae5e2783b0d8ca7553b85f..21fd5a081c5982cc4aefcecc9398463a6c90b145 100644 --- a/psrdada_cpp/effelsberg/edd/GatedStokesSpectrometer.cuh +++ b/psrdada_cpp/effelsberg/edd/GatedStokesSpectrometer.cuh @@ -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(); diff --git a/psrdada_cpp/effelsberg/edd/detail/GatedSpectrometer.cu b/psrdada_cpp/effelsberg/edd/detail/GatedSpectrometer.cu index c77edc7d1a85013518481541b2f322ce1f2fb9b4..db69b92b64ea523f4cb731af4701fa9f1dd7881c 100644 --- a/psrdada_cpp/effelsberg/edd/detail/GatedSpectrometer.cu +++ b/psrdada_cpp/effelsberg/edd/detail/GatedSpectrometer.cu @@ -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), diff --git a/psrdada_cpp/effelsberg/edd/detail/GatedStokesSpectrometer.cu b/psrdada_cpp/effelsberg/edd/detail/GatedStokesSpectrometer.cu index fa590b5e115ee364c17e108e897dffb6bdc8a4f6..e1ccceb1ce6b6b7b5ae4f63bdb80d5df4a20ff6d 100644 --- a/psrdada_cpp/effelsberg/edd/detail/GatedStokesSpectrometer.cu +++ b/psrdada_cpp/effelsberg/edd/detail/GatedStokesSpectrometer.cu @@ -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), diff --git a/psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu b/psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu index 908c5ec5e86e581c4e92d864bdf2988f0689a947..be8bed6c8ee845c5d73099dce261cae36ae87093 100644 --- a/psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu +++ b/psrdada_cpp/effelsberg/edd/src/GatedSpectrometer_cli.cu @@ -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()