WRITE-SIGNALS 

&SIGNAL: WRITE-SIGNALS


FORMAT

By default, the signals are written in a Spice readable format as a Piece Wise Linear (PWL) input signal.

One alternative is the Sceptre format, i.e. a comma between time and current but neither a heading nor a closing line.

In the above 2 cases, the file contains records indicating the wires on which the signal was induced and the number of records that have been written out.

With the Sorin format, the files do not contain any header. Instead, to identify the signals, the global variables EVENT and GROUP can be used in the file name. Note the use of escaped curly brackets:

For event From 1 To 5 Do
   // Compute signals
   ...
   // Write to a file for off-line processing
   write-signals file="sorin_\\{event\\}_\\{group\\}.sig" ...
      units ampere second ...
      format sorin
Enddo
The EVENT variable is expected to be set by the user, the GROUP variable is automatically set to the number of the read-out group. In this format, the direct and cross-induced signals are added - they are not written to separate files.

Other formats can be added - please contact the author.


condition

Enables the user to write selectively a part of the signal to a dataset.

The condition is an expression in terms of the following variables:

Variable Meaning
SAMPLE the sample number, 1 to MXLIST
SIGNAL in case of a pure signal, the current in \μA
TIME the time corresponding to the sample in \μsec

The condition must evaluate to a Logical.

The condition is remembered, and re-used, by default from one call to the next - the initial default is 'True'.

Examples:

write-signal dataset "signal.list" wr-if 'time>0.5&time<1'

write-signal dataset "signal.list" wr-if 'signal<-0.02'

Call threshold_crossing(1,-0.02,`falling,plot`,n1,t1_fall) Call threshold_crossing(1,-0.02,`rising,plot`,n2,t1_rise) If n1<1 | n2<1 Then Say "Didn't find both a falling and a rising edge." Elseif t1_fall > t1_rise Then Say "Rising edge precedes falling edge." Else write-signal dataset "signal.list" ... write-if 'time>{t1_fall}&time<{t1_rise}' Say "Writing out the signal for {t1_fall} < t < {t1_rise}" Endif

The first 2 examples are simple applications of the write condition: writing out only the signal within a fixed time range and writing out only the portions of the signal that are below a threshold of -0.02\&nbsp;\&mu;A.

The 3rd example illustrates how one can obtain the times at which the signal passes a threshold in a given direction and to write out the signal between the rising and falling edges.


file

The name of the file in which you wish to write the signals.

This argument may also be prefixed with the keyword DATASET for backwards compatibility.


member

The name by which you will want to reference the member.

remark

A remark string that helps in identifying the member.

By default, the remark field will contain the read-out electrode number and an indication whether the signal is direct or cross induced,


units

By default, the time is written to the dataset in units of \&mu;sec and the current in \&mu;A. You can change this via the UNITS keyword followed by the units that you prefer:

Keyword Meaning Keyword Meaning
- - KILO-AMPERE 10\<SUP\>3\</SUP\> A
SECOND sec AMPERE A
MILLI-SECOND 10\<SUP\>-3\</SUP\> sec MILLI-AMPERE 10\<SUP\>-3\</SUP\> A
MICRO-SECOND 10\<SUP\>-6\</SUP\> sec MICRO-AMPERE 10\<SUP\>-6\</SUP\> A
NANO-SECOND 10\<SUP\>-9\</SUP\> sec NANO-AMPERE 10\<SUP\>-9\</SUP\> A
PICO-SECOND 10\<SUP\>-12\</SUP\> sec PICO-AMPERE 10\<SUP\>-12\</SUP\> A
FEMTO-SECOND 10\<SUP\>-15\</SUP\> sec FEMTO-AMPERE 10\<SUP\>-15\</SUP\> A
ATTO-SECOND 10\<SUP\>-18\</SUP\> sec ATTO-AMPERE 10\<SUP\>-18\</SUP\> A

Some commonly abbreviations of these units are recognised (e.g. nsec).


Go to the top level, to &SIGNAL, to WRITE-SIGNALS, to the topic index, to the table of contents, or to the full text.

Formatted on 21/01/18 at 16:55.