aylons / mwavepy

Automatically exported from code.google.com/p/mwavepy
GNU General Public License v3.0
1 stars 0 forks source link

Non-monotonous frequency sweeps are ignored #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When loading and plotting an s1p-file that was measured with a logarithmic 
frequency sweep, the frequency sweep is overwritten with a linear one between 
the first and the last frequency.

I think the problem shows up in network.py, line 293:
    self._frequency  = Frequency(f[0],f[-1],len(f),'hz')

I do not yet understand mwavepy's architecture as to be sure where to fix this. 
Should Frequency also support a log scale? Or why should Frequency recalculate 
the frequency list at all? (That way, we would correctly support arbitrary 
frequency lists as well.) If we decide not to, we should at least assert that 
the file's frequency lists matches our linear or logarithmic approximation 
(within a certain error range).

Original issue reported on code.google.com by s.t.optl...@gmail.com on 25 Aug 2011 at 9:43

GoogleCodeExporter commented 8 years ago
This is lacking feature more than a bug. But i think can be added fairly easily.

first the Frequency object needs to support different sweep types
and the Frequency object needs to be able to be able to have its .f property 
directly accessible.

ill take a closer look this afternoon, 

alex

Original comment by alexande...@gmail.com on 25 Aug 2011 at 12:32

GoogleCodeExporter commented 8 years ago
Please find attached diffs for frequency and network that should do the job. 
Not rigourously tested, though.

Original comment by s.t.optl...@gmail.com on 25 Aug 2011 at 2:43

Attachments: