Re: [Pdl-general] conv2d

2022-10-11 Thread Eric Wheeler
On Mon, 10 Oct 2022, Luis Mochan wrote: > Hi Eric, > > With some colleagues we have been developing a system with PDL to > calculate optical properties of metamaterials: macroscopic response, > electric field, non-linear response, spatial dispersion... > > https://github.com/wlmb/Photonic >

Re: [Pdl-general] conv2d

2022-10-10 Thread Luis Mochan
Hi Eric, With some colleagues we have been developing a system with PDL to calculate optical properties of metamaterials: macroscopic response, electric field, non-linear response, spatial dispersion... https://github.com/wlmb/Photonic https://metacpan.org/pod/Photonic Regards, Luis On Mon,

Re: [Pdl-general] conv2d

2022-10-10 Thread Eric Wheeler
On Mon, 15 Aug 2022, Luis Mochan wrote: > Hello, > I tried to use conv2d from PDL::Image2D to make a simple average, as in > $z->conv2d(ones(3,3))/9; > to take the arithmetic average a pixel with its neareast > neighbors. However, what I want to average is a component of an > electric field

Re: [Pdl-general] conv2d

2022-08-21 Thread Luis Mochan
Hi, I have used PDL::Graphics::Gnuplot to display the electric field resulting from a calculation for some system. I would like to overlay the image of the system over the field. I tried to use the 'png transparent' terminal and made the plots {with=>'rgbalpha'} to have an alpha channel, but it

Re: [Pdl-general] conv2d

2022-08-21 Thread Luis Mochan
Hi Ed, On Sun, Aug 21, 2022 at 05:52:11PM +, Ed . wrote: > Hi Luis, > > The init_vars doesn’t do... > I’ve now merged it to the main branch, thank you! Could you pull it and make > sure it works as you expect with your code, so you can at least not rely on a > local modification? It seems

Re: [Pdl-general] conv2d

2022-08-21 Thread Ed .
To: Ed .<mailto:ej...@hotmail.com> Cc: perldl<mailto:pdl-general@lists.sourceforge.net>; perldl<mailto:pdl-de...@lists.sourceforge.net> Subject: Re: [Pdl-general] conv2d Done, at PDLPorters/pdl. I'm still unsure about removing 'tmp' from 'init_vars', as it seems to do more than jus

Re: [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
sts.sourceforge.net>; > perldl<mailto:pdl-de...@lists.sourceforge.net> > Subject: Re: [Pdl-general] conv2d > > Thaks Ed, > I modified conv2d as you suggested. The result became a CDouble, but > the imaginary part disappeared. I could fix it by also changing the > init_vars line (

Re: [Pdl-general] conv2d

2022-08-15 Thread Ed .
l<mailto:pdl-general@lists.sourceforge.net>; perldl<mailto:pdl-de...@lists.sourceforge.net> Subject: Re: [Pdl-general] conv2d Thaks Ed, I modified conv2d as you suggested. The result became a CDouble, but the imaginary part disappeared. I could fix it by also changing the init_vars line (

Re: [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
gt; Ed > > From: Luis Mochan<mailto:moc...@icf.unam.mx> > Sent: 15 August 2022 17:39 > To: perldl<mailto:pdl-general@lists.sourceforge.net>; > perldl<mailto:pdl-de...@lists.sourceforge.net> > Subject: [Pdl-general] conv2d > > Hello, > I tried to use conv2d fr

Re: [Pdl-general] conv2d

2022-08-15 Thread Ed .
et>; perldl<mailto:pdl-de...@lists.sourceforge.net> Subject: [Pdl-general] conv2d Hello, I tried to use conv2d from PDL::Image2D to make a simple average, as in $z->conv2d(ones(3,3))/9; to take the arithmetic average a pixel with its neareast neighbors. However, what I want t

[Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
Hello, I tried to use conv2d from PDL::Image2D to make a simple average, as in $z->conv2d(ones(3,3))/9; to take the arithmetic average a pixel with its neareast neighbors. However, what I want to average is a component of an electric field which is complex valued. It turns out that conv2d