Commit 1c2b046f authored by bonnell's avatar bonnell
Browse files

Revised pick documenation to reflect named args and python dictionary return

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23817 18c085ea-50e0-402c-830e-de6fd14e8384
parent a1fa7d93
......@@ -3255,7 +3255,7 @@ const char *visit_GetPickOutput_doc =
"AddPlot(\"Pseudocolor\", \"d\")\n"
"DrawPlots()\n"
"\n"
"ZonePick((0.4, 0.6), (\"default\", \"u\", \"v\"))\n"
"ZonePick(coord=(0.4, 0.6, 0), vars=(\"default\", \"u\", \"v\"))\n"
"s = GetPickOutput()\n"
"print s\n"
"o = GetPickOutputObject()\n"
......@@ -4313,27 +4313,33 @@ const char *visit_NodePick_doc =
"\n"
"Synopsis:\n"
"\n"
"NodePick(point) -> integer\n"
"NodePick(point, variables) -> integer\n"
"NodePick(sx, sy) -> integer\n"
"NodePick(sx, sy, variables) -> integer\n"
"NodePick(namedarg1=arg1, namedarg2=arg2, ...) -> dictionary\n"
"\n"
"Required arguments:\n"
" coord (tuple of doubles): Spatial coordinate (x, y, z).\n"
" OR\n"
" x (integer): A screen X location (in pixels) offset from the left side\n"
" of the visualization window.\n"
" y (integer): A screen Y location (in pixels) offset from the bottom\n"
" of the visualization window.\n"
"\n"
"Arguments:\n"
"Optional named args:\n"
" vars (tuple of strings): variable names for which to return results.\n"
" (default: currently plotted variable)\n"
"\n"
"point\n"
"A tuple of values that describe the coordinate of where we want to perform\n"
"the nodal pick.\n"
"variables\n"
"An optional tuple of strings containing the names of the variables for\n"
"which we want information. The tuple can contain the name \"default\" if\n"
"you want information for the plotted variable.\n"
"sx\n"
"A screen X location (in pixels) offset from the left side of the\n"
"visualization window.\n"
"sy\n"
"A screen Y location (in pixels) offset from the bottom of the\n"
"visualization window.\n"
"Time related arguments(optional):\n"
" do_time (integer): 1 -> do a time pick, 0 (default) -> do not do a time pick\n"
" start_time (integer): Starting frame index (default: 0)\n"
" end_time (integer): Ending frame index (default: num_timestates - 1)\n"
" stride (integer): Stride for advancing in time (default: 1)\n"
" preserve_coord (integer): 0 -> used picked element (default), 1-> used picked coordinate\n"
" curve_plot_type (integer): 0 -> single Y axis (default), 1 -> multiple Y Axes\n"
"\n"
"\n"
"Returns:\n"
"\n"
"PickByNode returns a python dictionary of the pick results, unless do_time is specified,\n"
"then a time curve is created in a new window.\n"
"\n"
"\n"
"Returns:\n"
......@@ -4355,10 +4361,10 @@ const char *visit_NodePick_doc =
"DrawPlots()\n"
"\n"
"# Perform node pick in screen space\n"
"NodePick(300,300)\n"
"pick_out = NodePick(x=200,y=200)\n"
"\n"
"# Perform node pick in world space.\n"
"NodePick((-5.0, 5.0))\n"
"pick_out = NodePick(coord=(-5.0, 5.0, 0))\n"
;
const char *visit_NumColorTableNames_doc =
"NumColorTableNames\n"
......@@ -4714,31 +4720,37 @@ const char *visit_ZonePick_doc =
"\n"
"Synopsis:\n"
"\n"
"ZonePick(point) -> integer\n"
"ZonePick(point, variables) -> integer\n"
"ZonePick(sx, sy) -> integer\n"
"ZonePick(sx, sy, variables) -> integer\n"
"ZonePick(namedarg1=arg1, namedarg2=arg2, ...) -> dictionary\n"
"\n"
"Required arguments:\n"
" coord (tuple of doubles): Spatial coordinate (x, y, z).\n"
" OR\n"
" x (integer): A screen X location (in pixels) offset from the left side\n"
" of the visualization window.\n"
" y (integer): A screen Y location (in pixels) offset from the bottom\n"
" of the visualization window.\n"
"\n"
"Arguments:\n"
"Optional named args:\n"
" vars (tuple of strings): variable names for which to return results.\n"
" (default: currently plotted variable)\n"
"\n"
"point\n"
"A tuple of values that describe the coordinate of where we want to perform\n"
"the zonal pick.\n"
"variables\n"
"An optional tuple of strings containing the names of the variables for\n"
"which we want information. The tuple can contain the name \"default\" if\n"
"you want information for the plotted variable.\n"
"sx\n"
"A screen X location (in pixels) offset from the left side of the\n"
"visualization window.\n"
"sy\n"
"A screen Y location (in pixels) offset from the bottom of the\n"
"visualization window.\n"
"Time related arguments(optional):\n"
" do_time (integer): 1 -> do a time pick, 0 (default) -> do not do a time pick\n"
" start_time (integer): Starting frame index (default: 0)\n"
" end_time (integer): Ending frame index (default: num_timestates - 1)\n"
" stride (integer): Stride for advancing in time (default: 1)\n"
" preserve_coord (integer): 0 -> used picked element (default), 1-> used picked coordinate\n"
" curve_plot_type (integer): 0 -> single Y axis (default), 1 -> multiple Y Axes\n"
"\n"
"\n"
"Returns:\n"
"\n"
"PickByZone returns a python dictionary of the pick results, unless do_time is specified,\n"
"then a time curve is created in a new window.\n"
"If the picked variable is node centered, the variable values are grouped according to\n"
"incident node ids.\n"
"\n"
"\n"
"The ZonePick function prints pick information for the cell (a.k.a zone) that\n"
"contains the specified point. The point can be specified as a 2D or 3D\n"
"point in world space or it can be specified as a pixel location in screen\n"
......@@ -4757,9 +4769,9 @@ const char *visit_ZonePick_doc =
"DrawPlots()\n"
"\n"
"# Perform zone pick in screen space\n"
"ZonePick(300,300)\n"
"pick_out = ZonePick(x=200,y=200)\n"
"# Perform zone pick in world space.\n"
"ZonePick((-5.0, 5.0))\n"
"pick_out = ZonePick(coord = (-5.0, 5.0, 0))\n"
;
const char *visit_PickByGlobalNode_doc =
"PickByGlobalNode\n"
......@@ -4768,22 +4780,28 @@ const char *visit_PickByGlobalNode_doc =
"\n"
"Synopsis:\n"
"\n"
"PickByGlobalNode(node) -> integer\n"
"PickByGlobalNode(node, variables) -> integer\n"
"PickByGlobalNode(namedarg1=arg1, ...)\n"
"\n"
"Required named arguments:\n"
" element (integer): Global node id.\n"
"\n"
"Arguments:\n"
"Optional named arguments:\n"
" vars (tuple of strings): variable names\n"
" (default if not specified is currently plotted variabled)\n"
"\n"
"node\n"
"Integer index of the global node for which we want pick information.\n"
"variables\n"
"A tuple of strings containing the names of the variables for which we want\n"
"pick information.\n"
"Time related arguments(optional):\n"
"\n"
" do_time (integer): 1 -> do a time pick, 0 (default) -> do not do a time pick\n"
" start_time (integer): Starting frame index (default: 0)\n"
" end_time (integer): Ending frame index (default: num_timestates - 1)\n"
" stride (integer): Stride for advancing in time (default: 1)\n"
" preserve_coord (integer): 0 -> used picked element (default), 1-> used picked coordinate\n"
" curve_plot_type (integer): 0 -> single Y axis (default), 1 -> multiple Y Axes\n"
"\n"
"\n"
"Returns:\n"
"\n"
"PickByGlobalNode returns 1 on success and 0 on failure.\n"
"PickByGlobalNode returns a python dictionary of pick results.\n"
"\n"
"\n"
"Description:\n"
......@@ -4801,13 +4819,17 @@ const char *visit_PickByGlobalNode_doc =
"Example:\n"
"\n"
"% visit -cli\n"
"OpenDatabase(\"/usr/gapps/visit/data/multi_curv2d.silo\")\n"
"AddPlot(\"Pseudocolor\", \"d\")\n"
"OpenDatabase(\"/usr/gapps/visit/data/global_node.silo\")\n"
"AddPlot(\"Pseudocolor\", \"dist\")\n"
"DrawPlots()\n"
"\n"
"# Pick on node 200 in the first domain.\n"
"PickByGlobalNode(200)\n"
"print \"Last pick = \", GetPickOutput()\n"
"# Pick on global node 236827\n"
"pick_out = PickByGlobalNode(element=246827)\n"
"# examine output\n"
"print 'value of dist at global node 246827: %g' % pick_out['dist']\n"
"print 'local domain/node: %d/%d' % (pick_out['domain_id'], pick_out['node_id'])\n"
"# get last pick output as string\n"
"print 'Last pick = ', GetPickOutput()\n"
;
const char *visit_PickByGlobalZone_doc =
"PickByGlobalZone\n"
......@@ -4816,22 +4838,28 @@ const char *visit_PickByGlobalZone_doc =
"\n"
"Synopsis:\n"
"\n"
"PickByGlobalZone(id) -> integer\n"
"PickByGlobalZone(id, variables) -> integer\n"
"PickByGlobalZone(namedarg1=arg1, ...)\n"
"\n"
"Required named arguments:\n"
" element (integer): Global zone id.\n"
"\n"
"Arguments:\n"
"Optional named arguments:\n"
" vars (tuple of strings): variable names\n"
" (default if not specified is currently plotted variabled)\n"
"\n"
"id\n"
"Integer index of the global cell for which we want pick information.\n"
"variables\n"
"A tuple of strings containing the names of the variables for which we want\n"
"pick information.\n"
"Time related arguments(optional):\n"
"\n"
" do_time (integer): 1 -> do a time pick, 0 (default) -> do not do a time pick\n"
" start_time (integer): Starting frame index (default: 0)\n"
" end_time (integer): Ending frame index (default: num_timestates - 1)\n"
" stride (integer): Stride for advancing in time (default: 1)\n"
" preserve_coord (integer): 0 -> used picked element (default), 1-> used picked coordinate\n"
" curve_plot_type (integer): 0 -> single Y axis (default), 1 -> multiple Y Axes\n"
"\n"
"\n"
"Returns:\n"
"\n"
"PickByGlobalZone returns 1 on success and 0 on failure.\n"
"PickByGlobalZone returns a python dictionary of pick results.\n"
"\n"
"\n"
"Description:\n"
......@@ -4848,44 +4876,49 @@ const char *visit_PickByGlobalZone_doc =
"\n"
"Example:\n"
"\n"
"% visit -cli\n"
"OpenDatabase(\"/usr/gapps/visit/data/multi_curv2d.silo\")\n"
"AddPlot(\"Pseudocolor\", \"d\")\n"
"OpenDatabase(\"/usr/gapps/visit/data/global_node.silo\")\n"
"AddPlot(\"Pseudocolor\", \"p\")\n"
"DrawPlots()\n"
"\n"
"# Pick on cell 200 in the first domain.\n"
"PickByGlobalZone(200)\n"
"print \"Last pick = \", GetPickOutput()\n"
"# Pick on global zone 237394\n"
"pick_out = PickByGlobalZone(element=237394)\n"
"# examine output\n"
"print 'value of p at global zone 237394: %g' % pick_out['p']\n"
"print 'local domain/zone: %d/%d' % (pick_out['domain_id'], pick_out['zone_id'])\n"
"# get last pick output as string\n"
"print 'Last pick = ', GetPickOutput()\n"
;
const char *visit_PickByNode_doc =
"PickByNode\n"
"-Performs pick operation for a specific node in a given domain.\n"
"\n"
"\n"
"Synopsis:\n"
"\n"
"PickByNode(node) -> integer\n"
"PickByNode(node, variables) -> integer\n"
"PickByNode(node, domain) -> integer\n"
"PickByNode(node, domain, variables) -> integer\n"
"PickByNode(namedarg1=arg1, namedarg2=arg2, ...) -> dictionary\n"
"\n"
"Required arguments:\n"
" domain (integer): domain id\n"
" element (integer): node id\n"
"\n"
"Arguments:\n"
"Optional named args:\n"
" vars (tuple of strings): variable names for which to return results\n"
" (default: currently plotted variable)\n"
"Time related arguments(optional):\n"
"\n"
"node\n"
"Integer index of the node for which we want pick information.\n"
"domain\n"
"An integer representing the index of the domain that contains the node for\n"
"which we want pick information. Note that if the first domain is\n"
"\"domain1\" then the first valid index is 1.\n"
"variables\n"
"A tuple of strings containing the names of the variables for which we want\n"
"pick information.\n"
" do_time (integer): 1 -> do a time pick, 0 (default) -> do not do a time pick\n"
" start_time (integer): Starting frame index (default: 0)\n"
" end_time (integer): Ending frame index (default: num_timestates - 1)\n"
" stride (integer): Stride for advancing in time (default: 1)\n"
" preserve_coord (integer): 0 -> used picked element (default), 1-> used picked coordinate\n"
" curve_plot_type (integer): 0 -> single Y axis (default), 1 -> multiple Y Axes\n"
"\n"
"\n"
"Returns:\n"
"\n"
"PickByNode returns 1 on success and 0 on failure.\n"
"PickByNode returns a python dictionary of the pick results, unless do_time is specified,\n"
"then a time curve is created in a new window.\n"
"If the picked variable is zone centered, the variable values are grouped according to\n"
"incident zone ids.\n"
"\n"
"\n"
"Description:\n"
......@@ -4902,47 +4935,53 @@ const char *visit_PickByNode_doc =
"\n"
"% visit -cli\n"
"OpenDatabase(\"/usr/gapps/visit/data/multi_curv2d.silo\")\n"
"AddPlot(\"Pseudocolor\", \"d\")\n"
"AddPlot(\"Pseudocolor\", \"u\")\n"
"DrawPlots()\n"
"\n"
"# Pick on node 200 in the first domain.\n"
"PickByNode(200)\n"
"# Pick on node 200 in the second domain.\n"
"PickByNode(200, 2)\n"
"pick_out = PickByNode(element=200, domain=1)\n"
"# examine output\n"
"print 'value of u at node 200: %g' % pick_out['u']\n"
"# Pick on node 100 in domain 5 and return information for two additional\n"
"variables.\n"
"PickByNode(100, 5, (\"default\", \"u\", \"v\"))\n"
"pick_out = PickByNode(domain=5, element=100, vars=(\"u\", \"v\", \"d\"))\n"
"# examine output\n"
"print 'incident zones for node 100: ', pick_out['incident_zones']\n"
"print 'value of d at incident zone %d: %g' % (pick_out['incident_zones'][0], pick_out['d'][str(pick_out['incident_zones'][0])])\n"
"# print results formatted as string\n"
"print \"Last pick = \", GetPickOutput()\n"
;
const char *visit_PickByZone_doc =
"PickByZone\n"
"-Performs pick operation for a specific cell in a given domain.\n"
"\n"
"\n"
"Synopsis:\n"
"\n"
"PickByZone(cell) -> integer\n"
"PickByZone(cell, variables) -> integer\n"
"PickByZone(cell, domain) -> integer\n"
"PickByZone(cell, domain, variables) -> integer\n"
"PickByZone(namedarg1=arg1, namedarg2=arg2, ...) -> dictionary\n"
"\n"
"Required arguments:\n"
" domain (integer): domain id\n"
" element (integer): zone id\n"
"\n"
"Arguments:\n"
"Optional named args:\n"
" vars (tuple of strings): variable names for which to return results.\n"
" (default: currently plotted variable)\n"
"\n"
"cell\n"
"Integer index of the cell for which we want pick information.\n"
"domain\n"
"An integer representing the index of the domain that contains the cell for\n"
"which we want pick information. Note that if the first domain is\n"
"\"domain1\" then the first valid index is 1.\n"
"variables\n"
"A tuple of strings containing the names of the variables for which we want\n"
"pick information.\n"
"Time related arguments(optional):\n"
" do_time (integer): 1 -> do a time pick, 0 (default) -> do not do a time pick\n"
" start_time (integer): Starting frame index (default: 0)\n"
" end_time (integer): Ending frame index (default: num_timestates - 1)\n"
" stride (integer): Stride for advancing in time (default: 1)\n"
" preserve_coord (integer): 0 -> used picked element (default), 1-> used picked coordinate\n"
" curve_plot_type (integer): 0 -> single Y axis (default), 1 -> multiple Y Axes\n"
"\n"
"\n"
"Returns:\n"
"\n"
"PickByZone returns 1 on success and 0 on failure.\n"
"PickByZone returns a python dictionary of the pick results, unless do_time is specified,\n"
"then a time curve is created in a new window.\n"
"If the picked variable is node centered, the variable values are grouped according to\n"
"incident node ids.\n"
"\n"
"\n"
"Description:\n"
......@@ -4962,13 +5001,17 @@ const char *visit_PickByZone_doc =
"AddPlot(\"Pseudocolor\", \"d\")\n"
"DrawPlots()\n"
"\n"
"# Pick on cell 200 in the first domain.\n"
"PickByZone(200)\n"
"# Pick on cell 200 in the second domain.\n"
"PickByZone(200, 2)\n"
"pick_out = PickByZone(element=200, domain=2)\n"
"# examine output\n"
"print 'value of d at zone 200: %g' % pick_out['d']\n"
"# Pick on cell 100 in domain 5 and return information for two additional\n"
"variables.\n"
"PickByZone(100, 5, (\"default\", \"u\", \"v\"))\n"
"pick_out = PickByZone(element=100, domain=5, vars=(\"d\", \"u\", \"v\"))\n"
"# examine output\n"
"print 'incident nodes for zone 100: ', pick_out['incident_nodes']\n"
"print 'values of u at incident zone %d: %g' % (pick_out['incident_nodes'][0], pick_out['u'][str(pick_out['incident_zones'][0])])\n"
"# print results formatted as string\n"
"print \"Last pick = \", GetPickOutput()\n"
"\n"
;
......@@ -6973,14 +7016,14 @@ const char *visit_SetPickAttributes_doc =
"AddPlot(\"Pseudocolor\", \"hgslice\")\n"
"DrawPlots()\n"
"\n"
"ZonePick((-5,5))\n"
"ZonePick(coord=(-5,5,0))\n"
"\n"
"p = GetPickAttributes()\n"
"p.showTimeStep = 0\n"
"p.showMeshName = 0\n"
"p.showZoneId = 0\n"
"SetPickAttributes(p)\n"
"ZonePick((0,5))\n"
"ZonePick(coord=(0,5,0))\n"
;
const char *visit_SetPipelineCachingMode_doc =
"SetPipelineCachingMode\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment