My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
spfile.h
Go to the documentation of this file.
1 /*
2  * spfile.h - S-parameter file class definitions
3  *
4  * Copyright (C) 2004, 2005, 2006, 2008, 2009 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id: spfile.h 1825 2011-03-11 20:42:14Z ela $
22  *
23  */
24 
25 #ifndef __SPFILE_H__
26 #define __SPFILE_H__
27 
28 class vector;
29 class matvec;
30 class dataset;
31 class interpolator;
32 
34 {
35  public:
36  spfile_vector ();
37  ~spfile_vector ();
38 
39  public:
40  void prepare (vector *, vector *, bool, int, int);
41  nr_complex_t interpolate (nr_double_t);
42 
43  public:
44  vector * v;
45  vector * f;
46  int isreal;
48  int r;
49  int c;
50 };
51 
52 class spfile : public circuit
53 {
54  public:
55  CREATOR (spfile);
56  ~spfile ();
57  void initSP (void);
58  void calcSP (nr_double_t);
59  void calcNoiseSP (nr_double_t);
60  void initDC (void);
61  void initTR (void);
62  void initAC (void);
63  void calcAC (nr_double_t);
64  void calcNoiseAC (nr_double_t);
65  void createIndex (void);
66  void prepare (void);
67  void createVector (int, int);
68  matrix correlationMatrix (nr_double_t, nr_complex_t, nr_double_t, matrix);
69  nr_double_t noiseFigure (matrix, matrix, nr_double_t&, nr_complex_t&,
70  nr_double_t&);
75  matrix getInterpolMatrixS (nr_double_t);
76  matrix calcMatrixCs (nr_double_t);
77 
78  private:
79  dataset * data;
80  vector * sfreq;
81  vector * nfreq;
82  spfile_vector * spara;
83  spfile_vector * RN;
84  spfile_vector * FMIN;
85  spfile_vector * SOPT;
86  char paraType;
87  int dataType;
88  int interpolType;
89 };
90 
91 #endif /* __SPFILE_H__ */