OSMAPOSLParameters :=
; example file for running OSEM with interfiltering
; filter specific things are at the end
; WARNING: At least up to STIR 2.4 this will use the default projectors
; which are unmatched (ray tracing forward projector, interpolating backprojector).
; This is NOT recommended. 
; From STIR 3.0 onwards, a matching projector is used, but it is based on 
; ray tracing a single line, which leads to some discretisation artefacts.
; See OSMAPOSL_emml_with_projmatrix.par how to specify a different projection matrix.

objective function type:= PoissonLogLikelihoodWithLinearModelForMeanAndProjData
PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:=

input file := test.hs

; if disabled, defaults to maximum segment number in the file
maximum absolute segment number to process := 4
; see User's Guide to see when you need this
zero end planes of segment 0:= 1


; normalisation (and attenuation correction)

  ; time info can be used for dead-time correction 
  ; (currently only used when using ECAT7 .n files)
  ; see TimeFrameDefinitions
  time frame definition filename :=
  ; starts from 1
  time frame number :=
  ; see BinNormalisation hierarchy for possible values
  Bin Normalisation type := Chained
	Chained Bin Normalisation Parameters:=
	Bin Normalisation to apply first:= From ECAT7
	  Bin Normalisation From ECAT7:=
		  normalisation_ECAT7_filename:= STUDY.n
		  singles rates := Singles From ECAT7 File
		  Singles Rates From ECAT7 File:=
		     ECAT7_filename := ecat7_sinogram.S
		  End Singles Rates From ECAT7:=
	  End Bin Normalisation From ECAT7:=
	; or if normalisation factors are in a file
        ; Bin Normalisation to apply first:= From ProjData
	;   Bin Normalisation From ProjData :=
	;     normalisation projdata filename:= norm.hs
	; End Bin Normalisation From ProjData:=

	Bin Normalisation to apply second:= From Attenuation Image
		Bin Normalisation From Attenuation Image:=
			attenuation_image_filename := <string>
			;forward projector type := <string>
	End Bin Normalisation From Attenuation Image :=
  END Chained Bin Normalisation Parameters:=

; if next is set to 1, sensitivity will be recomputed
; and also written to file (if "sensitivity filename" or "subset sensitivity filenames" is set)
; if it is zero, the sensitivity will be read from file
 recompute sensitivity := 0
 use subset sensitivities:=1 ; recommended
 ; optional filename to store/read the sensitivity image 
 ; (if "use subset sensitivity" is off)
 ;sensitivity filename:=
 ; optional filename to store/read the subsensitivities
 ; use %d where you want the subset-number (a la printf)
 subset sensitivity filenames:= sens_%d.hv


; specify additive projection data to handle randoms or so
; see User's Guide for more info
additive sinogram := 0

; output image sizes
; warning: will likely disappear. Use "initial estimate" instead

; choose size of pixels
; x,y pixel size = bin_size/zoom
zoom := 1
; number of x,y pixels (-1 takes default value to cover the FOV)
xy output image size (in pixels) := -1

end PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:=

; Number of subsets should be a divisor of num_views/4
number of subsets:= 12
; Use for starting the numbering from something else than 1
;start at subiteration number:=1
; Use if you want to start from another subset than 0 (but why?)
;start at subset:= 0
number of subiterations:= 24
save estimates at subiteration intervals:= 12

; initial estimate := some_image
; enable this when you read an initial estimate with negative data
enforce initial positivity condition:=0


inter-update filter subiteration interval:= 0
inter-update filter type := None

inter-iteration filter subiteration interval:= 4
inter-iteration filter type := Separable Cartesian Metz
  Separable Cartesian Metz Filter Parameters :=
  x-dir filter FWHM (in mm):= 6.0
  y-dir filter FWHM (in mm):= 6.0
  z-dir filter FWHM (in mm):= 6.0
  x-dir filter Metz power:= 0.0
  y-dir filter Metz power:= 0.0
  z-dir filter Metz power:= 0.0
END Separable Cartesian Metz Filter Parameters :=

post-filter type := None

END :=
