phase

How to get Pi-Phase from sound to get an destructive interference in Python

元气小坏坏 提交于 2020-01-06 02:28:10
问题 first: I don't know where to put this topic because it's an programming and sound-question. Please comment if it's at the wrong place. But this is my question: How can I load a sound into Python and create the "reverse-sound" of it. So when I play the original and the "pi-shifted" file, they create an destructive interference and cancel each other out so you hear almost nothing. Are there any Libraries to use? Here's a small explanation-video. Thank you a lot. Just want to experiment a little

Modifying JSF Component Tree in PhaseListener

蹲街弑〆低调 提交于 2019-12-31 04:09:09
问题 I'm having an issue. I've implemented a PhaseListener, which is meant to add a style class to any UIInput components in the tree that have messages attached to them, and removes the style class if it doesn't have any messages attached to them. The PhaseListener runs in the RENDER_RESPONSE phase, and does it's work in both the beforePhase and afterPhase methods while debugging. While debugging, I found that beforePhase doesn't have access to the full component tree, but afterPhase does. Any

Request-scoped beans and datamodel initialization?

六眼飞鱼酱① 提交于 2019-12-23 12:35:59
问题 UPDATE II: OK, I managed to narrow it down a little. I have a page with a datatable with sorting and filtering functionalities, both taking place in the DB. In other words, I do not use the embedded functionality of the rich:datatable I use, but rather let the DB do the work. I work with request-scoped beans. The only session-scoped beans contain the sorting and filtering of my interface. Filtering for each column is bound to the certain session bean fields. As such, it is actually updated

JSF: why is empty test in rendered invoked during apply request values phase during form submission under request scoped POST REDIRECT GET

我是研究僧i 提交于 2019-12-22 16:30:45
问题 This question is spawned from the partial answer to JSF2: why does empty test in rendered of panelGroup in composite prevent action from being called? In the following an Element is an @Entity with a name and id. A view.xhtml JSF page takes the id as a viewParam and uses setID(Long id) of the @ManagedBean @RequestScoped ElementController to trigger loading of the corresponding Element by id from database (that plays no further role in the question) and this found Element is set as the

Unwrap angle to have continuous phase

给你一囗甜甜゛ 提交于 2019-12-22 07:39:12
问题 Let's say I have an array of phases similar to this: import numpy as np import matplotlib.pyplot as plt phase = np.linspace(0., 100., 1000) % np.pi plt.plot(phase) plt.show() (with many discontinuities like this) How to get an array of more "continuous" phases from it? Of course, I already tried with np.unwrap: plt.plot(np.unwrap(phase)) or plt.plot(np.unwrap(phase),discont=0.1) but it stays exactly similar: What I expected was an unwrapping like this: 回答1: If you want to keep your original

Change phase of a signal in frequency domain (MatLab)

北城以北 提交于 2019-12-22 01:10:14
问题 I posted this question on dsp.stackexchange, and was informed that it was more relevant for stackoverflow as it is primarily a programming question: I am attempting to write a code which allows me to change the phase of a signal in the frequency domain. However, my output isn't exactly correct, so something must be wrong. For a simple example assume that we have the function y = sin(2*pi*t) and want to implement a phase shift of -pi/2. My code looks as follows: clear all close all N = 64;

apply fourier shift theorem to complex signal

不想你离开。 提交于 2019-12-13 00:45:35
问题 Im trying to apply the fourier phase shift theorem to a complex signal in R. However, only the magnitude of my signal shifts as I expect it. I think it should be possible to apply this theorem to complex signals, so probably I make an error somewhere. My guess is that there is an error in the frequency axis I calculate. How do I correctly apply the fourier shift theorem to a complex signal (using R)? i = complex(0,0,1) t.in = (1+i)*matrix(c(1,0,0,0,0,0,0,0,0,0)) n.shift = 5 #the output of fft

VHDL - Phase Accumulator with feedback

风流意气都作罢 提交于 2019-12-11 04:26:55
问题 I am trying to create a phase accumulator using VHDL that has the following characteristics. Inputs: D (Input signal) RESET CE CLK Outputs: Q (output signal - feedback) Source code: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Phase_accu is port ( D : in std_logic_vector(3 downto 0); CE : in std_logic; CLK : in std_logic; RESET : in std_logic; Q : out std_logic_vector(15 downto 0) ); end Phase_accu; architecture Behavioral of

Mvn compile before exec

时光毁灭记忆、已成空白 提交于 2019-12-10 12:34:05
问题 I am trying to set up my POM such that when I do mvn exec:exec or mvn exec:java it will first compile the source and iff successful, execute it. I have the following and have tried moving the <execution> part about but can't get it to work: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> <executions> <execution> <phase>exec<

translation/rotation through phase correlation in python

旧城冷巷雨未停 提交于 2019-12-10 11:33:12
问题 I have two pictures, one that was the original and another one that I have modified so that it's translated up and left a bit and then rotated 90 degrees (so the shape of the picture is transposed as well). Now I'd like to determine how many pixels (or any distance unit) the modified picture is translated from the original, as well as the degrees of rotation relative to the original. Phase correlation is supposed to solve this problem by first converting the coordinates to logpolar