Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cpixe-calib.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "libcpixe.h"
#include "compilopt.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
int cpixecalib (void)

Variables

STATFILENAME inputfilename = "input-cal.in"


Detailed Description

cpixe-calib is an auxiliary program for creating the detector efficiency calibration files used by programs based on the LibCPIXE library.

cpixe-calib uses also the LibCPIXE library

See the libcpixe.c file for more information.

Definition in file cpixe-calib.c.


Function Documentation

int cpixecalib void   ) 
 

Calculates the efficiency coefficient based on experimental data and (hopefully) accurate description of the sample. The efficiency coefs have the following meaning:

"Number of counts that are expected in the detector for a given X-ray emission line induced by a 2MeV proton beam in an ideally thin target, per unit of irradiation charge (uC), per unit of solid angle (msr) and per 10^15 at/cm2 of the element"

Returns:
EXIT_SUCCESS if no error ocurred and "-1" if some error happened.

Todo:
This indicates that the filter is not going to be varied (Provisional)

Divide the calib yields by Xprod(Ecal) to obtain detector efficiency at the given emission energy. Tabulate [emission_energy,efficiency] --->Output

the detector efficiency can be fitted VS energy. The fit can be interpolated and converted back to calib yields for the elements/lines for which no experimental info was available (i.e. construct the calib file)

Definition at line 81 of file cpixe-calib.c.

References ELEMENT::A, EXTRAINFO::AreasFileNm, EXTRAINFO::AreasFormat, EXP_PARAM::BeamEner, SIM_PARAM::CalEner, FILTER::changes, SIM_PARAM::ColCharge, foil::comp, createPresentElems(), createSPTs(), EXTRAINFO::DBpath, DEG2RAD, EXP_PARAM::DetAng, EXP_PARAM::DetColFac, EXTRAINFO::DoCalibration, SIM_PARAM::DTCC, COMPOUND::elem, FILENMLENGTH, EXTRAINFO::FilterFileNm, FilterTrans(), FILTER::foil, fprintCALIBYLD(), freeFilter(), freeReusable(), EXP_PARAM::IncAng, initlyrarray(), inputfilename, integrate_Simpson(), EXP_PARAM::ion, CalibYld::K_, CalibYld::L_, CalibYld::M_, SIM_PARAM::MaxZinsample, COMPOUND::nelem, foil::nfoilelm, FILTER::nlyr, EXTRAINFO::OutputFileNm, readAbsCoef(), readCalcFlags(), readFCK(), readFilter(), readINPUT(), readsample(), readXYld(), EXTRAINFO::SampleFileNm, CPIXERESULTS::simareas, EXP_PARAM::simpar, STATFILENAME, foil::thick, COMPOUND::w, EXTRAINFO::WantOutputfile, COMPOUND::X, COMPOUND::xn, Xprod(), XrayYield::XYld, EXTRAINFO::XYldFileNm, ELEMENT::Z, and Z2mass().

Referenced by main().

int main int  argc,
char *  argv[]
 

Main program: The executable accepts 1 optional command line argument indicating the input file name (which defaults to "input.in").

Returns:
EXIT_SUCCESS if normal finishing

Definition at line 57 of file cpixe-calib.c.

References cpixecalib(), inputfilename, and STATFILENAME.


Variable Documentation

STATFILENAME inputfilename = "input-cal.in"
 

Definition at line 48 of file cpixe-calib.c.

Referenced by cpixecalib(), cpixemain(), and main().


Generated on Fri Jul 15 20:43:49 2005 for LibCPIXE API by  doxygen 1.3.9.1