Re: Piping SAV [message #72579] |
Fri, 24 September 2010 00:20 |
rogass
Messages: 200 Registered: April 2008
|
Senior Member |
|
|
On 24 Sep., 05:17, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Sep 23, 7:54 pm, chris <rog...@googlemail.com> wrote:
>
>> Ok, thanks. Can you give an example? Or in other words :)
>
> If you want to spawn things, you just assemble a command (IDL or not)
> into a string, and give that to spawn.
>
> If it is to run a savefile:
>
> spawn,'idl -rt=whatever.sav'
>
> You may or not want to capture the output of the command, with spawn's
> arguments.
>
> But it does not have to be a savefile. You could do
>
> spawn,'idl -e "print,acos(-1d0)"'
>
> Or run a batch file:
>
> spawn,'idl something.pro'
Thank you. Now I understand it.
Regards
CR
|
|
|
Re: Piping SAV [message #72583 is a reply to message #72579] |
Thu, 23 September 2010 20:17  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Sep 23, 7:54 pm, chris <rog...@googlemail.com> wrote:
> Ok, thanks. Can you give an example? Or in other words :)
If you want to spawn things, you just assemble a command (IDL or not)
into a string, and give that to spawn.
If it is to run a savefile:
spawn,'idl -rt=whatever.sav'
You may or not want to capture the output of the command, with spawn's
arguments.
But it does not have to be a savefile. You could do
spawn,'idl -e "print,acos(-1d0)"'
Or run a batch file:
spawn,'idl something.pro'
|
|
|
Re: Piping SAV [message #72584 is a reply to message #72583] |
Thu, 23 September 2010 20:07  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Sep 23, 7:54 pm, chris <rog...@googlemail.com> wrote:
>
> Ok, thanks. Can you give an example? Or in other words :)
This may give a taste of how to do things with the bridge:
obridge=idl_idlbridge() ;make the bridge
obridge.setvar,'x',dindgen(1e6) ;put something into a var called x in
the bridge
obridge.execute,'for i=0L,3e2 do yb=cos(x)',/nowait ;do some stuff in
the bridge, asynchronously
print,obridge.status() ;find out if the bridge is done
; 1
;(do some stuff here while the bridge is busy)
print,obridge.status() ;find out if the bridge is done
; 0
y=obridge.getvar('x') ;get a variable called y from the bridge
obridge.cleanup ;destroy the bridge when done
|
|
|
Re: Piping SAV [message #72587 is a reply to message #72584] |
Thu, 23 September 2010 15:54  |
rogass
Messages: 200 Registered: April 2008
|
Senior Member |
|
|
On 24 Sep., 00:37, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Sep 23, 7:33 pm, chris <rog...@googlemail.com> wrote:
>
>> Hi,
>> is it possible to pipe SAV files by SPAWN or to execute IDL
>> subroutines while other ones are running?
>
>> Thanks
>
>> CR
>
> You can spawn a call to idl that uses a sav file, but the sav file
> must be complete. It does not seem to make sense to pipe a sav file.
> Or you can use an idl_idlbridge to make a new session, and communicate
> with it through the bridge object.
Ok, thanks. Can you give an example? Or in other words :)
_=(replicate({c=call_function('PLS_PAULO_GIVE_ME_SOME_EXAMPL ES',/
VERBOSE},indgen(10))).(0)
Thanks
CR
|
|
|
Re: Piping SAV [message #72588 is a reply to message #72587] |
Thu, 23 September 2010 15:37  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Sep 23, 7:33 pm, chris <rog...@googlemail.com> wrote:
> Hi,
> is it possible to pipe SAV files by SPAWN or to execute IDL
> subroutines while other ones are running?
>
> Thanks
>
> CR
You can spawn a call to idl that uses a sav file, but the sav file
must be complete. It does not seem to make sense to pipe a sav file.
Or you can use an idl_idlbridge to make a new session, and communicate
with it through the bridge object.
|
|
|