8#include "tpcclibConfig.h"
26static char *info[] = {
27 "List the PET isotopes and their half-lives (min) that are identified by",
30 "Usage: @P [options] [> outputfile]",
34 " Show only the given isotope.",
36 " Lambda value (1/min) is listed.",
38 " Positron fraction (branching ratio) is listed.",
40 " Half-lives are listed in seconds and lambdas 1/sec.",
43 "See also: tacdecay, imgdecay, tactime, ecattime, dcftime",
45 "Keywords: physical decay, decay correction, halflife, isotope",
64int main(
int argc,
char **argv)
66 int ai, help=0, version=0, verbose=1;
77 for(ai=1; ai<argc; ai++)
if(*argv[ai]==
'-') {
79 char *cptr=argv[ai]+1;
80 if(strncasecmp(cptr,
"I=", 2)==0) {
83 fprintf(stderr,
"Error: invalid isotope '%s'\n", cptr);
return(1);
84 }
else if(strncasecmp(cptr,
"LAMBDA", 3)==0) {
85 do_lambda=1;
continue;
86 }
else if(strcasecmp(cptr,
"PF")==0 || strcasecmp(cptr,
"BR")==0) {
88 }
else if(strncasecmp(cptr,
"SECONDS", 3)==0) {
91 fprintf(stderr,
"Error: invalid option '%s'\n", argv[ai]);
95 for(ai=1; ai<argc; ai++)
if(*argv[ai]!=
'-') {
96 fprintf(stderr,
"Error: invalid argument '%s'\n", argv[ai]);
100 if(help==2) {
tpcHtmlUsage(argv[0], info,
"");
return(0);}
105 for(ai=0; ai<argc; ai++) printf(
"%s ", argv[ai]);
107 printf(
"do_lambda := %d\n", do_lambda);
108 printf(
"do_br := %d\n", do_br);
110 printf(
"tunit := %d\n", tunit);
123 fprintf(stdout,
"isotope := %s\n",
isotopeName(i));
126 if(do_br!=0) fprintf(stdout,
"positron_fraction := %g\n",
isotopeBranching(i));
double lambdaFromIsotope(int isotope)
char * isotopeName(int isotope_code)
double isotopeBranching(int isotope_code)
double isotopeHalflife(int isotope_code)
int isotopeIdentify(const char *isotope)
int tpcProcessStdOptions(const char *s, int *print_usage, int *print_version, int *verbose_level)
int tpcHtmlUsage(const char *program, char *text[], const char *path)
void tpcPrintBuild(const char *program, FILE *fp)
void tpcPrintUsage(const char *program, char *text[], FILE *fp)
Header file for library libtpcextensions.
Header file for library libtpcisotope.
@ ISOTOPE_UNKNOWN
Unknown.