-
Notifications
You must be signed in to change notification settings - Fork 1
Incorporating skycleaver functionality to skyweaver #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pipeline_dev
Are you sure you want to change the base?
Conversation
…annel cfreq change
cmake/compiler_settings.cmake
Outdated
|
|
||
| # Set compiler flags | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fopenmp") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fopenmp -std=gnu++20") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++ standard should be set in compiler_settings.cmake with
set (CMAKE_CXX_STANDARD 20)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed this and added set (CMAKE_CXX_STANDARD 20)
|
|
||
|
|
||
| // also the at() method | ||
| auto& at(std::size_t idx) { return _vector[idx]; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What purpose does this serve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is another function in std::vector that I tried to mimic here. Not required but good to have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion, we decided to keep this in.
cpp/skyweaver/MultiFileWriter.cuh
Outdated
| : header_size(header_size), max_file_size(max_file_size), | ||
| stokes_mode(stokes_mode), output_dir(output_dir), prefix(prefix), | ||
| extension(extension), output_basename("") {}; | ||
| MultiFileWriterConfig(MultiFileWriterConfig const& other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for implementing these constructors? The class member variables are all either trivial types or types with RAII behaviour, so you shouldn't need to write custom copy constructors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was originally not RAII, but now they are, but the constructors were left over. I will delete them.
cpp/skyweaver/MultiFileWriter.cuh
Outdated
| stokes_mode(other.stokes_mode), output_dir(other.output_dir), | ||
| base_output_dir(other.base_output_dir), prefix(other.prefix), | ||
| extension(other.extension), output_basename(other.output_basename) {}; | ||
| MultiFileWriterConfig& operator=(MultiFileWriterConfig const& other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
| MultiFileWriter(PipelineConfig const& config, | ||
| std::string tag, | ||
| CreateStreamCallBackType create_stream_callback); | ||
| MultiFileWriter(MultiFileWriterConfig config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this pass by value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be const& or you will get a double copy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't be const as I will edit some values inside, but it can be pass by reference.
cpp/skyweaver/ObservationHeader.hpp
Outdated
| double fch1 = 0.0; // Centre frequency of the first channel | ||
| double foff = 0.0; // Frequency offset between channels | ||
|
|
||
| bool sigproc_params = false; // Whether to include sigproc parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used for control somewhere? It seems to only be on the to_string call for the header.
| CreateStreamCallBackType create_stream_callback) | ||
| : _tag(tag), _create_stream_callback(create_stream_callback) | ||
| { | ||
| MultiFileWriterConfig writer_config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do this rather than just writing the parameters on the _config? You already have a stack allocated instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Residual code from previous changes, will clean it up.
| std::size_t end = 0; | ||
| while(end != std::string::npos) { | ||
| end = str.find(',', start); | ||
| values.push_back(std::stof(str.substr(start, end - start))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use some error handling, as the stof doesn't throw (see comments on hennings PR).
| std::vector<std::string> dec_s; | ||
| boost::split(ra_s, ra_val, boost::is_any_of(":")); | ||
| boost::split(dec_s, dec_val, boost::is_any_of(":")); | ||
| ra = stod(boost::join(ra_s, "")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment on error handling here. as stod doesn't throw
Add .tmp suffix to output filenames, and remove it when they are closed.
Filename frequency fix
…r consistency with the others
Optional output of stats and incoherent beam files
Fix integer overflow in SkyCleaver's expected bridge frequencies
|
@vivekvenkris This request has gone on too long. At this point SkyCleaver is the defacto main branch. |
…_ptr is not guaranteed, tests now passing
…_ptr is not guaranteed, tests now passing
Skycleaver tdb order fix
Prototype fix for threading of CB handler (WIP)
…into skycleaver
Split TDB output file into several files with fewer beams, version 2
Skycleaver functionality that takes
fnumber of.tdbfiles and producesd*bnumber of filterbank files. Currently only works for total intensity.