Nabu issueshttps://gitlab.esrf.fr/tomotools/nabu/-/issues2021-04-26T18:21:17+02:00https://gitlab.esrf.fr/tomotools/nabu/-/issues/246Double flatfield: issues when using LimitedMemory pipeline2021-04-26T18:21:17+02:00Pierre PaleoDouble flatfield: issues when using LimitedMemory pipelineReported by Ludo and Bratislav.
In some cases, the "double flatfield" works differently when used on a single slice, on a whole volume, or on a subvolume.
![ijump1](/uploads/20e9aebbaf0b787b967055d34f13d0d9/ijump1.png)
![ijump2](/uplo...Reported by Ludo and Bratislav.
In some cases, the "double flatfield" works differently when used on a single slice, on a whole volume, or on a subvolume.
![ijump1](/uploads/20e9aebbaf0b787b967055d34f13d0d9/ijump1.png)
![ijump2](/uploads/635d396b0af5e270e1800adb85a4f14a/ijump2.png)
The likely reason is that the underlying pipeline `CudaFullFieldPipelineLimitedMemory` computes one DFF for projections `[0, ..., n_1]`, then another DFF for projections `[n_1 + 1, ..., n_2]`, and so on. The "true" DFF is different than DFF computed on sub-stack of projections.
There is no solution for `CudaFullFieldPipelineLimitedMemory` and `FullRadiosPipeline` outside computing the DFF in a first stage. Therefore, a CLI tool should be provided to generate a DFF file, which can be used afterwise.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/244Auto-CoR on sinograms instead of projections2021-04-22T12:48:53+02:00Nicola ViganoAuto-CoR on sinograms instead of projections## Description of the problem
Currently, from the configuration file, we can only request auto-CoR on 0-180 degree projections.
Working with sinograms is mandatory with XRD-CT and highly valuable with half-acquisitions (full-field with r...## Description of the problem
Currently, from the configuration file, we can only request auto-CoR on 0-180 degree projections.
Working with sinograms is mandatory with XRD-CT and highly valuable with half-acquisitions (full-field with rotation axis on one side).
## Proposed solution
I propose adding an option for activating it along the line of `slice`, which automatically implies that the auto-CoR should be in the sinogram domain.
Concerning the values, I am not sure what the best strategy would be. I can think of a few:
- a percentage of the projection's height, in the interval [0, 1].
- a slice number, starting from 0.
- a string including ["top", "center", "bottom"], where the values correspond to [0.1, 0.5, 0.9] in percentages.
It would be great if we could find a way to make these three options all available (with some mechanics to specify their meaning).
## Further benefits for the future
This will also be beneficial to the auto-tilt functionality of #239 down the line.
In that case, we could imagine a similar keyword called `slices`, which could have a list of (at least 2) different slices for computing the tilt of the detector, by using the sinograms.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/243Double flatfield: CLI tool + parmeter in config file2021-04-28T15:12:57+02:00Pierre PaleoDouble flatfield: CLI tool + parmeter in config fileRelated to #235
A CLI tool `nabu-doubleflatfield` could be used to generate a `doubleflatfield.h5` file.
This file could then be provided in `nabu.conf` for double flatfield.Related to #235
A CLI tool `nabu-doubleflatfield` could be used to generate a `doubleflatfield.h5` file.
This file could then be provided in `nabu.conf` for double flatfield.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/229alignment: Close ploting windows when using verbose mode2021-03-18T10:06:48+01:00Pierre Paleoalignment: Close ploting windows when using verbose modeWhen classes of the `preproc.alignment` module are instantiated with `verbose=True`, ploting window are created.
In order to have a proper deletion, it would be good to keep the ploting object in the class.When classes of the `preproc.alignment` module are instantiated with `verbose=True`, ploting window are created.
In order to have a proper deletion, it would be good to keep the ploting object in the class.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/227Resume a pipeline from sinograms2021-04-28T10:31:17+02:00Pierre PaleoResume a pipeline from sinogramsIt should be possible to resume a processing pipeline from sinograms, both with `FullFieldPipeline` and `FullRadiosPipeline`.It should be possible to resume a processing pipeline from sinograms, both with `FullFieldPipeline` and `FullRadiosPipeline`.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/226Dump sinograms2021-04-28T10:31:17+02:00Pierre PaleoDump sinogramsIt should be made possible to dump the sinograms while executing the reconstruction pipeline, without necessarily stopping the processing. For example
```
save_sinograms = [bool|path]
...
[reconstruction]
method = [none|fbp] # if set to ...It should be made possible to dump the sinograms while executing the reconstruction pipeline, without necessarily stopping the processing. For example
```
save_sinograms = [bool|path]
...
[reconstruction]
method = [none|fbp] # if set to none, only sinograms are generated
```
Related to #218.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/223Support full-radio processing up to sinograms generation2021-03-30T16:04:53+02:00Pierre PaleoSupport full-radio processing up to sinograms generationThe current Full-Field pipeline implementations process the data by slabs of projections: each `FullFieldPipeline` object handles a sub-volume `radios[:, start_z:end_z, :]`.
However, in some settings, it is necessary to process the ful...The current Full-Field pipeline implementations process the data by slabs of projections: each `FullFieldPipeline` object handles a sub-volume `radios[:, start_z:end_z, :]`.
However, in some settings, it is necessary to process the full radio (ex. CTF phase retrieval with a filter spanning the whole image). In this case, a high-level view of the pipeline consists in these main steps:
1. Processing steps on full radios
2. Build the sinograms from the radios
3. Processing steps on stack of sinograms
Here are two possible solutions.
## Solution 1: using two classes
A class `FullRadiosPipeline` processes groups of radios. Ex: `radios[100:200, :, :]`, `radios[200:300, :, :]`, etc.
Another class `SinosStackProcessing` processes stacks of sinograms. Ex: `radios[:, 100:200, :] == sinos[100:200, :, :]`.
The main difficulty is how the data is passed from one class to the other, especially for datasets not fitting in memory (which is usually the case).
Therefore, a group of radios processed by a `FullRadiosPipeline` instance is either dumped in a file (`nabu_processes.h5`, temporary file) or kept in memory.
Once all the radios are processed (either by sequentially instantiating `FullRadiosPipeline` objects, or by distributing them), the class `SinosStackProcessing` is used to reconstruct slabs of slices.
This approach offers the advantage of easily allowing the workload distribution of both the radios processing and the sinos processing. There is one synchronization point (waiting that all the radios are processed to build the sinograms) but it cannot be avoided.
## Solution 2: using one class
An alternative could be to write one specialized pipeline dealing with this use case, in one single class, like in `CudaFullFieldPipelineLimitedMemory`.
While it might be simpler to implement (debatable), it would not easily allow to distribute the workload.
## Remarks
I would advocate for solution 1 as it seems to be more flexible.
The main technical difficulty will be how we save the processed radios:
- If the configuration changes, new radios must be saved. Should it overwrite the old radios to save space ?
- Otherwise, existing radios must be loaded from an existing file (if any)
- Importantly, writing to files should be avoided when possible. For "small" datasets fitting in memory, only one `FullRadiosProcessing` instance can be used, and then `SinosStackProcessing` would use in-memory radios.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/222Detect and auto-correct camera tilt2021-03-31T15:32:14+02:00Pierre PaleoDetect and auto-correct camera tiltFollow-up of !102.
It would be good to detect and automatically correct tilts.
In the configuration file, we could add a new key in the same spirit of `rotation_axis_position`:
`tilt_correction = [auto|algo1|algo2|value]`
where
-...Follow-up of !102.
It would be good to detect and automatically correct tilts.
In the configuration file, we could add a new key in the same spirit of `rotation_axis_position`:
`tilt_correction = [auto|algo1|algo2|value]`
where
- `auto` is the default automatic tilt computation method (it's up to us to decide which one)
- `algo1`, `algo2` refer to tilt computation methods
- `value` is a scalar chosen by the userRelease 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/220nabu-generate-info with half tomography2021-03-16T09:50:54+01:00Pierre Paleonabu-generate-info with half tomographyNUM_X and NUM_Y values are not correct in the generated .info file in the case of half acquisition
(to be confirmed)NUM_X and NUM_Y values are not correct in the generated .info file in the case of half acquisition
(to be confirmed)Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/219overwrite option not working for EDF2021-03-16T09:50:49+01:00Pierre Paleooverwrite option not working for EDFEven if the "overwrite" option is activated in .conf file, slices are added the one after the other in the .edf file
(to be confirmed)Even if the "overwrite" option is activated in .conf file, slices are added the one after the other in the .edf file
(to be confirmed)Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/218Reconstruct a slice for several with several center of rotations2021-04-28T11:04:33+02:00paynoReconstruct a slice for several with several center of rotationsIn some case we want to reconstruct the same slice with several cor values.
For now we have to launch n reconstruction and generation of the sinogram is done each time.
To speed up we could either:
- full y handle this use case
- cre...In some case we want to reconstruct the same slice with several cor values.
For now we have to launch n reconstruction and generation of the sinogram is done each time.
To speed up we could either:
- full y handle this use case
- create a cache on the sinogram creation and the user would benefit from it if keep his instances of nabu classes
- add a way to get sinogram from nabu process and a function to directly reconstruct from it
* other...Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/213Pre-processing: Adding CTF based single-distance phase-retrieval2021-03-31T15:04:32+02:00Nicola ViganoPre-processing: Adding CTF based single-distance phase-retrievalSome of the ESRF beamlines (e.g. ID16A) often use different filters other than the Paganin filter for phase-retrieval.
Here we ask for the inclusion of support for the contrast transfer function (CTF) single-distance phase-retrieval.
A ...Some of the ESRF beamlines (e.g. ID16A) often use different filters other than the Paganin filter for phase-retrieval.
Here we ask for the inclusion of support for the contrast transfer function (CTF) single-distance phase-retrieval.
A comprehensive description of the CTF and it's derivation / usage can be found here: https://doi.org/10.1364/OE.26.011110 ( equation (8) for single distance; Equation (16) for multiple distances).Release 2021.1.0Nicola ViganoNicola Viganohttps://gitlab.esrf.fr/tomotools/nabu/-/issues/210Rotate projection images2021-03-16T09:50:42+01:00Pierre PaleoRotate projection imagesAsked by @ludwig.
Let the reference frame be as follows, with the origin on the sample stage:
![ref_frame](/uploads/44881907afcd3e867bc73bfaa4253c55/ref_frame.png)
The rotation axis can be tilted by a solid angle spanned by two planar...Asked by @ludwig.
Let the reference frame be as follows, with the origin on the sample stage:
![ref_frame](/uploads/44881907afcd3e867bc73bfaa4253c55/ref_frame.png)
The rotation axis can be tilted by a solid angle spanned by two planar angles `(alpha, beta)`:
1. Planar rotation around the axis **x** with angle `alpha`
2. Planar rotation around the axis **y** with angle `beta`
Case (1):
![ref_frame_tilt1](/uploads/c1938d5d7f12521cf8592a15a993e352/ref_frame_tilt1.png)
Case (2):
![ref_frame_tilt2](/uploads/9cee6b204b01e3603d88b02d6d0a322d/ref_frame_tilt2.png)
The generic solution is to account for this tilt in the backprojector.
In case (2), however, things can be handled by first rotating the projection images. The filling mode can be set to "edges" (see scipy documentation) to handle local tomography.Release 2021.1.0https://gitlab.esrf.fr/tomotools/nabu/-/issues/44Implement CTF Phase retrieval2021-03-31T15:04:33+02:00Pierre PaleoImplement CTF Phase retrievalImplement phase retrieval based on contrast transfer function. See for example [this study](https://www.osapublishing.org/oe/abstract.cfm?uri=oe-26-9-11110).Implement phase retrieval based on contrast transfer function. See for example [this study](https://www.osapublishing.org/oe/abstract.cfm?uri=oe-26-9-11110).Release 2021.1.0