Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-22 Thread Luis Mochan
Hi, On Mon, Aug 22, 2022 at 01:33:45PM +, Ed . wrote: > Hi Luis, > > Glad to hear it! Could you share the code you’ve used? It might make a great > demo to add to P:G:Gnuplot. The following code plots two opaque vertical bars, a black one on the left and a red one on the right. On top of

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-22 Thread Ed .
ailto:pdl-devel@lists.sourceforge.net> Subject: Re: [Pdl-devel] [Pdl-general] conv2d Sorry for the noise, it seems I've got it working now. Regards, Luis On Sun, Aug 21, 2022 at 08:23:51PM -0500, Luis Mochan wrote: > Hi, > I have used PDL::Graphics::Gnuplot to display the electric field > r

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-21 Thread Luis Mochan
Sorry for the noise, it seems I've got it working now. Regards, Luis On Sun, Aug 21, 2022 at 08:23:51PM -0500, Luis Mochan wrote: > 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

Re: [Pdl-devel] [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-devel] [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-devel] [Pdl-general] conv2d

2022-08-21 Thread Ed .
Hi Luis, The init_vars doesn’t do anything with the “vars” hash-entry other than use it literally, so all is well – since we now use C99, declarations later in the code as you added are fine. I did update it to PDL_CLDouble because the use of “double” previously was to avoid loss of precision,

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
Done, at PDLPorters/pdl. I'm still unsure about removing 'tmp' from 'init_vars', as it seems to do more than just declaring the variable. Regards, Luis On Mon, Aug 15, 2022 at 11:20:03PM +, Ed . wrote: > Sorry that you had to add extra bits! Could you PR what you have, and add the > test

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-15 Thread Ed .
Sorry that you had to add extra bits! Could you PR what you have, and add the test code as a comment on the PR? (I’m happy to bend it into the .t) Best regards, Ed From: Luis Mochan Sent: 15 August 2022 20:23 To: Ed . Cc:

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-15 Thread Luis Mochan
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 (around l. 270), removing the variable tmp, which was declared as a double, and declaring it just before the start of the broadcastloop

Re: [Pdl-devel] [Pdl-general] conv2d

2022-08-15 Thread Ed .
Hi Luis, For backward compatibility, operations default to supporting all real types, which is why you’re getting LDouble (the highest-numbered real type, but still below the complex ones). To make the various Image* operations work on native complex values, they just need telling to do so.