lm_to_projdata output filename prefix with "." leads to suffix issue
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
Playing with lm_to_projdata.par output filename prefix and the usage of output filename prefix := Unlisted/Delayed/Sim_test.Delayed results in filename header Sim_test.hs and binary Sim_test.Delayed_f1g1d0b0. Sim_test.hs does link correctly with name of data file := Sim_test.Delayed_f1g1d0b0.
Tracking this down it leads to
https://github.com/UCL/STIR/blob/aae4c92e9cb63699997573b4e02b78fdb86d373d/src/listmode_buildblock/LmToProjData.cxx#L827
which is defined
https://github.com/UCL/STIR/blob/aae4c92e9cb63699997573b4e02b78fdb86d373d/src/IO/interfile.cxx#L1439-L1474
In the lm_to_projdata.parfile, using output filename prefix := Unlisted/Delayed/Sim_test.Delayed.hs (adding the .hs which the above method can handle) results in file outputs of Sim_test.Delayed.hs (expected header) and Sim_test.Delayed.hs_f1g1d0b0 (wierd). This is becasue of
https://github.com/UCL/STIR/blob/aae4c92e9cb63699997573b4e02b78fdb86d373d/src/listmode_buildblock/LmToProjData.cxx#L565-L567
which is called before the filename is passed to write_basic_interfile_PDFS_header.
This is more of an annoyance than anything else. Functionally everything is okay, naming convention is just not consistant.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced filename handling in src/listmode_buildblock/LmToProjData.cxx around lines 565-567 and 827, then inspect the cited write_basic_interfile_PDFS_header implementation in src/IO/interfile.cxx. Reproduce both parameter-file cases and make the header and binary filenames follow one consistent prefix convention without breaking the existing link between them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100