lib/App/SeismicUnixGui/sunix/model/raydata.pm untested

filter: Statementstmt 0.0% 0 / 321 Branchbran 0.0% 0 / 82 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 49 Podpod 0.0% 0 / 45 totaltotal 0.0% 0 / 497 CC 42 SCAR 17.3
CC
42
Cov
0%
ascci
6.0
g11data
6.0
g13data
6.0
CRAP 5.6
1 package App::SeismicUnixGui::sunix::model::raydata;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR: Juan Lorenzo (Perl module only)
8  
9 DATE:
10  
11 DESCRIPTION:
12  
13 Version:
14  
15 =head2 USE
16  
17 =head3 NOTES
18  
19 =head4 Examples
20  
21 =head2 SYNOPSIS
22  
23 =head3 SEISMIC UNIX NOTES
24 RAYDATA - simple program to display ray data from elaray
25  
26  
27  
28 raydata <rayends [optional parameters]
29  
30  
31  
32 Optional Parameters:
33  
34 kend= Index of interest
35  
36 t=0 =1 output of x_t requested
37  
38 px=0 =1 output of x_px requested
39  
40 pz=0 =1 output of x_pz requested
41  
42 vgx=0 =1 output of x_vgx requested
43  
44 vgz=0 =1 output of x_vgz requested
45  
46 pxvx=0 =1 output of px_vgx requested
47  
48 pol=0 =1 output of x_polangle requested
49  
50 ascci=0 binary output
51  
52 =1 ascci output
53  
54  
55  
56 Simple program to display some of the computed raydata.
57  
58 Output is written into files <*.data>
59  
60  
61  
62  
63  
64  
65  
66  
67  
68 Author: Andreas Rueger, Colorado School of Mines, 02/15/94
69  
70  
71  
72  
73  
74  
75  
76 the main program
77  
78 int main (int argc, char **argv)
79  
80 {
81  
82 int ir,nre,nrealloc,nri,iri,tout,ascci;
83  
84 int pxout,pzout,vgxout,vgzout,pxvxout;
85  
86 int polout;
87  
88 float *tdata=NULL,*xdata=NULL,*pxdata=NULL,*pzdata=NULL;
89  
90 float *vgxdata=NULL,*vgzdata=NULL,*pxvxdata=NULL;
91  
92 float *poldata=NULL,*g11data=NULL,*g33data=NULL,*g13data=NULL;
93  
94 /* float g11,g33,g13;*/
95  
96 int kend;
97  
98 RayEnd *re;
99  
100 FILE *txfp=NULL,*pxfp=NULL,*pzfp=NULL,*vgxfp=NULL,*vgzfp=NULL;
101  
102 FILE *outparfp=NULL,*polfp=NULL,*pxvxfp=NULL;
103  
104  
105  
106 /* hook up getpar to handle the parameters
107  
108 initargs(argc,argv);
109  
110 requestdoc(0);
111  
112
113  
114 /* get parameters
115  
116 if (!getparint("kend",&kend)) kend = INT_MAX;
117  
118 if (!getparint("t",&tout)) tout = 0;
119  
120 if (!getparint("px",&pxout)) pxout = 0;
121  
122 if (!getparint("pz",&pzout)) pzout = 0;
123  
124 if (!getparint("vgx",&vgxout)) vgxout = 0;
125  
126 if (!getparint("vgz",&vgzout)) vgzout = 0;
127  
128 if (!getparint("pxvx",&pxvxout)) pxvxout = 0;
129  
130 if (!getparint("pol",&polout)) polout = 0;
131  
132  
133  
134 if (!getparint("ascci",&ascci)) ascci = 0;
135  
136  
137  
138 checkpars();
139  
140  
141  
142 /* output file control
143  
144 if(tout>0) txfp= fopen("x_t.data","w");
145  
146 if(pxout) pxfp= fopen("x_px.data","w");
147  
148 if(pzout) pzfp= fopen("x_pz.data","w");
149  
150 if(vgxout) vgxfp= fopen("x_vgx.data","w");
151  
152 if(vgzout) vgzfp= fopen("x_vgz.data","w");
153  
154 if(pxvxout) pxvxfp= fopen("px_vgx.data","w");
155  
156 if(polout) polfp= fopen("x_pol.data","w");
157  
158 if(!ascci) outparfp = efopen("outpar","w");
159  
160  
161  
162 /* read rayends
163  
164 nre = nri = 0;
165  
166 nrealloc = 301;
167  
168 re = ealloc1(nrealloc,sizeof(RayEnd));
169  
170  
171  
172  
173  
174 while (fread(&re[nre],sizeof(RayEnd),1,stdin)==1) {
175  
176 nre++;
177  
178  
179  
180 if (nre==nrealloc) {
181  
182 nrealloc += 100;
183  
184 re = erealloc1(re,nrealloc,sizeof(RayEnd));
185  
186 }
187  
188 }
189  
190 if(kend == INT_MAX){
191  
192 nri=nre;
193  
194 } else {
195  
196 /* how many rayends are of interest
197  
198 for(ir = 0; ir < nre;ir +=1 )
199  
200 if(re[ir].kend == kend) nri++;
201  
202 }
203  
204  
205  
206 /* allocate space for data files
207  
208 if(tout>0) tdata = ealloc1(nri,sizeof(float));
209  
210 if(pxout|| pxvxout) pxdata = ealloc1(nri,sizeof(float));
211  
212 if(pzout) pzdata = ealloc1(nri,sizeof(float));
213  
214 if(vgxout|| pxvxout) vgxdata = ealloc1(nri,sizeof(float));
215  
216 if(vgzout) vgzdata = ealloc1(nri,sizeof(float));
217  
218 if(pxvxout) pxvxdata = ealloc1(nri,sizeof(float));
219  
220 if(polout){
221  
222 poldata = ealloc1(nri,sizeof(float));
223  
224 g11data = ealloc1(nri,sizeof(float));
225  
226 g13data = ealloc1(nri,sizeof(float));
227  
228 g33data = ealloc1(nri,sizeof(float));
229  
230 }
231  
232  
233  
234 xdata = ealloc1(nri,sizeof(float));
235  
236  
237  
238 iri = 0;
239  
240  
241  
242 /* read in data into files
243  
244 for(ir = 0; ir < nre;ir +=1 ){
245  
246 /*fprintf(stderr,"ir=0 \t kend=0\n",ir,re[ir].kend);*/
247  
248 if(re[ir].kend == kend || kend == INT_MAX) {
249  
250 if(tout>0) tdata[iri] = re[ir].t;
251  
252 if(pxout|| pxvxout) pxdata[iri] = re[ir].px;
253  
254 if(pzout) pzdata[iri] = re[ir].pz;
255  
256 if(vgxout|| pxvxout) vgxdata[iri] = re[ir].vgx;
257  
258 if(vgzout) vgzdata[iri] = re[ir].vgz;
259  
260 if(polout){
261  
262 g11data[iri] = re[ir].g11;
263  
264 g33data[iri] = re[ir].g33;
265  
266 g13data[iri] = re[ir].g13;
267  
268 }
269  
270 xdata[iri] = re[ir].x;
271  
272 iri++;
273  
274  
275  
276 }
277  
278 }
279  
280  
281  
282 /* compute polarization
283  
284 if(polout){
285  
286 for(ir = 0; ir < nre;ir +=1 ){
287  
288  
289  
290 if(g13data[ir] > 0){
291  
292 poldata[ir]=atan(sqrt(g11data[ir]/g33data[ir]));
293  
294 } else if(g13data[ir] < 0){
295  
296 poldata[ir]=PI/2+atan(sqrt(g33data[ir]/g11data[ir]));
297  
298 } else if(g13data[ir] == 0 && g33data[ir]>0){
299  
300 poldata[ir]=0.0;
301  
302 } else if(g13data[ir] == 0 && g33data[ir]<0){
303  
304 poldata[ir]=PI/2;
305  
306 }
307  
308 /*fprintf(stderr,"pol=0\n",poldata[ir]);*/
309  
310 }
311  
312 }
313  
314  
315  
316 /* ASCII output for x_t
317  
318 if(ascci ==1 && tout ==1){
319  
320 for(ir=0;ir<nri;ir+=1)
321  
322 fprintf(txfp,"0.000000 0.000000\n",xdata[ir],tdata[ir]);
323  
324 /* Binary output for x_t
325  
326 } else if(ascci ==0 && tout ==1){
327  
328 for(ir=0;ir<nri;ir+=1){
329  
330 fwrite(&tdata[ir],sizeof(float),1,txfp);
331  
332 fwrite(&xdata[ir],sizeof(float),1,txfp);
333  
334 }
335  
336 }
337  
338  
339  
340  
341  
342 /* ASCII output for x_px
343  
344 if(ascci ==1 && pxout ==1){
345  
346 for(ir=0;ir<nri;ir+=1)
347  
348 fprintf(pxfp,"0.000000 0.000000\n",xdata[ir],pxdata[ir]);
349  
350 /* Binary output for x_px
351  
352 } else if(ascci ==0 && pxout ==1){
353  
354 for(ir=0;ir<nri;ir+=1){
355  
356 fwrite(&pxdata[ir],sizeof(float),1,pxfp);
357  
358 fwrite(&xdata[ir],sizeof(float),1,pxfp);
359  
360 }
361  
362 }
363  
364  
365  
366  
367  
368 /* ASCII output for x_pz
369  
370 if(ascci ==1 && pzout ==1){
371  
372 for(ir=0;ir<nri;ir+=1)
373  
374 fprintf(pzfp,"0.000000 0.000000\n",xdata[ir],pzdata[ir]);
375  
376 /* Binary output for x_pz
377  
378 } else if(ascci ==0 && pzout ==1){
379  
380 for(ir=0;ir<nri;ir+=1){
381  
382 fwrite(&pzdata[ir],sizeof(float),1,pzfp);
383  
384 fwrite(&xdata[ir],sizeof(float),1,pzfp);
385  
386 }
387  
388 }
389  
390  
391  
392  
393  
394 /* ASCII output for x_vgx
395  
396 if(ascci ==1 && vgxout ==1){
397  
398 for(ir=0;ir<nri;ir+=1)
399  
400 fprintf(vgxfp,"0.000000 0.000000\n",xdata[ir],vgxdata[ir]);
401  
402 /* Binary output for x_vgx
403  
404 } else if(ascci ==0 && vgxout ==1){
405  
406 for(ir=0;ir<nri;ir+=1){
407  
408 fwrite(&vgxdata[ir],sizeof(float),1,vgxfp);
409  
410 fwrite(&xdata[ir],sizeof(float),1,vgxfp);
411  
412 }
413  
414 }
415  
416  
417  
418  
419  
420 /* ASCII output for x_vgz
421  
422 if(ascci ==1 && vgzout ==1){
423  
424 for(ir=0;ir<nri;ir+=1)
425  
426 fprintf(vgzfp,"0.000000 0.000000\n",xdata[ir],vgzdata[ir]);
427  
428 /* Binary output for x_vgz
429  
430 } else if(ascci ==0 && vgzout ==1){
431  
432 for(ir=0;ir<nri;ir+=1){
433  
434 fwrite(&vgzdata[ir],sizeof(float),1,vgzfp);
435  
436 fwrite(&xdata[ir],sizeof(float),1,vgzfp);
437  
438 }
439  
440 }
441  
442 /* ASCII output for px_vgx
443  
444 if(ascci == 1 && pxvxout != 0){
445  
446 for(ir=0;ir<nri;ir+=1)
447  
448 fprintf(pxvxfp,"0.000000 0.000000\n",pxdata[ir],vgxdata[ir]);
449  
450 /* Binary output for px_vgx
451  
452 } else if(ascci ==0 && pxvxout != 0){
453  
454 for(ir=0;ir<nri;ir+=1){
455  
456 fwrite(&pxdata[ir],sizeof(float),1,pxvxfp);
457  
458 fwrite(&vgxdata[ir],sizeof(float),1,pxvxfp);
459  
460 }
461  
462 }
463  
464  
465  
466 /* ASCII output for px_vgx
467  
468 if(ascci == 1 && polout != 0){
469  
470 for(ir=0;ir<nri;ir+=1)
471  
472 fprintf(polfp,"0.000000 0.000000\n",xdata[ir],poldata[ir]);
473  
474 /* Binary output for px_vgx
475  
476 } else if(ascci ==0 && polout != 0){
477  
478 for(ir=0;ir<nri;ir+=1){
479  
480 fwrite(&xdata[ir],sizeof(float),1,polfp);
481  
482 fwrite(&poldata[ir],sizeof(float),1,polfp);
483  
484 }
485  
486 }
487  
488  
489  
490  
491  
492 if(!ascci) fprintf(outparfp,"0\n",nri);
493  
494 return EXIT_FAILURE;
495  
496
497  
498 }
499  
500 =head2 User's notes (Juan Lorenzo)
501 untested
502  
503 =cut
504  
505  
506 =head2 CHANGES and their DATES
507  
508 =cut
509  
510 use Moose;
511 our $VERSION = '0.0.1';
512  
513  
514 =head2 Import packages
515  
516 =cut
517  
518 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
519  
520 use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin);
521 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
522  
523  
524 =head2 instantiation of packages
525  
526 =cut
527  
528 my $get = L_SU_global_constants->new();
529 my $Project = Project_config->new();
530 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
531 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
532 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
533  
534 my $var = $get->var();
535 my $on = $var->{_on};
536 my $off = $var->{_off};
537 my $true = $var->{_true};
538 my $false = $var->{_false};
539 my $empty_string = $var->{_empty_string};
540  
541 =head2 Encapsulated
542 hash of private variables
543  
544 =cut
545  
546 my $raydata = {
547 _ascci => '',
548 _g11data => '',
549 _g13data => '',
550 _g33data => '',
551 _ir => '',
552 _iri => '',
553 _kend => '',
554 _nre => '',
555 _nrealloc => '',
556 _nri => '',
557 _outparfp => '',
558 _pol => '',
559 _poldata => '',
560 _polfp => '',
561 _polout => '',
562 _px => '',
563 _pxdata => '',
564 _pxfp => '',
565 _pxout => '',
566 _pxvx => '',
567 _pxvxdata => '',
568 _pxvxfp => '',
569 _pxvxout => '',
570 _pz => '',
571 _pzdata => '',
572 _pzfp => '',
573 _pzout => '',
574 _re => '',
575 _t => '',
576 _tdata => '',
577 _tout => '',
578 _txfp => '',
579 _vgx => '',
580 _vgxdata => '',
581 _vgxfp => '',
582 _vgxout => '',
583 _vgz => '',
584 _vgzdata => '',
585 _vgzfp => '',
586 _vgzout => '',
587 _xdata => '',
588 _Step => '',
589 _note => '',
590  
591 };
592  
593 =head2 sub Step
594  
595 collects switches and assembles bash instructions
596 by adding the program name
597  
598 =cut
599  
600 sub Step {
601  
602 $raydata->{_Step} = 'raydata'.$raydata->{_Step};
603 return ( $raydata->{_Step} );
604  
605 }
606  
607  
608 =head2 sub note
609  
610 collects switches and assembles bash instructions
611 by adding the program name
612  
613 =cut
614  
615 sub note {
616  
617 $raydata->{_note} = 'raydata'.$raydata->{_note};
618 return ( $raydata->{_note} );
619  
620 }
621  
622  
623  
624 =head2 sub clear
625  
626 =cut
627  
628 sub clear {
629  
630 $raydata->{_ascci} = '';
631 $raydata->{_g11data} = '';
632 $raydata->{_g13data} = '';
633 $raydata->{_g33data} = '';
634 $raydata->{_ir} = '';
635 $raydata->{_iri} = '';
636 $raydata->{_kend} = '';
637 $raydata->{_nre} = '';
638 $raydata->{_nrealloc} = '';
639 $raydata->{_nri} = '';
640 $raydata->{_outparfp} = '';
641 $raydata->{_pol} = '';
642 $raydata->{_poldata} = '';
643 $raydata->{_polfp} = '';
644 $raydata->{_polout} = '';
645 $raydata->{_px} = '';
646 $raydata->{_pxdata} = '';
647 $raydata->{_pxfp} = '';
648 $raydata->{_pxout} = '';
649 $raydata->{_pxvx} = '';
650 $raydata->{_pxvxdata} = '';
651 $raydata->{_pxvxfp} = '';
652 $raydata->{_pxvxout} = '';
653 $raydata->{_pz} = '';
654 $raydata->{_pzdata} = '';
655 $raydata->{_pzfp} = '';
656 $raydata->{_pzout} = '';
657 $raydata->{_re} = '';
658 $raydata->{_t} = '';
659 $raydata->{_tdata} = '';
660 $raydata->{_tout} = '';
661 $raydata->{_txfp} = '';
662 $raydata->{_vgx} = '';
663 $raydata->{_vgxdata} = '';
664 $raydata->{_vgxfp} = '';
665 $raydata->{_vgxout} = '';
666 $raydata->{_vgz} = '';
667 $raydata->{_vgzdata} = '';
668 $raydata->{_vgzfp} = '';
669 $raydata->{_vgzout} = '';
670 $raydata->{_xdata} = '';
671 $raydata->{_Step} = '';
672 $raydata->{_note} = '';
673 }
674  
675  
676 =head2 sub ascci
677  
678  
679 =cut
680  
681 sub ascci {
682  
683 my ( $self,$ascci ) = @_;
684 if ( $ascci ne $empty_string ) {
685  
686 $raydata->{_ascci} = $ascci;
687 $raydata->{_note} = $raydata->{_note}.' ascci='.$raydata->{_ascci};
688 $raydata->{_Step} = $raydata->{_Step}.' ascci='.$raydata->{_ascci};
689  
690 } else {
691 print("raydata, ascci, missing ascci,\n");
692 }
693 }
694  
695  
696 =head2 sub g11data
697  
698  
699 =cut
700  
701 sub g11data {
702  
703 my ( $self,$g11data ) = @_;
704 if ( $g11data ne $empty_string ) {
705  
706 $raydata->{_g11data} = $g11data;
707 $raydata->{_note} = $raydata->{_note}.' g11data='.$raydata->{_g11data};
708 $raydata->{_Step} = $raydata->{_Step}.' g11data='.$raydata->{_g11data};
709  
710 } else {
711 print("raydata, g11data, missing g11data,\n");
712 }
713 }
714  
715  
716 =head2 sub g13data
717  
718  
719 =cut
720  
721 sub g13data {
722  
723 my ( $self,$g13data ) = @_;
724 if ( $g13data ne $empty_string ) {
725  
726 $raydata->{_g13data} = $g13data;
727 $raydata->{_note} = $raydata->{_note}.' g13data='.$raydata->{_g13data};
728 $raydata->{_Step} = $raydata->{_Step}.' g13data='.$raydata->{_g13data};
729  
730 } else {
731 print("raydata, g13data, missing g13data,\n");
732 }
733 }
734  
735  
736 =head2 sub g33data
737  
738  
739 =cut
740  
741 sub g33data {
742  
743 my ( $self,$g33data ) = @_;
744 if ( $g33data ne $empty_string ) {
745  
746 $raydata->{_g33data} = $g33data;
747 $raydata->{_note} = $raydata->{_note}.' g33data='.$raydata->{_g33data};
748 $raydata->{_Step} = $raydata->{_Step}.' g33data='.$raydata->{_g33data};
749  
750 } else {
751 print("raydata, g33data, missing g33data,\n");
752 }
753 }
754  
755  
756 =head2 sub ir
757  
758  
759 =cut
760  
761 sub ir {
762  
763 my ( $self,$ir ) = @_;
764 if ( $ir ne $empty_string ) {
765  
766 $raydata->{_ir} = $ir;
767 $raydata->{_note} = $raydata->{_note}.' ir='.$raydata->{_ir};
768 $raydata->{_Step} = $raydata->{_Step}.' ir='.$raydata->{_ir};
769  
770 } else {
771 print("raydata, ir, missing ir,\n");
772 }
773 }
774  
775  
776 =head2 sub iri
777  
778  
779 =cut
780  
781 sub iri {
782  
783 my ( $self,$iri ) = @_;
784 if ( $iri ne $empty_string ) {
785  
786 $raydata->{_iri} = $iri;
787 $raydata->{_note} = $raydata->{_note}.' iri='.$raydata->{_iri};
788 $raydata->{_Step} = $raydata->{_Step}.' iri='.$raydata->{_iri};
789  
790 } else {
791 print("raydata, iri, missing iri,\n");
792 }
793 }
794  
795  
796 =head2 sub kend
797  
798  
799 =cut
800  
801 sub kend {
802  
803 my ( $self,$kend ) = @_;
804 if ( $kend ne $empty_string ) {
805  
806 $raydata->{_kend} = $kend;
807 $raydata->{_note} = $raydata->{_note}.' kend='.$raydata->{_kend};
808 $raydata->{_Step} = $raydata->{_Step}.' kend='.$raydata->{_kend};
809  
810 } else {
811 print("raydata, kend, missing kend,\n");
812 }
813 }
814  
815  
816 =head2 sub nre
817  
818  
819 =cut
820  
821 sub nre {
822  
823 my ( $self,$nre ) = @_;
824 if ( $nre ne $empty_string ) {
825  
826 $raydata->{_nre} = $nre;
827 $raydata->{_note} = $raydata->{_note}.' nre='.$raydata->{_nre};
828 $raydata->{_Step} = $raydata->{_Step}.' nre='.$raydata->{_nre};
829  
830 } else {
831 print("raydata, nre, missing nre,\n");
832 }
833 }
834  
835  
836 =head2 sub nrealloc
837  
838  
839 =cut
840  
841 sub nrealloc {
842  
843 my ( $self,$nrealloc ) = @_;
844 if ( $nrealloc ne $empty_string ) {
845  
846 $raydata->{_nrealloc} = $nrealloc;
847 $raydata->{_note} = $raydata->{_note}.' nrealloc='.$raydata->{_nrealloc};
848 $raydata->{_Step} = $raydata->{_Step}.' nrealloc='.$raydata->{_nrealloc};
849  
850 } else {
851 print("raydata, nrealloc, missing nrealloc,\n");
852 }
853 }
854  
855  
856 =head2 sub nri
857  
858  
859 =cut
860  
861 sub nri {
862  
863 my ( $self,$nri ) = @_;
864 if ( $nri ne $empty_string ) {
865  
866 $raydata->{_nri} = $nri;
867 $raydata->{_note} = $raydata->{_note}.' nri='.$raydata->{_nri};
868 $raydata->{_Step} = $raydata->{_Step}.' nri='.$raydata->{_nri};
869  
870 } else {
871 print("raydata, nri, missing nri,\n");
872 }
873 }
874  
875  
876 =head2 sub outparfp
877  
878  
879 =cut
880  
881 sub outparfp {
882  
883 my ( $self,$outparfp ) = @_;
884 if ( $outparfp ne $empty_string ) {
885  
886 $raydata->{_outparfp} = $outparfp;
887 $raydata->{_note} = $raydata->{_note}.' outparfp='.$raydata->{_outparfp};
888 $raydata->{_Step} = $raydata->{_Step}.' outparfp='.$raydata->{_outparfp};
889  
890 } else {
891 print("raydata, outparfp, missing outparfp,\n");
892 }
893 }
894  
895  
896 =head2 sub pol
897  
898  
899 =cut
900  
901 sub pol {
902  
903 my ( $self,$pol ) = @_;
904 if ( $pol ne $empty_string ) {
905  
906 $raydata->{_pol} = $pol;
907 $raydata->{_note} = $raydata->{_note}.' pol='.$raydata->{_pol};
908 $raydata->{_Step} = $raydata->{_Step}.' pol='.$raydata->{_pol};
909  
910 } else {
911 print("raydata, pol, missing pol,\n");
912 }
913 }
914  
915  
916 =head2 sub poldata
917  
918  
919 =cut
920  
921 sub poldata {
922  
923 my ( $self,$poldata ) = @_;
924 if ( $poldata ne $empty_string ) {
925  
926 $raydata->{_poldata} = $poldata;
927 $raydata->{_note} = $raydata->{_note}.' poldata='.$raydata->{_poldata};
928 $raydata->{_Step} = $raydata->{_Step}.' poldata='.$raydata->{_poldata};
929  
930 } else {
931 print("raydata, poldata, missing poldata,\n");
932 }
933 }
934  
935  
936 =head2 sub polfp
937  
938  
939 =cut
940  
941 sub polfp {
942  
943 my ( $self,$polfp ) = @_;
944 if ( $polfp ne $empty_string ) {
945  
946 $raydata->{_polfp} = $polfp;
947 $raydata->{_note} = $raydata->{_note}.' polfp='.$raydata->{_polfp};
948 $raydata->{_Step} = $raydata->{_Step}.' polfp='.$raydata->{_polfp};
949  
950 } else {
951 print("raydata, polfp, missing polfp,\n");
952 }
953 }
954  
955  
956 =head2 sub polout
957  
958  
959 =cut
960  
961 sub polout {
962  
963 my ( $self,$polout ) = @_;
964 if ( $polout ne $empty_string ) {
965  
966 $raydata->{_polout} = $polout;
967 $raydata->{_note} = $raydata->{_note}.' polout='.$raydata->{_polout};
968 $raydata->{_Step} = $raydata->{_Step}.' polout='.$raydata->{_polout};
969  
970 } else {
971 print("raydata, polout, missing polout,\n");
972 }
973 }
974  
975  
976 =head2 sub px
977  
978  
979 =cut
980  
981 sub px {
982  
983 my ( $self,$px ) = @_;
984 if ( $px ne $empty_string ) {
985  
986 $raydata->{_px} = $px;
987 $raydata->{_note} = $raydata->{_note}.' px='.$raydata->{_px};
988 $raydata->{_Step} = $raydata->{_Step}.' px='.$raydata->{_px};
989  
990 } else {
991 print("raydata, px, missing px,\n");
992 }
993 }
994  
995  
996 =head2 sub pxdata
997  
998  
999 =cut
1000  
1001 sub pxdata {
1002  
1003 my ( $self,$pxdata ) = @_;
1004 if ( $pxdata ne $empty_string ) {
1005  
1006 $raydata->{_pxdata} = $pxdata;
1007 $raydata->{_note} = $raydata->{_note}.' pxdata='.$raydata->{_pxdata};
1008 $raydata->{_Step} = $raydata->{_Step}.' pxdata='.$raydata->{_pxdata};
1009  
1010 } else {
1011 print("raydata, pxdata, missing pxdata,\n");
1012 }
1013 }
1014  
1015  
1016 =head2 sub pxfp
1017  
1018  
1019 =cut
1020  
1021 sub pxfp {
1022  
1023 my ( $self,$pxfp ) = @_;
1024 if ( $pxfp ne $empty_string ) {
1025  
1026 $raydata->{_pxfp} = $pxfp;
1027 $raydata->{_note} = $raydata->{_note}.' pxfp='.$raydata->{_pxfp};
1028 $raydata->{_Step} = $raydata->{_Step}.' pxfp='.$raydata->{_pxfp};
1029  
1030 } else {
1031 print("raydata, pxfp, missing pxfp,\n");
1032 }
1033 }
1034  
1035  
1036 =head2 sub pxout
1037  
1038  
1039 =cut
1040  
1041 sub pxout {
1042  
1043 my ( $self,$pxout ) = @_;
1044 if ( $pxout ne $empty_string ) {
1045  
1046 $raydata->{_pxout} = $pxout;
1047 $raydata->{_note} = $raydata->{_note}.' pxout='.$raydata->{_pxout};
1048 $raydata->{_Step} = $raydata->{_Step}.' pxout='.$raydata->{_pxout};
1049  
1050 } else {
1051 print("raydata, pxout, missing pxout,\n");
1052 }
1053 }
1054  
1055  
1056 =head2 sub pxvx
1057  
1058  
1059 =cut
1060  
1061 sub pxvx {
1062  
1063 my ( $self,$pxvx ) = @_;
1064 if ( $pxvx ne $empty_string ) {
1065  
1066 $raydata->{_pxvx} = $pxvx;
1067 $raydata->{_note} = $raydata->{_note}.' pxvx='.$raydata->{_pxvx};
1068 $raydata->{_Step} = $raydata->{_Step}.' pxvx='.$raydata->{_pxvx};
1069  
1070 } else {
1071 print("raydata, pxvx, missing pxvx,\n");
1072 }
1073 }
1074  
1075  
1076 =head2 sub pxvxdata
1077  
1078  
1079 =cut
1080  
1081 sub pxvxdata {
1082  
1083 my ( $self,$pxvxdata ) = @_;
1084 if ( $pxvxdata ne $empty_string ) {
1085  
1086 $raydata->{_pxvxdata} = $pxvxdata;
1087 $raydata->{_note} = $raydata->{_note}.' pxvxdata='.$raydata->{_pxvxdata};
1088 $raydata->{_Step} = $raydata->{_Step}.' pxvxdata='.$raydata->{_pxvxdata};
1089  
1090 } else {
1091 print("raydata, pxvxdata, missing pxvxdata,\n");
1092 }
1093 }
1094  
1095  
1096 =head2 sub pxvxfp
1097  
1098  
1099 =cut
1100  
1101 sub pxvxfp {
1102  
1103 my ( $self,$pxvxfp ) = @_;
1104 if ( $pxvxfp ne $empty_string ) {
1105  
1106 $raydata->{_pxvxfp} = $pxvxfp;
1107 $raydata->{_note} = $raydata->{_note}.' pxvxfp='.$raydata->{_pxvxfp};
1108 $raydata->{_Step} = $raydata->{_Step}.' pxvxfp='.$raydata->{_pxvxfp};
1109  
1110 } else {
1111 print("raydata, pxvxfp, missing pxvxfp,\n");
1112 }
1113 }
1114  
1115  
1116 =head2 sub pxvxout
1117  
1118  
1119 =cut
1120  
1121 sub pxvxout {
1122  
1123 my ( $self,$pxvxout ) = @_;
1124 if ( $pxvxout ne $empty_string ) {
1125  
1126 $raydata->{_pxvxout} = $pxvxout;
1127 $raydata->{_note} = $raydata->{_note}.' pxvxout='.$raydata->{_pxvxout};
1128 $raydata->{_Step} = $raydata->{_Step}.' pxvxout='.$raydata->{_pxvxout};
1129  
1130 } else {
1131 print("raydata, pxvxout, missing pxvxout,\n");
1132 }
1133 }
1134  
1135  
1136 =head2 sub pz
1137  
1138  
1139 =cut
1140  
1141 sub pz {
1142  
1143 my ( $self,$pz ) = @_;
1144 if ( $pz ne $empty_string ) {
1145  
1146 $raydata->{_pz} = $pz;
1147 $raydata->{_note} = $raydata->{_note}.' pz='.$raydata->{_pz};
1148 $raydata->{_Step} = $raydata->{_Step}.' pz='.$raydata->{_pz};
1149  
1150 } else {
1151 print("raydata, pz, missing pz,\n");
1152 }
1153 }
1154  
1155  
1156 =head2 sub pzdata
1157  
1158  
1159 =cut
1160  
1161 sub pzdata {
1162  
1163 my ( $self,$pzdata ) = @_;
1164 if ( $pzdata ne $empty_string ) {
1165  
1166 $raydata->{_pzdata} = $pzdata;
1167 $raydata->{_note} = $raydata->{_note}.' pzdata='.$raydata->{_pzdata};
1168 $raydata->{_Step} = $raydata->{_Step}.' pzdata='.$raydata->{_pzdata};
1169  
1170 } else {
1171 print("raydata, pzdata, missing pzdata,\n");
1172 }
1173 }
1174  
1175  
1176 =head2 sub pzfp
1177  
1178  
1179 =cut
1180  
1181 sub pzfp {
1182  
1183 my ( $self,$pzfp ) = @_;
1184 if ( $pzfp ne $empty_string ) {
1185  
1186 $raydata->{_pzfp} = $pzfp;
1187 $raydata->{_note} = $raydata->{_note}.' pzfp='.$raydata->{_pzfp};
1188 $raydata->{_Step} = $raydata->{_Step}.' pzfp='.$raydata->{_pzfp};
1189  
1190 } else {
1191 print("raydata, pzfp, missing pzfp,\n");
1192 }
1193 }
1194  
1195  
1196 =head2 sub pzout
1197  
1198  
1199 =cut
1200  
1201 sub pzout {
1202  
1203 my ( $self,$pzout ) = @_;
1204 if ( $pzout ne $empty_string ) {
1205  
1206 $raydata->{_pzout} = $pzout;
1207 $raydata->{_note} = $raydata->{_note}.' pzout='.$raydata->{_pzout};
1208 $raydata->{_Step} = $raydata->{_Step}.' pzout='.$raydata->{_pzout};
1209  
1210 } else {
1211 print("raydata, pzout, missing pzout,\n");
1212 }
1213 }
1214  
1215  
1216 =head2 sub re
1217  
1218  
1219 =cut
1220  
1221 sub re {
1222  
1223 my ( $self,$re ) = @_;
1224 if ( $re ne $empty_string ) {
1225  
1226 $raydata->{_re} = $re;
1227 $raydata->{_note} = $raydata->{_note}.' re='.$raydata->{_re};
1228 $raydata->{_Step} = $raydata->{_Step}.' re='.$raydata->{_re};
1229  
1230 } else {
1231 print("raydata, re, missing re,\n");
1232 }
1233 }
1234  
1235  
1236 =head2 sub t
1237  
1238  
1239 =cut
1240  
1241 sub t {
1242  
1243 my ( $self,$t ) = @_;
1244 if ( $t ne $empty_string ) {
1245  
1246 $raydata->{_t} = $t;
1247 $raydata->{_note} = $raydata->{_note}.' t='.$raydata->{_t};
1248 $raydata->{_Step} = $raydata->{_Step}.' t='.$raydata->{_t};
1249  
1250 } else {
1251 print("raydata, t, missing t,\n");
1252 }
1253 }
1254  
1255  
1256 =head2 sub tdata
1257  
1258  
1259 =cut
1260  
1261 sub tdata {
1262  
1263 my ( $self,$tdata ) = @_;
1264 if ( $tdata ne $empty_string ) {
1265  
1266 $raydata->{_tdata} = $tdata;
1267 $raydata->{_note} = $raydata->{_note}.' tdata='.$raydata->{_tdata};
1268 $raydata->{_Step} = $raydata->{_Step}.' tdata='.$raydata->{_tdata};
1269  
1270 } else {
1271 print("raydata, tdata, missing tdata,\n");
1272 }
1273 }
1274  
1275  
1276 =head2 sub tout
1277  
1278  
1279 =cut
1280  
1281 sub tout {
1282  
1283 my ( $self,$tout ) = @_;
1284 if ( $tout ne $empty_string ) {
1285  
1286 $raydata->{_tout} = $tout;
1287 $raydata->{_note} = $raydata->{_note}.' tout='.$raydata->{_tout};
1288 $raydata->{_Step} = $raydata->{_Step}.' tout='.$raydata->{_tout};
1289  
1290 } else {
1291 print("raydata, tout, missing tout,\n");
1292 }
1293 }
1294  
1295  
1296 =head2 sub txfp
1297  
1298  
1299 =cut
1300  
1301 sub txfp {
1302  
1303 my ( $self,$txfp ) = @_;
1304 if ( $txfp ne $empty_string ) {
1305  
1306 $raydata->{_txfp} = $txfp;
1307 $raydata->{_note} = $raydata->{_note}.' txfp='.$raydata->{_txfp};
1308 $raydata->{_Step} = $raydata->{_Step}.' txfp='.$raydata->{_txfp};
1309  
1310 } else {
1311 print("raydata, txfp, missing txfp,\n");
1312 }
1313 }
1314  
1315  
1316 =head2 sub vgx
1317  
1318  
1319 =cut
1320  
1321 sub vgx {
1322  
1323 my ( $self,$vgx ) = @_;
1324 if ( $vgx ne $empty_string ) {
1325  
1326 $raydata->{_vgx} = $vgx;
1327 $raydata->{_note} = $raydata->{_note}.' vgx='.$raydata->{_vgx};
1328 $raydata->{_Step} = $raydata->{_Step}.' vgx='.$raydata->{_vgx};
1329  
1330 } else {
1331 print("raydata, vgx, missing vgx,\n");
1332 }
1333 }
1334  
1335  
1336 =head2 sub vgxdata
1337  
1338  
1339 =cut
1340  
1341 sub vgxdata {
1342  
1343 my ( $self,$vgxdata ) = @_;
1344 if ( $vgxdata ne $empty_string ) {
1345  
1346 $raydata->{_vgxdata} = $vgxdata;
1347 $raydata->{_note} = $raydata->{_note}.' vgxdata='.$raydata->{_vgxdata};
1348 $raydata->{_Step} = $raydata->{_Step}.' vgxdata='.$raydata->{_vgxdata};
1349  
1350 } else {
1351 print("raydata, vgxdata, missing vgxdata,\n");
1352 }
1353 }
1354  
1355  
1356 =head2 sub vgxfp
1357  
1358  
1359 =cut
1360  
1361 sub vgxfp {
1362  
1363 my ( $self,$vgxfp ) = @_;
1364 if ( $vgxfp ne $empty_string ) {
1365  
1366 $raydata->{_vgxfp} = $vgxfp;
1367 $raydata->{_note} = $raydata->{_note}.' vgxfp='.$raydata->{_vgxfp};
1368 $raydata->{_Step} = $raydata->{_Step}.' vgxfp='.$raydata->{_vgxfp};
1369  
1370 } else {
1371 print("raydata, vgxfp, missing vgxfp,\n");
1372 }
1373 }
1374  
1375  
1376 =head2 sub vgxout
1377  
1378  
1379 =cut
1380  
1381 sub vgxout {
1382  
1383 my ( $self,$vgxout ) = @_;
1384 if ( $vgxout ne $empty_string ) {
1385  
1386 $raydata->{_vgxout} = $vgxout;
1387 $raydata->{_note} = $raydata->{_note}.' vgxout='.$raydata->{_vgxout};
1388 $raydata->{_Step} = $raydata->{_Step}.' vgxout='.$raydata->{_vgxout};
1389  
1390 } else {
1391 print("raydata, vgxout, missing vgxout,\n");
1392 }
1393 }
1394  
1395  
1396 =head2 sub vgz
1397  
1398  
1399 =cut
1400  
1401 sub vgz {
1402  
1403 my ( $self,$vgz ) = @_;
1404 if ( $vgz ne $empty_string ) {
1405  
1406 $raydata->{_vgz} = $vgz;
1407 $raydata->{_note} = $raydata->{_note}.' vgz='.$raydata->{_vgz};
1408 $raydata->{_Step} = $raydata->{_Step}.' vgz='.$raydata->{_vgz};
1409  
1410 } else {
1411 print("raydata, vgz, missing vgz,\n");
1412 }
1413 }
1414  
1415  
1416 =head2 sub vgzdata
1417  
1418  
1419 =cut
1420  
1421 sub vgzdata {
1422  
1423 my ( $self,$vgzdata ) = @_;
1424 if ( $vgzdata ne $empty_string ) {
1425  
1426 $raydata->{_vgzdata} = $vgzdata;
1427 $raydata->{_note} = $raydata->{_note}.' vgzdata='.$raydata->{_vgzdata};
1428 $raydata->{_Step} = $raydata->{_Step}.' vgzdata='.$raydata->{_vgzdata};
1429  
1430 } else {
1431 print("raydata, vgzdata, missing vgzdata,\n");
1432 }
1433 }
1434  
1435  
1436 =head2 sub vgzfp
1437  
1438  
1439 =cut
1440  
1441 sub vgzfp {
1442  
1443 my ( $self,$vgzfp ) = @_;
1444 if ( $vgzfp ne $empty_string ) {
1445  
1446 $raydata->{_vgzfp} = $vgzfp;
1447 $raydata->{_note} = $raydata->{_note}.' vgzfp='.$raydata->{_vgzfp};
1448 $raydata->{_Step} = $raydata->{_Step}.' vgzfp='.$raydata->{_vgzfp};
1449  
1450 } else {
1451 print("raydata, vgzfp, missing vgzfp,\n");
1452 }
1453 }
1454  
1455  
1456 =head2 sub vgzout
1457  
1458  
1459 =cut
1460  
1461 sub vgzout {
1462  
1463 my ( $self,$vgzout ) = @_;
1464 if ( $vgzout ne $empty_string ) {
1465  
1466 $raydata->{_vgzout} = $vgzout;
1467 $raydata->{_note} = $raydata->{_note}.' vgzout='.$raydata->{_vgzout};
1468 $raydata->{_Step} = $raydata->{_Step}.' vgzout='.$raydata->{_vgzout};
1469  
1470 } else {
1471 print("raydata, vgzout, missing vgzout,\n");
1472 }
1473 }
1474  
1475  
1476 =head2 sub xdata
1477  
1478  
1479 =cut
1480  
1481 sub xdata {
1482  
1483 my ( $self,$xdata ) = @_;
1484 if ( $xdata ne $empty_string ) {
1485  
1486 $raydata->{_xdata} = $xdata;
1487 $raydata->{_note} = $raydata->{_note}.' xdata='.$raydata->{_xdata};
1488 $raydata->{_Step} = $raydata->{_Step}.' xdata='.$raydata->{_xdata};
1489  
1490 } else {
1491 print("raydata, xdata, missing xdata,\n");
1492 }
1493 }
1494  
1495  
1496 =head2 sub get_max_index
1497  
1498 max index = number of input variables -1
1499
1500 =cut
1501
1502 sub get_max_index {
1503 my ($self) = @_;
1504 my $max_index = 8;
1505  
1506 return($max_index);
1507 }
1508
1509
1510 1;