cpixe-calib/cpixe-calib.c File Reference

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

Include dependency graph for cpixe-calib.c:

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)

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)

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

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

Todo:
IMPORTANT: tempCYld is being calculated wrong: it should be the inverse! (OR NOT???)

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

References ELEMENT::A, EXTRAINFO::AreasFileNm, EXTRAINFO::AreasFormat, EXP_PARAM::BeamEner, SIM_PARAM::CalEner, EXTRAINFO::CalibFileNm, FILTER::changes, ChemicalSymbol, SIM_PARAM::ColCharge, foil::comp, createPresentElems(), createSPTs(), EXTRAINFO::DBpath, DEG2RAD, EXP_PARAM::DetAng, EXP_PARAM::DetColFac, EXTRAINFO::DetectorFileNm, SIM_PARAM::DTCC, COMPOUND::elem, FILENMLENGTH, EXTRAINFO::FilterFileNm, FilterTrans(), EXP_PARAM::Fluence, FILTER::foil, fprintCALIBYLD(), freeExtraInfo(), freeFilter(), freeReusable(), EXP_PARAM::IncAng, initlyrarray(), inputfilename, integrate_Simpson2(), EXP_PARAM::ion, CalibYld::K_, CalibYld::L_, LineNm, CalibYld::M_, SIM_PARAM::MaxZinsample, COMPOUND::nelem, foil::nfoilelm, FILTER::nlyr, EXTRAINFO::OutputFileNm, readAbsCoef(), readCalcFlags(), readEff3(), readFCK(), readFilter(), readINPUT(), readLinesEner(), readsample(), EXTRAINFO::SampleFileNm, EXP_PARAM::SAngFract, CPIXERESULTS::simareas, EXP_PARAM::simpar, foil::thick, FILTER::Trans, COMPOUND::w, EXTRAINFO::WantOutputfile, COMPOUND::X, COMPOUND::xn, and ELEMENT::Z.

Here is the call graph for this function:

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

Main program for cpixe-calib: The executable accepts a list of command line arguments indicating the input file names If none is specified, ("input-cal.in" is assumed).

Returns:
EXIT_SUCCESS if normal finishing


Variable Documentation

STATFILENAME inputfilename = "input-cal.in"

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


Generated on Sat Dec 8 23:11:36 2007 for libCPIXE by  doxygen 1.5.4