# HST_SLAVE PARAMETER FILE

# Parameters defining the projection file series
#FILE_PREFIX = /data/visitor//in904/id19/0.28_19keV_Tristan_mousse_syntact__xc15_gap17/0.28_19keV_Tristan_mousse_syntact__xc15_gap17
FILE_PREFIX = /data/id19/industry/mousse-in904/0.28_19keV_Tristan_mousse_syntact__xc15_gap17

NUM_FIRST_IMAGE = 0 # No. of first projection file
NUM_LAST_IMAGE = 1999 # No. of last projection file
NUMBER_LENGTH_VARIES = NO
LENGTH_OF_NUMERICAL_PART = 4 # No. of characters
FILE_POSTFIX = .edf
FILE_INTERVAL = 1 # Interval between input files

# Parameters defining the projection file format
NUM_IMAGE_1 = 2048 # Number of pixels horizontally
NUM_IMAGE_2 = 2048 # Number of pixels vertically
IMAGE_PIXEL_SIZE_1 = 0.279441 # Pixel size horizontally (microns)
IMAGE_PIXEL_SIZE_2 = 0.279441 # Pixel size vertically

# Parameters defining background treatment
SUBTRACT_BACKGROUND = YES # Subtract background from data
BACKGROUND_FILE = dark.edf
#BACKGROUND_FILE = /data/visitor//in904/id19/0.28_19keV_Tristan_mousse_syntact__xc15_gap17/dark.edf


# Parameters defining flat-field treatment
CORRECT_FLATFIELD = YES # Divide by flat-field image
FLATFIELD_CHANGING = YES # Series of flat-field files
FLATFIELD_FILE = N.A.
FF_PREFIX = refHST
FF_NUM_FIRST_IMAGE = 0 # No. of first flat-field file
FF_NUM_LAST_IMAGE = 2000 # No. of last flat-field file
FF_NUMBER_LENGTH_VARIES = NO
FF_LENGTH_OF_NUMERICAL_PART = 4 # No. of characters
FF_POSTFIX = .edf
FF_FILE_INTERVAL = 2000 # Interval between flat-field files

TAKE_LOGARITHM = YES # Take log of projection values

# Parameters defining experiment
ANGLE_BETWEEN_PROJECTIONS = 0.090000 # Increment angle in degrees
ROTATION_VERTICAL = YES
ROTATION_AXIS_POSITION = 1004.243482 # Position in pixels

# Parameters defining reconstruction
OUTPUT_SINOGRAMS = NO # Output sinograms to files or not
OUTPUT_RECONSTRUCTION = YES # Reconstruct and save or not
START_VOXEL_1 =      1 # X-start of reconstruction volume
START_VOXEL_2 =      1 # Y-start of reconstruction volume
START_VOXEL_3 =    829 # Z-start of reconstruction volume
END_VOXEL_1 =   int(2048*1.0) # X-end of reconstruction volume
END_VOXEL_2 =   int(2048*1.0) # Y-end of reconstruction volume
END_VOXEL_3 =    829 # Z-end of reconstruction volume
OVERSAMPLING_FACTOR = 4 # 0 = Linear, 1 = Nearest pixel
ANGLE_OFFSET = 0.000000 # Reconstruction rotation offset angle in degrees
CACHE_KILOBYTES = 1024 # Size of processor cache (L2) per processor (KBytes)
SINOGRAM_MEGABYTES = 1000 # Maximum size of sinogram storage (megabytes)

# Parameters extra features PyHST
DO_CCD_FILTER = YES # CCD filter (spikes)
CCD_FILTER = "CCD_Filter"
CCD_FILTER_PARA = {"threshold": 0.040000 }
DO_SINO_FILTER = NO # Sinogram filter (rings)
SINO_FILTER = "SINO_Filter"
ar = Numeric.ones(2048,'f')
ar[0]=0.0
ar[2:18]=0.0
SINO_FILTER_PARA = {"FILTER": ar }
DO_AXIS_CORRECTION = NO # Axis correction
AXIS_CORRECTION_FILE = correct.txt
OPTIONS= { 'padding':'E' , 'axis_to_the_center':'Y' , 'avoidhalftomo':'Y'} # Padding and position axis
NSLICESATONCE=200  # limiting the number of slices at once to not crash the memory 

# Parameters for Paganin reconstruction
# delta over beta ratio for Paganin phase retrieval = 100.00 
DO_PAGANIN = 1 
PAGANIN_Lmicron = 17.558273 
PAGANIN_MARGE = 20 
DO_OUTPUT_PAGANIN = 0 
OUTPUT_PAGANIN_FILE = paga_cufft 
PAGANIN_TRY_CUFFT = 1 
PAGANIN_TRY_FFTW = 1 

# Parameters for unsharp masking on the radiographs
UNSHARP_LOG = 0 
PUS = 0.800000 
PUC = 3.000000 
ZEROCLIPVALUE = 0.0001 # Minimum value of radiographs after flat / before log

# Parameters defining output file / format
OUTPUT_FILE = rec

# Reconstruction program options
DISPLAY_GRAPHICS = NO # No images


 
#DENOISING
DENOISING_TYPE=1
DO_PRECONDITION=1
RING_ALPHA=10#2.1

#Rings removal - DL
ITER_RING_SIZE=200
ITER_RING_BETA= 0.0001# *10000 #0.1
ITER_RING_HEIGHT=5500.0


ZEROOFFMASK=0
LIPSCHITZ_ITERATIONS=20
LIPSCHITZFACTOR=1.2


STRAIGTHEN_SINOS=1

ITERATIVE_CORRECTIONS=700*2*0
DENOISING_TYPE=4
PATCHES_FILE = patcheslena.h5
FISTA=1
STEPFORPATCHES = 4
BETA_TV =  35.000000e+01 /10000.0 #0.035
WEIGHT_OVERLAP=20.000000e+00
PRECOND_FILTER_DL=1

#For TV :
BETA_TV = 0.0035*100
DENOISING_TYPE=1
OPTIM_ALGORITHM=3
RING_ALPHA=1 #For C-P
ITER_RING_SIZE=200
ITER_RING_BETA=0.000001
ITER_RING_HEIGHT=5500.0

#
#not-so-bad params :
#
#BETA_TV = 0.0035*100
#ITER_RING_BETA=0.00001
#ITER_RING_HEIGHT=5500.0

OUTPUT_SINOGRAMS = YES
OUTPUT_FILE = sino_
