MCPcopy Create free account
hub / github.com/PyTTaMaster/PyTTa / measurement

Function measurement

pytta/generate.py:507–695  ·  view source on GitHub ↗

Generates a measurement object of type Recording, Playback and Recording, Transferfunction, with the proper initiation arguments, a sampling rate, frequency limits, audio input and output devices and channels >>> pytta.generate.measurement(kind,

(kind='playrec',
                samplingRate=None,
                freqMin=None,
                freqMax=None,
                device=None,
                inChannels=None,
                outChannels=None,
                *args,
                **kwargs)

Source from the content-addressed store, hash-verified

505
506
507def measurement(kind='playrec',
508 samplingRate=None,
509 freqMin=None,
510 freqMax=None,
511 device=None,
512 inChannels=None,
513 outChannels=None,
514 *args,
515 **kwargs):
516 """
517 Generates a measurement object of type Recording, Playback and Recording,
518 Transferfunction, with the proper initiation arguments, a sampling rate,
519 frequency limits, audio input and output devices and channels
520
521 >>> pytta.generate.measurement(kind,
522 [lengthDomain,
523 fftDegree,
524 timeLength,
525 excitation,
526 outputAmplification],
527 samplingRate,
528 freqMin,
529 freqMax,
530 device,
531 inChannels,
532 outChannels,
533 comment)
534
535 The parameters between brackets are different for each value of the (kind)
536 parameter.
537
538 >>> msRec = pytta.generate.measurement(kind='rec')
539 >>> msPlayRec = pytta.generate.measurement(kind='playrec')
540 >>> msFRF = pytta.generate.measurement(kind='frf')
541
542 The input arguments may be different for each measurement kind.
543
544 Options for (kind='rec'):
545
546 - lengthDomain: 'time' or 'samples', defines if the recording length
547 will be set by time length, or number of samples;
548
549 - timeLength: [s] used only if (domain='time'), set the duration of the
550 recording, in seconds;
551
552 - fftDegree: represents a power of two value that defines the number of
553 samples to be recorded:
554
555 >>> numSamples = 2**fftDegree
556
557 - samplingRate: [Hz] sampling frequency of the recording;
558 - freqMin: [Hz] smallest frequency of interest;
559 - freqMax: [Hz] highest frequency of interest;
560 - device: audio I/O device to use for recording;
561 - inChannels: list of active channels to record;
562 - comment: any commentary about the recording.
563
564

Callers 1

__h5_unpackFunction · 0.90

Calls 7

RecMeasureClass · 0.90
PlayRecMeasureClass · 0.90
FRFMeasureClass · 0.90
sweepFunction · 0.85
splitMethod · 0.80
getMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected