Output Interface

Output Interface

Calculation of the geometrical efficiency can be run in one of two modes aside from using geoEff, the interactive/direct mode and the batch mode.

Interactive/Direct Mode

GeoEfficiency.calcFunction.
calc(detector::Detector = Detector(), aSource::Tuple{Point, Float64, Float64,} = source())

calculate and display on the console the geometrical efficiency of the detector detector for the tuple aSource describing the source.

Throw an inValidGeometry if the source location is inappropriate.

see also: geoEff(::Detector, ::Tuple{Point, Float64, Float64})

Missing/No Argument(s)

if source description aSource alone or even both source description and detector detect are missing, the method prompt the user to complete the missing data via the console.

source

for repeated calculations.

GeoEfficiency.calcNFunction.
calcN()

calculate and display the geometrical efficiency repeatedly. Prompt the user to input a detector and a source from the console. Prompt the user repeatedly until it exit (give a choice to use the same detector or a new detector).

source

Batch Mode

Use batch() to let the program inspect the excel files containing the required information and run the calculations.

GeoEfficiency.batchFunction.
batch()

provide batch calculation of the geometrical efficiency based on the information provided by the CSV files by default located in C:\Users\Mohamed\GeoEfficiency.

results are saved on a CSV file(s) named after the detector(s). the CSV file(s) by default found in C:\Users\Mohamed\GeoEfficiency\results, also a log of the results are displayed on the console.

for more information on batch refer to batchInfo.

source
batch(
	detector::Detector,
	srcHeights_array::Vector{S},
	srcRhos_array::Vector{S}=[0.0],
	srcRadii_array::Vector{S}=[0.0],
	srcLengths_array::Vector{S}=[0.0],
	ispoint::Bool=true
	)::String 	where S <: Real

provide batch calculation of the geometrical efficiency for the detector detector. results are saved on a CSV file named after the detector. the CSV file by default found in C:\Users\Mohamed\GeoEfficiency\results. this method return the actual path to the CSV file. also a log of the results are displayed on the console.

  • srcHeights_array: list of source heights to feed to batch.
  • srcRhos_array: list of source off-axis distances to feed to batch.
  • srcRadii_array: list of source radii to feed to batch.
  • srcLengths_array: list of source lengths to feed to batch.

A set of sources is constructed of every valid combination of parameter in the srcRhos_array, srcRadii_array and srcLengths_array arrays with conjunction with ispoint.

point/cylinder source
  • If ispoint is true (the default) the source type is a point source and the parameters in srcRadii_array and srcLengths_array arrays is completely ignored.
  • If ispoint is false the parameters in srcRhos_array is completely ignored.
source
batch( 
	detectors_array::Vector{<: Detector},
    srcHeights_array::Vector{S},
    srcRhos_array::Vector{S}=[0.0],
    srcRadii_array::Vector{S}=[0.0],
    srcLengths_array::Vector{S}=[0.0],
	ispoint::Bool=true
	)::Vector{String} where S <: Real

same as batch(::Detector, ::Vector{Real},::Vector{Real},::Vector{Real},::Vector{Real},::Bool) but accept a list of detectors detectors_array. return a list of paths to the CSV of files (file for each detector) storing the results.

source
batch(
	detector_info_array::Matrix{S},
	srcHeights_array::Vector{S},
	srcRhos_array::Vector{S}=[0.0],
	srcRadii_array::Vector{S}=[0.0],
	srcLengths_array::Vector{S}=[0.0],
	ispoint::Bool=true
	)::Vector{String} 	where S <: Real

same as batch(::Vector{Detector}, ::Vector{Real},::Vector{Real},::Vector{Real},::Vector{Real},::Bool) but provide batch calculation of the geometrical efficiency for the detector in the detector_info_array after applying getDetectors. return a list of paths to the CSV of files (file for each detector) storing the results.

source

As mentioned above, the batch calculation controlled by CSV files. the following refer to information on the CSV files structure and location.

The function batch() can be called with or without arrangement(s). The without argument version relay on previously prepared Comma Saved Values [CSV] files, that can be easily edit by Microsoft Excel, by default located in the directory C:\Users\Mohamed\GeoEfficiency .

results of batch calculation are saved on a CSV file(s) named after the detector(s). the CSV file by default found in C:\Users\Mohamed\GeoEfficiency\results.

CSV input files

  • Detectors.csv contains the detectors description; The line format is:
	 Crystal_Radius | Crystal_Length | Hole_Radius | Hole_Depth |
	 ---------------| ---------------|-------------|----------- |
  • srcHeights.csv contains the source heights;
	 Source_Heights | 
	 ---------------|
  • srcRhos.csv contains the source off-axis distances;
	 Source_Rhos | 
 	 ------------|
  • srcRadii.csv contains the source radii for disc and cylindrical sources;
	 Source_Radii| 
	 ------------|
  • srcLengths.csv contains the source length for cylindrical sources;
	 Source_Lengths| 
	 --------------|

CSV results files

CSV file containing the results has columns of headers AnchorHeight, AnchorRho, srcRadius, srcLength, GeoEfficiency for non-point sources and columns of headers Height, Rho, GeoEfficiency for point sources.

Note

for Comma Saved Values [CSV] files each line represent an entry, the first line is always treated as the header.

Warning

the program expect each line to contain one number for all CSV files except for Detectors.csv each line should contain at least one number or at most four separated numbers.

source

The result of the batch calculation is also displayed in the console. the function max_batch(n::Real) can be used to give a hint (thus it may or may not apply) to the program to limit displayed results.

max_batch(n::Real)

set the value of _max_batch which give a hint to the program on maximum number of entries per detector displayed on the console in batch mode. This function do not affect the saving of the batch calculation.

Special Values
Negative value will display prevent batch results from printed to the `console`. 
while `Inf` will print all  batch results to the `console`.

see also: max_batch()

source

Also the without arguments max_batch() restore back the default value.

max_batch()

set the value of _max_batch which give a hint to the program on maximum number of entries per detector displayed on the console in batch mode. to its default value set by the constant max_display.

see also: max_batch(n::Real)

source

Before the batch mode start the user is asked to decide the source type. once the calculation is done the user can check the current setting for the source or modify it. for details see the next section.