[FLASH-USERS] QuickFlash Interpolation Question

Ken Dere kdere at gmu.edu
Tue Feb 23 10:08:14 EST 2010


Hi

I am  starting to use Visit for FLASH files inside Python.  I have put
together the following script which shows how to get started.


# assume this file is named visit_test.py
# callling syntax:
# > python -i visit_test.py myfilename
# ipython > %run visit_test.py myfilename
import sys
filename=sys.argv[1]
import visit
try:
    visit.Launch()
    visit.OpenComputeEngine('localhost')
except:
    pass
args = ('-assume_format', 'FLASH')
visit.OpenMDServer('localhost', args)
visit.OpenDatabase(filename)
visit.AddPlot('Pseudocolor', 'mesh_blockandlevel/vely')
p = visit.PseudocolorAttributes()
p.minFlag = 1
p.min = -2.e+6
p.maxFlag = 1
p.max = 2.e+6
p.colorTableName = 'hot'
visit.SetPlotOptions(p)
visit.DrawPlots()
visit.CloseComputeEngine('localhost')



On 02/19/10 05:39, Mats Holmstrom wrote:
>
> Hi Randy,
>   I'm also trying to script Visit plots of FLASH data.
> It would be really helpful to be able to see the Python calls of the GUI.
> I have not been able to do that.
> The "Control-Command" window seems to only be for input of Python
> commands.
>
> Mats Holmstrom
>
>
> On 02/18/2010 10:35 PM, Randy Hudson wrote:
>>
>> Sam,
>>
>> Resample is documented at
>> https://wci.llnl.gov/codes/visit/1.5/VisItUsersManual1.5.pdf, and in
>> visit's onboard manual (probably the same text).
>>
>> The python interface manual is at
>> https://wci.llnl.gov/codes/visit/1.4.1/PythonInterface1.4.1.pdf.  If
>> that doesn't suffice, you might learn more from the Command window
>> (selectable from the Control menu), which shows the python calls that
>> implement what you're doing in the visit GUI.
>>
>> You submit a python script to visit by running "visit -cli -s
>> <scriptname>", and you can loop through multiple files in a script.
>>
>>
>> On Feb 18, 2010, at 1:06 PM, Nathan Hearn wrote:
>>
>>> Hi Sam,
>>>
>>>    For automation, you might want to look at the Python interface for
>>> VisIt.  It has been a while since I have used it, but I don't remember
>>> it being very difficult.  (As I recall, the session files that you can
>>> save in VisIt often have a bit of Python code that you can reference.)
>>> Such a script can be run from the command line without requiring the
>>> GUI to load.
>>>
>>>
>>> - Nathan
>>>
>>>
>>> On Thu, Feb 18, 2010 at 08:22, Samuel Friedman
>>> <friedman at astro.wisc.edu <mailto:friedman at astro.wisc.edu>> wrote:
>>>> Dear Randy,
>>>>
>>>> Where would the documentation for resample be?  Also, can this be done
>>>> through some kind of command line interface?  I don't want to select
>>>> manually "File -> Export" many times (which I need to do).
>>>>
>>>> Thanks,
>>>> Sam
>>
>>
>> Randy.
>>
>>
>>
>

-- 
Kenneth P. Dere
Research Professor of Solar Physics
Dept. of Computational and Data Sciences
MS 6A2
George Mason University
4400 University Drive
Fairfax VA 22030
703-993-4555
703-993-1992 FAX
kdere at gmu.edu




More information about the flash-users mailing list