5#include "tpcclibConfig.h"
19typedef struct TPC_ISOTOPE {
30static TPC_ISOTOPE tpc_isotope[]={
32 {
"Br-75", 98.0, 0.90},
33 {
"Br-76", 978.33, 0.62},
35 {
"Cu-64", 762.018, 0.174},
36 {
"Fe-52", 4980.0, 0.56},
37 {
"Ga-68", 68.0, 0.891},
38 {
"Ge-68", 396000.0, 0.891},
39 {
"Na-22", 1368000.0, 0.906},
40 {
"Rb-82", 1.25, 0.950},
41 {
"Sc-44", 238.2, 0.94},
42 {
"Tb-152",1050.0, 0.17},
43 {
"Zn-62", 548.0, 0.18},
44 {
"Zr-89", 4704.0, 0.22},
45 {
"C-11", 20.4, 0.998},
46 {
"F-18", 109.8, 0.967},
47 {
"I-124", 6013.44, 0.26},
48 {
"N-13", 10.0, 0.998},
49 {
"O-15", 2.05, 0.999},
50 {
"O-14", 1.1818, 1.0},
68 while(strlen(tpc_isotope[n].name)>1) n++;
69 if(isotope_code<1 || isotope_code>n-1)
return nan(
"");
70 else return(tpc_isotope[isotope_code].hl);
87 while(strlen(tpc_isotope[n].name)>1) n++;
88 if(isotope_code<1 || isotope_code>n-1)
return nan(
"");
89 else if(tpc_isotope[isotope_code].br<1.0E-10)
return nan(
"");
90 else return(tpc_isotope[isotope_code].br);
107 while(strlen(tpc_isotope[n].name)>1) n++;
108 if(isotope_code<1 || isotope_code>n-1)
111 return(tpc_isotope[isotope_code].name);
127 while(strlen(tpc_isotope[n].name)>1) n++;
130 if(fabs(halflife/tpc_isotope[i].hl-1.0)<0.05 )
return i;
151 unsigned short int i, n=0;
152 while(strlen(tpc_isotope[n].name)>1) n++;
156 if(strcasecmp(tpc_isotope[i].name,
isotope)==0)
return(i);
161 int mass_nr=0, ic_mass_nr=0;
166 cptr=strpbrk(
isotope,
"123456789");
177 cptr=strchr(tpc_isotope[i].name,
'-');
if(cptr==NULL)
continue;
178 ic_mass_nr=atoi(cptr+1);
179 if(mass_nr>0 && ic_mass_nr!=mass_nr)
continue;
unsigned short int elementIdentify(const char *str)
char * isotopeName(int isotope_code)
int isotopeIdentifyHalflife(double halflife)
double isotopeBranching(int isotope_code)
double isotopeHalflife(int isotope_code)
int isotopeIdentify(const char *isotope)
size_t strnlen(const char *s, size_t n)
Header file for library libtpcisotope.
#define MAX_ISOTOPE_LEN
Max string length for PET isotope.
@ ISOTOPE_UNKNOWN
Unknown.