DiamondLightSource / DiamondLightSource/httomo
Log absolute path of input data in loader
- Dominant language
- Python
- Stars
- 10
- Forks
- 5
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
If the data path given to the CLI is a relative path, then the loader logging the input data path will be a _relative path_: https://github.com/DiamondLightSource/httomo/blob/bce8fc7ffd411d22a07dc21c0b4cc090b4dcaa77/httomo/loaders/standard_tomo_loader.py#L220-L223
This means that the `debug.log` file will contain a relative path rather than an absolute one, for example:
```
2024-05-17 17:29:23.555 | INFO | httomo.utils:log_once:54 - Pipeline has been separated into 2 sections
2024-05-17 17:29:23.556 | INFO | httomo.utils:log_once:64 - See the full log file at: /dls/tmp/twi18192/17-05-2024_17_29_14_output/user.log
2024-05-17 17:29:23.556 | INFO | httomo.utils:log_once:56 - Running loader (pattern=projection): standard_tomo...
2024-05-17 17:29:23.573 | DEBUG | httomo.utils:log_once:48 - The full dataset shape is (220, 128, 160)
2024-05-17 17:29:23.573 | DEBUG | httomo.utils:log_once:48 - Loading data: ../httomo/tests/test_data/tomo_standard.nxs
2024-05-17 17:29:23.573 | DEBUG | httomo.utils:log_once:48 - Path to data: entry1/tomo_entry/data/data
2024-05-17 17:29:23.573 | DEBUG | httomo.utils:log_once:48 - Preview: (0:180, 0:128, 0:160)
2024-05-17 17:29:23.573 | DEBUG | httomo.utils:log_once:48 - Data shape is (180, 128, 160) of type uint16
2024-05-17 17:29:23.573 | INFO | httomo.utils:log_once:60 - Finished loader: standard_tomo (httomo) Took 17.09ms
```
This is potentially not ideal for debugging purposes, and logging the absolute path to the input data would perhaps be more informative.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.