Google групе више не подржавају нове Usenet постове ни праћења. Претходни садржај остаје видљив.

SKILL: How to convert a waveform object into a list?

2.659 прегледа
Пређи на прву непрочитану поруку

Bernd Fischer

непрочитано,
17. 8. 2006. 11:56:5217.8.06.
Hi,

I'm curios if it is possible to convert a
waveform object into a list?


I knew that I can use 'ocnPrint', e.g.
ocnPrint( o_wave ?output t_file )
to print a waveform object into a file.

But I want to postprocess the data before
I write them to a file. And I didn't want to
do a cost effective file out, file in and file out
again.

Thanks Bernd

Svenn Bjerkem

непрочитано,
17. 8. 2006. 13:06:1717.8.06.

How about using some of the functions that Andew use to create
waveforms with new xaxis in his abChangeXAxis function? I just saw it
the other day when the question plot somewave vs otherwave in ocean
showed up again. drGetWaveform* should also give some hits in
cdsFinder.

I personally don't like the way ocnPrint formats the data because it is
more or less useless without further processing. I need to move a lot
of ocnPrint data over in excel to postprocess because we haven't
discovered qtiplot, or labplot in my company yet. (But I would rather
like to have something that perl can read in to use
Spreadsheet::WriteExcel perl module)

Any perl hackers out there who have time and energy to write a wrapper
around the psf executable to extract data from the psfbin waveform data
on a command line base. (No OCEAN here) I would gladly cooperate.

--
Svenn

Andrew Beckett

непрочитано,
18. 8. 2006. 02:30:5118.8.06.

A SKILL function to do what Bernd wants:

/* abWaveToList.il

Author A.D.Beckett
Group Custom IC (UK), Cadence Design Systems Ltd.
Language SKILL
Date Nov 17, 2003
Modified
By

Convert a waveform to a list

***************************************************

SCCS Info: @(#) abWaveToList.il 11/17/03.15:08:15 1.1

*/

/************************************************************************
* *
* (abWaveToList wave @key transpose) *
* *
* Take a waveform object, and return it as a list of xy pairs. Or *
* if transpose is set, it returns a list of x values followed by a list *
* of y values. *
* *
************************************************************************/


(procedure (abWaveToList wave @key transpose)
(let (xList yList xyList len
(xVec (drGetWaveformXVec wave))
(yVec (drGetWaveformYVec wave))
)
(setq len (drVectorLength xVec))
;-----------------------------------------------------------------
; Return value of this if is the list
;-----------------------------------------------------------------
(if transpose
(progn
(for i 0 (sub1 len)
(setq xList (tconc xList (drGetElem xVec i)))
(setq yList (tconc yList (drGetElem yVec i)))
)
(list (car xList) (car yList))
)
; else
(progn
(for i 0 (sub1 len)
(setq xyList (tconc xyList (list (drGetElem xVec i)
(drGetElem yVec i))))
)
(car xyList)
)
) ; if
) ; let
) ; procedure

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.

Bernd Fischer

непрочитано,
18. 8. 2006. 04:28:5118.8.06.
Thanks guys, especially Andrew, this helps me to move further.

Cheers Bernd

Sylvio Triebel

непрочитано,
12. 9. 2006. 07:52:3612.9.06.
Hi Andrew,
do you have an estimation, how fast this conversion would be
compared with ocnPrint (which is probably a native implementation)?

Thanks,
Sylvio

Andrew Beckett

непрочитано,
8. 10. 2006. 11:35:068.10.06.
On Tue, 12 Sep 2006 13:52:36 +0200, Sylvio Triebel <Sylvio....@nospam.com>
wrote:

>Hi Andrew,
>do you have an estimation, how fast this conversion would be
>compared with ocnPrint (which is probably a native implementation)?
>
>Thanks,
>Sylvio
>

I don't think there would be much in it. I've not done any profiling, but I
expect it to be similar speed.

ign...@gmail.com

непрочитано,
3. 7. 2019. 12:15:313.7.19.
On Thursday, August 17, 2006 at 2:06:17 PM UTC-3, Svenn Are Bjerkem wrote:
> Any perl hackers out there who have time and energy to write a wrapper
> around the psf executable to extract data from the psfbin waveform data
> on a command line base. (No OCEAN here) I would gladly cooperate.

Hi Svenn,

Why not use nutbin format? It is very easy to parse.

Regards
Ignacio
0 нових порука