Title: Running script files
I have written a script to create a series of slices and write them to a single file. I want to be able to invoke dx in script mode, passing this file to it so that I can use a batch manager (PBS) to run the file. I thought I'd test this with just a slice or two first. Problem is, that I don't get file at the end of it. If I start dx in script mode and then "include <scriptname> " it works fine. If I invoke dx with a command line
"dx -memory 1024 -processors 2 -script <scriptname>"
there is no file written. I am using Unix6.5 on an SGI 3800, and dx4.1.3. The script file is included below.
Regards,
Cameron Huddlestone-Holmes
School of Earth Sciences,
James Cook University,
Townsville,
Queensland. 4811.
Australia.
[EMAIL PROTECTED]
+61 7 4781 4884
--
--------------------------------------------------------------------------
//This is an OpenDX script written by C. Huddlestone-Holmes 13/8/02
//It is for making a stack of horizontal slices of the reduced versions
//of the high-res data. The slices are at ~0.117mm intervals, from 6.0mm to
//-6.0mm. They have an x and y axis, and the z value. The exported file
//is in image magick "miff" format
macro all_slice(slice, data, cmap)
{
//Slice the data
sliced = Slice (data, "z", slice) [cache:0];
//Color the data
colored = Color (input = sliced, color = cmap) [cache:0];
//Create a camera, with a 400 x 400 output, y axis up the page
cam = AutoCamera (object = colored, resolution = 400, aspect = 1, up = [0 1 0]);
//Create some axes
withaxes = AutoAxes (input = colored, camera = cam, labels = {"X","Y"}, ticks = 24, corners = {[-6 -6 1],[6 6 1]}, grid = 1, frame = 1, labelscale = 0.5, annotation = {"background","grid","labels","ticks"}, colors = {"clear","lightgray","white","orange"});
//Label the z-slice
zslice = Compute ("6 - ($0*(12.0/306.0))", slice);
label = Format ("z = %3.2f", zslice);
label = Caption (string = label, position = [0.795 0.19], height = 12);
//collect the label and image
collected = Collect (label, withaxes);
//The image is rendered
rendered = Render (collected, cam) [cache:0];
WriteImage (image = rendered, name = "/fast/jc120855/hrdata/v2091hzslices", format = "miff");
}
//Import file
data = "" (name = "/fast/jc120855/hrdata/v2091ptlow.dx");
//Import a colormap
cmap = Import (name = "/hpchome/55/jc120855/nets/lowslice.cm");
//Use the sequencer to step through the slices
@deltaframe = 3;
@startframe = 2;
@endframe = 8;
@nextframe = @startframe;
sequence all_slice(@frame, data, cmap);
play;
[opendx-users] Running script files
Cameron Huddlestone-Holmes Thu, 22 Aug 2002 23:25:12 -0700 (PDT)
- [opendx-users] Running script files Cameron Huddlestone-Holmes
- [opendx-users] Re: Running script files Randall Hopper
- Re: [opendx-users] Re: Running script ... Cameron Huddlestone-Holmes
- [opendx-users] Re: Running script ... Randall Hopper
