# Driving Options¶

===The following documentation has been extracted automatically from the comments found in the source code. Discard Parameters. object variable.

class`Parameters_module.`

`Parameters`

¶The input variables are read from the input file. The input file is written with python syntax. The Input file is interpreted as python after a preprocessing The preprocessing was introduced at the time of HST-> PYHST transition to maintaing compatibility with:

NO/YES meaning 0/1

items containing FILE in their name can be initialized without using the “” which are otherwise necessary for strings

The input file has to set (some of) the following variables. To setup easily an input file you are suggested to start from one of the examples given in the doc.

`BINNING`

= 1¶This option, when >1, activated the binning of your data. (mind that this is a barely tested option)

`DOUBLEFFCORRECTION_ONTHEFLY`

= 0¶This parameter is similar to DOUBLEFFCORRECTION, but the double flat field is computed on the fly. Mind that if DOUBLEFFCORRECTION_ONTHEFLY > 0, then we should have DOUBLEFFCORRECTION = 0. In the current version, this parameter does not work for helical tomography.

If DOUBLEFFCORRECTION_ONTHEFLY is not zero, all the projections are averaged. A file “projectionsmean.edf” is generated. This file is used as a double flat-field correction.

If FF2_SIGMA > 0, the average is high-pass filtered, where the filter is a complementary Gaussian function of STD FF2_SIGMA. A file “projectionsmean_filt.edf” is generated. This filtered average is used as a double flat field instead of the plain average.

`FBFILTER`

= 0¶

FBFILTER = -1 : no fourier filtering is done (plain back-projection)

FBFILTER = 0 : naif ramp filter ( default)

FBFILTER = 1 : Ramp filter for the discretized case http://www.mathematica-journal.com/issue/v6i2/article/murrell/murrell.pdf

FBFILTER = 2 : A filter used for interferometry : an integration is done. Then the discretized ramp filter is used

FBFILTER = 3 : A filter which goes like abs(sin(x*PI)) with x=0 for the 0 frequency, 0.5 for the niquyst

FBFILTER > 4 and FBFILTER <= 5 : A filter which goes like |x|-alpha*x*x. X being 1 at Niquyst and alpha=FBFILTER-4

FBFILTER = 10 : DFI method implemented by Roman Shkarin

`FF2_SIGMA`

= 0.0¶This parameter is relevant for DOUBLEFFCORRECTION_ONTHEFLY > 0. If FF2_SIGMA > 0, the average of the projections is high-pass filtered, where the filter is a complementary Gaussian function of STD FF2_SIGMA. This filtered average is used as a double flat field instead of the plain average.

`OPTIONS`

= {'avoidhalftomo': 0, 'axis_to_the_center': 1, 'padding': 'E'}¶

- This is a python dictionary which may contain the following keys :

- axis_to_the_center: 1 or 0
If 1 is chosen the reconstructed region is centered over the rotation axis.

- avoidhalftomo1 -1 or 0
when set to zero, half-tomo is activated when the following condition is satisfied

ANGLE_BETWEEN_PROJECTIONS*num_projections = 2*PI +/-0.001where num_projections is the number of projection which is deduced from NUM_FIRST_IMAGE, NUM_LAST_IMAGE and FILE_INTERVAL

When it is set to -1, it is always activated

- padding“E” or “0” (mind the quotes)
this options concerns the Fourier filtering in the Filtered Back Projection(FBP) method. In FBP a convolution kernel is applied ( whose kind is selected through the FBFILTER parameter ) to the data. At the border of the data region (detector has a limited size ) the tails of the kernels goes outside the data region, and there are two options to pad it:

- “E”:
the data is padded extending the border pixel value beyond the border limit.

- “0”
the data is padded with zeros

The total extent of the padded data after padding is given by the smallest power of 2 which is greater or equal to 2*num_bins, where num_bins is the detector width. The obtained number is again multiplied by two to host extra symmetric padding in the case of half-tomo reconstruction.

Padding for Half-Tomo: How it works

- When “E” padding is selected, in the half-tomo case the padding is done :

beyond the close-to-the-axis border using the theta+180 projection (or the projection with the nearest angle when theta+180 is missing)

beyond the far-from-the-axis border, extending the projection border value.

`OVERSAMPLING_FACTOR`

= 4¶Oversampling factor : the to-be-backprojected data are oversampled. Then nearest neighbour approximation is used. When using GPU this parameter has no effect : linear interpolation is done at the hardware level

`PENTEZONE`

= 10.0¶Doing Half-tomo, each projection has an overlapping region, around the rotation axis, whose rotated duplicate can be found at the theta+180 angle. When doing backprojection the core of this region is multiplied by 0.5 to compensate the fact that this region is counted twice, if one considers also the duplicate. The periferical part keeps its wheight=1, while we introduce through the PENTEZONE parametre two transition regions where the weight goes from 1 to 0.5 on one side of the core region, and from 0.5 on the other size. Both transition have width=PENTEZONE

`STRAIGTHEN_SINOS`

= 0¶This option can be used when your reconstructed slice has a strong cupping that you want to remove. In general this problem occurs in local-tomography. When this option is activated each sinogram slice is fitted with a sum of Chebychev polynomia up to order 2, the result of the fit is subtracted from the line.

`SUMRULE`

= 0¶if SUMRULE=1 then, after reconstruction, a constant value is added to the slice suche that the sum over the slice be equal to the sum over the sinogram

`TRYEDFCONSTANTHEADER`

= 1¶When enabled (default), PyHST assumes that all the projections have the same header size, if the first and the last do. This may lead to a slight gain of performance. If the projections do not have the same header size, then set this option to 0. If CURRENT_NAME is set, then TRYEDFCONSTANTHEADER is set to zero beacaus all projections need to be read.

`VERBOSITY`

= 10¶Level of verbosity

`ZEROOFFMASK`

= 1¶After reconstruction, sets to zero the region outside the reconstruction mask. The reconstruction mask is the set of pixel which is define as:

in the half-tomo case, those pixels which always have a projection points which falls on the detector for at-least half of the angles

in the standard case those pixels whose projection point always falls on the detector